Agent with Ollama can't find OllamaLanguageModelInstruction api.
Closed this issue · 3 comments
acer1204 commented
Describe the bug
after install this two package
1.LangChain.Core
2.LangChain.Providers.Ollama
copy the example code for ollama, but it's show OllamaLanguageModelInstruction and OllamaLanguageModelOptions not found.
Steps to reproduce the bug
1.install LangChain.Core
2.LangChain.Providers.Ollama
3.copy agent example for ollama
Expected behavior
it's can run
Screenshots
No response
NuGet package version
LangChain v0.15.0
LangChain.Core v0.15.0
LangChain.Providers.Ollama v0.15.0
Additional context
No response
quannv108 commented
Try use this
var provider = new OllamaProvider(
"http://localhost:11434",
options: new RequestOptions
{
Temperature = 0,
Stop = new[] { "Observation", "[END]" }, // add injection word `Observation` and `[END]` to stop the model(just as additional safety feature)
});
var model = new OllamaChatModel(provider, id: "llama3").UseConsoleForDebug();
look like the wiki page is outdate and need to be update
HavenDV commented
Yes, it's best to use these tests as an example, we are in the process of migrating documentation from wiki to mkdocs
https://github.com/tryAGI/LangChain/blob/main/src/Meta/test/WikiTests.AgentWithOllama.cs