pub enum GenericRole {
System,
Assistant,
User,
Tool,
}
Expand description
High-level chat roles recognised by most LLM providers.
The Display
implementation renders the canonical lowercase name so you
can feed it directly into JSON without extra mapping logic.
Variants§
System
“System” messages define global behaviour and style guidelines.
Assistant
Messages produced by the assistant / model.
User
Messages originating from the human user.
Tool
Special role used when a tool call or similar structured result is injected into the conversation.
Trait Implementations§
Source§impl Clone for GenericRole
impl Clone for GenericRole
Source§fn clone(&self) -> GenericRole
fn clone(&self) -> GenericRole
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GenericRole
impl Debug for GenericRole
Source§impl Display for GenericRole
impl Display for GenericRole
Source§impl PartialEq for GenericRole
impl PartialEq for GenericRole
impl Copy for GenericRole
impl Eq for GenericRole
impl StructuralPartialEq for GenericRole
Auto Trait Implementations§
impl Freeze for GenericRole
impl RefUnwindSafe for GenericRole
impl Send for GenericRole
impl Sync for GenericRole
impl Unpin for GenericRole
impl UnwindSafe for GenericRole
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