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

initial implementation of Ollama LLM #276

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

ptgoetz
Copy link
Collaborator

@ptgoetz ptgoetz commented Apr 7, 2024

What?

Add an option to use Ollama LLMs for agents

New "Ollama" optyion:
Screenshot 2024-04-06 at 7 23 41 PM

Bot created with the Ollama LLM:
Screenshot 2024-04-06 at 7 24 04 PM

Test Llama2 LLM:
Screenshot 2024-04-06 at 7 59 21 PM

Test OpenChat LLM:
Screenshot 2024-04-06 at 8 26 10 PM

For now, it only supports one Ollama Model. Future Pull Requests will address this shortcoming.

Configuration is currently driven by environment variables:

 export OLLAMA_MODEL=openchat
 export OLLAMA_BASE_URL=http://localhost:11434/

I will follow up with PRs that model configuration multi-model, and more dynamic.

@mkorpela mkorpela merged commit ac607c9 into langchain-ai:main Apr 8, 2024
6 checks passed
@weipienlee
Copy link

weipienlee commented Apr 8, 2024

@mkorpela and @ptgoetz, it seems that the retrieval has been move from local postgres to Azure (and embedding model as well). I kind of like the idea to be able to run everything locally, is it not better to be able to choose? Furthermore, maybe not every user want to set up an Azure account and such.

@weipienlee
Copy link

weipienlee commented Apr 8, 2024

I misread the code, seems to choose the embedding model only. I have both OPENAI_API_KEY and AZURE_OPENAI_API_KEY in my environment so that I can choose the llm "supplier". In this case it will always choose the OpenAI embedding no matter what LLM I choose from OpenAI or Azure. Should the embedding model also be configurable? E.g.:

  • OLLAMA llm => ollama embedding
  • Azure llm => Azure embedding
  • else => OpenAI embedding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants