Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Langchain (Python)
add_documents( documents: List[Document], ids: Optional[List[str]] = None, **kwargs ) -> List[str]
documents
List[Document]
ids
Optional[List[str]]
**kwargs
Any
List[str]
from langchain_core.documents import Document # Create documents with metadata documents = [ Document( page_content="Introduction to machine learning", metadata={"chapter": 1, "topic": "ML basics"} ), Document( page_content="Deep learning fundamentals", metadata={"chapter": 2, "topic": "Neural networks"} ) ] # Add documents to the store ids = store.add_documents(documents) print(f"Added {len(ids)} documents")
Was this page helpful?
Contact support