pub struct ServerTool {
pub tool_type: String,
pub name: String,
pub max_uses: Option<u32>,
}Expand description
Server-side tool definition. These tools are executed by the API provider rather than by the client. Currently only web_search_tool is supported.
Fields§
§tool_type: String§name: String§max_uses: Option<u32>Implementations§
Source§impl ServerTool
impl ServerTool
Sourcepub fn web_search(max_uses: Option<u32>) -> Self
pub fn web_search(max_uses: Option<u32>) -> Self
Create a new web search server tool.
Trait Implementations§
Source§impl Clone for ServerTool
impl Clone for ServerTool
Source§fn clone(&self) -> ServerTool
fn clone(&self) -> ServerTool
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 ServerTool
impl Debug for ServerTool
Source§impl<'de> Deserialize<'de> for ServerTool
impl<'de> Deserialize<'de> for ServerTool
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
Auto Trait Implementations§
impl Freeze for ServerTool
impl RefUnwindSafe for ServerTool
impl Send for ServerTool
impl Sync for ServerTool
impl Unpin for ServerTool
impl UnsafeUnpin for ServerTool
impl UnwindSafe for ServerTool
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