pub struct AgentRuntime { /* private fields */ }Implementations§
Source§impl AgentRuntime
impl AgentRuntime
pub fn new( model: Arc<dyn ChatModel>, model_name: impl Into<String>, system_prompt: impl Into<String>, ) -> Self
pub fn with_tools(self, tools: ToolRegistry) -> Self
pub fn with_hooks(self, hooks: Vec<Arc<dyn Hook>>) -> Self
pub fn with_limits(self, limits: RuntimeLimits) -> Self
pub fn with_token_meter(self, meter: Arc<dyn TokenMeter>) -> Self
pub fn with_compactor(self, compactor: Arc<dyn Compactor>) -> Self
pub fn with_reasoning_effort(self, effort: ReasoningEffort) -> Self
pub fn with_output_policy(self, schema: Value) -> Result<Self, PluginError>
pub fn with_prompt_section( self, section: PromptSection, ) -> Result<Self, PluginError>
pub fn with_context_contributor( self, context: Arc<dyn ContextContributor>, ) -> Self
pub fn with_plugins(self, mounted: MountedPlugins) -> Result<Self, PluginError>
pub fn with_allowed_tools(self, allowed: Option<&BTreeSet<String>>) -> Self
Source§impl AgentRuntime
impl AgentRuntime
pub async fn run( &self, request: TurnRequest, writer: &dyn EventWriter, cancellation: CancellationToken, ) -> Result<RuntimeOutcome, RuntimeError>
Auto Trait Implementations§
impl !RefUnwindSafe for AgentRuntime
impl !UnwindSafe for AgentRuntime
impl Freeze for AgentRuntime
impl Send for AgentRuntime
impl Sync for AgentRuntime
impl Unpin for AgentRuntime
impl UnsafeUnpin for AgentRuntime
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