pub struct StreamedTurn {
pub message_id: Option<String>,
pub choice: Vec<AssistantContent>,
pub executable_tool_names: BTreeSet<String>,
pub allowed_tool_names: BTreeSet<String>,
pub internal_call_ids: Vec<(String, String)>,
pub finish_reason: Option<FinishReason>,
}Expand description
The assembled streamed turn, fed to
AgentRun::streamed_turn.
Fields§
§message_id: Option<String>Provider-assigned assistant message ID, when available.
choice: Vec<AssistantContent>The assistant content to record in history: canonical (reasoning → text → tool calls) when the turn produced reasoning or tool calls, otherwise the provider’s aggregated choice as-is.
executable_tool_names: BTreeSet<String>Executable Rig tools advertised to the provider for this turn.
allowed_tool_names: BTreeSet<String>Tools allowed by the active tool choice for this turn.
internal_call_ids: Vec<(String, String)>(tool_call_id, internal_call_id) pairs for this turn’s tool calls,
in emission order. Carried into the run state so a resumed process
keeps the IDs consumers already saw in tool-call deltas.
finish_reason: Option<FinishReason>Why the provider stopped generating this turn, when it reported a
reason — the streamed analogue of ModelTurn::finish_reason, so a
driver that feeds turns through streamed_turn records the same
terminal reason the blocking surface does (rig#2322).
Trait Implementations§
Source§impl Clone for StreamedTurn
impl Clone for StreamedTurn
Source§fn clone(&self) -> StreamedTurn
fn clone(&self) -> StreamedTurn
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more