pub enum RunnerBackend {
Echo {
model: String,
},
Cassette {
model: String,
strict: bool,
entries: Arc<Vec<Expr>>,
},
Fake {
model: String,
script: Arc<Mutex<VecDeque<Expr>>>,
delay: Duration,
},
External {
runner: Arc<dyn ModelRunner>,
},
}Expand description
The strategy a runner component uses to produce model responses.
Variants§
Echo
Echoes the request back, attributed to a named model.
Cassette
Replays pre-recorded responses from a fixed cassette.
Fields
Fake
Emits scripted responses with a simulated delay, for testing.
Fields
External
Delegates to an external ModelRunner implementation.
Fields
§
runner: Arc<dyn ModelRunner>The backing model runner.
Trait Implementations§
Source§impl Clone for RunnerBackend
impl Clone for RunnerBackend
Source§fn clone(&self) -> RunnerBackend
fn clone(&self) -> RunnerBackend
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for RunnerBackend
impl !UnwindSafe for RunnerBackend
impl Freeze for RunnerBackend
impl Send for RunnerBackend
impl Sync for RunnerBackend
impl Unpin for RunnerBackend
impl UnsafeUnpin for RunnerBackend
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