-
Notifications
You must be signed in to change notification settings - Fork 2k
[DOC] In gemini example, correct embedding function name #5978
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
base: main
Are you sure you want to change the base?
[DOC] In gemini example, correct embedding function name #5978
Conversation
The gemini example used invalid capitalization for the embedding function, resulting in an error. Correcting to use the expected function name. Change embedding_functions.GoogleGenerativeAIEmbeddingFunction to embedding_functions.GoogleGenerativeAiEmbeddingFunction
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Fix Gemini example embedding setup and batching logic The PR updates Key Changes• Replace Affected Areas• examples/gemini/load_data.py This summary was automatically generated by @propel-code-bot |
philipithomas
left a comment
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.
Thank you for this fix!
|
The first iteration of this PR addresses a clear function name syntax error. Further changes needed though to address logic as well as Gemini model changes. Awaiting quota reset for further testing. |
* Revise ids list to align with documents and metadatas lists * Specify model_name='gemini-embedding-001' for embedding function. * Fix to logic for continuing document upload if collections not empty. * Revise batch_size to work with Free Tier. TODO: Consider changing the defaults in the embedding_function classes.
Head branch was pushed to by a user without write access
|
Revised collections.add() logic in load_data.py to work with non-empty collection. Loading documents now able to be properly tested. Awaiting quota reset for query testing. |
* Align the embedding function model in main.py to match the same embedding function model used in load_data.py. * Remove the task_type to use the default.
|
After the latest modification to Full testing of example script execution now succeeds. |
|
As the scope increased to address logic and the embedding model, should the title be revised? |
Description of changes
The gemini example uses invalid capitalization for the embedding function, resulting in an error. Correcting to use the current function name.
In examples/gemini/ for load_data.py and main.py:
Change
embedding_functions.GoogleGenerativeAIEmbeddingFunctionto
embedding_functions.GoogleGenerativeAiEmbeddingFunctionFixes: #5977
Test plan
As described in README.md, execute the standard steps:
All should now execute properly.
Migration plan
N/A
Observability plan
N/A
Documentation Changes
None