pub struct EasyInputMessage {
pub type: MessageType,
pub role: Role,
pub content: EasyInputContent,
pub phase: Option<MessagePhase>,
}Expand description
A simplified message input to the model (EasyInputMessage in the OpenAPI spec).
This is the most user-friendly way to provide messages, supporting both simple
string content and structured content. Role can include assistant for providing
previous assistant responses.
Fields§
§type: MessageTypeThe type of the message input. Defaults to message when omitted in JSON input.
role: RoleThe role of the message input. One of user, assistant, system, or developer.
content: EasyInputContentText, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
phase: Option<MessagePhase>Labels an assistant message as intermediate commentary (commentary) or
the final answer (final_answer). Not used for user messages.
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 (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 EasyInputMessage
impl Debug for EasyInputMessage
Source§impl Default for EasyInputMessage
impl Default for EasyInputMessage
Source§fn default() -> EasyInputMessage
fn default() -> EasyInputMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EasyInputMessage
impl<'de> Deserialize<'de> for EasyInputMessage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EasyInputMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EasyInputMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S> From<S> for EasyInputMessage
impl<S> From<S> for EasyInputMessage
Source§fn from(value: S) -> EasyInputMessage
fn from(value: S) -> EasyInputMessage
Converts to this type from the input type.
Source§impl PartialEq for EasyInputMessage
impl PartialEq for EasyInputMessage
Source§fn eq(&self, other: &EasyInputMessage) -> bool
fn eq(&self, other: &EasyInputMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EasyInputMessage
impl Serialize for EasyInputMessage
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
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 UnsafeUnpin 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