nat.data_models.step_adaptor#
Attributes#
Classes#
Enum where members are also (and must be) strings |
|
Configures how intermediate steps are filtered and normalized by the StepAdaptor. |
Module Contents#
- logger#
- class StepAdaptorMode#
Bases:
enum.StrEnumEnum where members are also (and must be) strings
Initialize self. See help(type(self)) for accurate signature.
- DEFAULT = 'default'#
- CUSTOM = 'custom'#
- OFF = 'off'#
- class StepAdaptorConfig(/, **data: Any)#
Bases:
pydantic.BaseModelConfigures how intermediate steps are filtered and normalized by the StepAdaptor.
- Args:
- mode (StepAdaptorMode): One of:
‘current’ => pass only LLM (all LLM_* events) + TOOL_END
‘end_events_only’ => pass only LLM_END and TOOL_END
‘custom’ => pass only the events in custom_event_types
- custom_event_types (list[IntermediateStepType]):
If mode == ‘custom’, we only pass events whose event_type is in this list. Otherwise, this field is ignored.
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.selfis explicitly positional-only to allowselfas a field name.- mode: StepAdaptorMode#
- custom_event_types: list[nat.data_models.intermediate_step.IntermediateStepType] = None#
- check_custom_event_types() StepAdaptorConfig#
Validates custom configurations