pub struct AgentLoop<M: CompletionModel> { /* private fields */ }Implementations§
Source§impl<M: CompletionModel> AgentLoop<M>
impl<M: CompletionModel> AgentLoop<M>
Sourcepub fn new(
agent: Agent<M>,
prompt_stream: impl Stream<Item = CompletionEvaluatedPrompt> + 'static,
) -> Self
pub fn new( agent: Agent<M>, prompt_stream: impl Stream<Item = CompletionEvaluatedPrompt> + 'static, ) -> Self
Creates a new Coral agent loop
Sourcepub fn iteration_tool_quota(self, iteration_tool_quota: Option<u32>) -> Self
pub fn iteration_tool_quota(self, iteration_tool_quota: Option<u32>) -> Self
The maximum number of tools that can be used during one iteration. If an iteration reaches this limit, it will move on to the next iteration. This number should be large enough to allow the model to use as many tools as it needs to complete a task, but should also be small enough to catch any bugs that result in infinite tool usage.
If None is provided, there will be no limit to tool usage. If there is an infinite tool
usage bug when None is set, tokens will be burned!
Default is DEFAULT_ITERATION_TOOL_QUOTA
Auto Trait Implementations§
impl<M> !RefUnwindSafe for AgentLoop<M>
impl<M> !Send for AgentLoop<M>
impl<M> !Sync for AgentLoop<M>
impl<M> !UnwindSafe for AgentLoop<M>
impl<M> Freeze for AgentLoop<M>
impl<M> Unpin for AgentLoop<M>
impl<M> UnsafeUnpin for AgentLoop<M>
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