pub enum Tool {
Function {
name: String,
description: Option<String>,
parameters: Option<Value>,
strict: Option<bool>,
},
Mcp {
server_label: String,
server_url: String,
allowed_tools: Option<Vec<String>>,
},
}Variants§
Implementations§
Source§impl Tool
impl Tool
pub fn function<S: Into<String>>(name: S) -> Self
pub fn mcp<S1: Into<String>, S2: Into<String>>(label: S1, url: S2) -> Self
pub fn with_allowed_tools(self, tools: Vec<String>) -> Self
pub fn with_description<S: Into<String>>(self, desc: S) -> Self
pub fn with_parameters(self, params: Value) -> Self
pub fn strict(self, strict: bool) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
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 StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnwindSafe for Tool
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