aiq.data_models.step_adaptor#
Attributes#
Classes#
str(object='') -> str |
|
Configures how intermediate steps are filtered and normalized by the StepAdaptor. |
Module Contents#
- logger#
- class StepAdaptorMode#
-
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
Initialize self. See help(type(self)) for accurate signature.
- DEFAULT = 'default'#
- CUSTOM = 'custom'#
- OFF = 'off'#
- class StepAdaptorConfig(/, **data: Any)#
Bases:
pydantic.BaseModel
Configures 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.self
is explicitly positional-only to allowself
as a field name.- mode: StepAdaptorMode#
- custom_event_types: list[aiq.data_models.intermediate_step.IntermediateStepType] = None#
- check_custom_event_types() StepAdaptorConfig #
Validates custom configurations