pub enum Item {
Message {
id: Option<String>,
status: Option<MessageStatus>,
role: MessageRole,
content: Vec<OutputContent>,
},
FunctionCall {
id: Option<String>,
call_id: String,
name: String,
arguments: String,
status: FunctionCallStatus,
},
FunctionCallOutput {
id: Option<String>,
call_id: String,
output: FunctionOutput,
status: FunctionCallOutputStatus,
},
Reasoning {
id: Option<String>,
content: Option<Vec<InputContent>>,
summary: Vec<InputContent>,
encrypted_content: Option<String>,
},
ItemReference {
id: String,
},
}Variants§
Message
FunctionCall
FunctionCallOutput
Reasoning
ItemReference
Implementations§
Source§impl Item
impl Item
pub fn user_message<S: Into<String>>(content: S) -> Self
pub fn user_message_with_content(content: Vec<OutputContent>) -> Self
pub fn assistant_message<S: Into<String>>(content: S) -> Self
pub fn system_message<S: Into<String>>(content: S) -> Self
pub fn developer_message<S: Into<String>>(content: S) -> Self
pub fn reference<S: Into<String>>(id: S) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
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
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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