pub struct FunctionToolArgs { /* private fields */ }Expand description
Builder for FunctionTool.
Implementations§
Source§impl FunctionToolArgs
impl FunctionToolArgs
Sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The name of the function to call.
Sourcepub fn parameters<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
pub fn parameters<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
A JSON schema object describing the parameters of the function.
Sourcepub fn strict<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn strict<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to enforce strict parameter validation. Default true.
Sourcepub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A description of the function. Used by the model to determine whether or not to call the function.
Sourcepub fn build(&self) -> Result<FunctionTool, FunctionToolArgsError>
pub fn build(&self) -> Result<FunctionTool, FunctionToolArgsError>
Trait Implementations§
Source§impl Clone for FunctionToolArgs
impl Clone for FunctionToolArgs
Source§fn clone(&self) -> FunctionToolArgs
fn clone(&self) -> FunctionToolArgs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionToolArgs
impl RefUnwindSafe for FunctionToolArgs
impl Send for FunctionToolArgs
impl Sync for FunctionToolArgs
impl Unpin for FunctionToolArgs
impl UnwindSafe for FunctionToolArgs
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