-
Notifications
You must be signed in to change notification settings - Fork 845
add embedder tests #430
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 embedder tests #430
Conversation
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.
Important
Looks good to me! 👍
Reviewed everything up to c7af153 in 1 minute and 34 seconds. Click for details.
- Reviewed
439
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
10
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. tests/embedder/embedder_fixtures.py:18
- Draft comment:
The create_embedding_values function is clear and idiomatic. Consider adding a type hint for 'dimension' if desired, but it's acceptable. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold80%
None
2. tests/embedder/test_gemini.py:31
- Draft comment:
The helper create_gemini_embedding is clear; no changes required. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold80%
None
3. tests/embedder/test_openai.py:31
- Draft comment:
The create_openai_embedding function and slicing for embedding dimensions are clear and correctly implemented. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold80%
None
4. tests/embedder/test_voyage.py:88
- Draft comment:
Converting embedding values to float in expected results is clear; no issues found. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold80%
None
5. tests/embedder/embedder_fixtures.py:18
- Draft comment:
Optional: Consider using 'List[float]' from the typing module for clearer type annotations if you need compatibility with older Python versions. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold80%
None
6. tests/embedder/test_gemini.py:61
- Draft comment:
Ensure the patch target 'google.genai.Client' is correct and up-to-date with the actual module structure. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold80%
None
7. tests/embedder/test_openai.py:61
- Draft comment:
Verify that the patch target 'openai.AsyncOpenAI' correctly reflects how the OpenAI client is imported and used in OpenAIEmbedder. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold80%
None
8. tests/embedder/test_voyage.py:54
- Draft comment:
Confirm that 'voyageai.AsyncClient' is the correct patch target for the VoyageAI client. Adjust if the client’s import path ever changes. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold80%
None
9. tests/embedder/test_voyage.py:88
- Draft comment:
The explicit conversion to float in the expected result may be redundant if the embedding values are already floats; consider adding a comment if this conversion is intentional. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold80%
None
10. tests/embedder/test_gemini.py:30
- Draft comment:
Consider parameterizing similar test cases across embedder implementations to reduce duplication in test logic (optional). - Reason this comment was not posted:
Confidence changes required:33%
<= threshold80%
None
Workflow ID: wflow_V6wkOa7Fdml2KcX3
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Partially addresses issue #375 |
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.
Great work!
Add Tests for Embedder Implementations
Changes
Technical Details
embedder_fixtures.py
: Utility function for creating mock embedding valuestest_openai.py
: Tests for OpenAI embeddertest_gemini.py
: Tests for Gemini embeddertest_voyage.py
: Tests for VoyageAI embedderI have read the CLA Document and I hereby sign the CLA
Important
Add tests for OpenAI, Gemini, and VoyageAI embedders, including single and batch operations, with mock API interactions.
test_openai.py
,test_gemini.py
,test_voyage.py
for OpenAI, Gemini, and VoyageAI embedders.embedder_fixtures.py
for creating mock embedding values.create_embedding_values()
for generating mock data.This description was created by
for c7af153. You can customize this summary. It will automatically update as commits are pushed.