Comparison#

class langchain_core.structured_query.Comparison[source]#

Bases: FilterDirective

Comparison to a value.

Create a Comparison.

Parameters:
  • comparator – The comparator to use.

  • attribute – The attribute to compare.

  • value – The value to compare to.

param attribute: str [Required]#

The attribute to compare.

param comparator: Comparator [Required]#

The comparator to use.

param value: Any [Required]#

The value to compare to.

accept(visitor: Visitor) Any#

Accept a visitor.

Parameters:

visitor (Visitor) – visitor to accept.

Returns:

result of visiting.

Return type:

Any

Examples using Comparison