pub struct Agent<E, T>{ /* private fields */ }
Implementations§
Source§impl<E, T> Agent<E, T>
impl<E, T> Agent<E, T>
pub fn new( executor: E, search_tool: T, early_stopping_config: EarlyStoppingConfig, ) -> Self
Sourcepub fn build_agent_scratchpad(
&self,
intermediate_steps: &Vec<AgentIntermediateStep>,
) -> String
pub fn build_agent_scratchpad( &self, intermediate_steps: &Vec<AgentIntermediateStep>, ) -> String
Convert the intermediate steps into a single text to pass to the agent so he can continue his thought process
pub async fn run( &self, query: &str, ) -> Result<(AgentFinish, Vec<AgentIntermediateStep>), SelfAskWithSearchAgentError<<T as Tool>::Error>>
Auto Trait Implementations§
impl<E, T> Freeze for Agent<E, T>
impl<E, T> RefUnwindSafe for Agent<E, T>
impl<E, T> Send for Agent<E, T>
impl<E, T> Sync for Agent<E, T>
impl<E, T> Unpin for Agent<E, T>
impl<E, T> UnwindSafe for Agent<E, T>
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