pub struct ToolFunctionDefinition {
pub description: String,
pub name: String,
pub parameters: Option<Value>,
}Expand description
Tool function definition.
Fields§
§description: StringA description of what the function does, used by the model to choose when and how to call the function.
name: StringThe name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
parameters: Option<Value>The parameters the functions accepts, described as a JSON Schema object. See the Tool Calls Guide for examples, and the JSON Schema reference for documentation about the format.
Omitting parameters defines a function with an empty parameter list.
Trait Implementations§
Source§impl Clone for ToolFunctionDefinition
impl Clone for ToolFunctionDefinition
Source§fn clone(&self) -> ToolFunctionDefinition
fn clone(&self) -> ToolFunctionDefinition
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 Debug for ToolFunctionDefinition
impl Debug for ToolFunctionDefinition
Source§impl<'de> Deserialize<'de> for ToolFunctionDefinition
impl<'de> Deserialize<'de> for ToolFunctionDefinition
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
impl Eq for ToolFunctionDefinition
Source§impl PartialEq for ToolFunctionDefinition
impl PartialEq for ToolFunctionDefinition
Source§fn eq(&self, other: &ToolFunctionDefinition) -> bool
fn eq(&self, other: &ToolFunctionDefinition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolFunctionDefinition
impl Serialize for ToolFunctionDefinition
impl StructuralPartialEq for ToolFunctionDefinition
Auto Trait Implementations§
impl Freeze for ToolFunctionDefinition
impl RefUnwindSafe for ToolFunctionDefinition
impl Send for ToolFunctionDefinition
impl Sync for ToolFunctionDefinition
impl Unpin for ToolFunctionDefinition
impl UnsafeUnpin for ToolFunctionDefinition
impl UnwindSafe for ToolFunctionDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.