LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-corevectorstoresbaseVectorStoreadd_texts
    Method●Since v0.2

    add_texts

    Run more texts through the embeddings and add to the VectorStore.

    Copy
    add_texts(
      self,
      texts: Iterable[str],
      metadatas: list[dict] | None = None,
      *,
      ids: list[str] | None = None,
      **kwargs: Any = {}
    ) -> list[str]

    Parameters

    NameTypeDescription
    texts*Iterable[str]

    Iterable of strings to add to the VectorStore.

    metadataslist[dict] | None
    Default:None

    Optional list of metadatas associated with the texts.

    idslist[str] | None
    Default:None

    Optional list of IDs associated with the texts.

    **kwargsAny
    Default:{}

    VectorStore specific parameters.

    One of the kwargs should be ids which is a list of ids associated with the texts.

    View source on GitHub