pub enum Role {
System,
User,
Assistant,
}
Expand description
The role of the message used for the chat completion.
Variants§
System
The system message, describing the task to the model. As a tip, when using structured outputs try and keep this smaller. You don’t need to include each field / variant’s description in this, and can instead rely on docstrings to be included in the schema’s prompt!
User
The user message, i.e. the payload into the model.
Assistant
The assistant message, i.e. the model’s response.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
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 Copy for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
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