-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commnity[patch]: refactor code for faiss vectorstore, update faiss ve…
…ctorstore documentation (#18092) **Description:** Refactor code of FAISS vectorcstore and update the related documentation. Details: - replace `.format()` with f-strings for strings formatting; - refactor definition of a filtering function to make code more readable and more flexible; - slightly improve efficiency of `max_marginal_relevance_search_with_score_by_vector` method by removing unnecessary looping over the same elements; - slightly improve efficiency of `delete` method by using set data structure for checking if the element was already deleted; **Issue:** fix small inconsistency in the documentation (the old example was incorrect and unappliable to faiss vectorstore) **Dependencies:** basic langchain-community dependencies and `faiss` (for CPU or for GPU) **Twitter handle:** antonenkodev
- Loading branch information
1 parent
acf1ecc
commit 0bec1f6
Showing
2 changed files
with
91 additions
and
121 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
Oops, something went wrong.