pub struct AgentBuilder { /* private fields */ }Expand description
Agent builder
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
pub fn with_llm(self, llm: Arc<dyn BaseChatModel>) -> Self
pub fn tool(self, tool: Arc<dyn Tool>) -> Self
pub fn tools(self, tools: Vec<Arc<dyn Tool>>) -> Self
pub fn config(self, config: AgentConfig) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn max_iterations(self, max: usize) -> Self
pub fn build(self) -> Result<Agent>
Trait Implementations§
Source§impl Default for AgentBuilder
impl Default for AgentBuilder
Source§fn default() -> AgentBuilder
fn default() -> AgentBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentBuilder
impl !RefUnwindSafe for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
impl !UnwindSafe for AgentBuilder
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