Exposes Rockset's vector store/search functionality

Hierarchy (view full)

Constructors

Properties

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

Accessors

Methods

  • Embeds and adds Documents to the store.

    Parameters

    • documents: Document[]

      The documents to store

    Returns Promise<undefined | string[]>

    The _id's of the documents added

  • Adds vectors to the store given their corresponding Documents

    Parameters

    • vectors: number[][]

      The vectors to store

    • documents: Document[]

      The Documents they represent

    Returns Promise<undefined | string[]>

    The _id's of the added documents

  • Deletes the collection this RocksetStore uses

    Parameters

    • OptionalwaitUntilDeletion: boolean

      Whether to sleep until the collection is ready to be queried

    Returns Promise<void>

  • 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

    • Optionalfilter: string

      The SQL WHERE clause to filter by

    Returns Promise<[Document, number][]>

  • Constructs and returns a RocksetStore object given texts to store.

    Parameters

    • texts: string[]

      The texts to store

    • metadatas: object | object[]

      The metadatas that correspond to

    • embeddings: EmbeddingsInterface

      The object used to embed queries and page content

    • dbConfig: RocksetLibArgs

      The options to be passed into the RocksetStore constructor

    Returns Promise<RocksetStore>

""