feat: Adding support for Ollama local api embeddings #1384
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the purpose of this pull request.
See title.
How to test
poetry run pytest -s tests/test_endpoints.py
Have you tested this PR?
Yes, but it does not work yet
Related issues or PRs
Addresses #1369
Is your PR over 500 lines of code?
No.
Additional context
Current issue: Unable to connect to
http://localhost:11434
when running indicated test.This issue occured both when using LLamaIndex's interface for creating an Ollama EmbeddingModel object, and when creating a vanilla EmbeddingModel object without LLamaIndex. Do I need to have something running at
http://localhost:11434
first?IMPORTANT
The test fails when run on a file I created called
ollama.json
. It is containted (locally) withinconfigs/embedding_model_configs/
, however this change did not get commited (and therefore pushed) for some reason.Here is the contents of
ollama.json