Replies: 1 comment 6 replies
-
The Here's an example of how to use it: from uuid import uuid4
from langchain_core.documents import Document
document_1 = Document(
page_content="I had chocolate chip pancakes and scrambled eggs for breakfast this morning.",
metadata={"source": "tweet"},
id=1,
)
# ... (other documents)
documents = [
document_1,
# ... (other documents)
]
uuids = [str(uuid4()) for _ in range(len(documents))]
vector_store.add_documents(documents=documents, ids=uuids) If you need to handle document chunks, you might want to use a |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
python
Description
I'd like to use vectorstore.add_documents. This expects chunks or a list of extracted pdf documents?
Previously I'm used the 'from_documents' method which is works with chunks
System Info
Package Information
Beta Was this translation helpful? Give feedback.
All reactions