#[non_exhaustive]pub struct ModelOutput { /* private fields */ }Expand description
Completed output from a model response.
Implementations§
Source§impl ModelOutput
impl ModelOutput
Sourcepub fn from_output(
output: Vec<Value>,
end_turn: bool,
usage: TokenUsage,
) -> Result<Self>
pub fn from_output( output: Vec<Value>, end_turn: bool, usage: TokenUsage, ) -> Result<Self>
Validates normalized output and derives its visible text and tool calls.
Sourcepub fn tool_calls(&self) -> &[ToolCall]
pub fn tool_calls(&self) -> &[ToolCall]
Returns the validated tool calls.
Sourcepub fn usage(&self) -> &TokenUsage
pub fn usage(&self) -> &TokenUsage
Returns the validated token usage.
Sourcepub fn content(&self) -> &[ModelStepContent]
pub fn content(&self) -> &[ModelStepContent]
Returns complete, provider-neutral text normalized at the model boundary.
Trait Implementations§
Source§impl Clone for ModelOutput
impl Clone for ModelOutput
Source§fn clone(&self) -> ModelOutput
fn clone(&self) -> ModelOutput
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 moreAuto Trait Implementations§
impl Freeze for ModelOutput
impl RefUnwindSafe for ModelOutput
impl Send for ModelOutput
impl Sync for ModelOutput
impl Unpin for ModelOutput
impl UnsafeUnpin for ModelOutput
impl UnwindSafe for ModelOutput
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