pub struct FunctionTool {
pub name: String,
pub description: Option<String>,
pub input_schema: JsonSchema,
pub input_examples: Option<Vec<ToolInputExample>>,
pub strict: Option<bool>,
pub provider_options: Option<ProviderOptions>,
}Expand description
Client-defined function tool with a JSON schema input.
Fields§
§name: StringUnique tool name within the call.
description: Option<String>Optional natural-language description.
input_schema: JsonSchemaJSON schema for the input arguments.
input_examples: Option<Vec<ToolInputExample>>Example inputs to guide the model.
strict: Option<bool>Request strict schema enforcement when the provider supports it.
provider_options: Option<ProviderOptions>Provider-specific options.
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 (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 FunctionTool
impl Debug for FunctionTool
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 PartialEq for FunctionTool
impl PartialEq for FunctionTool
Source§fn eq(&self, other: &FunctionTool) -> bool
fn eq(&self, other: &FunctionTool) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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