-
Notifications
You must be signed in to change notification settings - Fork 127
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
feat: OllamaDocumentEmbedder
- allow batching embeddings
#1224
Conversation
@latifboubyan thanks for your contribution! can you update the docstring of the |
] | ||
reply = embedder.run(list_of_docs) | ||
assert isinstance(reply, dict) | ||
assert all(isinstance(element, float) for element in reply["documents"][0].embedding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems you are only checking if the first document was embedded - can you make sure are asserting that all the 3 documents have an embedding?
overall, looks good to me, I've left too minor comments though - I will also ask @anakin87 to have a quick look |
OllamaDocumentEmbedder
- allow batching embeddings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I pushed some minor refinements.
Proposed Changes:
Use Ollama's batch embedding
How did you test it?
Manual verification as well as adding a unit test.
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.