A vector store that uses the Momento Vector Index.

Remarks

To sign up for a free Momento account, visit https://console.gomomento.com.

Hierarchy

Constructors

Properties

FilterType: string | object

Methods

  • Adds vectors to the index. Generates embeddings from the documents using the Embeddings instance passed to the constructor.

    Parameters

    • documents: Document<Record<string, any>>[]

      Array of Document instances to be added to the index.

    • Optional documentProps: DocumentProps

    Returns Promise<void>

    Promise that resolves when the documents have been added to the index.

  • Adds vectors to the index.

    Parameters

    • vectors: number[][]

      The vectors to add to the index.

    • documents: Document<Record<string, any>>[]

      The documents to add to the index.

    • Optional documentProps: DocumentProps

      The properties of the documents to add to the index, specifically the ids.

    Returns Promise<void | string[]>

    Promise that resolves when the vectors have been added to the index. Also returns the ids of the documents that were added.

    Remarks

    If the index does not already exist, it will be created if ensureIndexExists is true.

  • Parameters

    • query: string
    • Optional k: number
    • Optional filter: string | object
    • Optional _callbacks: Callbacks

    Returns Promise<DocumentInterface<Record<string, any>>[]>

  • Parameters

    • query: string
    • Optional k: number
    • Optional filter: string | object
    • Optional _callbacks: Callbacks

    Returns Promise<[DocumentInterface<Record<string, any>>, number][]>

Generated using TypeDoc