weaviate_agents.transformation.classes
- class weaviate_agents.transformation.classes.OperationType(*values)[source]
Bases:
str,EnumTypes of operations that can be performed on properties.
- APPEND = 'append'
- UPDATE = 'update'
- class weaviate_agents.transformation.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.transformation.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.transformation.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.transformation.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.transformation.classes.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.transformation.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: