pub struct SystemPromptProcessor { /* private fields */ }Expand description
Prepends the routed target’s system prompt to the outbound request.
Implementations§
Source§impl SystemPromptProcessor
impl SystemPromptProcessor
Sourcepub fn new(prompts: TargetPrompts) -> Self
pub fn new(prompts: TargetPrompts) -> Self
Hand each target the prompt configured for it.
Trait Implementations§
Source§impl<S: Send> Processor<S> for SystemPromptProcessor
impl<S: Send> Processor<S> for SystemPromptProcessor
Source§fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_state: &'life1 mut S,
event: Event<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_state: &'life1 mut S,
event: Event<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process an event, accumulating facts into
state. Request-bearing events
(Event::Request, Event::Decision) may also be rewritten in place.Auto Trait Implementations§
impl Freeze for SystemPromptProcessor
impl RefUnwindSafe for SystemPromptProcessor
impl Send for SystemPromptProcessor
impl Sync for SystemPromptProcessor
impl Unpin for SystemPromptProcessor
impl UnsafeUnpin for SystemPromptProcessor
impl UnwindSafe for SystemPromptProcessor
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