pub struct Character {
pub name: String,
pub username: Option<String>,
pub bio: Vec<String>,
pub lore: Vec<String>,
pub topics: Vec<String>,
pub style: CharacterStyle,
pub knowledge: Vec<String>,
pub message_examples: Vec<MessageExample>,
pub adjectives: Vec<String>,
}Expand description
Structured agent persona.
Characters are loaded from configuration files (TOML/JSON) and
injected into RequestContext
via to_system_prompt.
Fields§
§name: StringDisplay name (e.g. "Bob", "CodeReviewBot").
username: Option<String>Optional username / handle.
bio: Vec<String>Short biography lines. Rendered as a bulleted list in the prompt.
lore: Vec<String>Background lore or extended description.
topics: Vec<String>Areas of expertise. Used for routing and capability matching.
style: CharacterStyleStyle guidelines applied to the assistant’s responses.
knowledge: Vec<String>Inline knowledge snippets injected into the system prompt.
message_examples: Vec<MessageExample>Few-shot example conversations (user → assistant pairs).
adjectives: Vec<String>Descriptive adjectives for the character.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Character
impl<'de> Deserialize<'de> for Character
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
Auto Trait Implementations§
impl Freeze for Character
impl RefUnwindSafe for Character
impl Send for Character
impl Sync for Character
impl Unpin for Character
impl UnsafeUnpin for Character
impl UnwindSafe for Character
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