pub struct AssistantMessage {
pub content: Vec<ContentBlock>,
pub usage: Usage,
pub stop_reason: StopReason,
pub error_message: Option<String>,
pub response_id: Option<String>,
pub model: String,
pub provider: String,
pub timestamp: i64,
}Expand description
A message produced by the model.
Fields§
§content: Vec<ContentBlock>§usage: Usage§stop_reason: StopReason§error_message: Option<String>§response_id: Option<String>§model: String§provider: String§timestamp: i64Implementations§
Source§impl AssistantMessage
impl AssistantMessage
pub fn empty() -> Self
pub fn text_content(&self) -> String
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 From<AssistantMessage> for Message
impl From<AssistantMessage> for Message
Source§fn from(m: AssistantMessage) -> Self
fn from(m: AssistantMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for AssistantMessage
impl Freeze for AssistantMessage
impl Move 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