pub struct ProviderResponse {
pub content: Vec<ContentPart>,
pub stop_reason: StopReason,
pub usage: TokenUsage,
pub model: String,
pub cost: Option<Decimal>,
pub truncated: Option<bool>,
}Expand description
Response from a provider.
Fields§
§content: Vec<ContentPart>Response content parts.
stop_reason: StopReasonWhy the provider stopped.
usage: TokenUsageToken usage.
model: StringActual model used.
cost: Option<Decimal>Cost calculated by the provider (None if unknown).
truncated: Option<bool>Whether the provider truncated input (telemetry only).
Trait Implementations§
Source§impl Clone for ProviderResponse
impl Clone for ProviderResponse
Source§fn clone(&self) -> ProviderResponse
fn clone(&self) -> ProviderResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 ProviderResponse
impl Debug for ProviderResponse
Source§impl<'de> Deserialize<'de> for ProviderResponse
impl<'de> Deserialize<'de> for ProviderResponse
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 ProviderResponse
impl RefUnwindSafe for ProviderResponse
impl Send for ProviderResponse
impl Sync for ProviderResponse
impl Unpin for ProviderResponse
impl UnsafeUnpin for ProviderResponse
impl UnwindSafe for ProviderResponse
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