langchain.retrievers.self_query.qdrant
.QdrantTranslator¶
- class langchain.retrievers.self_query.qdrant.QdrantTranslator(metadata_key: str)[source]¶
Translate Qdrant internal query language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical operators.
Methods
__init__
(metadata_key)visit_comparison
(comparison)Translate a Comparison.
visit_operation
(operation)Translate an Operation.
visit_structured_query
(structured_query)Translate a StructuredQuery.
- Parameters
metadata_key (str) –
- visit_comparison(comparison: Comparison) rest.FieldCondition [source]¶
Translate a Comparison.
- Parameters
comparison (Comparison) –
- Return type
rest.FieldCondition
- visit_operation(operation: Operation) rest.Filter [source]¶
Translate an Operation.
- Parameters
operation (Operation) –
- Return type
rest.Filter
- visit_structured_query(structured_query: StructuredQuery) Tuple[str, dict] [source]¶
Translate a StructuredQuery.
- Parameters
structured_query (StructuredQuery) –
- Return type
Tuple[str, dict]