ChromaTranslator#

class langchain_community.query_constructors.chroma.ChromaTranslator[source]#

Translate Chroma internal query language elements to valid filters.

Attributes

allowed_comparators

Subset of allowed logical comparators.

allowed_operators

Subset of allowed logical operators.

Methods

__init__()

visit_comparison(comparison)

Translate a Comparison.

visit_operation(operation)

Translate an Operation.

visit_structured_query(structured_query)

Translate a StructuredQuery.

__init__()#
visit_comparison(comparison: Comparison) β†’ Dict[source]#

Translate a Comparison.

Parameters:

comparison (Comparison) – Comparison to translate.

Return type:

Dict

visit_operation(operation: Operation) β†’ Dict[source]#

Translate an Operation.

Parameters:

operation (Operation) – Operation to translate.

Return type:

Dict

visit_structured_query(structured_query: StructuredQuery) β†’ Tuple[str, dict][source]#

Translate a StructuredQuery.

Parameters:

structured_query (StructuredQuery) – StructuredQuery to translate.

Return type:

Tuple[str, dict]

Examples using ChromaTranslator