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.
- additional_filters
Optional filters to apply when the query is executed, in addition to filters selected by the Query Agent (i.e., there are AND combined).
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 additional_filters: Annotated[_Filters, PlainSerializer(func=serialise_filter, return_type=PydanticUndefined, when_used=always)] | None = None
- 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 aggregations: list[list[AggregationResultWithCollection]] [Required]
- field collection_names: list[str] [Required]
- field final_answer: str [Required]
- field is_partial_answer: bool [Required]
- field missing_information: list[str] [Required]
- field original_query: str [Required]
- field output_type: Literal['final_state'] = 'final_state'
- 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[PropertyFilter]] = []
- field queries: list[str | None] [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[PropertyAggregation] [Required]
- field filters: list[PropertyFilter] = []
- 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 | None] [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
- class weaviate_agents.query.classes.ProgressDetails[source]
Bases:
TypedDict- queries: list[QueryWithCollection]
- pydantic model weaviate_agents.query.classes.ProgressMessage[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: ProgressDetails = {}
- field message: str [Required]
- field output_type: Literal['progress_message'] = 'progress_message'
- field stage: str [Required]
- class weaviate_agents.query.classes.QueryWithCollection[source]
Bases:
TypedDict- query: str
- collection: str
- pydantic model weaviate_agents.query.classes.StreamedThoughts[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 delta: str [Required]
- field output_type: Literal['streamed_thoughts'] = 'streamed_thoughts'
- pydantic model weaviate_agents.query.classes.StreamedTokens[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 delta: str [Required]
- field output_type: Literal['streamed_tokens'] = 'streamed_tokens'
- pydantic model weaviate_agents.query.classes.IsNullPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter by property null state.
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.IS_NULL] = KnownFilterType.IS_NULL
- field is_null: bool [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.query.classes.SearchModeResponseBase[source]
Bases:
BaseModel,ABC,Generic[SearcherT]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 search_results: QueryReturn [Required]
- field searches: list[QueryResultWithCollectionNormalized] | None = None
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) – The BaseModel instance.
context (Any) – The context.
- Return type:
None
- class weaviate_agents.query.classes.ChatMessage[source]
Bases:
TypedDict- role: Literal['user', 'assistant']
- content: str
- pydantic model weaviate_agents.query.classes.AskModeResponse[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 aggregations: list[AggregationResultWithCollectionNormalized] [Required]
- field final_answer: str [Required]
- field is_partial_answer: bool | None [Required]
- field missing_information: list[str] | None [Required]
- field output_type: Literal['final_state'] = 'final_state'
- field searches: list[QueryResultWithCollectionNormalized] [Required]
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- pydantic model weaviate_agents.query.classes.ResearchModeResponse[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 final_answer: str [Required]
- field output_type: Literal['final_state'] = 'final_state'
- field queries: list[AskModeResponse] [Required]
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- pydantic model weaviate_agents.query.classes.ModelUnitUsage[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 model_units: int [Required]
- field remaining_plan_requests: int [Required]
- field usage_in_plan: bool [Required]
- pydantic model weaviate_agents.query.classes.FilterAndOr[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 combine: Literal['AND', 'OR'] [Required]
- field filters: list[PropertyFilter | FilterAndOr] [Required]
- pydantic model weaviate_agents.query.classes.QueryResultWithCollectionNormalized[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 filters: PropertyFilter | FilterAndOr | None [Required]
- field query: str | None [Required]
- pydantic model weaviate_agents.query.classes.AggregationResultWithCollectionNormalized[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: PropertyAggregation [Required]
- field collection: str [Required]
- field filters: PropertyFilter | FilterAndOr | None [Required]
- field groupby_property: str | None [Required]
- pydantic model weaviate_agents.query.classes.QuerySort[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 order: Literal['ascending', 'descending'] [Required]
- field property_name: str [Required]