pub enum ModelTool {
Function {
name: String,
parameters: Value,
description: Option<String>,
strict: Option<bool>,
},
WebSearch {
allowed_domains: Option<Vec<String>>,
excluded_domains: Option<Vec<String>>,
enable_image_understanding: Option<bool>,
external_web_access: Option<bool>,
filters: Option<WebSearchFilters>,
search_context_size: Option<String>,
user_location: Option<Value>,
},
XSearch {
allowed_x_handles: Option<Vec<String>>,
excluded_x_handles: Option<Vec<String>>,
enable_image_understanding: Option<bool>,
enable_video_understanding: Option<bool>,
from_date: Option<String>,
to_date: Option<String>,
},
FileSearch {
vector_store_ids: Vec<String>,
max_num_results: Option<i32>,
filters: Option<Value>,
ranking_options: Option<Value>,
},
CodeInterpreter {
container: Option<Value>,
},
Mcp {
server_label: String,
server_url: String,
allowed_tools: Option<Vec<String>>,
authorization: Option<String>,
connector_id: Option<String>,
headers: Option<HashMap<String, String>>,
require_approval: Option<String>,
server_description: Option<String>,
},
}Expand description
Definition of one tool that the model can call (for Responses API).
Variants§
Function
A function that the model can call.
Fields
WebSearch
Search the web.
Fields
§
external_web_access: Option<bool>Control whether the web search tool fetches live content or uses only cached content.
§
filters: Option<WebSearchFilters>Filters to apply to the search results.
XSearch
Search X.
Fields
§
allowed_x_handles: Option<Vec<String>>List of X Handles of the users from whom to consider the posts.
FileSearch
Search the knowledge bases.
Fields
CodeInterpreter
Execute code.
Mcp
A remote MCP server to use.
Fields
Authorization token.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelTool
impl<'de> Deserialize<'de> for ModelTool
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 ModelTool
Auto Trait Implementations§
impl Freeze for ModelTool
impl RefUnwindSafe for ModelTool
impl Send for ModelTool
impl Sync for ModelTool
impl Unpin for ModelTool
impl UnwindSafe for ModelTool
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