pub struct TypedRuntimeBuilder<S = Empty> { /* private fields */ }Expand description
Implementations§
Source§impl TypedRuntimeBuilder<HasLlm>
impl TypedRuntimeBuilder<HasLlm>
Sourcepub fn with_default_model(
self,
model: impl Into<String>,
) -> TypedRuntimeBuilder<Ready>
pub fn with_default_model( self, model: impl Into<String>, ) -> TypedRuntimeBuilder<Ready>
Set the default model. Transitions to Ready state.
Sourcepub fn with_store(self, store: Arc<dyn SessionStore>) -> Self
pub fn with_store(self, store: Arc<dyn SessionStore>) -> Self
Set the session store. (Stays in HasLlm state.)
Sourcepub fn with_events(self, events: Arc<dyn EventSink>) -> Self
pub fn with_events(self, events: Arc<dyn EventSink>) -> Self
Set the event sink. (Stays in HasLlm state.)
Sourcepub fn with_tools(self, tools: Arc<dyn ToolPort>) -> Self
pub fn with_tools(self, tools: Arc<dyn ToolPort>) -> Self
Set the tools port.
Sourcepub fn with_policy(self, policy: TurnPolicy) -> Self
pub fn with_policy(self, policy: TurnPolicy) -> Self
Set the turn policy.
Sourcepub fn with_dispatch_mode(self, mode: DispatchMode) -> Self
pub fn with_dispatch_mode(self, mode: DispatchMode) -> Self
Set the dispatch mode.
Sourcepub fn add_tool_layer(self, layer: Arc<dyn ToolLayer>) -> Self
pub fn add_tool_layer(self, layer: Arc<dyn ToolLayer>) -> Self
Add a tool layer.
Sourcepub fn with_tool_policy(self, policy: Arc<dyn ToolPolicyPort>) -> Self
pub fn with_tool_policy(self, policy: Arc<dyn ToolPolicyPort>) -> Self
Set the tool policy port.
Sourcepub fn with_approval(self, approval: Arc<dyn ApprovalPort>) -> Self
pub fn with_approval(self, approval: Arc<dyn ApprovalPort>) -> Self
Set the approval port.
Sourcepub fn with_checkpoint_store(
self,
store: Arc<dyn TurnCheckpointStorePort>,
) -> Self
pub fn with_checkpoint_store( self, store: Arc<dyn TurnCheckpointStorePort>, ) -> Self
Set the checkpoint store.
Sourcepub fn with_artifact_store(self, store: Arc<dyn ArtifactStorePort>) -> Self
pub fn with_artifact_store(self, store: Arc<dyn ArtifactStorePort>) -> Self
Set the artifact store.
Sourcepub fn with_cost_meter(self, meter: Arc<dyn CostMeterPort>) -> Self
pub fn with_cost_meter(self, meter: Arc<dyn CostMeterPort>) -> Self
Set the cost meter.
Sourcepub fn with_context_compactor(
self,
compactor: Arc<dyn ContextCompactorPort>,
) -> Self
pub fn with_context_compactor( self, compactor: Arc<dyn ContextCompactorPort>, ) -> Self
Set the context compactor.
Sourcepub fn with_journal(self, journal: Arc<dyn ToolJournalPort>) -> Self
pub fn with_journal(self, journal: Arc<dyn ToolJournalPort>) -> Self
Set the tool journal.
Source§impl TypedRuntimeBuilder<Ready>
impl TypedRuntimeBuilder<Ready>
Sourcepub fn build(self) -> Result<Arc<dyn AgentRuntime>, AgentError>
pub fn build(self) -> Result<Arc<dyn AgentRuntime>, AgentError>
Build the runtime. Only available when all required fields are set.
Source§impl TypedRuntimeBuilder<Ready>
impl TypedRuntimeBuilder<Ready>
Sourcepub fn with_store(self, store: Arc<dyn SessionStore>) -> Self
pub fn with_store(self, store: Arc<dyn SessionStore>) -> Self
Set the session store. (On Ready, overrides any previous value.)
Sourcepub fn with_events(self, events: Arc<dyn EventSink>) -> Self
pub fn with_events(self, events: Arc<dyn EventSink>) -> Self
Set the event sink. (On Ready, overrides any previous value.)
Sourcepub fn with_tools(self, tools: Arc<dyn ToolPort>) -> Self
pub fn with_tools(self, tools: Arc<dyn ToolPort>) -> Self
Set the tools port.
Sourcepub fn with_policy(self, policy: TurnPolicy) -> Self
pub fn with_policy(self, policy: TurnPolicy) -> Self
Set the turn policy.
Trait Implementations§
Source§impl<S> Debug for TypedRuntimeBuilder<S>
impl<S> Debug for TypedRuntimeBuilder<S>
Source§impl<S: Default> Default for TypedRuntimeBuilder<S>
impl<S: Default> Default for TypedRuntimeBuilder<S>
Source§fn default() -> TypedRuntimeBuilder<S>
fn default() -> TypedRuntimeBuilder<S>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<S> Freeze for TypedRuntimeBuilder<S>
impl<S = Empty> !RefUnwindSafe for TypedRuntimeBuilder<S>
impl<S> Send for TypedRuntimeBuilder<S>where
S: Send,
impl<S> Sync for TypedRuntimeBuilder<S>where
S: Sync,
impl<S> Unpin for TypedRuntimeBuilder<S>where
S: Unpin,
impl<S> UnsafeUnpin for TypedRuntimeBuilder<S>
impl<S = Empty> !UnwindSafe for TypedRuntimeBuilder<S>
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