pub struct SystemPromptJudge { /* private fields */ }Expand description
Passthrough routing with a judge-selected hidden system prompt.
Implementations§
Source§impl SystemPromptJudge
impl SystemPromptJudge
Sourcepub fn new(
target: ModelId,
judge_target: ModelId,
actions: Vec<PromptInjectionAction>,
config: SystemPromptJudgeConfig,
) -> Result<Self>
pub fn new( target: ModelId, judge_target: ModelId, actions: Vec<PromptInjectionAction>, config: SystemPromptJudgeConfig, ) -> Result<Self>
Creates a prompt-injection route.
Trait Implementations§
Source§impl Algorithm for SystemPromptJudge
impl Algorithm for SystemPromptJudge
Source§fn name(&self) -> &str
fn name(&self) -> &str
Stable, low-cardinality name identifying this algorithm — the
algorithm attribute on every span, metric, and log line the crate
emits for its runs.Source§fn route<'async_trait>(
self: Arc<Self>,
driver: Driver,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<RoutingOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
fn route<'async_trait>(
self: Arc<Self>,
driver: Driver,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<RoutingOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
Run one request to completion: make routing-time model calls with
Driver::call_model and return the terminal RoutingOutcome.
The method an algorithm implements; run_stream drives it.Source§fn run_stream(
self: Arc<Self>,
request: Request,
models: Arc<RuntimeModels>,
) -> StepStream
fn run_stream( self: Arc<Self>, request: Request, models: Arc<RuntimeModels>, ) -> StepStream
Auto Trait Implementations§
impl Freeze for SystemPromptJudge
impl RefUnwindSafe for SystemPromptJudge
impl Send for SystemPromptJudge
impl Sync for SystemPromptJudge
impl Unpin for SystemPromptJudge
impl UnsafeUnpin for SystemPromptJudge
impl UnwindSafe for SystemPromptJudge
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