| Name | Type | Description |
|---|---|---|
thread_id* | str | The thread ID to join. |
run_id* | str | The run ID to join. |
cancel_on_disconnect | bool | Default: FalseWhether to cancel the run when the stream is disconnected. |
stream_mode | StreamMode | Sequence[StreamMode] | None | Default: None |
headers | Mapping[str, str] | None | Default: None |
params | QueryParamTypes | None | Default: None |
last_event_id | str | None | Default: None |
Stream output from a run in real-time, until the run is done. Output is not buffered, so any output produced before this call will not be received here.
client = get_client(url="http://localhost:2024")
async for part in client.runs.join_stream(
thread_id="thread_id_to_join",
run_id="run_id_to_join",
stream_mode=["values", "debug"]
):
print(part)The stream mode(s) to use. Must be a subset of the stream modes passed when creating the run. Background runs default to having the union of all stream modes.
Optional custom headers to include with the request.
Optional query parameters to include with the request.
The last event ID to use for the stream.