View source: R/provider-claude-tools.R
| claude_tool_web_search | R Documentation |
Enables Claude to search the web for up-to-date information. Your organization administrator must enable web search in the Anthropic Console before using this tool, as it costs extra ($10 per 1,000 tokens at time of writing).
Learn more in https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool.
claude_tool_web_search(
max_uses = NULL,
allowed_domains = NULL,
blocked_domains = NULL,
user_location = NULL
)
max_uses |
Integer. Maximum number of searches allowed per request. |
allowed_domains |
Character vector. Restrict searches to specific domains
(e.g., |
blocked_domains |
Character vector. Exclude specific domains from searches.
Cannot be used with |
user_location |
List with optional elements: |
Other built-in tools:
claude_tool_web_fetch(),
google_tool_web_fetch(),
google_tool_web_search(),
openai_tool_web_search()
## Not run:
chat <- chat_claude()
chat$register_tool(claude_tool_web_search())
chat$chat("What was in the news today?")
chat$chat("What's the biggest news in the economy?")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.