weaviate_agents.query.classes
- class weaviate_agents.query.classes.QueryAgentCollectionConfig(*, name, tenant=None, view_properties=None, target_vector=None, additional_filters=None)[source]
Bases:
BaseModelA collection configuration for the QueryAgent.
- Parameters:
name (str)
tenant (str | None)
view_properties (list[str] | None)
target_vector (str | list[str] | None)
additional_filters (Annotated[_Filters, PlainSerializer(func=~weaviate_agents.serialise.serialise_filter, return_type=PydanticUndefined, when_used=always)] | None)
- name
The name of the collection to query.
- Type:
str
- tenant
Tenant name for collections with multi-tenancy enabled.
- Type:
str | None
- view_properties
Optional list of property names the agent has the ability to view for this specific collection.
- Type:
list[str] | None
- target_vector
Optional target vector name(s) for collections with named vectors. Can be a single vector name or a list of vector names.
- Type:
str | list[str] | None
- 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).
- Type:
Annotated[weaviate.collections.classes.filters._Filters, pydantic.functional_serializers.PlainSerializer(func=weaviate_agents.serialise.serialise_filter, return_type=PydanticUndefined, when_used=always)] | None
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.
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- tenant: str | None
- view_properties: list[str] | None
- target_vector: str | list[str] | None
- class weaviate_agents.query.classes.QueryAgentResponse(*, output_type='final_state', original_query, collection_names, searches, aggregations, usage, total_time, is_partial_answer, missing_information, final_answer, sources)[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.
- Parameters:
output_type (Literal['final_state'])
original_query (str)
collection_names (list[str])
searches (list[list[QueryResultWithCollection]])
aggregations (list[list[AggregationResultWithCollection]])
usage (Usage)
total_time (float)
is_partial_answer (bool)
missing_information (list[str])
final_answer (str)
sources (list[Source])
- output_type: Literal['final_state']
- original_query: str
- collection_names: list[str]
- searches: list[list[QueryResultWithCollection]]
- aggregations: list[list[AggregationResultWithCollection]]
- total_time: float
- is_partial_answer: bool
- missing_information: list[str]
- final_answer: str
- display()[source]
Display a pretty-printed summary of the QueryAgentResponse object.
- Return type:
None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.Source(*, object_id, collection)[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.
- Parameters:
object_id (str)
collection (str)
- object_id: str
- collection: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- 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'
- class weaviate_agents.query.classes.IntegerPropertyFilter(*, filter_type=KnownFilterType.INTEGER, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.INTEGER])
property_name (str)
operator (ComparisonOperator)
value (float)
- filter_type: Literal[KnownFilterType.INTEGER]
- operator: ComparisonOperator
- value: float
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.TextPropertyFilter(*, filter_type=KnownFilterType.TEXT, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.TEXT])
property_name (str)
operator (ComparisonOperator)
value (str)
- filter_type: Literal[KnownFilterType.TEXT]
- operator: ComparisonOperator
- value: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.BooleanPropertyFilter(*, filter_type=KnownFilterType.BOOLEAN, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.BOOLEAN])
property_name (str)
operator (ComparisonOperator)
value (bool)
- filter_type: Literal[KnownFilterType.BOOLEAN]
- operator: ComparisonOperator
- value: bool
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.QueryResult(*, queries, filters=[], filter_operators)[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.
- Parameters:
queries (list[str | None])
filters (list[list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter]])
filter_operators (Literal['AND', 'OR'])
- queries: list[str | None]
- filters: list[list[PropertyFilter]]
- filter_operators: Literal['AND', 'OR']
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- 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'
- class weaviate_agents.query.classes.IntegerPropertyAggregation(*, aggregation_type=KnownAggregationType.INTEGER, property_name, metrics)[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.
- Parameters:
aggregation_type (Literal[KnownAggregationType.INTEGER])
property_name (str)
metrics (NumericMetrics)
- aggregation_type: Literal[KnownAggregationType.INTEGER]
- metrics: NumericMetrics
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.TextPropertyAggregation(*, aggregation_type=KnownAggregationType.TEXT, property_name, metrics, top_occurrences_limit=None)[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.
- Parameters:
aggregation_type (Literal[KnownAggregationType.TEXT])
property_name (str)
metrics (TextMetrics)
top_occurrences_limit (int | None)
- aggregation_type: Literal[KnownAggregationType.TEXT]
- metrics: TextMetrics
- top_occurrences_limit: int | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.BooleanPropertyAggregation(*, aggregation_type=KnownAggregationType.BOOLEAN, property_name, metrics)[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.
- Parameters:
aggregation_type (Literal[KnownAggregationType.BOOLEAN])
property_name (str)
metrics (BooleanMetrics)
- aggregation_type: Literal[KnownAggregationType.BOOLEAN]
- metrics: BooleanMetrics
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.AggregationResult(*, search_query=None, groupby_property=None, aggregations, filters=[])[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.
- Parameters:
search_query (str | None)
groupby_property (str | None)
aggregations (list[IntegerPropertyAggregation | TextPropertyAggregation | BooleanPropertyAggregation | DatePropertyAggregation | UnknownPropertyAggregation])
filters (list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter])
- search_query: str | None
- groupby_property: str | None
- aggregations: list[PropertyAggregation]
- filters: list[PropertyFilter]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.Usage(*, requests=0, request_tokens=None, response_tokens=None, total_tokens=None, details=None)[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.
- Parameters:
requests (int | str)
request_tokens (int | str | None)
response_tokens (int | str | None)
total_tokens (int | str | None)
details (Dict[str, int] | Dict[str, str] | None)
- requests: int | str
- request_tokens: int | str | None
- response_tokens: int | str | None
- total_tokens: int | str | None
- details: Dict[str, int] | Dict[str, str] | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.AggregationResultWithCollection(*, search_query=None, groupby_property=None, aggregations, filters=[], collection)[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.
- Parameters:
search_query (str | None)
groupby_property (str | None)
aggregations (list[IntegerPropertyAggregation | TextPropertyAggregation | BooleanPropertyAggregation | DatePropertyAggregation | UnknownPropertyAggregation])
filters (list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter])
collection (str)
- collection: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.QueryResultWithCollection(*, queries, filters=[], filter_operators, collection)[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.
- Parameters:
queries (list[str | None])
filters (list[list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter]])
filter_operators (Literal['AND', 'OR'])
collection (str)
- collection: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.BooleanArrayPropertyFilter(*, filter_type=KnownFilterType.BOOLEAN_ARRAY, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.BOOLEAN_ARRAY])
property_name (str)
operator (ComparisonOperator)
value (list[bool])
- filter_type: Literal[KnownFilterType.BOOLEAN_ARRAY]
- operator: ComparisonOperator
- value: list[bool]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.DateArrayPropertyFilter(*, filter_type=KnownFilterType.DATE_ARRAY, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.DATE_ARRAY])
property_name (str)
operator (ComparisonOperator)
value (list[str])
- filter_type: Literal[KnownFilterType.DATE_ARRAY]
- operator: ComparisonOperator
- value: list[str]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.DateMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- class weaviate_agents.query.classes.DatePropertyAggregation(*, aggregation_type=KnownAggregationType.DATE, property_name, metrics)[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.
- Parameters:
aggregation_type (Literal[KnownAggregationType.DATE])
property_name (str)
metrics (DateMetrics)
- aggregation_type: Literal[KnownAggregationType.DATE]
- metrics: DateMetrics
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.DatePropertyFilter(*, filter_type=KnownFilterType.DATE, property_name, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.DATE])
property_name (str)
value (DateExact | DateRangeFrom | DateRangeTo | DateRangeBetween)
- filter_type: Literal[KnownFilterType.DATE]
- value: DateExact | DateRangeFrom | DateRangeTo | DateRangeBetween
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.IntegerArrayPropertyFilter(*, filter_type=KnownFilterType.INTEGER_ARRAY, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.INTEGER_ARRAY])
property_name (str)
operator (ComparisonOperator)
value (list[float])
- filter_type: Literal[KnownFilterType.INTEGER_ARRAY]
- operator: ComparisonOperator
- value: list[float]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.TextArrayPropertyFilter(*, filter_type=KnownFilterType.TEXT_ARRAY, property_name, operator, value)[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.
- Parameters:
filter_type (Literal[KnownFilterType.TEXT_ARRAY])
property_name (str)
operator (ComparisonOperator)
value (list[str])
- filter_type: Literal[KnownFilterType.TEXT_ARRAY]
- operator: ComparisonOperator
- value: list[str]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.GeoPropertyFilter(*, filter_type=KnownFilterType.GEO, property_name, latitude, longitude, max_distance_meters)[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.
- Parameters:
filter_type (Literal[KnownFilterType.GEO])
property_name (str)
latitude (float)
longitude (float)
max_distance_meters (float)
- filter_type: Literal[KnownFilterType.GEO]
- latitude: float
- longitude: float
- max_distance_meters: float
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.UnknownPropertyAggregation(*, aggregation_type, **extra_data)[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.
- Parameters:
aggregation_type (None)
extra_data (Any)
- model_config = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- aggregation_type: None
- class weaviate_agents.query.classes.UnknownPropertyFilter(*, filter_type, **extra_data)[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.
- Parameters:
filter_type (None)
extra_data (Any)
- model_config = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- filter_type: None
- class weaviate_agents.query.classes.ProgressDetails[source]
Bases:
TypedDict- queries: list[QueryWithCollection]
- class weaviate_agents.query.classes.ProgressMessage(*, output_type='progress_message', stage, message, details={})[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.
- Parameters:
output_type (Literal['progress_message'])
stage (str)
message (str)
details (ProgressDetails)
- output_type: Literal['progress_message']
- stage: str
- message: str
- details: ProgressDetails
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.QueryWithCollection[source]
Bases:
TypedDict- query: str
- collection: str
- class weaviate_agents.query.classes.StreamedThoughts(*, output_type='streamed_thoughts', delta)[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.
- Parameters:
output_type (Literal['streamed_thoughts'])
delta (str)
- output_type: Literal['streamed_thoughts']
- delta: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.StreamedTokens(*, output_type='streamed_tokens', delta)[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.
- Parameters:
output_type (Literal['streamed_tokens'])
delta (str)
- output_type: Literal['streamed_tokens']
- delta: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.IsNullPropertyFilter(*, filter_type=KnownFilterType.IS_NULL, property_name, is_null)[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.
- Parameters:
filter_type (Literal[KnownFilterType.IS_NULL])
property_name (str)
is_null (bool)
- filter_type: Literal[KnownFilterType.IS_NULL]
- is_null: bool
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.SearchModeResponseBase(*, searches=None, usage, total_time, search_results)[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.
- Parameters:
searches (list[QueryResultWithCollectionNormalized] | None)
usage (ModelUnitUsage)
total_time (float)
search_results (QueryReturn)
- searches: list[QueryResultWithCollectionNormalized] | None
- usage: ModelUnitUsage
- total_time: float
- search_results: QueryReturn
- abstractmethod next(limit=20, offset=0)[source]
- Parameters:
self (SearchModeResponseT)
limit (int)
offset (int)
- Return type:
SearchModeResponseT | Coroutine[Any, Any, SearchModeResponseT]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- 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
- class weaviate_agents.query.classes.AskModeResponse(*, output_type='final_state', searches, aggregations, usage, total_time, is_partial_answer, missing_information, final_answer, sources)[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.
- Parameters:
output_type (Literal['final_state'])
searches (list[QueryResultWithCollectionNormalized])
aggregations (list[AggregationResultWithCollectionNormalized])
usage (ModelUnitUsage)
total_time (float)
is_partial_answer (bool | None)
missing_information (list[str] | None)
final_answer (str)
sources (list[Source] | None)
- output_type: Literal['final_state']
- searches: list[QueryResultWithCollectionNormalized]
- aggregations: list[AggregationResultWithCollectionNormalized]
- usage: ModelUnitUsage
- total_time: float
- is_partial_answer: bool | None
- missing_information: list[str] | None
- final_answer: str
- display()[source]
Display a pretty-printed summary of the AskModeResponse object.
- Return type:
None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.ResearchModeResponse(*, output_type='final_state', final_answer, usage, queries, total_time)[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.
- Parameters:
output_type (Literal['final_state'])
final_answer (str)
usage (ModelUnitUsage)
queries (list[AskModeResponse])
total_time (float)
- output_type: Literal['final_state']
- final_answer: str
- usage: ModelUnitUsage
- queries: list[AskModeResponse]
- total_time: float
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.ModelUnitUsage(*, model_units, usage_in_plan, remaining_plan_requests)[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.
- Parameters:
model_units (int)
usage_in_plan (bool)
remaining_plan_requests (int)
- model_units: int
- usage_in_plan: bool
- remaining_plan_requests: int
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.FilterAndOr(*, combine, filters)[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.
- Parameters:
combine (Literal['AND', 'OR'])
filters (list[IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter | FilterAndOr])
- combine: Literal['AND', 'OR']
- filters: list[PropertyFilter | FilterAndOr]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.QueryResultWithCollectionNormalized(*, query, filters, collection, sort_property=None, uuid_value=None)[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.
- Parameters:
query (str | None)
filters (IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter | FilterAndOr | None)
collection (str)
sort_property (QuerySort | None)
uuid_value (UUID | None)
- query: str | None
- filters: PropertyFilter | FilterAndOr | None
- collection: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.AggregationResultWithCollectionNormalized(*, groupby_property, aggregation, filters, collection)[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.
- Parameters:
groupby_property (str | None)
aggregation (IntegerPropertyAggregation | TextPropertyAggregation | BooleanPropertyAggregation | DatePropertyAggregation | UnknownPropertyAggregation)
filters (IntegerPropertyFilter | IntegerArrayPropertyFilter | TextPropertyFilter | TextArrayPropertyFilter | BooleanPropertyFilter | BooleanArrayPropertyFilter | DatePropertyFilter | DateArrayPropertyFilter | GeoPropertyFilter | IsNullPropertyFilter | UUIDPropertyFilter | UUIDArrayPropertyFilter | UnknownPropertyFilter | FilterAndOr | None)
collection (str)
- groupby_property: str | None
- aggregation: PropertyAggregation
- filters: PropertyFilter | FilterAndOr | None
- collection: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.QuerySort(*, property_name, order, tie_break)[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.
- Parameters:
property_name (str)
order (Literal['ascending', 'descending'])
tie_break (QuerySort | None)
- property_name: str
- order: Literal['ascending', 'descending']
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.UUIDPropertyFilter(*, filter_type=KnownFilterType.UUID, property_name, operator, value)[source]
Bases:
KnownPropertyFilterBaseFilter UUID 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.
- Parameters:
filter_type (Literal[KnownFilterType.UUID])
property_name (str)
operator (ComparisonOperator)
value (UUID)
- filter_type: Literal[KnownFilterType.UUID]
- property_name: str
- operator: ComparisonOperator
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.query.classes.UUIDArrayPropertyFilter(*, filter_type=KnownFilterType.UUID_ARRAY, property_name, operator, value)[source]
Bases:
KnownPropertyFilterBaseFilter UUID array 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.
- Parameters:
filter_type (Literal[KnownFilterType.UUID_ARRAY])
property_name (str)
operator (ComparisonOperator)
value (list[UUID])
- filter_type: Literal[KnownFilterType.UUID_ARRAY]
- property_name: str
- operator: ComparisonOperator
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].