#[non_exhaustive]pub struct TargetOutput {
pub output: String,
pub tool_calls: Vec<ToolCall>,
pub usage: Usage,
pub session_id: Option<String>,
pub transcript: Vec<Turn>,
}Expand description
What one target run produced.
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.output: StringThe answer: to the last turn of a multi-turn case.
tool_calls: Vec<ToolCall>The tool calls, in order, over all turns.
usage: UsageThe model tokens spent, over all turns.
session_id: Option<String>The session the run belongs to, for evaluators that read its traces.
transcript: Vec<Turn>Each turn and its answer, in order; empty for a single-turn run.
Implementations§
Source§impl TargetOutput
impl TargetOutput
Sourcepub fn with_tool_calls(self, tool_calls: Vec<ToolCall>) -> Self
pub fn with_tool_calls(self, tool_calls: Vec<ToolCall>) -> Self
Record the tool calls made.
Sourcepub fn with_usage(self, usage: Usage) -> Self
pub fn with_usage(self, usage: Usage) -> Self
Record the model tokens spent.
Sourcepub fn with_session_id(self, session_id: impl Into<String>) -> Self
pub fn with_session_id(self, session_id: impl Into<String>) -> Self
Record the session the run belongs to.
Sourcepub fn with_transcript(self, transcript: Vec<Turn>) -> Self
pub fn with_transcript(self, transcript: Vec<Turn>) -> Self
Record the turns of a multi-turn run.
Trait Implementations§
Source§impl Clone for TargetOutput
impl Clone for TargetOutput
Source§impl Debug for TargetOutput
impl Debug for TargetOutput
Source§impl Default for TargetOutput
impl Default for TargetOutput
Source§impl From<&str> for TargetOutput
impl From<&str> for TargetOutput
Source§impl From<String> for TargetOutput
impl From<String> for TargetOutput
Source§impl PartialEq for TargetOutput
impl PartialEq for TargetOutput
impl StructuralPartialEq for TargetOutput
Auto Trait Implementations§
impl Forget for TargetOutput
impl Freeze for TargetOutput
impl Move for TargetOutput
impl RefUnwindSafe for TargetOutput
impl Send for TargetOutput
impl Sync for TargetOutput
impl Unpin for TargetOutput
impl UnsafeUnpin for TargetOutput
impl UnwindSafe for TargetOutput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.