pub struct PersonalityPrompt { /* private fields */ }Expand description
Personality prompt state prepared for one provider turn.
Implementations§
Source§impl PersonalityPrompt
impl PersonalityPrompt
Sourcepub fn active(prompt: String, changed: bool) -> Self
pub fn active(prompt: String, changed: bool) -> Self
Creates one active personality, marking whether delta-mode providers must receive its body as an update.
Sourcepub fn cleared(changed: bool) -> Self
pub fn cleared(changed: bool) -> Self
Creates a cleared personality state.
changed is true when a delta-mode provider previously held active
personality instructions and must be told to discard them.
Sourcepub fn current(&self) -> Option<&str>
pub fn current(&self) -> Option<&str>
Returns the current personality body for a full bootstrap.
Sourcepub fn update(&self) -> &PersonalityPromptUpdate
pub fn update(&self) -> &PersonalityPromptUpdate
Returns the instruction update to apply when continuing context.
Trait Implementations§
Source§impl Clone for PersonalityPrompt
impl Clone for PersonalityPrompt
Source§fn clone(&self) -> PersonalityPrompt
fn clone(&self) -> PersonalityPrompt
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersonalityPrompt
impl Debug for PersonalityPrompt
Source§impl Default for PersonalityPrompt
impl Default for PersonalityPrompt
Source§fn default() -> PersonalityPrompt
fn default() -> PersonalityPrompt
Returns the “default value” for a type. Read more
impl Eq for PersonalityPrompt
Source§impl PartialEq for PersonalityPrompt
impl PartialEq for PersonalityPrompt
impl StructuralPartialEq for PersonalityPrompt
Auto Trait Implementations§
impl Freeze for PersonalityPrompt
impl RefUnwindSafe for PersonalityPrompt
impl Send for PersonalityPrompt
impl Sync for PersonalityPrompt
impl Unpin for PersonalityPrompt
impl UnsafeUnpin for PersonalityPrompt
impl UnwindSafe for PersonalityPrompt
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