pub struct ReActEngine { /* private fields */ }Expand description
ReAct engine for executing the reasoning loop.
Implementations§
Source§impl ReActEngine
impl ReActEngine
Sourcepub fn new(
config: ReActConfig,
tool_invoker: Option<Arc<Mutex<ToolInvoker>>>,
) -> Self
pub fn new( config: ReActConfig, tool_invoker: Option<Arc<Mutex<ToolInvoker>>>, ) -> Self
Create a new ReAct engine
Sourcepub async fn execute(
&self,
query: String,
llm_client: &UniversalLLMClient,
_llm_config: &LLMConfig,
_memory: Option<&Arc<dyn Memory>>,
ctx: &mut AgentContext,
) -> Result<ReActResult>
pub async fn execute( &self, query: String, llm_client: &UniversalLLMClient, _llm_config: &LLMConfig, _memory: Option<&Arc<dyn Memory>>, ctx: &mut AgentContext, ) -> Result<ReActResult>
Execute the ReAct loop
Auto Trait Implementations§
impl Freeze for ReActEngine
impl !RefUnwindSafe for ReActEngine
impl Send for ReActEngine
impl Sync for ReActEngine
impl Unpin for ReActEngine
impl !UnwindSafe for ReActEngine
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more