Replies: 1 comment
-
Hey there, @oubeichen! I'm here to help you with any bugs, questions, or if you'd like to become a contributor. Let's tackle this issue together! The For example, in the async def adelete(
self, ids: Optional[List[str]] = None, **kwargs: Any
) -> Optional[bool]:
"""Delete by vector IDs.
Args:
ids: List of ids to delete.
Returns:
Optional[bool]: True if deletion is successful,
False otherwise, None if not implemented.
"""
if ids is None:
raise ValueError("No ids provided to delete.")
for document_id in ids:
await self.adelete_by_document_id(document_id)
return True This method allows for asynchronous deletion of documents by their IDs, leveraging concurrency to handle multiple delete requests efficiently. The use of asynchronous operations ensures that the deletion process does not block the main execution thread, thus maintaining the application's performance and responsiveness [1]. Your workaround of creating a subclass ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I'm using LangChain's built-in
aindex
to create document indexes. However, mostVectorStore
implementations in LangChain (such asChroma
) do not override theadelete
method, instead relying on the default method from the parent class, which is actually functional. But at this line:langchain/libs/core/langchain_core/indexing/api.py
Line 523 in f679ed7
There's a strict requirement that the method needs to be overridden. Could you explain why this is necessary?
Currently, my workaround is to create a new class that inherits from
Chroma
and implements theadelete
method:System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
Beta Was this translation helpful? Give feedback.
All reactions