View source: R/provider-openai-tools.R
| openai_tool_web_search | R Documentation |
Enables OpenAI models to search the web for up-to-date information. The search behavior varies by model: non-reasoning models perform simple searches, while reasoning models can perform agentic, iterative searches.
Learn more at https://developers.openai.com/api/docs/guides/tools-web-search
openai_tool_web_search(
allowed_domains = NULL,
user_location = NULL,
external_web_access = TRUE
)
allowed_domains |
Character vector. Restrict searches to specific domains
(e.g., |
user_location |
List with optional elements: |
external_web_access |
Logical. Whether to allow live internet access
( |
Other built-in tools:
claude_tool_web_fetch(),
claude_tool_web_search(),
google_tool_web_fetch(),
google_tool_web_search()
## Not run:
chat <- chat_openai()
chat$register_tool(openai_tool_web_search())
chat$chat("Very briefly summarise the top 3 news stories of the day")
chat$chat("Of those stories, which one do you think was the most interesting?")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.