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

FilterType: string | object
embeddings: Embeddings

Methods

  • Parameters

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

    Returns Promise<void | string[]>

  • Parameters

    • vectors: number[][]
    • documents: Document<Record<string, any>>[]
    • Optional options: AddDocumentOptions

    Returns Promise<void | string[]>

  • Parameters

    • Optional _params: Record<string, any>

    Returns Promise<void>

  • Parameters

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

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

  • Parameters

    • query: number[]
    • k: number
    • Optional filter: string | object

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

  • Parameters

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

    Returns Promise<[Document<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<Document<Record<string, any>>[]>

    • List of documents selected by maximal marginal relevance.
  • Parameters

    • _docs: Document<Record<string, any>>[]
    • _embeddings: Embeddings
    • _dbConfig: Record<string, any>

    Returns Promise<VectorStore>

  • Parameters

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

    Returns Promise<VectorStore>

Generated using TypeDoc