For a conceptual overview of response caching, see Response Caching.
Basic Usage
Enable caching by settingcache_response=True when initializing the model. The first call will hit the API and cache the response, while subsequent identical calls will return the cached result.
cache_model_response.py
Usage
1
Create a virtual environment
Open the
Terminal and create a python virtual environment.2
Set your API key
3
Install libraries
4
Run Agent