pub struct FunctionTool {
pub name: String,
pub parameters: Option<Value>,
pub strict: Option<bool>,
pub description: Option<String>,
}Available on crate feature
response-types only.Fields§
§name: StringThe name of the function to call.
parameters: Option<Value>A JSON schema object describing the parameters of the function.
strict: Option<bool>Whether to enforce strict parameter validation. Default true.
description: Option<String>A description of the function. Used by the model to determine whether or not to call the function.
Trait Implementations§
Source§impl Clone for FunctionTool
impl Clone for FunctionTool
Source§fn clone(&self) -> FunctionTool
fn clone(&self) -> FunctionTool
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 moreSource§impl Debug for FunctionTool
impl Debug for FunctionTool
Source§impl Default for FunctionTool
impl Default for FunctionTool
Source§fn default() -> FunctionTool
fn default() -> FunctionTool
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FunctionTool
impl<'de> Deserialize<'de> for FunctionTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<FunctionTool> for Tool
impl From<FunctionTool> for Tool
Source§fn from(tool: FunctionTool) -> Self
fn from(tool: FunctionTool) -> Self
Converts to this type from the input type.
Source§impl From<FunctionTool> for Vec<Tool>
impl From<FunctionTool> for Vec<Tool>
Source§fn from(tool: FunctionTool) -> Self
fn from(tool: FunctionTool) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FunctionTool
impl PartialEq for FunctionTool
Source§impl Serialize for FunctionTool
impl Serialize for FunctionTool
impl StructuralPartialEq for FunctionTool
Auto Trait Implementations§
impl Freeze for FunctionTool
impl RefUnwindSafe for FunctionTool
impl Send for FunctionTool
impl Sync for FunctionTool
impl Unpin for FunctionTool
impl UnwindSafe for FunctionTool
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