VectorStore.add_texts fails with iterator #26818
Labels
01 bug
Confirmed bug
Ɑ: core
Related to langchain-core
stale
Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Ɑ: vector store
Related to vector store module
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
AssertionError
Description
The
VectorStore.add_texts
type annotation fortext
isIterable[str]
. But passing an iterator rather than a sequence is like passing an empty list.langchain/libs/core/langchain_core/vectorstores/base.py
Lines 60 to 62 in 408a930
The fix is to replace
texts
withtexts_
on line 104:langchain/libs/core/langchain_core/vectorstores/base.py
Line 104 in 408a930
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: