pub enum MessageItem {
Output(OutputMessage),
Input(InputMessage),
}Expand description
A message item used within the Item enum.
Both InputMessage and OutputMessage have type: "message", so we use an untagged
enum to distinguish them based on their structure:
- OutputMessage: role=assistant, required id & status fields
- InputMessage: role=user/system/developer, content is Vec
, optional id/status
Note: EasyInputMessage is NOT included here - it’s a separate variant in InputItem,
not part of the structured Item enum.
Variants§
Output(OutputMessage)
An output message from the model (role: assistant, has required id & status). This must come first as it has the most specific structure (required id and status fields).
Input(InputMessage)
A structured input message (role: user/system/developer, content is Vec
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.
Trait Implementations§
Source§impl Clone for MessageItem
impl Clone for MessageItem
Source§fn clone(&self) -> MessageItem
fn clone(&self) -> MessageItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more