openai_struct/models/
web_search_preview_tool.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub WebSearchPreviewTool : This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct WebSearchPreviewTool {
18    /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
19    #[serde(rename = "search_context_size")]
20    pub search_context_size: Option<String>,
21    /// The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
22    #[serde(rename = "type")]
23    pub _type: String,
24    #[serde(rename = "user_location")]
25    pub user_location: Option<crate::ApproximateLocation>,
26}