View Source ExOpenAI.Components.WebSearchTool (ex_openai.ex v2.0.0-beta2)

Search the Internet for sources related to the prompt. Learn more about the web search tool.

Fields

  • :filters - optional - {:%{}, [], [{{:optional, [], [:allowed_domains]}, {:|, [], [{:list, [], [{{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}]}, {:any, [], []}]}}]} | any()

  • :search_context_size - optional - :low | :medium | :high
    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.
    Allowed values: "low", "medium", "high"
    Default: "medium"

  • :type - required - :web_search | :web_search_2025_08_26
    The type of the web search tool. One of web_search or web_search_2025_08_26.
    Allowed values: "web_search", "web_search_2025_08_26"
    Default: "web_search"

  • :user_location - optional - ExOpenAI.Components.WebSearchApproximateLocation.t()

Summary

Types

@type t() :: %ExOpenAI.Components.WebSearchTool{
  filters:
    (%{optional(:allowed_domains) => [String.t()] | any()} | any()) | nil,
  search_context_size: ((:low | :medium) | :high) | nil,
  type: :web_search | :web_search_2025_08_26,
  user_location: ExOpenAI.Components.WebSearchApproximateLocation.t() | nil
}