pub struct AssistantMessage {Show 17 fields
pub content: Vec<AssistantContent>,
pub api: String,
pub provider: String,
pub model: String,
pub response_model: Option<String>,
pub response_id: Option<String>,
pub provider_thinking_level: Option<String>,
pub thinking_level: Option<ThinkingLevel>,
pub diagnostics: Option<Vec<AssistantDiagnostic>>,
pub usage: Usage,
pub stop_reason: StopReason,
pub deferred: Option<DeferredHandle>,
pub error_message: Option<String>,
pub raw_stop_reason: Option<String>,
pub end_turn: Option<bool>,
pub timestamp: TimestampMs,
pub duration_ms: Option<u64>,
}Expand description
Assistant message.
Fields§
§content: Vec<AssistantContent>Content blocks.
api: StringWire API (anthropic-messages, …).
provider: StringProvider id.
model: StringModel id that answered.
response_model: Option<String>Model reported by the provider response.
response_id: Option<String>Provider response id.
provider_thinking_level: Option<String>Provider-specific effort string applied.
thinking_level: Option<ThinkingLevel>Thinking level requested for this response.
diagnostics: Option<Vec<AssistantDiagnostic>>Non-fatal diagnostics.
usage: UsageUsage (required).
stop_reason: StopReasonStop reason (required).
deferred: Option<DeferredHandle>Deferred response handle.
error_message: Option<String>Error text for error/aborted.
raw_stop_reason: Option<String>Provider’s raw stop reason.
end_turn: Option<bool>Provider end-of-turn flag.
timestamp: TimestampMsCreation time.
duration_ms: Option<u64>Wall time of the request.
Implementations§
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