pub struct WebSearchTool {
pub filters: Option<WebSearchFilters>,
pub return_token_budget: Option<WebSearchReturnTokenBudget>,
pub search_context_size: Option<WebSearchContextSize>,
pub user_location: Option<WebSearchUserLocation>,
}Expand description
Non-preview hosted web search tool configuration.
Spec: { type: "web_search" | "web_search_2025_08_26", filters? { allowed_domains? }, return_token_budget?: "default"|"unlimited", search_context_size?: "low"|"medium"|"high", user_location? }.
Distinct from WebSearchPreviewTool: adds filters.allowed_domains (domain
allowlist), return_token_budget, and pins search_context_size to the spec-listed enum.
Fields§
§filters: Option<WebSearchFilters>Optional domain allowlist applied to candidate sources.
return_token_budget: Option<WebSearchReturnTokenBudget>Search-result context token budget. Spec enum: "default" | "unlimited".
search_context_size: Option<WebSearchContextSize>Search context budget. Spec enum: "low" | "medium" | "high".
user_location: Option<WebSearchUserLocation>Approximate user location used to bias results.
Trait Implementations§
Source§impl Clone for WebSearchTool
impl Clone for WebSearchTool
Source§fn clone(&self) -> WebSearchTool
fn clone(&self) -> WebSearchTool
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 WebSearchTool
impl Debug for WebSearchTool
Source§impl Default for WebSearchTool
impl Default for WebSearchTool
Source§fn default() -> WebSearchTool
fn default() -> WebSearchTool
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WebSearchTool
impl<'de> Deserialize<'de> for WebSearchTool
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 JsonSchema for WebSearchTool
impl JsonSchema for WebSearchTool
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for WebSearchTool
impl RefUnwindSafe for WebSearchTool
impl Send for WebSearchTool
impl Sync for WebSearchTool
impl Unpin for WebSearchTool
impl UnsafeUnpin for WebSearchTool
impl UnwindSafe for WebSearchTool
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