pub struct UserMessage {
pub content: MessageContent,
pub name: Option<String>,
}Expand description
A user message payload.
Fields§
§content: MessageContentThe contents of the user message: plain text, or an array of
multimodal content parts (text, image_url, input_audio,
file).
name: Option<String>An optional name for the participant.
Provides the model information to differentiate between participants of the same role.
Trait Implementations§
Source§impl Clone for UserMessage
impl Clone for UserMessage
Source§impl Debug for UserMessage
impl Debug for UserMessage
Source§impl Default for UserMessage
impl Default for UserMessage
Source§impl<'de> Deserialize<'de> for UserMessage
impl<'de> Deserialize<'de> for UserMessage
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 UserMessage
impl RefUnwindSafe for UserMessage
impl Send for UserMessage
impl Sync for UserMessage
impl Unpin for UserMessage
impl UnsafeUnpin for UserMessage
impl UnwindSafe for UserMessage
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