Code
websearch_builtin_tool.py
Usage
1
Set up your virtual environment
2
Set your API key
3
Install dependencies
4
Run Agent
Save the code above as
websearch_builtin_tool.py, then run:Use OpenAI’s built-in web_search_preview tool with FileTools to save search results through the OpenAI Responses API.
Set up your virtual environment
Set your API key
Install dependencies
Run Agent
websearch_builtin_tool.py, then run: