pub struct EasyInputMessage {
pub role: EasyInputMessageRole,
pub content: EasyInputMessageContent,
pub type: Option<EasyInputMessageType>,
}
Expand description
A message input to the model with a role indicating instruction following
hierarchy. Instructions given with the developer
or system
role take
precedence over instructions given with the user
role. Messages with the
assistant
role are presumed to have been generated by the model in previous
interactions.
Fields§
§role: EasyInputMessageRole
The role of the message input. One of user
, assistant
, system
, or
developer
.
content: EasyInputMessageContent
Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
type: Option<EasyInputMessageType>
The type of the message input. Always message
.
Implementations§
Trait Implementations§
Source§impl Clone for EasyInputMessage
impl Clone for EasyInputMessage
Source§fn clone(&self) -> EasyInputMessage
fn clone(&self) -> EasyInputMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EasyInputMessage
impl Debug for EasyInputMessage
Source§impl<'de> Deserialize<'de> for EasyInputMessage
impl<'de> Deserialize<'de> for EasyInputMessage
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 EasyInputMessage
impl PartialEq for EasyInputMessage
Source§impl Serialize for EasyInputMessage
impl Serialize for EasyInputMessage
impl StructuralPartialEq for EasyInputMessage
Auto Trait Implementations§
impl Freeze for EasyInputMessage
impl RefUnwindSafe for EasyInputMessage
impl Send for EasyInputMessage
impl Sync for EasyInputMessage
impl Unpin for EasyInputMessage
impl UnwindSafe for EasyInputMessage
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