haive.core.graph.branches.send_mappingΒΆ
Send mapping functionality for routing and state transformation.
ClassesΒΆ
Generator for Send objects based on lists or collections. |
|
Mapping configuration for generating Send objects. |
|
Collection of send mappings. |
Module ContentsΒΆ
- class haive.core.graph.branches.send_mapping.SendGenerator(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Generator for Send objects based on lists or collections.
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)
- create_sends(state)[source]ΒΆ
Create multiple Send objects from a collection in state.
- Parameters:
state (haive.core.graph.common.types.StateLike)
- Return type:
list[Any]
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class haive.core.graph.branches.send_mapping.SendMapping(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Mapping configuration for generating Send objects.
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)
- create_send(state)[source]ΒΆ
Create a Send object from state using this mapping.
- Parameters:
state (haive.core.graph.common.types.StateLike)
- Return type:
Any | None
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class haive.core.graph.branches.send_mapping.SendMappingList(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Collection of send mappings.
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)
- create_sends(state)[source]ΒΆ
Apply all mappings and generators to state.
- Parameters:
state (haive.core.graph.common.types.StateLike)
- Return type:
list[Any]
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].