langchain.js
    Preparing search index...

    ZepCloudVectorStore is a VectorStore implementation that uses the Zep long-term memory store as a backend.

    If the collection does not exist, it will be created automatically.

    Requires @getzep/zep-cloud to be installed:

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      Returns ZepCloudVectorStore

    Properties

    client: ZepClient

    The ZepClient instance used to interact with Zep's API.

    collectionName: string

    Methods

    • Parameters

      • query: string
      • k: number
      • Optionalfilter: Record<string, unknown>

      Returns Promise<[Document, number][]>

    • Returns string

    • Adds documents to the collection. The documents are first embedded into vectors using the provided embedding model.

      Parameters

      • documents: Document[]

        The documents to add.

      Returns Promise<string[]>

      • A promise that resolves with the UUIDs of the added documents.
    • Returns Promise<string[]>

    • Deletes documents from the collection.

      Parameters

      Returns Promise<void>

    • Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.

      Parameters

      • query: string

        Text to look up documents similar to.

      • options: MaxMarginalRelevanceSearchOptions<this["FilterType"]>
        • k

          Number of documents to return.

        • fetchK=20-

          Number of documents to fetch before passing to the MMR algorithm.

        • lambda=0.5

          Number between 0 and 1 that determines the degree of diversity among the results, where 0 corresponds to maximum diversity and 1 to minimum diversity.

        • filter

          Optional Zep JSONPath query to pre-filter on document metadata field

      Returns Promise<Document[]>

      • List of documents selected by maximal marginal relevance.
    • Performs a similarity search on the Zep collection.

      Parameters

      • query: string

        The query string to search for.

      • Optionalk: number = 4

        The number of results to return. Defaults to 4.

      • Optionalfilter: unknown = undefined

        An optional set of JSONPath filters to apply to the search.

      • Optional_callbacks: any = undefined

        Optional callbacks. Currently not implemented.

      Returns Promise<Document[]>

      • A promise that resolves to an array of Documents that are similar to the query.
    • Returns Promise<[Document, number][]>

    • Parameters

      • query: string
      • k: number = 4
      • filter: undefined | Record<string, unknown> = undefined
      • _callbacks: undefined = undefined

      Returns Promise<[Document, number][]>

    • Creates a new ZepVectorStore instance from an array of Documents. Each Document is added to a Zep collection.

      Parameters

      • docs: Document[]

        The Documents to add.

      • embeddings: EmbeddingsInterface

        Pass FakeEmbeddings, Zep Cloud will handle text embedding for you.

      • zepConfig: IZepCloudConfig

        The configuration object for the Zep API.

      Returns Promise<ZepCloudVectorStore>

      • A promise that resolves with the new ZepVectorStore instance.
    • Creates a new ZepVectorStore instance from an array of texts. Each text is converted into a Document and added to the collection.

      Parameters

      • texts: string[]

        The texts to convert into Documents.

      • metadatas: object | object[]

        The metadata to associate with each Document. If an array is provided, each element is associated with the corresponding Document. If an object is provided, it is associated with all Documents.

      • embeddings: EmbeddingsInterface

        Pass FakeEmbeddings, Zep Cloud will handle text embedding for you.

      • zepConfig: IZepCloudConfig

        The configuration object for the Zep API.

      Returns Promise<ZepCloudVectorStore>

      • A promise that resolves with the new ZepVectorStore instance.