weaviate_agents.query.classes
- pydantic model weaviate_agents.query.classes.QueryAgentCollectionConfig[source]
Bases:
BaseModelA collection configuration for the QueryAgent.
- name
The name of the collection to query.
- tenant
Tenant name for collections with multi-tenancy enabled.
- view_properties
Optional list of property names the agent has the ability to view for this specific collection.
- target_vector
Optional target vector name(s) for collections with named vectors. Can be a single vector name or a list of vector names.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field name: str [Required]
- field target_vector: str | list[str] | None = None
- field tenant: str | None = None
- field view_properties: list[str] | None = None
- pydantic model weaviate_agents.query.classes.QueryAgentResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_answer: str | None = None
- field aggregations: list[list[AggregationResultWithCollection]] [Required]
- field collection_names: list[str] [Required]
- field final_answer: str [Required]
- field has_aggregation_answer: bool [Required]
- field has_search_answer: bool [Required]
- field is_partial_answer: bool [Required]
- field missing_information: list[str] [Required]
- field original_query: str [Required]
- field searches: list[list[QueryResultWithCollection]] [Required]
- field total_time: float [Required]
- pydantic model weaviate_agents.query.classes.Source[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field object_id: str [Required]
- class weaviate_agents.query.classes.ComparisonOperator(*values)[source]
Bases:
str,Enum- EQUALS = '='
- LESS_THAN = '<'
- GREATER_THAN = '>'
- LESS_EQUAL = '<='
- GREATER_EQUAL = '>='
- NOT_EQUALS = '!='
- LIKE = 'LIKE'
- CONTAINS_ANY = 'contains_any'
- CONTAINS_ALL = 'contains_all'
- pydantic model weaviate_agents.query.classes.IntegerPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter numeric properties using comparison operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.INTEGER] = KnownFilterType.INTEGER
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: float [Required]
- pydantic model weaviate_agents.query.classes.TextPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter text properties using equality or LIKE operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.TEXT] = KnownFilterType.TEXT
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: str [Required]
- pydantic model weaviate_agents.query.classes.BooleanPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter boolean properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.BOOLEAN] = KnownFilterType.BOOLEAN
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: bool [Required]
- pydantic model weaviate_agents.query.classes.QueryResult[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_operators: Literal['AND', 'OR'] [Required]
- field filters: list[list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | UnknownPropertyFilter]] = []
- field queries: list[str] [Required]
- class weaviate_agents.query.classes.NumericMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEAN = 'MEAN'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- SUM = 'SUM'
- TYPE = 'TYPE'
- class weaviate_agents.query.classes.TextMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- TYPE = 'TYPE'
- TOP_OCCURRENCES = 'TOP_OCCURRENCES'
- class weaviate_agents.query.classes.BooleanMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- TYPE = 'TYPE'
- TOTAL_TRUE = 'TOTAL_TRUE'
- TOTAL_FALSE = 'TOTAL_FALSE'
- PERCENTAGE_TRUE = 'PERCENTAGE_TRUE'
- PERCENTAGE_FALSE = 'PERCENTAGE_FALSE'
- pydantic model weaviate_agents.query.classes.IntegerPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate numeric properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.INTEGER] = KnownAggregationType.INTEGER
- field metrics: NumericMetrics [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.query.classes.TextPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate text properties using frequency analysis.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.TEXT] = KnownAggregationType.TEXT
- field metrics: TextMetrics [Required]
- field property_name: str [Required]
- field top_occurrences_limit: int | None = None
- pydantic model weaviate_agents.query.classes.BooleanPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate boolean properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.BOOLEAN] = KnownAggregationType.BOOLEAN
- field metrics: BooleanMetrics [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.query.classes.AggregationResult[source]
Bases:
BaseModelThe aggregations to be performed on a collection in a vector database.
They should be based on the original user query and can include multiple aggregations across different properties and metrics.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[IntegerPropertyAggregation | TextPropertyAggregation | BooleanPropertyAggregation | DatePropertyAggregation | UnknownPropertyAggregation] [Required]
- field filters: list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | UnknownPropertyFilter] = []
- field groupby_property: str | None = None
- field search_query: str | None = None
- pydantic model weaviate_agents.query.classes.Usage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field details: Dict[str, int] | Dict[str, str] | None = None
- field request_tokens: int | str | None = None
- field requests: int | str = 0
- field response_tokens: int | str | None = None
- field total_tokens: int | str | None = None
- pydantic model weaviate_agents.query.classes.AggregationResultWithCollection[source]
Bases:
AggregationResultCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[PropertyAggregation] [Required]
- field collection: str [Required]
- field filters: list[PropertyFilter] = []
- field groupby_property: str | None = None
- field search_query: str | None = None
- pydantic model weaviate_agents.query.classes.QueryResultWithCollection[source]
Bases:
QueryResultCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field filter_operators: Literal['AND', 'OR'] [Required]
- field filters: list[list[PropertyFilter]] = []
- field queries: list[str] [Required]
- pydantic model weaviate_agents.query.classes.BooleanArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter boolean-array properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.BOOLEAN_ARRAY] = KnownFilterType.BOOLEAN_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[bool] [Required]
- pydantic model weaviate_agents.query.classes.DateArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter datetime properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.DATE_ARRAY] = KnownFilterType.DATE_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[str] [Required]
- class weaviate_agents.query.classes.DateMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- pydantic model weaviate_agents.query.classes.DatePropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate datetime properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.DATE] = KnownAggregationType.DATE
- field metrics: DateMetrics [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.query.classes.DatePropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter datetime properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.DATE] = KnownFilterType.DATE
- field property_name: str [Required]
- field value: DateExact | DateRangeFrom | DateRangeTo | DateRangeBetween [Required]
- pydantic model weaviate_agents.query.classes.IntegerArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter numeric-array properties using comparison operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.INTEGER_ARRAY] = KnownFilterType.INTEGER_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[float] [Required]
- pydantic model weaviate_agents.query.classes.TextArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter text-array properties using equality or LIKE operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.TEXT_ARRAY] = KnownFilterType.TEXT_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[str] [Required]
- pydantic model weaviate_agents.query.classes.GeoPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter geo-coordinates properties.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.GEO] = KnownFilterType.GEO
- field latitude: float [Required]
- field longitude: float [Required]
- field max_distance_meters: float [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.query.classes.UnknownPropertyAggregation[source]
Bases:
BaseModelCatch-all aggregation for unknown aggregation types, to preserve future back-compatibility.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: None [Required]
- Validated by:
ensure_filter_type_unknown
- pydantic model weaviate_agents.query.classes.UnknownPropertyFilter[source]
Bases:
BaseModelCatch-all filter for unknown filter types, to preserve future back-compatibility.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: None [Required]
- Validated by:
ensure_filter_type_unknown