You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @KevinZJN! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
I found a similar issue that was addressed in the LangChain.js repository. The issue titled "MemoryVectorStore does not support Document id property" was closed with a pull request that added support for storing and retrieving the Document ID field in the MemoryVectorStore [1].
For the Chroma vector store, the addVectors method already generates UUIDs for document IDs if they are not provided, ensuring that IDs are assigned to documents [2]. The fix you mentioned for the Chroma vector store involves modifying the code to include the id when creating a new Document instance during the similarity search. This ensures that the document ID is retained and accessible in the search results.
To apply a similar solution to other vector stores, you would need to ensure that the document ID is included when creating Document instances in their respective methods for adding documents and performing similarity searches. This might involve modifying the code to handle IDs similarly to how it's done in the Chroma vector store.
I've been scratching my head trying to figure out why documents all said id: undefined despite following the guide. I need it to be able to delete the document. I hope this gets fixed soon.
Checked other resources
Example Code
Example code:
Error Message and Stack Trace (if applicable)
Description
The same issue as shown in Python.
There is already pull request here that fixes one of the vector. But the issue occurs in other vectorstores.
Example code fix in Chroma db
libs/langchain-community/src/vectorstores/chroma.ts line:351
:to
If it's possible we would like to perform same solution to other vectorstores.
System Info
The text was updated successfully, but these errors were encountered: