pub struct CreateMessageResponse {
pub content: Content,
pub model: String,
pub stop_reason: Option<StopReason>,
pub role: MessageRole,
pub meta: ResponseMetadata,
}Expand description
Response from sampling/createMessage
Fields§
§content: ContentThe generated content
model: StringThe model that generated the response
stop_reason: Option<StopReason>The reason why generation stopped
role: MessageRoleThe role of the message (usually assistant)
meta: ResponseMetadataMetadata for the response
Trait Implementations§
Source§impl Clone for CreateMessageResponse
impl Clone for CreateMessageResponse
Source§fn clone(&self) -> CreateMessageResponse
fn clone(&self) -> CreateMessageResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 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<CreateMessageResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateMessageResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateMessageResponse
impl Serialize for CreateMessageResponse
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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 UnsafeUnpin 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