pub struct InputMessage {
pub content: Vec<InputContent>,
pub role: InputRole,
pub status: Option<OutputStatus>,
}Expand description
A structured message input to the model (InputMessage in the OpenAPI spec).
This variant requires structured content (not a simple string) and does not support
the assistant role (use OutputMessage for that). Used when items are returned via API
with additional metadata.
Fields§
§content: Vec<InputContent>A list of one or many input items to the model, containing different content types.
role: InputRoleThe role of the message input. One of user, system, or developer.
Note: assistant is NOT allowed here; use OutputMessage instead.
status: Option<OutputStatus>The status of the item. One of in_progress, completed, or incomplete.
Populated when items are returned via API.
Trait Implementations§
Source§impl Clone for InputMessage
impl Clone for InputMessage
Source§fn clone(&self) -> InputMessage
fn clone(&self) -> InputMessage
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 InputMessage
impl Debug for InputMessage
Source§impl Default for InputMessage
impl Default for InputMessage
Source§fn default() -> InputMessage
fn default() -> InputMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InputMessage
impl<'de> Deserialize<'de> for InputMessage
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 InputMessage
impl PartialEq for InputMessage
Source§impl Serialize for InputMessage
impl Serialize for InputMessage
impl StructuralPartialEq for InputMessage
Auto Trait Implementations§
impl Freeze for InputMessage
impl RefUnwindSafe for InputMessage
impl Send for InputMessage
impl Sync for InputMessage
impl Unpin for InputMessage
impl UnwindSafe for InputMessage
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