pub struct FunctionToolArgs { /* private fields */ }Expand description
Builder for FunctionTool.
Implementations§
Source§impl FunctionToolArgs
impl FunctionToolArgs
Sourcepub fn name<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
pub fn name<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
The name of the function to call.
Sourcepub fn parameters<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
pub fn parameters<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
A JSON schema object describing the parameters of the function.
Sourcepub fn strict<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
pub fn strict<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
Whether to enforce strict parameter validation. Default true.
Sourcepub fn description<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
pub fn description<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
A description of the function. Used by the model to determine whether or not to call the function.
Sourcepub fn defer_loading<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
pub fn defer_loading<VALUE>(&mut self, value: VALUE) -> &mut FunctionToolArgs
Whether this function is deferred and loaded via tool search.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for FunctionToolArgs
impl Default for FunctionToolArgs
Source§fn default() -> FunctionToolArgs
fn default() -> FunctionToolArgs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FunctionToolArgs
impl RefUnwindSafe for FunctionToolArgs
impl Send for FunctionToolArgs
impl Sync for FunctionToolArgs
impl Unpin for FunctionToolArgs
impl UnsafeUnpin 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