langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
84.83k stars 13.11k forks source link

[add] upsert texts to the Milvus vectorstore #20976

Closed rgupta2508 closed 5 days ago

rgupta2508 commented 2 weeks ago

Upsert texts to the Milvus vectorstore. This is based on upsert data based on add_text functionality In case metadata need to upsert in milvus, Metadata keys will need to be present for all inserted values. At the moment there is no None equivalent in Milvus.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2024 9:54am
rgupta2508 commented 1 week ago

@baskaryan Please review

rgupta2508 commented 1 week ago

@ccurme Can you please review this as well.

upsert same thing which provided in add_text method

Thanks

ccurme commented 1 week ago

@rgupta2508 can you clarify, are these two equivalent?

milvus.upsert_texts(texts, metadatas=metadatas)

and

from langchain_core.documents import Document

documents = [Document(text, metadata=metadata) for text, metadata in zip(texts, metadatas)]
milvus.upsert(documents=documents)

i.e., is this a convenience method, or is there missing functionality?

rgupta2508 commented 5 days ago

@rgupta2508 can you clarify, are these two equivalent?

milvus.upsert_texts(texts, metadatas=metadatas)

and

from langchain_core.documents import Document

documents = [Document(text, metadata=metadata) for text, metadata in zip(texts, metadatas)]
milvus.upsert(documents=documents)

i.e., is this a convenience method, or is there missing functionality?

Ohh got it, thanks for clarification.

Closing this PR