pub struct LlmSpawnOptsBuilder<'a> { /* private fields */ }Expand description
Builder for LlmSpawnOpts.
Implementations§
Source§impl<'a> LlmSpawnOptsBuilder<'a>
impl<'a> LlmSpawnOptsBuilder<'a>
Sourcepub fn error<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn error<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
The loop error to create the agent with, for state FAILED. Refused with any other state.
Sourcepub fn handle<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn handle<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
The runtime handle to restore the instance under, as published on its loop span as dagger.io/agent.id. Omit to mint a fresh instance.
Sourcepub fn name<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
Display label for the agent — telemetry and error messages; carries no identity. Defaults to a short name derived from the conversation.
Sourcepub fn state<VALUE: Into<AgentState>>(&mut self, value: VALUE) -> &mut Self
pub fn state<VALUE: Into<AgentState>>(&mut self, value: VALUE) -> &mut Self
The lifecycle state to create the agent in, as facts on the entry: IDLE is ready to be prompted, PAUSED parks it, FAILED holds an error a resume retries past, STOPPED preserves a dormant snapshot that send or resume can relaunch. RUNNING and WAITING_INPUT are refused: they describe a loop, and a restored loop died with the session that published it — restore such an agent as IDLE, its interrupted turn’s input still pending on the conversation.
Sourcepub fn build(&self) -> Result<LlmSpawnOpts<'a>, LlmSpawnOptsBuilderError>
pub fn build(&self) -> Result<LlmSpawnOpts<'a>, LlmSpawnOptsBuilderError>
Trait Implementations§
Source§impl<'a> Clone for LlmSpawnOptsBuilder<'a>
impl<'a> Clone for LlmSpawnOptsBuilder<'a>
Source§fn clone(&self) -> LlmSpawnOptsBuilder<'a>
fn clone(&self) -> LlmSpawnOptsBuilder<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for LlmSpawnOptsBuilder<'a>
impl<'a> RefUnwindSafe for LlmSpawnOptsBuilder<'a>
impl<'a> Send for LlmSpawnOptsBuilder<'a>
impl<'a> Sync for LlmSpawnOptsBuilder<'a>
impl<'a> Unpin for LlmSpawnOptsBuilder<'a>
impl<'a> UnsafeUnpin for LlmSpawnOptsBuilder<'a>
impl<'a> UnwindSafe for LlmSpawnOptsBuilder<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more