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