weaviate_agents.classes
- class weaviate_agents.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.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.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.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.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.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.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.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.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.classes.TextMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- TYPE = 'TYPE'
- TOP_OCCURRENCES = 'TOP_OCCURRENCES'
- class weaviate_agents.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.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.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.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.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.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.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.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.classes.OperationType(*values)[source]
Bases:
str,EnumTypes of operations that can be performed on properties.
- APPEND = 'append'
- UPDATE = 'update'
- class weaviate_agents.classes.OperationStep(*, property_name, view_properties, instruction, operation_type)[source]
Bases:
BaseModelBase model for a transformation operation step.
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:
property_name (str)
view_properties (List[str])
instruction (str)
operation_type (OperationType)
- property_name: str
- view_properties: List[str]
- instruction: str
- operation_type: OperationType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.AppendPropertyOperation(*, property_name, view_properties, instruction, operation_type=OperationType.APPEND, data_type)[source]
Bases:
OperationStepOperation to append a new property.
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:
property_name (str)
view_properties (List[str])
instruction (str)
operation_type (OperationType)
data_type (DataType)
- operation_type: OperationType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.UpdatePropertyOperation(*, property_name, view_properties, instruction, operation_type=OperationType.UPDATE)[source]
Bases:
OperationStepOperation to update an existing property.
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:
property_name (str)
view_properties (List[str])
instruction (str)
operation_type (OperationType)
- operation_type: OperationType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.DependentOperationStep(operation, depends_on=None)[source]
Bases:
BaseModelA wrapper for operation steps that have dependencies on other operations.
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:
operation (OperationStep)
depends_on (List[OperationStep] | None)
- operation: OperationStep
- depends_on: List[OperationStep] | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.Operations[source]
Bases:
objectFactory class for creating transformation operations.
- static append_property(property_name, data_type, view_properties, instruction)[source]
Create an operation to append a new property.
- Parameters:
property_name (str) – Name of the new property to append
data_type (DataType) – Data type of the new property
view_properties (List[str]) – List of property names to use as context for the transformation
instruction (str) – Instruction for how to generate the new property value
- Returns:
An AppendPropertyOperation object
- Return type:
- static update_property(property_name, view_properties, instruction)[source]
Create an operation to update an existing property.
- Parameters:
property_name (str) – Name of the property to update
view_properties (List[str]) – List of property names to use as context for the transformation
instruction (str) – Instruction for how to update the property value
- Returns:
An UpdatePropertyOperation object
- Return type:
- class weaviate_agents.classes.Persona(*, persona_id, properties)[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:
persona_id (UUID)
properties (Dict[str, Any])
- persona_id: UUID
- properties: Dict[str, Any]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.PersonaInteraction(*, persona_id, item_id, weight, replace_previous_interactions=False, created_at=None)[source]
Bases:
BaseModelInteraction between a persona and an item.
If replace_previous_interactions is True, the interaction history for that specific item and persona pair will be replaced with the new interaction.
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:
persona_id (UUID)
item_id (UUID)
weight (float)
replace_previous_interactions (bool)
created_at (datetime | None)
- persona_id: UUID
- item_id: UUID
- weight: float
- replace_previous_interactions: bool
- created_at: datetime | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.PersonaInteractionResponse(*, uuid, weight, createdAt)[source]
Bases:
BaseModelResponse model for persona interactions when retrieving them.
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:
uuid (UUID)
weight (float)
createdAt (str)
- item_id: UUID
- weight: float
- created_at: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.PersonalizationAgentGetObjectsResponse(*, objects, ranking_rationale=None, 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.
- Parameters:
objects (list[PersonalizedObject])
ranking_rationale (str | None)
usage (Usage)
- objects: list[PersonalizedObject]
- ranking_rationale: str | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.PersonalizedObject(*, uuid, original_rank, personalized_rank, properties)[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:
uuid (UUID)
original_rank (int)
personalized_rank (int | None)
properties (Dict[str, Any])
- uuid: UUID
- original_rank: int
- personalized_rank: int | None
- properties: Dict[str, Any]
- model_dump(**kwargs)[source]
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended tu use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.PersonalizedQueryResponse(*, objects, usage)[source]
Bases:
BaseModel,QueryReturnCreate 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 = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.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.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.classes.DateMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- class weaviate_agents.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.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.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.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.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.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.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.classes.ProgressDetails[source]
Bases:
TypedDict- queries: list[QueryWithCollection]
- class weaviate_agents.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.classes.QueryWithCollection[source]
Bases:
TypedDict- query: str
- collection: str
- class weaviate_agents.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.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.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.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.classes.ChatMessage[source]
Bases:
TypedDict- role: Literal['user', 'assistant']
- content: str
- class weaviate_agents.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.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.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.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.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.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.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.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.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].
Subpackages
weaviate_agents.classes.personalization
- class weaviate_agents.classes.personalization.Persona(*, persona_id, properties)[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:
persona_id (UUID)
properties (Dict[str, Any])
- persona_id: UUID
- properties: Dict[str, Any]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.personalization.PersonaInteraction(*, persona_id, item_id, weight, replace_previous_interactions=False, created_at=None)[source]
Bases:
BaseModelInteraction between a persona and an item.
If replace_previous_interactions is True, the interaction history for that specific item and persona pair will be replaced with the new interaction.
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:
persona_id (UUID)
item_id (UUID)
weight (float)
replace_previous_interactions (bool)
created_at (datetime | None)
- persona_id: UUID
- item_id: UUID
- weight: float
- replace_previous_interactions: bool
- created_at: datetime | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.personalization.PersonaInteractionResponse(*, uuid, weight, createdAt)[source]
Bases:
BaseModelResponse model for persona interactions when retrieving them.
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:
uuid (UUID)
weight (float)
createdAt (str)
- item_id: UUID
- weight: float
- created_at: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.personalization.PersonalizationAgentGetObjectsResponse(*, objects, ranking_rationale=None, 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.
- Parameters:
objects (list[PersonalizedObject])
ranking_rationale (str | None)
usage (Usage)
- objects: list[PersonalizedObject]
- ranking_rationale: str | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.personalization.PersonalizedObject(*, uuid, original_rank, personalized_rank, properties)[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:
uuid (UUID)
original_rank (int)
personalized_rank (int | None)
properties (Dict[str, Any])
- uuid: UUID
- original_rank: int
- personalized_rank: int | None
- properties: Dict[str, Any]
- model_dump(**kwargs)[source]
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended tu use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.personalization.PersonalizedQueryResponse(*, objects, usage)[source]
Bases:
BaseModel,QueryReturnCreate 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 = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.personalization.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].
weaviate_agents.classes.query
- class weaviate_agents.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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].
- class weaviate_agents.classes.query.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.classes.query.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.classes.query.TextMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- TYPE = 'TYPE'
- TOP_OCCURRENCES = 'TOP_OCCURRENCES'
- class weaviate_agents.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.DateMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- class weaviate_agents.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.ProgressDetails[source]
Bases:
TypedDict- queries: list[QueryWithCollection]
- class weaviate_agents.classes.query.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.classes.query.QueryWithCollection[source]
Bases:
TypedDict- query: str
- collection: str
- class weaviate_agents.classes.query.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.classes.query.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.classes.query.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.classes.query.ChatMessage[source]
Bases:
TypedDict- role: Literal['user', 'assistant']
- content: str
- class weaviate_agents.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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.classes.query.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].
weaviate_agents.classes.transformation
- class weaviate_agents.classes.transformation.OperationType(*values)[source]
Bases:
str,EnumTypes of operations that can be performed on properties.
- APPEND = 'append'
- UPDATE = 'update'
- class weaviate_agents.classes.transformation.OperationStep(*, property_name, view_properties, instruction, operation_type)[source]
Bases:
BaseModelBase model for a transformation operation step.
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:
property_name (str)
view_properties (List[str])
instruction (str)
operation_type (OperationType)
- property_name: str
- view_properties: List[str]
- instruction: str
- operation_type: OperationType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.transformation.AppendPropertyOperation(*, property_name, view_properties, instruction, operation_type=OperationType.APPEND, data_type)[source]
Bases:
OperationStepOperation to append a new property.
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:
property_name (str)
view_properties (List[str])
instruction (str)
operation_type (OperationType)
data_type (DataType)
- operation_type: OperationType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.transformation.UpdatePropertyOperation(*, property_name, view_properties, instruction, operation_type=OperationType.UPDATE)[source]
Bases:
OperationStepOperation to update an existing property.
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:
property_name (str)
view_properties (List[str])
instruction (str)
operation_type (OperationType)
- operation_type: OperationType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.transformation.DependentOperationStep(operation, depends_on=None)[source]
Bases:
BaseModelA wrapper for operation steps that have dependencies on other operations.
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:
operation (OperationStep)
depends_on (List[OperationStep] | None)
- operation: OperationStep
- depends_on: List[OperationStep] | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.transformation.TransformationResponse(*, workflow_id)[source]
Bases:
BaseModelResponse from a transformation operation.
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:
workflow_id (str)
- workflow_id: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate_agents.classes.transformation.Operations[source]
Bases:
objectFactory class for creating transformation operations.
- static append_property(property_name, data_type, view_properties, instruction)[source]
Create an operation to append a new property.
- Parameters:
property_name (str) – Name of the new property to append
data_type (DataType) – Data type of the new property
view_properties (List[str]) – List of property names to use as context for the transformation
instruction (str) – Instruction for how to generate the new property value
- Returns:
An AppendPropertyOperation object
- Return type:
- static update_property(property_name, view_properties, instruction)[source]
Create an operation to update an existing property.
- Parameters:
property_name (str) – Name of the property to update
view_properties (List[str]) – List of property names to use as context for the transformation
instruction (str) – Instruction for how to update the property value
- Returns:
An UpdatePropertyOperation object
- Return type: