-
Notifications
You must be signed in to change notification settings - Fork 38
INTPYTHON-832 Add search_by_vector method to VectorStore #266
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
Conversation
|
Hi @barnuri, thanks again for this PR! Can you please add a test for this new method to https://github.com/langchain-ai/langchain-mongodb/blob/main/libs/langchain-mongodb/tests/integration_tests/test_vectorstore_from_texts.py? |
|
Hi @barnuri. Just curious. Even though |
we have a logic that already have the vector, and tried multiple searches, so embedded it every time instead of passing the vector its a waste |
|
@blink1073 @caseyclements any update ? |
Co-authored-by: barnuri <13019522+barnuri@users.noreply.github.com>
[WIP] Add docstring as suggested in review for patch 1
|
Type checker errors: langchain_mongodb/vectorstores.py:874: error: Signature of "similarity_search_by_vector" incompatible with supertype "langchain_core.vectorstores.base.VectorStore" [override]
langchain_mongodb/vectorstores.py:874: note: Superclass:
langchain_mongodb/vectorstores.py:874: note: def similarity_search_by_vector(self, embedding: list[float], k: int = ..., **kwargs: Any) -> list[Document]
langchain_mongodb/vectorstores.py:874: note: Subclass:
langchain_mongodb/vectorstores.py:874: note: def similarity_search_by_vector(self, query_vector: list[float], *args: Any, **kwargs: Any) -> list[Document]
langchain_mongodb/vectorstores.py:900: error: "MongoDBAtlasVectorSearch" has no attribute "vector_store" [attr-defined]
Installing missing stub packages: |
|
I'd suggest aligning with the superclass signature |
Co-authored-by: barnuri <13019522+barnuri@users.noreply.github.com>
[WIP] Fix issue in patch 1
fixed |
blink1073
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.
LGTM, thanks again!
|
We're planning to wait until next week for the 0.9 release, since it is a holiday week for us. |
This pull request adds a new method to the
VectorStoreclass invectorstores.py, enhancing its functionality to support similarity search directly by vector input.New functionality:
similarity_search_by_vectormethod to theVectorStoreclass, allowing users to perform similarity searches using a query vector and returning relevant documents.