StreamEventData: {
    chunk?: any;
    input?: any;
    output?: any;
}

Data associated with a StreamEvent.

Type declaration

  • Optionalchunk?: 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.

  • Optionalinput?: 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.

  • Optionaloutput?: 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.