Exposes Rockset's vector store/search functionality

Hierarchy

Constructors

Properties

FilterType: string
client: MainApi
collectionName: string
embeddingKey: string
textKey: string
workspaceName: string
filter?: string

Accessors

Methods

  • Adds vectors to the store given their corresponding Documents

    Parameters

    • vectors: number[][]

      The vectors to store

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

      The Documents they represent

    Returns Promise<undefined | string[]>

    The _id's of the added documents

  • Deletes the collection this RocksetStore uses

    Parameters

    • Optional waitUntilDeletion: boolean

      Whether to sleep until the collection is ready to be queried

    Returns Promise<void>

  • Parameters

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

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

  • Gets the most relevant documents to a query along with their similarity score. The returned documents are ordered by similarity (most similar at the first index)

    Parameters

    • query: number[]

      The embedded query to search the store by

    • k: number

      The number of documents to retreive

    • Optional filter: string

      The SQL WHERE clause to filter by

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

  • Parameters

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

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

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

    Parameters

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

    • List of documents selected by maximal marginal relevance.

Generated using TypeDoc