#[non_exhaustive]pub struct TurnResult {Show 13 fields
pub session_id: String,
pub outcome: Option<Outcome>,
pub is_error: bool,
pub result: Option<String>,
pub error: Option<String>,
pub model: Option<String>,
pub duration_ms: u64,
pub model_calls: u64,
pub usage: Usage,
pub denied: Vec<Denied>,
pub turn_id: Option<String>,
pub prompt_id: Option<String>,
pub cost: Option<Cost>,
}Expand description
result: the end of a turn.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: StringThe session’s id.
outcome: Option<Outcome>How the turn ended.
is_error: boolWhether the turn failed to answer.
result: Option<String>The answer.
error: Option<String>The error, when the turn failed.
model: Option<String>The model that answered.
duration_ms: u64The turn’s length.
model_calls: u64Model calls the turn made.
usage: UsageTokens the turn used.
denied: Vec<Denied>Calls the gates denied.
turn_id: Option<String>The turn’s id.
prompt_id: Option<String>The id of the prompt that opened the turn.
cost: Option<Cost>What the turn’s model calls cost.
Trait Implementations§
Source§impl Clone for TurnResult
impl Clone for TurnResult
Source§impl Debug for TurnResult
impl Debug for TurnResult
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
Source§impl PartialEq for TurnResult
impl PartialEq for TurnResult
impl StructuralPartialEq for TurnResult
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