pub struct Orchestrator { /* private fields */ }Implementations§
Source§impl Orchestrator
impl Orchestrator
pub fn new( provider: Arc<dyn Provider>, tools: ToolRegistry, middlewares: Vec<Arc<dyn Middleware>>, config: OrchestratorConfig, ) -> Self
Sourcepub fn swap_provider(&self, new_provider: Arc<dyn Provider>) -> String
pub fn swap_provider(&self, new_provider: Arc<dyn Provider>) -> String
Swap the active provider at runtime. Returns the name of the new provider.
Sourcepub fn provider_name(&self) -> String
pub fn provider_name(&self) -> String
Get the current provider name.
pub fn run( &self, input: RunInput, event_handler: impl FnMut(AgentEvent), ) -> RunOutput
Sourcepub fn run_cancellable(
&self,
input: RunInput,
cancel: Option<&Arc<AtomicBool>>,
event_handler: impl FnMut(AgentEvent),
) -> RunOutput
pub fn run_cancellable( &self, input: RunInput, cancel: Option<&Arc<AtomicBool>>, event_handler: impl FnMut(AgentEvent), ) -> RunOutput
Run the orchestrator loop with an optional cancellation flag.
If cancel is provided and set to true during execution,
the loop will stop at the next iteration boundary.
Auto Trait Implementations§
impl Freeze for Orchestrator
impl !RefUnwindSafe for Orchestrator
impl Send for Orchestrator
impl Sync for Orchestrator
impl Unpin for Orchestrator
impl UnsafeUnpin for Orchestrator
impl !UnwindSafe for Orchestrator
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