pub struct StructuredToolBuilder { /* private fields */ }Expand description
Builder for creating StructuredTool instances.
Implementations§
Source§impl StructuredToolBuilder
impl StructuredToolBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn args_schema(self, schema: ArgsSchema) -> Self
pub fn args_schema(self, schema: ArgsSchema) -> Self
Set the args schema.
Sourcepub fn return_direct(self, return_direct: bool) -> Self
pub fn return_direct(self, return_direct: bool) -> Self
Set return_direct.
Sourcepub fn response_format(self, format: ResponseFormat) -> Self
pub fn response_format(self, format: ResponseFormat) -> Self
Set the response format.
Sourcepub fn parse_docstring(self, parse: bool) -> Self
pub fn parse_docstring(self, parse: bool) -> Self
Set parse_docstring.
Sourcepub fn error_on_invalid_docstring(self, error: bool) -> Self
pub fn error_on_invalid_docstring(self, error: bool) -> Self
Set error_on_invalid_docstring.
Set tags.
Sourcepub fn build(self) -> Result<StructuredTool>
pub fn build(self) -> Result<StructuredTool>
Build the StructuredTool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StructuredToolBuilder
impl !RefUnwindSafe for StructuredToolBuilder
impl Send for StructuredToolBuilder
impl Sync for StructuredToolBuilder
impl Unpin for StructuredToolBuilder
impl !UnwindSafe for StructuredToolBuilder
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