EventData#

class langchain_core.runnables.schema.EventData[source]#

Data associated with a streaming event.

input: Any#

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.

output: Any#

The output of the Runnable that generated the event.

Outputs will only be available at the END of the Runnable.

For most Runnables, this field can be inferred from the chunk field, though there might be some exceptions for special cased Runnables (e.g., like chat models), which may return more information.

chunk: Any#

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.