pub struct ModelOutput {
pub response: ModelResponse,
pub usage: Option<ModelUsage>,
pub stop_reason: ModelStopReason,
pub reasoning: Option<ReasoningPayload>,
}Expand description
The gateway’s result envelope: the model door consumes only the
ModelResponse and ModelStopReason facts from it; usage and reasoning
stay caller-retained.
Fields§
§response: ModelResponseWhat the model said and asked: the ModelResponse fact.
usage: Option<ModelUsage>Token accounting, when the provider disclosed it.
stop_reason: ModelStopReasonWhy generation ended: the ModelStopReason fact.
reasoning: Option<ReasoningPayload>Structured reasoning payload, when the provider emitted one.
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 moreSource§impl Debug for ModelOutput
impl Debug for ModelOutput
Source§impl<'de> Deserialize<'de> for ModelOutput
impl<'de> Deserialize<'de> for ModelOutput
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 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