Expand description
High-level streaming prompting traits for the classic agent runtime.
Structs§
- Pause
Control - Control for pausing and resuming a streaming response
- RawStreaming
Tool Call - Describes a streaming tool call response (in its entirety)
- Stream
Final - The provider’s terminal stream record, normalized.
- Stream
Part Id - Opaque accumulation key of one streamed part.
- Streaming
Completion Response - The response from a streaming completion request;
message and response are populated at the end of the
innerstream. - Synthetic
Ids - Fabricated per-stream keys for wires that carry none.
- Tool
Call Decoration - Decoration a provider attaches to a streamed tool call that is still assembling, matched by its established provider id (e.g. OpenRouter encrypted reasoning details). Carried onto the completed call by the adapter’s end event.
- Tool
Input End - End of a streamed tool call’s input: the signal for the shared assembler
(
RawStreamingChoice::ToolInputEnd) to finalize the call. - Unknown
Payload - An unmodeled wire payload on the raw passthrough channel.
- WireId
- The durable provider handle: an identifier the provider actually issued, ready for the replayable message types and request payloads.
Enums§
- Mint
Kind - What kind of part a minted identity was fabricated for.
- RawStreaming
Choice - Enum representing a streaming chunk from the model.
- Stream
Final Kind - Discriminant for
StreamFinal. - Streamed
Assistant Content - Describes responses from a streamed provider response which is either text, a tool call or a final usage response.
- Streamed
User Content - Streamed user content. This content is primarily used to represent tool results from tool calls made during a multi-turn/step agent prompt.
- Tool
Call Delta Content - The content of a tool call delta - either the tool name or argument data
- Unparseable
Tool Input - How the shared assembler treats an argument payload that does not parse as JSON when a streamed tool call’s input ends.
Traits§
- Streaming
Chat - High-level streaming chat interface with caller-provided history.
- Streaming
Prompt - High-level one-shot streaming prompt interface.
Functions§
- normalize_
stream - Normalize the terminal record of a provider-native stream.
Type Aliases§
- RawStreaming
Result Not ( target_os=unknownand WebAssembly) - Provider stream whose terminal record is the provider-native
R, on native targets. - Streaming
Result - Normalized provider stream, as consumed by
StreamingCompletionResponse.