Struct langchain_rust::agent::AgentExecutor
source · pub struct AgentExecutor<A>where
A: Agent,{
pub memory: Option<Arc<Mutex<dyn BaseMemory>>>,
/* private fields */
}Fields§
§memory: Option<Arc<Mutex<dyn BaseMemory>>>Implementations§
source§impl<A> AgentExecutor<A>where
A: Agent,
impl<A> AgentExecutor<A>where
A: Agent,
pub fn from_agent(agent: A) -> Self
pub fn with_max_iterations(self, max_iterations: i32) -> Self
pub fn with_memory(self, memory: Arc<Mutex<dyn BaseMemory>>) -> Self
Trait Implementations§
source§impl<A> Chain for AgentExecutor<A>
impl<A> Chain for AgentExecutor<A>
fn call<'life0, 'async_trait>(
&'life0 self,
input_variables: PromptArgs
) -> Pin<Box<dyn Future<Output = Result<GenerateResult, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input_variables: PromptArgs
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
input_variables: PromptArgs
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_input_keys(&self) -> Vec<String>
fn get_output_keys(&self) -> Vec<String>
Auto Trait Implementations§
impl<A> !RefUnwindSafe for AgentExecutor<A>
impl<A> Send for AgentExecutor<A>
impl<A> Sync for AgentExecutor<A>
impl<A> Unpin for AgentExecutor<A>where
A: Unpin,
impl<A> !UnwindSafe for AgentExecutor<A>
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