Code
image_agent_with_memory.py
Usage
1
Set up your virtual environment
2
Set your API key
3
Install dependencies
4
Run Agent
Save the code above as
image_agent_with_memory.py, then run:Use an OpenAIResponses gpt-4o agent with WebSearchTools and add_history_to_context to answer a follow-up question about an image described in an earlier turn.
Set up your virtual environment
Set your API key
Install dependencies
Run Agent
image_agent_with_memory.py, then run: