pub struct LocalRuntimeOptions {
pub max_steps: usize,
pub human_tool_names: Option<Vec<String>>,
pub thread_id: Option<String>,
pub clock: Rc<dyn Fn() -> Timestamp>,
pub ids: Rc<dyn Fn() -> MessageId>,
}Expand description
Construction options (LocalRuntimeOptions).
Fields§
§max_steps: usizeModel steps per run before the run stops with pending tool calls
(maxSteps, default 2). Steps are the adapter’s reported steps or,
if it reports none, the number of steps the runtime started.
human_tool_names: Option<Vec<String>>Tool calls the frontend answers (unstable_humanToolNames); see
should_continue.
thread_id: Option<String>Passed to the adapter as thread_id.
clock: Rc<dyn Fn() -> Timestamp>Message timestamps.
ids: Rc<dyn Fn() -> MessageId>Message ids; the runtime skips any id already stored.
Implementations§
Source§impl LocalRuntimeOptions
impl LocalRuntimeOptions
Sourcepub fn with_clock(clock: Rc<dyn Fn() -> Timestamp>) -> Self
pub fn with_clock(clock: Rc<dyn Fn() -> Timestamp>) -> Self
Options with an explicit clock and ids derived from it.
Trait Implementations§
Source§impl Clone for LocalRuntimeOptions
impl Clone for LocalRuntimeOptions
Source§impl Default for LocalRuntimeOptions
Available on not (target_os=unknown and WebAssembly).Uses the system clock, which wasm32-unknown-unknown lacks: browser hosts
use LocalRuntimeOptions::with_clock with Date.now().
impl Default for LocalRuntimeOptions
Available on not (
target_os=unknown and WebAssembly).Uses the system clock, which wasm32-unknown-unknown lacks: browser hosts
use LocalRuntimeOptions::with_clock with Date.now().
Auto Trait Implementations§
impl !RefUnwindSafe for LocalRuntimeOptions
impl !Send for LocalRuntimeOptions
impl !Sync for LocalRuntimeOptions
impl !UnwindSafe for LocalRuntimeOptions
impl Forget for LocalRuntimeOptions
impl Freeze for LocalRuntimeOptions
impl Move for LocalRuntimeOptions
impl Unpin for LocalRuntimeOptions
impl UnsafeUnpin for LocalRuntimeOptions
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