pub struct DefaultLlmManager { /* private fields */ }Expand description
Default LLM manager that delegates to existing runner functions.
Implementations§
Source§impl DefaultLlmManager
impl DefaultLlmManager
pub fn new(llm: Arc<dyn LLMProvider>) -> Self
Trait Implementations§
Source§impl LlmManager for DefaultLlmManager
impl LlmManager for DefaultLlmManager
Source§fn execute_round<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
config: &'life2 AgentLoopConfig,
event_tx: &'life3 Sender<AgentEvent>,
cancel_token: &'life4 CancellationToken,
session_id: &'life5 str,
model_name: &'life6 str,
tool_schemas: &'life7 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<LlmRoundOutput, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
fn execute_round<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
config: &'life2 AgentLoopConfig,
event_tx: &'life3 Sender<AgentEvent>,
cancel_token: &'life4 CancellationToken,
session_id: &'life5 str,
model_name: &'life6 str,
tool_schemas: &'life7 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<LlmRoundOutput, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
Execute a single LLM round.
Source§fn attempt_overflow_recovery<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
config: &'life2 AgentLoopConfig,
session_id: &'life3 str,
event_tx: &'life4 Sender<AgentEvent>,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn attempt_overflow_recovery<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
config: &'life2 AgentLoopConfig,
session_id: &'life3 str,
event_tx: &'life4 Sender<AgentEvent>,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Attempt overflow recovery by compressing context.
Auto Trait Implementations§
impl Freeze for DefaultLlmManager
impl !RefUnwindSafe for DefaultLlmManager
impl Send for DefaultLlmManager
impl Sync for DefaultLlmManager
impl Unpin for DefaultLlmManager
impl UnsafeUnpin for DefaultLlmManager
impl !UnwindSafe for DefaultLlmManager
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