-
-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weaviate: allow embedder override in vectorstores options
The changes allow the embedder to be overridden in the vectorstores options. This is done by changing the embedder calls in `AddDocuments` and `SimilaritySearch` functions to use the embedder from the options instead of the store. The default embedder is still the one from the store, but it can be overwritten by passing a `vectorstores.WithEmbedder` option. A new test case 'TestWeaviateWithOptionEmbedder' is added to ensure that the embedder provided as an option to either `AddDocuments` or `SimilaritySearch` takes precedence over the one provided when creating the Store. This change provides more flexibility in choosing the embedder at runtime, which can be useful in scenarios where the same store is used with different embedders.
- Loading branch information
Showing
2 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters