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.
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: add support for openai embedding #23
feat: add support for openai embedding #23
Changes from all commits
4198c1c
7fe0468
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
💡 Codebase verification
Inconsistent
persist_directory
Assignments DetectedThe following instances set
persist_directory
to values other thanself.settings.chromadb_url
:backend/app/vectorstore/chroma.py: _client_settings.persist_directory = persist_path
backend/app/vectorstore/chroma.py: self._persist_directory = _client_settings.persist_directory
Please ensure that all assignments to
persist_directory
useself.settings.chromadb_url
to maintain configuration consistency.🔗 Analysis chain
Persistence directory now set from settings.
The use of
self.settings.chromadb_url
for setting the persistence directory ensures consistency with the new configuration approach.Verify that this change doesn't break existing implementations:
If the script returns results, consider updating those occurrences to use the new settings approach.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 361
Script:
Length of output: 116
Script:
Length of output: 474
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.
Improved document addition with OpenAI embedding support and better logging.
The changes to the
add_docs
method enhance its functionality by supporting OpenAI embeddings and improving logging. The addition of thebatch_size
parameter increases flexibility.The current implementation doesn't handle the case where both
batch_size
andself._batch_size
areNone
. Consider adding a default value:To improve readability and maintainability, consider extracting the document addition logic into separate methods:
This refactoring improves the readability and maintainability of the
add_docs
method.Also applies to: 85-85, 101-124