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

Add OllamaInterface #4

Merged
merged 3 commits into from
Jul 3, 2024
Merged

Add OllamaInterface #4

merged 3 commits into from
Jul 3, 2024

Conversation

standsleeping
Copy link
Collaborator

This branch adds support for Ollama via the Ollama Python Library.

I mostly followed the aimodels.ipynb as an implementation guide, but with a few adjustments:

  1. Allow the user to specify the host URL for their Ollama server, and fall back to localhost:11434 (Ollama's default).
  2. Catch ConnectError from the underlying httpx library used by the Ollama client, and raise a RuntimeError with a helpful error message that guides the user to start their Ollama server.

I also renamed the test_anthropic.ipynb notebook in the examples folder to a more general multi_fm_client.ipynb and added an Ollama example in a new cell beneath the Anthropic example. My assumption here is that we won't want to be adding a new notebook for each and every provider as we expand.

@standsleeping standsleeping requested a review from ksolo July 3, 2024 19:21
pyproject.toml Outdated Show resolved Hide resolved
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.

2 participants