pub struct CreateMessageResponse {
pub content: Vec<ContentBlock>,
pub id: String,
pub model: String,
pub role: Role,
pub stop_reason: Option<StopReason>,
pub stop_sequence: Option<String>,
pub type_: String,
pub usage: Usage,
}Expand description
Response from creating a message
Fields§
§content: Vec<ContentBlock>Content blocks in the response
id: StringUnique message identifier
model: StringModel that handled the request
role: RoleRole of the message (always “assistant”)
stop_reason: Option<StopReason>Reason for stopping generation
stop_sequence: Option<String>Stop sequence that was generated
type_: StringType of the message
usage: UsageUsage statistics
Trait Implementations§
Source§impl Debug for CreateMessageResponse
impl Debug for CreateMessageResponse
Source§impl<'de> Deserialize<'de> for CreateMessageResponse
impl<'de> Deserialize<'de> for CreateMessageResponse
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 CreateMessageResponse
impl RefUnwindSafe for CreateMessageResponse
impl Send for CreateMessageResponse
impl Sync for CreateMessageResponse
impl Unpin for CreateMessageResponse
impl UnwindSafe for CreateMessageResponse
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