Abstract class representing a store of vectors. Provides methods for adding vectors and documents, deleting from the store, and searching the store.

Hierarchy

Constructors

Properties

batchSize: number = 3000
caller: AsyncCaller
apiKey: string
apiUrl: string = "https://api.turbopuffer.com/v1"
distanceMetric: TurbopufferDistanceMetric = "cosine_distance"
namespace: string = "default"

Methods

  • Parameters

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

  • Parameters

    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.
  • Parameters

    • _texts: string[]
    • _metadatas: object | object[]
    • _embeddings: EmbeddingsInterface
    • _dbConfig: Record<string, any>

    Returns Promise<VectorStore>

Generated using TypeDoc