weaviate_agents.classes
- pydantic model weaviate_agents.classes.QueryAgentCollectionConfig[source]
Bases:
BaseModelA collection configuration for the QueryAgent.
- name
The name of the collection to query.
- tenant
Tenant name for collections with multi-tenancy enabled.
- view_properties
Optional list of property names the agent has the ability to view for this specific collection.
- target_vector
Optional target vector name(s) for collections with named vectors. Can be a single vector name or a list of vector names.
- additional_filters
Optional filters to apply when the query is executed, in addition to filters selected by the Query Agent (i.e., there are AND combined).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field additional_filters: Annotated[_Filters, PlainSerializer(func=serialise_filter, return_type=PydanticUndefined, when_used=always)] | None = None
- field name: str [Required]
- field target_vector: str | list[str] | None = None
- field tenant: str | None = None
- field view_properties: list[str] | None = None
- pydantic model weaviate_agents.classes.QueryAgentResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[list[AggregationResultWithCollection]] [Required]
- field collection_names: list[str] [Required]
- field final_answer: str [Required]
- field is_partial_answer: bool [Required]
- field missing_information: list[str] [Required]
- field original_query: str [Required]
- field output_type: Literal['final_state'] = 'final_state'
- field searches: list[list[QueryResultWithCollection]] [Required]
- field total_time: float [Required]
- pydantic model weaviate_agents.classes.Source[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field object_id: str [Required]
- class weaviate_agents.classes.ComparisonOperator(*values)[source]
Bases:
str,Enum- EQUALS = '='
- LESS_THAN = '<'
- GREATER_THAN = '>'
- LESS_EQUAL = '<='
- GREATER_EQUAL = '>='
- NOT_EQUALS = '!='
- LIKE = 'LIKE'
- CONTAINS_ANY = 'contains_any'
- CONTAINS_ALL = 'contains_all'
- pydantic model weaviate_agents.classes.IntegerPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter numeric properties using comparison operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.INTEGER] = KnownFilterType.INTEGER
- field operator: ComparisonOperator [Required]
- field value: float [Required]
- pydantic model weaviate_agents.classes.TextPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter text properties using equality or LIKE operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.TEXT] = KnownFilterType.TEXT
- field operator: ComparisonOperator [Required]
- field value: str [Required]
- pydantic model weaviate_agents.classes.BooleanPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter boolean properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.BOOLEAN] = KnownFilterType.BOOLEAN
- field operator: ComparisonOperator [Required]
- field value: bool [Required]
- pydantic model weaviate_agents.classes.QueryResult[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_operators: Literal['AND', 'OR'] [Required]
- field filters: list[list[PropertyFilter]] = []
- field queries: list[str | None] [Required]
- class weaviate_agents.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'
- pydantic model weaviate_agents.classes.IntegerPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate numeric properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.INTEGER] = KnownAggregationType.INTEGER
- field metrics: NumericMetrics [Required]
- pydantic model weaviate_agents.classes.TextPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate text properties using frequency analysis.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.TEXT] = KnownAggregationType.TEXT
- field metrics: TextMetrics [Required]
- field top_occurrences_limit: int | None = None
- pydantic model weaviate_agents.classes.BooleanPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate boolean properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.BOOLEAN] = KnownAggregationType.BOOLEAN
- field metrics: BooleanMetrics [Required]
- pydantic model weaviate_agents.classes.AggregationResult[source]
Bases:
BaseModelThe aggregations to be performed on a collection in a vector database.
They should be based on the original user query and can include multiple aggregations across different properties and metrics.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[PropertyAggregation] [Required]
- field filters: list[PropertyFilter] = []
- field groupby_property: str | None = None
- field search_query: str | None = None
- pydantic model weaviate_agents.classes.Usage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field details: Dict[str, int] | Dict[str, str] | None = None
- field request_tokens: int | str | None = None
- field requests: int | str = 0
- field response_tokens: int | str | None = None
- field total_tokens: int | str | None = None
- pydantic model weaviate_agents.classes.AggregationResultWithCollection[source]
Bases:
AggregationResultCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- pydantic model weaviate_agents.classes.QueryResultWithCollection[source]
Bases:
QueryResultCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- class weaviate_agents.classes.OperationType(*values)[source]
Bases:
str,EnumTypes of operations that can be performed on properties.
- APPEND = 'append'
- UPDATE = 'update'
- pydantic model weaviate_agents.classes.OperationStep[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.
- field instruction: str [Required]
- field operation_type: OperationType [Required]
- field property_name: str [Required]
- field view_properties: List[str] [Required]
- pydantic model weaviate_agents.classes.AppendPropertyOperation[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.
- field operation_type: OperationType = OperationType.APPEND
- pydantic model weaviate_agents.classes.UpdatePropertyOperation[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.
- field operation_type: OperationType = OperationType.UPDATE
- pydantic model weaviate_agents.classes.DependentOperationStep[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.
- field depends_on: List[OperationStep] | None = None
- field operation: OperationStep [Required]
- 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:
- pydantic model weaviate_agents.classes.Persona[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field persona_id: UUID [Required]
- field properties: Dict[str, Any] [Required]
- pydantic model weaviate_agents.classes.PersonaInteraction[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.
- field created_at: datetime | None = None
- field item_id: UUID [Required]
- field persona_id: UUID [Required]
- field replace_previous_interactions: bool = False
- field weight: float [Required]
- pydantic model weaviate_agents.classes.PersonaInteractionResponse[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.
- field created_at: str [Required] (alias 'createdAt')
- field item_id: UUID [Required] (alias 'uuid')
- field weight: float [Required]
- pydantic model weaviate_agents.classes.PersonalizationAgentGetObjectsResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field objects: list[PersonalizedObject] [Required]
- field ranking_rationale: str | None = None
- pydantic model weaviate_agents.classes.PersonalizedObject[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field original_rank: int [Required]
- field personalized_rank: int | None [Required]
- field properties: Dict[str, Any] [Required]
- field uuid: UUID [Required]
- 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.
- pydantic model weaviate_agents.classes.PersonalizedQueryResponse[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.
- pydantic model weaviate_agents.classes.BooleanArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter boolean-array properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.BOOLEAN_ARRAY] = KnownFilterType.BOOLEAN_ARRAY
- field operator: ComparisonOperator [Required]
- field value: list[bool] [Required]
- pydantic model weaviate_agents.classes.DateArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter datetime properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.DATE_ARRAY] = KnownFilterType.DATE_ARRAY
- field operator: ComparisonOperator [Required]
- field value: list[str] [Required]
- class weaviate_agents.classes.DateMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- pydantic model weaviate_agents.classes.DatePropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate datetime properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.DATE] = KnownAggregationType.DATE
- field metrics: DateMetrics [Required]
- pydantic model weaviate_agents.classes.DatePropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter datetime properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.DATE] = KnownFilterType.DATE
- field value: DateExact | DateRangeFrom | DateRangeTo | DateRangeBetween [Required]
- pydantic model weaviate_agents.classes.IntegerArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter numeric-array properties using comparison operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.INTEGER_ARRAY] = KnownFilterType.INTEGER_ARRAY
- field operator: ComparisonOperator [Required]
- field value: list[float] [Required]
- pydantic model weaviate_agents.classes.GeoPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter geo-coordinates properties.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.GEO] = KnownFilterType.GEO
- field latitude: float [Required]
- field longitude: float [Required]
- field max_distance_meters: float [Required]
- pydantic model weaviate_agents.classes.TextArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter text-array properties using equality or LIKE operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.TEXT_ARRAY] = KnownFilterType.TEXT_ARRAY
- field operator: ComparisonOperator [Required]
- field value: list[str] [Required]
- pydantic model weaviate_agents.classes.UnknownPropertyAggregation[source]
Bases:
BaseModelCatch-all aggregation for unknown aggregation types, to preserve future back-compatibility.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: None [Required]
- Validated by:
ensure_filter_type_unknown
- pydantic model weaviate_agents.classes.UnknownPropertyFilter[source]
Bases:
BaseModelCatch-all filter for unknown filter types, to preserve future back-compatibility.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: None [Required]
- Validated by:
ensure_filter_type_unknown
- class weaviate_agents.classes.ProgressDetails[source]
Bases:
TypedDict- queries: list[QueryWithCollection]
- pydantic model weaviate_agents.classes.ProgressMessage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field details: ProgressDetails = {}
- field message: str [Required]
- field output_type: Literal['progress_message'] = 'progress_message'
- field stage: str [Required]
- class weaviate_agents.classes.QueryWithCollection[source]
Bases:
TypedDict- query: str
- collection: str
- pydantic model weaviate_agents.classes.StreamedTokens[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field delta: str [Required]
- field output_type: Literal['streamed_tokens'] = 'streamed_tokens'
- pydantic model weaviate_agents.classes.IsNullPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter by property null state.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.IS_NULL] = KnownFilterType.IS_NULL
- field is_null: bool [Required]
- pydantic model weaviate_agents.classes.SearchModeResponseBase[source]
Bases:
BaseModel,ABC,Generic[SearcherT]Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field search_results: QueryReturn [Required]
- field searches: list[QueryResultWithCollectionNormalized] | None = None
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) – The BaseModel instance.
context (Any) – The context.
- Return type:
None
- class weaviate_agents.classes.ChatMessage[source]
Bases:
TypedDict- role: Literal['user', 'assistant']
- content: str
- pydantic model weaviate_agents.classes.AskModeResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[AggregationResultWithCollectionNormalized] [Required]
- field final_answer: str [Required]
- field is_partial_answer: bool | None [Required]
- field missing_information: list[str] | None [Required]
- field output_type: Literal['final_state'] = 'final_state'
- field searches: list[QueryResultWithCollectionNormalized] [Required]
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- pydantic model weaviate_agents.classes.ModelUnitUsage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field model_units: int [Required]
- field remaining_plan_requests: int [Required]
- field usage_in_plan: bool [Required]
- pydantic model weaviate_agents.classes.FilterAndOr[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field combine: Literal['AND', 'OR'] [Required]
- field filters: list[PropertyFilter | FilterAndOr] [Required]
- pydantic model weaviate_agents.classes.QueryResultWithCollectionNormalized[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field filters: PropertyFilter | FilterAndOr | None [Required]
- field query: str | None [Required]
- pydantic model weaviate_agents.classes.AggregationResultWithCollectionNormalized[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation: PropertyAggregation [Required]
- field collection: str [Required]
- field filters: PropertyFilter | FilterAndOr | None [Required]
- field groupby_property: str | None [Required]
- pydantic model weaviate_agents.classes.QuerySort[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field order: Literal['ascending', 'descending'] [Required]
- field property_name: str [Required]
Subpackages
weaviate_agents.classes.personalization
- pydantic model weaviate_agents.classes.personalization.Persona[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field persona_id: UUID [Required]
- field properties: Dict[str, Any] [Required]
- pydantic model weaviate_agents.classes.personalization.PersonaInteraction[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.
- field created_at: datetime | None = None
- field item_id: UUID [Required]
- field persona_id: UUID [Required]
- field replace_previous_interactions: bool = False
- field weight: float [Required]
- pydantic model weaviate_agents.classes.personalization.PersonaInteractionResponse[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.
- field created_at: str [Required] (alias 'createdAt')
- field item_id: UUID [Required] (alias 'uuid')
- field weight: float [Required]
- pydantic model weaviate_agents.classes.personalization.PersonalizationAgentGetObjectsResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field objects: list[PersonalizedObject] [Required]
- field ranking_rationale: str | None = None
- pydantic model weaviate_agents.classes.personalization.PersonalizedObject[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field original_rank: int [Required]
- field personalized_rank: int | None [Required]
- field properties: Dict[str, Any] [Required]
- field uuid: UUID [Required]
- 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.
- pydantic model weaviate_agents.classes.personalization.PersonalizedQueryResponse[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.
- pydantic model weaviate_agents.classes.personalization.Usage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field details: Dict[str, int] | Dict[str, str] | None = None
- field request_tokens: int | str | None = None
- field requests: int | str = 0
- field response_tokens: int | str | None = None
- field total_tokens: int | str | None = None
weaviate_agents.classes.query
- pydantic model weaviate_agents.classes.query.QueryAgentCollectionConfig[source]
Bases:
BaseModelA collection configuration for the QueryAgent.
- name
The name of the collection to query.
- tenant
Tenant name for collections with multi-tenancy enabled.
- view_properties
Optional list of property names the agent has the ability to view for this specific collection.
- target_vector
Optional target vector name(s) for collections with named vectors. Can be a single vector name or a list of vector names.
- additional_filters
Optional filters to apply when the query is executed, in addition to filters selected by the Query Agent (i.e., there are AND combined).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field additional_filters: Annotated[_Filters, PlainSerializer(func=serialise_filter, return_type=PydanticUndefined, when_used=always)] | None = None
- field name: str [Required]
- field target_vector: str | list[str] | None = None
- field tenant: str | None = None
- field view_properties: list[str] | None = None
- pydantic model weaviate_agents.classes.query.QueryAgentResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[list[AggregationResultWithCollection]] [Required]
- field collection_names: list[str] [Required]
- field final_answer: str [Required]
- field is_partial_answer: bool [Required]
- field missing_information: list[str] [Required]
- field original_query: str [Required]
- field output_type: Literal['final_state'] = 'final_state'
- field searches: list[list[QueryResultWithCollection]] [Required]
- field total_time: float [Required]
- pydantic model weaviate_agents.classes.query.Source[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field object_id: str [Required]
- class weaviate_agents.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'
- pydantic model weaviate_agents.classes.query.IntegerPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter numeric properties using comparison operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.INTEGER] = KnownFilterType.INTEGER
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: float [Required]
- pydantic model weaviate_agents.classes.query.TextPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter text properties using equality or LIKE operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.TEXT] = KnownFilterType.TEXT
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: str [Required]
- pydantic model weaviate_agents.classes.query.BooleanPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter boolean properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.BOOLEAN] = KnownFilterType.BOOLEAN
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: bool [Required]
- pydantic model weaviate_agents.classes.query.QueryResult[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_operators: Literal['AND', 'OR'] [Required]
- field filters: list[list[PropertyFilter]] = []
- field queries: list[str | None] [Required]
- class weaviate_agents.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'
- pydantic model weaviate_agents.classes.query.IntegerPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate numeric properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.INTEGER] = KnownAggregationType.INTEGER
- field metrics: NumericMetrics [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.classes.query.TextPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate text properties using frequency analysis.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.TEXT] = KnownAggregationType.TEXT
- field metrics: TextMetrics [Required]
- field property_name: str [Required]
- field top_occurrences_limit: int | None = None
- pydantic model weaviate_agents.classes.query.BooleanPropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate boolean properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.BOOLEAN] = KnownAggregationType.BOOLEAN
- field metrics: BooleanMetrics [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.classes.query.AggregationResult[source]
Bases:
BaseModelThe aggregations to be performed on a collection in a vector database.
They should be based on the original user query and can include multiple aggregations across different properties and metrics.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[PropertyAggregation] [Required]
- field filters: list[PropertyFilter] = []
- field groupby_property: str | None = None
- field search_query: str | None = None
- pydantic model weaviate_agents.classes.query.Usage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field details: Dict[str, int] | Dict[str, str] | None = None
- field request_tokens: int | str | None = None
- field requests: int | str = 0
- field response_tokens: int | str | None = None
- field total_tokens: int | str | None = None
- pydantic model weaviate_agents.classes.query.AggregationResultWithCollection[source]
Bases:
AggregationResultCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[PropertyAggregation] [Required]
- field collection: str [Required]
- field filters: list[PropertyFilter] = []
- field groupby_property: str | None = None
- field search_query: str | None = None
- pydantic model weaviate_agents.classes.query.QueryResultWithCollection[source]
Bases:
QueryResultCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field filter_operators: Literal['AND', 'OR'] [Required]
- field filters: list[list[PropertyFilter]] = []
- field queries: list[str | None] [Required]
- pydantic model weaviate_agents.classes.query.BooleanArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter boolean-array properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.BOOLEAN_ARRAY] = KnownFilterType.BOOLEAN_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[bool] [Required]
- pydantic model weaviate_agents.classes.query.DateArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter datetime properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.DATE_ARRAY] = KnownFilterType.DATE_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[str] [Required]
- class weaviate_agents.classes.query.DateMetrics(*values)[source]
Bases:
str,Enum- COUNT = 'COUNT'
- MAX = 'MAXIMUM'
- MEDIAN = 'MEDIAN'
- MIN = 'MINIMUM'
- MODE = 'MODE'
- pydantic model weaviate_agents.classes.query.DatePropertyAggregation[source]
Bases:
KnownPropertyAggregationBaseAggregate datetime properties using statistical functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: Literal[KnownAggregationType.DATE] = KnownAggregationType.DATE
- field metrics: DateMetrics [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.classes.query.DatePropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter datetime properties using equality operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.DATE] = KnownFilterType.DATE
- field property_name: str [Required]
- field value: DateExact | DateRangeFrom | DateRangeTo | DateRangeBetween [Required]
- pydantic model weaviate_agents.classes.query.IntegerArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter numeric-array properties using comparison operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.INTEGER_ARRAY] = KnownFilterType.INTEGER_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[float] [Required]
- pydantic model weaviate_agents.classes.query.TextArrayPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter text-array properties using equality or LIKE operators.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.TEXT_ARRAY] = KnownFilterType.TEXT_ARRAY
- field operator: ComparisonOperator [Required]
- field property_name: str [Required]
- field value: list[str] [Required]
- pydantic model weaviate_agents.classes.query.GeoPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter geo-coordinates properties.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.GEO] = KnownFilterType.GEO
- field latitude: float [Required]
- field longitude: float [Required]
- field max_distance_meters: float [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.classes.query.UnknownPropertyAggregation[source]
Bases:
BaseModelCatch-all aggregation for unknown aggregation types, to preserve future back-compatibility.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation_type: None [Required]
- Validated by:
ensure_filter_type_unknown
- pydantic model weaviate_agents.classes.query.UnknownPropertyFilter[source]
Bases:
BaseModelCatch-all filter for unknown filter types, to preserve future back-compatibility.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: None [Required]
- Validated by:
ensure_filter_type_unknown
- class weaviate_agents.classes.query.ProgressDetails[source]
Bases:
TypedDict- queries: list[QueryWithCollection]
- pydantic model weaviate_agents.classes.query.ProgressMessage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field details: ProgressDetails = {}
- field message: str [Required]
- field output_type: Literal['progress_message'] = 'progress_message'
- field stage: str [Required]
- class weaviate_agents.classes.query.QueryWithCollection[source]
Bases:
TypedDict- query: str
- collection: str
- pydantic model weaviate_agents.classes.query.StreamedTokens[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field delta: str [Required]
- field output_type: Literal['streamed_tokens'] = 'streamed_tokens'
- pydantic model weaviate_agents.classes.query.IsNullPropertyFilter[source]
Bases:
KnownPropertyFilterBaseFilter by property null state.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field filter_type: Literal[KnownFilterType.IS_NULL] = KnownFilterType.IS_NULL
- field is_null: bool [Required]
- field property_name: str [Required]
- pydantic model weaviate_agents.classes.query.SearchModeResponseBase[source]
Bases:
BaseModel,ABC,Generic[SearcherT]Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field search_results: QueryReturn [Required]
- field searches: list[QueryResultWithCollectionNormalized] | None = None
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) – The BaseModel instance.
context (Any) – The context.
- Return type:
None
- class weaviate_agents.classes.query.ChatMessage[source]
Bases:
TypedDict- role: Literal['user', 'assistant']
- content: str
- pydantic model weaviate_agents.classes.query.AskModeResponse[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregations: list[AggregationResultWithCollectionNormalized] [Required]
- field final_answer: str [Required]
- field is_partial_answer: bool | None [Required]
- field missing_information: list[str] | None [Required]
- field output_type: Literal['final_state'] = 'final_state'
- field searches: list[QueryResultWithCollectionNormalized] [Required]
- field total_time: float [Required]
- field usage: ModelUnitUsage [Required]
- pydantic model weaviate_agents.classes.query.ModelUnitUsage[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field model_units: int [Required]
- field remaining_plan_requests: int [Required]
- field usage_in_plan: bool [Required]
- pydantic model weaviate_agents.classes.query.FilterAndOr[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field combine: Literal['AND', 'OR'] [Required]
- field filters: list[PropertyFilter | FilterAndOr] [Required]
- pydantic model weaviate_agents.classes.query.QueryResultWithCollectionNormalized[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field filters: PropertyFilter | FilterAndOr | None [Required]
- field query: str | None [Required]
- pydantic model weaviate_agents.classes.query.AggregationResultWithCollectionNormalized[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field aggregation: PropertyAggregation [Required]
- field collection: str [Required]
- field filters: PropertyFilter | FilterAndOr | None [Required]
- field groupby_property: str | None [Required]
- pydantic model weaviate_agents.classes.query.QuerySort[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field order: Literal['ascending', 'descending'] [Required]
- field property_name: str [Required]
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'
- pydantic model weaviate_agents.classes.transformation.OperationStep[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.
- field instruction: str [Required]
- field operation_type: OperationType [Required]
- field property_name: str [Required]
- field view_properties: List[str] [Required]
- pydantic model weaviate_agents.classes.transformation.AppendPropertyOperation[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.
- field instruction: str [Required]
- field operation_type: OperationType = OperationType.APPEND
- field property_name: str [Required]
- field view_properties: List[str] [Required]
- pydantic model weaviate_agents.classes.transformation.UpdatePropertyOperation[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.
- field instruction: str [Required]
- field operation_type: OperationType = OperationType.UPDATE
- field property_name: str [Required]
- field view_properties: List[str] [Required]
- pydantic model weaviate_agents.classes.transformation.DependentOperationStep[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.
- field depends_on: List[OperationStep] | None = None
- field operation: OperationStep [Required]
- pydantic model weaviate_agents.classes.transformation.TransformationResponse[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.
- field workflow_id: str [Required]
- 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: