langchain.js
    Preparing search index...

    Class for storing and retrieving documents in memory synchronously.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • Optionaldocs: Map<string, Document>

      Returns SynchronousInMemoryDocstore

    Properties

    _docs: Map<string, Document>

    Methods

    • Adds new documents to the store.

      Parameters

      • texts: Record<string, BaseMessage>

        An object where the keys are document IDs and the values are the documents themselves.

      Returns void

      Void

    • Searches for a document in the store based on its ID.

      Parameters

      • search: string

        The ID of the document to search for.

      Returns Document

      The document with the given ID.