Home / Function/ from_texts() — langchain Function Reference

from_texts() — langchain Function Reference

Architecture documentation for the from_texts() function in test_vectorstore.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  a4dd91a1_cd49_7327_2a4c_3a42aaf0fbda["from_texts()"]
  772c8084_cd97_39bb_e9dc_0664d06811a8["CustomAddDocumentsVectorstore"]
  a4dd91a1_cd49_7327_2a4c_3a42aaf0fbda -->|defined in| 772c8084_cd97_39bb_e9dc_0664d06811a8
  bc50d4b5_30d2_311f_4e38_2ece7c35a0f6["from_texts()"]
  bc50d4b5_30d2_311f_4e38_2ece7c35a0f6 -->|calls| a4dd91a1_cd49_7327_2a4c_3a42aaf0fbda
  bc50d4b5_30d2_311f_4e38_2ece7c35a0f6["from_texts()"]
  a4dd91a1_cd49_7327_2a4c_3a42aaf0fbda -->|calls| bc50d4b5_30d2_311f_4e38_2ece7c35a0f6
  ace26790_92a3_03c0_1017_6c319ca5f45a["add_texts()"]
  a4dd91a1_cd49_7327_2a4c_3a42aaf0fbda -->|calls| ace26790_92a3_03c0_1017_6c319ca5f45a
  style a4dd91a1_cd49_7327_2a4c_3a42aaf0fbda fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/vectorstores/test_vectorstore.py lines 103–112

    def from_texts(
        cls,
        texts: list[str],
        embedding: Embeddings,
        metadatas: list[dict] | None = None,
        **kwargs: Any,
    ) -> CustomAddDocumentsVectorstore:
        vectorstore = CustomAddDocumentsVectorstore()
        vectorstore.add_texts(texts, metadatas=metadatas, **kwargs)
        return vectorstore

Domain

Subdomains

Called By

Frequently Asked Questions

What does from_texts() do?
from_texts() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/vectorstores/test_vectorstore.py.
Where is from_texts() defined?
from_texts() is defined in libs/core/tests/unit_tests/vectorstores/test_vectorstore.py at line 103.
What does from_texts() call?
from_texts() calls 2 function(s): add_texts, from_texts.
What calls from_texts()?
from_texts() is called by 1 function(s): from_texts.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free