pub enum Role {
User,
Assistant,
System,
Tool,
}
Expand description
Conversation participant role.
Defines the role of a message sender in a conversation. Each role has specific semantics and is typically handled differently by AI language models.
Variants§
User
User message.
Represents input from a human user or client application.
Assistant
AI assistant message.
Represents responses from the AI assistant.
System
System message for context/instructions.
Provides context, instructions, or system-level information that guides the AI’s behavior.
Tool
Tool/function call message.
Represents output from external tools or function calls.
Trait Implementations§
impl Copy for Role
impl Eq 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