Enum chat_gpt_lib_rs::models::Role
source · pub enum Role {
System,
User,
Assistant,
}
Expand description
Represents the role of a message in the Chat API call.
The Role
enum has three variants:
System
: Represents a system message, usually to provide instructions to the assistant.User
: Represents a user message, which is the input or question the user provides.Assistant
: Represents an assistant message, which is the response generated by the Chat API.
The role is used to differentiate between different types of messages in the chat conversation.
Variants§
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
source§impl PartialEq for Role
impl PartialEq for Role
impl StructuralPartialEq 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