Skip to main content

RunOptions

Struct RunOptions 

Source
pub struct RunOptions {
    pub inputs: BTreeMap<String, Value>,
    pub approval: ApprovalMode,
    pub max_steps: u32,
    pub memory: BTreeMap<String, Value>,
    pub stop_at: Option<String>,
    pub resume: Option<Resumption>,
    pub pricing: Pricing,
}

Fields§

§inputs: BTreeMap<String, Value>

Input name to value.

§approval: ApprovalMode§max_steps: u32

Stop after this many steps even if the artifact allows more. A backstop for artifacts with no steps budget.

§memory: BTreeMap<String, Value>

Persistent memory this run starts from, usually loaded from the agent’s store. Fields absent here start from the artifact’s declared value, so an empty map is a correct first run rather than a missing one.

§stop_at: Option<String>

Stop at the resumable checkpoint with this label, and report a snapshot.

A label that names no checkpoint, or one that is not resumable, fails before the run starts. Running to completion without stopping would leave a caller unable to tell that from a run with no checkpoint.

§resume: Option<Resumption>

Continue an interrupted run instead of starting one.

The snapshot’s inputs, bindings, state, outputs and counters replace this run’s, and execution begins at the node it names.

§pricing: Pricing

What each model costs, so budget.cost can be charged.

Empty by default. A run with no prices charges nothing and reports every model it could not price, because Runtime 0.1 §8 says a backend that cannot price a request must not pretend to.

Trait Implementations§

Source§

impl Default for RunOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.