Abstract class that provides a blueprint for creating specific translator classes. Defines two abstract methods: formatFunction and mergeFilters.

Type Parameters

  • T extends VectorStore

Hierarchy (view full)

Constructors

Properties

VisitComparisonOutput: String
VisitOperationOutput: String
VisitStructuredQueryOutput: {
    filter?: T["FilterType"];
}
allowedComparators: Comparator[] = ...
allowedOperators: Operator[] = ...

Methods

  • Merges two filters into one, using a specified merge type.

    Parameters

    • defaultFilter: any

      The default filter.

    • generatedFilter: any

      The generated filter.

    • mergeType: string = "and"

      The type of merge to perform. Can be 'and', 'or', or 'replace'.

    • forceDefaultFilter: boolean = false

      If true, the default filter will be used even if the generated filter is not empty.

    Returns any

    The merged filter, or undefined if both filters are empty.