mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-11 22:04:37 +00:00
Fix async indexing issue
`aindex` function should check not only `adelete` method, but `delete` method too
This commit is contained in:
parent
4ff576e37d
commit
24eb244ffb
@ -647,10 +647,10 @@ async def aindex(
|
|||||||
)
|
)
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
if type(destination).adelete == VectorStore.adelete:
|
if type(destination).adelete == VectorStore.adelete and type(destination).delete == VectorStore.delete:
|
||||||
# Checking if the vectorstore has overridden the default delete method
|
# Checking if the vectorstore has overridden the default adelete or delete methods
|
||||||
# implementation which just raises a NotImplementedError
|
# implementation which just raises a NotImplementedError
|
||||||
msg = "Vectorstore has not implemented the delete method"
|
msg = "Vectorstore has not implemented the adelete or delete method"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
elif isinstance(destination, DocumentIndex):
|
elif isinstance(destination, DocumentIndex):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user