core[patch]: Fix aindex API (#25155)

A previous PR accidentally broke the aindex API by renaming a positional
argument vectorstore into vector_store. This PR reverts this change.
pull/25185/head
Eugene Yurtsev 1 month ago committed by GitHub
parent 15a36dd0a2
commit 425f6ffa5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -435,7 +435,7 @@ async def _to_async_iterator(iterator: Iterable[T]) -> AsyncIterator[T]:
async def aindex(
docs_source: Union[BaseLoader, Iterable[Document], AsyncIterator[Document]],
record_manager: RecordManager,
vectorstore: Union[VectorStore, DocumentIndex],
vector_store: Union[VectorStore, DocumentIndex],
*,
batch_size: int = 100,
cleanup: Literal["incremental", "full", None] = None,
@ -506,7 +506,7 @@ async def aindex(
if cleanup == "incremental" and source_id_key is None:
raise ValueError("Source id key is required when cleanup mode is incremental.")
destination = vectorstore # Renaming internally for clarity
destination = vector_store # Renaming internally for clarity
# If it's a vectorstore, let's check if it has the required methods.
if isinstance(destination, VectorStore):

Loading…
Cancel
Save