pub struct AgentRuntime { /* private fields */ }Expand description
Provider and tool dependencies shared by agent sessions.
Implementations§
Source§impl AgentRuntime
impl AgentRuntime
pub fn new( config: AgentConfig, provider: Arc<dyn ModelProvider>, tools: ToolRegistry, ) -> Result<Self, AgentError>
pub async fn create_session(&self) -> Result<AgentSession, AgentError>
pub async fn resume_session( &self, session_id: impl Into<String>, ) -> Result<AgentSession, AgentError>
pub fn start_turn( &self, session: &AgentSession, input: impl Into<String>, ) -> Result<TurnHandle, AgentError>
pub async fn run_turn( &self, session: &AgentSession, input: impl Into<String>, ) -> Result<TurnResult, AgentError>
Trait Implementations§
Source§impl Clone for AgentRuntime
impl Clone for AgentRuntime
Source§fn clone(&self) -> AgentRuntime
fn clone(&self) -> AgentRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentRuntime
impl !RefUnwindSafe for AgentRuntime
impl Send for AgentRuntime
impl Sync for AgentRuntime
impl Unpin for AgentRuntime
impl UnsafeUnpin for AgentRuntime
impl !UnwindSafe 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