Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent with Ollama can't find OllamaLanguageModelInstruction api. #365

Closed
acer1204 opened this issue Jul 1, 2024 · 3 comments
Closed

Agent with Ollama can't find OllamaLanguageModelInstruction api. #365

acer1204 opened this issue Jul 1, 2024 · 3 comments
Labels
bug Something isn't working providers

Comments

@acer1204
Copy link

acer1204 commented Jul 1, 2024

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

@acer1204 acer1204 added the bug Something isn't working label Jul 1, 2024
@quannv108
Copy link

quannv108 commented Aug 8, 2024

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
Copy link
Contributor

HavenDV commented Aug 8, 2024

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

@HavenDV
Copy link
Contributor

HavenDV commented Aug 27, 2024

@HavenDV HavenDV closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working providers
Projects
None yet
Development

No branches or pull requests

3 participants