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

Hierarchy

  • VectorStore
    • SingleStoreVectorStore

Constructors

Properties

connectionPool: Pool
contentColumnName: string
distanceMetric: DistanceMetrics
metadataColumnName: string
tableName: string
vectorColumnName: string

Methods

  • Adds new vectors to the SingleStoreDB database.

    Parameters

    • vectors: number[][]

      An array of vectors.

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

      An array of Document objects.

    Returns Promise<void>

  • 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

Generated using TypeDoc