Abstract class extending VectorStore with functionality for saving and loading the vector store.

Hierarchy

Constructors

Properties

FilterType: string | object

Methods

  • Parameters

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

    Returns Promise<void | string[]>

  • Parameters

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

    Returns Promise<void | string[]>

  • Parameters

    • Optional _params: Record<string, any>

    Returns Promise<void>

  • Parameters

    • directory: string

    Returns Promise<void>

  • Parameters

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

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

  • Parameters

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

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

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

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

    Returns Promise<VectorStore>

Generated using TypeDoc