pub struct MessagesCreateResponse {
pub id: String,
pub kind: String,
pub role: MessageRole,
pub content: Vec<ContentBlock>,
pub model: String,
pub stop_reason: Option<String>,
pub usage: Option<Usage>,
}Expand description
Response from creating a message
Fields§
§id: StringMessage ID
kind: StringType of response (always “message”)
role: MessageRoleRole of the response
content: Vec<ContentBlock>Content blocks in the response
model: StringModel used for generation
stop_reason: Option<String>Optional stop reason
usage: Option<Usage>Optional token usage information
Trait Implementations§
Source§impl Clone for MessagesCreateResponse
impl Clone for MessagesCreateResponse
Source§fn clone(&self) -> MessagesCreateResponse
fn clone(&self) -> MessagesCreateResponse
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 moreSource§impl Debug for MessagesCreateResponse
impl Debug for MessagesCreateResponse
Source§impl<'de> Deserialize<'de> for MessagesCreateResponse
impl<'de> Deserialize<'de> for MessagesCreateResponse
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 MessagesCreateResponse
impl PartialEq for MessagesCreateResponse
Source§impl Serialize for MessagesCreateResponse
impl Serialize for MessagesCreateResponse
impl Eq for MessagesCreateResponse
impl StructuralPartialEq for MessagesCreateResponse
Auto Trait Implementations§
impl Freeze for MessagesCreateResponse
impl RefUnwindSafe for MessagesCreateResponse
impl Send for MessagesCreateResponse
impl Sync for MessagesCreateResponse
impl Unpin for MessagesCreateResponse
impl UnwindSafe for MessagesCreateResponse
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