Class for interacting with a Supabase database to store and manage vectors.

Hierarchy

Constructors

Properties

client: default<any, "public", any>
embeddings: Embeddings
queryName: string
tableName: string
upsertBatchSize: number = 500

Methods

  • Adds documents to the vector store.

    Parameters

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

      The documents to add.

    • Optional options: {
          ids?: string[] | number[];
      }

      Optional parameters for adding the documents.

      • Optional ids?: string[] | number[]

    Returns Promise<string[]>

    A promise that resolves when the documents have been added.

  • Adds vectors to the vector store.

    Parameters

    • vectors: number[][]

      The vectors to add.

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

      The documents associated with the vectors.

    • Optional options: {
          ids?: string[] | number[];
      }

      Optional parameters for adding the vectors.

      • Optional ids?: string[] | number[]

    Returns Promise<string[]>

    A promise that resolves with the IDs of the added vectors when the vectors have been added.

Generated using TypeDoc