Home / Function/ from_texts() — langchain Function Reference

from_texts() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  1275ad38_2c4d_4707_9d04_5354d575598f["from_texts()"]
  2b1e88c6_438d_574a_4554_475753fefd62["DummyVectorStore"]
  1275ad38_2c4d_4707_9d04_5354d575598f -->|defined in| 2b1e88c6_438d_574a_4554_475753fefd62
  4b29c817_c0a5_67c5_5395_3031dc0730de["add_texts()"]
  1275ad38_2c4d_4707_9d04_5354d575598f -->|calls| 4b29c817_c0a5_67c5_5395_3031dc0730de
  style 1275ad38_2c4d_4707_9d04_5354d575598f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/example_selectors/test_similarity.py lines 65–75

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

Domain

Subdomains

Calls

Frequently Asked Questions

What does from_texts() do?
from_texts() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/example_selectors/test_similarity.py.
Where is from_texts() defined?
from_texts() is defined in libs/core/tests/unit_tests/example_selectors/test_similarity.py at line 65.
What does from_texts() call?
from_texts() calls 1 function(s): add_texts.

Analyze Your Own Codebase

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

Try Supermodel Free