Data associated with a streaming event.
EventData()| Name | Type |
|---|---|
| input | Any |
| error | NotRequired[BaseException] |
| output | Any |
| chunk | Any |
| tool_call_id | NotRequired[str | None] |
The input passed to the Runnable that generated the event.
Inputs will sometimes be available at the START of the Runnable, and
sometimes at the END of the Runnable.
If a Runnable is able to stream its inputs, then its input by definition
won't be known until the END of the Runnable when it has finished streaming
its inputs.
The error that occurred during the execution of the Runnable.
This field is only available if the Runnable raised an exception.
The output of the Runnable that generated the event.
Outputs will only be available at the END of the Runnable.
For most Runnable objects, this field can be inferred from the chunk field,
though there might be some exceptions for special a cased Runnable (e.g., like
chat models), which may return more information.
A streaming chunk from the output that generated the event.
chunks support addition in general, and adding them up should result
in the output of the Runnable that generated the event.
The tool call ID associated with the tool execution.
This field is available for the on_tool_error event and can be used to
link errors to specific tool calls in stateless agent implementations.