pub struct AssistantMessage {Show 15 fields
pub id: String,
pub session_id: String,
pub turn_id: TurnId,
pub parent_id: String,
pub created_at: i64,
pub completed_at: Option<i64>,
pub model_id: String,
pub provider_id: String,
pub input_tokens: i64,
pub output_tokens: i64,
pub cache_read_tokens: i64,
pub cache_write_tokens: i64,
pub finish_reason: Option<String>,
pub error: Option<ErrorInfo>,
pub content: Vec<ContentBlock>,
}Expand description
A message from the assistant
Fields§
§id: StringUnique message ID
session_id: StringSession this message belongs to
turn_id: TurnIdTurn ID for conversation tracking
parent_id: StringParent message ID
created_at: i64When the message was created (unix timestamp ms)
completed_at: Option<i64>When the message was completed (unix timestamp ms)
model_id: StringModel identifier
provider_id: StringProvider identifier
input_tokens: i64Input token count
output_tokens: i64Output token count
cache_read_tokens: i64Cache read token count
cache_write_tokens: i64Cache write token count
finish_reason: Option<String>Reason the response finished
error: Option<ErrorInfo>Error if the response failed
content: Vec<ContentBlock>Content blocks in this message
Trait Implementations§
Source§impl Clone for AssistantMessage
impl Clone for AssistantMessage
Source§fn clone(&self) -> AssistantMessage
fn clone(&self) -> AssistantMessage
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 moreAuto Trait Implementations§
impl Freeze for AssistantMessage
impl RefUnwindSafe for AssistantMessage
impl Send for AssistantMessage
impl Sync for AssistantMessage
impl Unpin 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