agents.planning.rewoo.models.steps¶
Step Models for ReWOO Planning.
Abstract step class and concrete implementations with computed fields and validators.
Classes¶
Abstract base step that other steps inherit from. |
|
Basic concrete implementation for testing. |
Module Contents¶
- class agents.planning.rewoo.models.steps.AbstractStep(/, **data)¶
Bases:
pydantic.BaseModel
,abc.ABC
Abstract base step that other steps inherit from.
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:
data (Any)
- abstractmethod can_execute(completed_steps)¶
Check if this step can execute given completed steps.
- abstractmethod execute(context)¶
Execute this step with given context.
- classmethod validate_dependencies(v)¶
Validate dependency IDs.
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.rewoo.models.steps.BasicStep(/, **data)¶
Bases:
AbstractStep
Basic concrete implementation for testing.
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:
data (Any)
- can_execute(completed_steps)¶
Basic implementation - all dependencies must be completed.