pub struct ModelOutput {
pub response: ModelResponse,
pub usage: Option<ModelUsage>,
pub stop_reason: ModelStopReason,
pub reasoning: Option<ReasoningPayload>,
}Expand description
The gateway result envelope. Pure response conversion consumes neither this value nor its usage and reasoning; execution consumers retain them.
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§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