pub struct MockEngine { /* private fields */ }Expand description
A mock that returns distributions seeded from (id, instructions).
Always satisfies sum-to-1 and confidence-in-range so the validator
passes.
Implementations§
Source§impl MockEngine
impl MockEngine
Trait Implementations§
Source§impl DecisionEngine for MockEngine
impl DecisionEngine for MockEngine
Source§fn backend_id(&self) -> &str
fn backend_id(&self) -> &str
Identifier of this backend, e.g.
"mock", "qwen-3b-candle".Source§fn model_metadata(&self) -> ModelInfo
fn model_metadata(&self) -> ModelInfo
Public metadata shown by
GET /v1/models. The default is a
minimal mock entry; real backends should override with a real
description and release date.Source§fn evaluate<'life0, 'async_trait>(
&'life0 self,
req: SystemRequest,
) -> Pin<Box<dyn Future<Output = EngineResult<SystemResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn evaluate<'life0, 'async_trait>(
&'life0 self,
req: SystemRequest,
) -> Pin<Box<dyn Future<Output = EngineResult<SystemResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Evaluate a single request. Returns one answer per question id.
Source§fn estimate_input_tokens(&self, req: &SystemRequest) -> u32
fn estimate_input_tokens(&self, req: &SystemRequest) -> u32
Estimate input tokens (cheap, before evaluation). The mock uses
a rough
bytes / 4 heuristic for state, instructions, and criteria;
real backends will use a tokenizer.Auto Trait Implementations§
impl Freeze for MockEngine
impl RefUnwindSafe for MockEngine
impl Send for MockEngine
impl Sync for MockEngine
impl Unpin for MockEngine
impl UnsafeUnpin for MockEngine
impl UnwindSafe for MockEngine
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