weaviate_agents.transformation.classes

class weaviate_agents.transformation.classes.OperationType(*values)[source]

Bases: str, Enum

Types of operations that can be performed on properties.

APPEND = 'append'
UPDATE = 'update'
pydantic model weaviate_agents.transformation.classes.OperationStep[source]

Bases: BaseModel

Base 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.transformation.classes.AppendPropertyOperation[source]

Bases: OperationStep

Operation 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 data_type: DataType [Required]
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.transformation.classes.UpdatePropertyOperation[source]

Bases: OperationStep

Operation 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.transformation.classes.DependentOperationStep[source]

Bases: BaseModel

A 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.transformation.classes.TransformationResponse[source]

Bases: BaseModel

Response 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.transformation.classes.Operations[source]

Bases: object

Factory 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:

AppendPropertyOperation

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:

UpdatePropertyOperation