pub struct AssistantMessage {Show 16 fields
pub content: Vec<ContentBlock>,
pub api: String,
pub provider: String,
pub model: String,
pub provider_thinking_level: Option<String>,
pub usage: Usage,
pub stop_reason: StopReason,
pub timestamp: u64,
pub response_id: Option<String>,
pub response_model: Option<String>,
pub raw_stop_reason: Option<String>,
pub deferred: Option<DeferredHandle>,
pub error_message: Option<String>,
pub diagnostics: Option<Vec<Value>>,
pub end_turn: Option<bool>,
pub thinking_level: Option<ThinkingLevel>,
}Expand description
A model response. Providers append responseId and the fields after it once the
response arrives, so they follow timestamp.
Fields§
§content: Vec<ContentBlock>§api: String§provider: String§model: String§provider_thinking_level: Option<String>Provider-native effort level used for this response.
usage: Usage§stop_reason: StopReason§timestamp: u64Unix time in milliseconds.
response_id: Option<String>§response_model: Option<String>Concrete model reported by the provider when it differs from model.
raw_stop_reason: Option<String>§deferred: Option<DeferredHandle>§error_message: Option<String>§diagnostics: Option<Vec<Value>>Redacted provider and runtime diagnostics.
end_turn: Option<bool>Whether the provider reported an explicit end of turn.
thinking_level: Option<ThinkingLevel>pi thinking level the agent loop requested; set last by the loop.
Trait Implementations§
Source§impl Clone for AssistantMessage
impl Clone for AssistantMessage
Source§impl Debug for AssistantMessage
impl Debug for AssistantMessage
Source§impl<'de> Deserialize<'de> for AssistantMessage
impl<'de> Deserialize<'de> for AssistantMessage
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
Source§impl PartialEq for AssistantMessage
impl PartialEq for AssistantMessage
Source§impl Serialize for AssistantMessage
impl Serialize for AssistantMessage
impl StructuralPartialEq for AssistantMessage
Auto Trait Implementations§
impl Freeze for AssistantMessage
impl RefUnwindSafe for AssistantMessage
impl Send for AssistantMessage
impl Sync for AssistantMessage
impl Unpin for AssistantMessage
impl UnsafeUnpin for AssistantMessage
impl UnwindSafe for AssistantMessage
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