Interface VectorStoreInterface

Hierarchy

Implemented by

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

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

Generated using TypeDoc