Class for interacting with SingleStoreDB, a high-performance distributed SQL database. It provides vector storage and vector functions.

Hierarchy

Constructors

Properties

FilterType: string | object
connectionPool: Pool
contentColumnName: string
distanceMetric: DistanceMetrics
metadataColumnName: string
tableName: string
vectorColumnName: string

Methods

  • Parameters

    • Optional _params: Record<string, any>

    Returns Promise<void>

  • Parameters

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

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

  • Performs a similarity search on the vectors stored in the SingleStoreDB database.

    Parameters

    • query: number[]

      An array of numbers representing the query vector.

    • k: number

      The number of nearest neighbors to return.

    • Optional filter: Metadata

      Optional metadata to filter the vectors by.

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

    Top matching vectors with score

  • Parameters

    • query: string
    • Optional k: number
    • Optional filter: string | object
    • 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