pub struct CreateMessageResult {
pub meta: Option<Map<String, Value>>,
pub content: CreateMessageResultContent,
pub model: String,
pub role: Role,
pub stop_reason: Option<String>,
pub extra: Map<String, Value>,
}
Expand description
The client’s response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.
Fields§
§meta: Option<Map<String, Value>>
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
content: CreateMessageResultContent
§model: String
The name of the model that generated the message.
role: Role
§stop_reason: Option<String>
The reason why sampling stopped, if known.
extra: Map<String, Value>
Additional parameters that are not part of the schema.
Trait Implementations§
Source§impl Clone for CreateMessageResult
impl Clone for CreateMessageResult
Source§fn clone(&self) -> CreateMessageResult
fn clone(&self) -> CreateMessageResult
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 CreateMessageResult
impl Debug for CreateMessageResult
Source§impl<'de> Deserialize<'de> for CreateMessageResult
impl<'de> Deserialize<'de> for CreateMessageResult
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 CreateMessageResult
impl PartialEq for CreateMessageResult
Source§impl Serialize for CreateMessageResult
impl Serialize for CreateMessageResult
impl StructuralPartialEq for CreateMessageResult
Auto Trait Implementations§
impl Freeze for CreateMessageResult
impl RefUnwindSafe for CreateMessageResult
impl Send for CreateMessageResult
impl Sync for CreateMessageResult
impl Unpin for CreateMessageResult
impl UnwindSafe for CreateMessageResult
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