pub struct TurnResult {
pub status: String,
pub messages: Vec<Msg>,
pub text: Option<String>,
pub value: Option<Value>,
pub usage: Usage,
pub rounds: u32,
pub tool_calls: u32,
pub error: Option<String>,
pub finish: Option<Value>,
}Expand description
A finished turn. messages is the transcript DELTA — only the assistant and
tool messages appended during this turn, in order — which the supervisor
concatenates onto the context it already holds. Sending a delta rather than
the whole transcript keeps the frame bounded as a conversation grows.
Fields§
§status: Stringcompleted | refused | exhausted_steps | exhausted_tokens |
deadline | loop_detected | cancelled | failed.
messages: Vec<Msg>§text: Option<String>The final text (a reply / the answer).
value: Option<Value>The parsed structured value (structured turns / schema’d answers).
usage: Usage§rounds: u32§tool_calls: u32§error: Option<String>§finish: Option<Value>The finish call, if the model made one ({status, output, reason, exit}).
Trait Implementations§
Source§impl Clone for TurnResult
impl Clone for TurnResult
Source§fn clone(&self) -> TurnResult
fn clone(&self) -> TurnResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TurnResult
impl Debug for TurnResult
Source§impl Default for TurnResult
impl Default for TurnResult
Source§fn default() -> TurnResult
fn default() -> TurnResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TurnResult
impl<'de> Deserialize<'de> for TurnResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TurnResult
impl RefUnwindSafe for TurnResult
impl Send for TurnResult
impl Sync for TurnResult
impl Unpin for TurnResult
impl UnsafeUnpin for TurnResult
impl UnwindSafe for TurnResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more