afrom_texts() — langchain Function Reference
Architecture documentation for the afrom_texts() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 755352fa_b98e_ac4a_7fcc_641f75863436["afrom_texts()"] 6c336ac6_f55c_1ad7_6db3_73dbd71fb625["VectorStore"] 755352fa_b98e_ac4a_7fcc_641f75863436 -->|defined in| 6c336ac6_f55c_1ad7_6db3_73dbd71fb625 4ed18cca_a7fc_92c8_c198_a06d26cd571b["afrom_documents()"] 4ed18cca_a7fc_92c8_c198_a06d26cd571b -->|calls| 755352fa_b98e_ac4a_7fcc_641f75863436 style 755352fa_b98e_ac4a_7fcc_641f75863436 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/vectorstores/base.py lines 871–896
async def afrom_texts(
cls,
texts: list[str],
embedding: Embeddings,
metadatas: list[dict] | None = None,
*,
ids: list[str] | None = None,
**kwargs: Any,
) -> Self:
"""Async return `VectorStore` initialized from texts and embeddings.
Args:
texts: Texts to add to the `VectorStore`.
embedding: Embedding function to use.
metadatas: Optional list of metadatas associated with the texts.
ids: Optional list of IDs associated with the texts.
**kwargs: Additional keyword arguments.
Returns:
`VectorStore` initialized from texts and embeddings.
"""
if ids is not None:
kwargs["ids"] = ids
return await run_in_executor(
None, cls.from_texts, texts, embedding, metadatas, **kwargs
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does afrom_texts() do?
afrom_texts() is a function in the langchain codebase, defined in libs/core/langchain_core/vectorstores/base.py.
Where is afrom_texts() defined?
afrom_texts() is defined in libs/core/langchain_core/vectorstores/base.py at line 871.
What calls afrom_texts()?
afrom_texts() is called by 1 function(s): afrom_documents.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free