Comparison#

class langchain_core.structured_query.Comparison[source]#

Bases: FilterDirective

Comparison to a value.

Parameters:
  • comparator – The comparator to use.

  • attribute – The attribute to compare.

  • value – The value to compare to.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param attribute: str [Required]#
param comparator: Comparator [Required]#
param value: Any = None#
accept(visitor: Visitor) Any#

Accept a visitor.

Parameters:

visitor (Visitor) – visitor to accept.

Returns:

result of visiting.

Return type:

Any

Examples using Comparison