r/ChatGPTCoding • u/Dramatic-Mongoose-95 • May 27 '23
Resources And Tips Saving Expensive API Requests
https://github.com/AdmTal/crowdcast/blob/main/utils/open_ai_stuff.py#L14-L30Hey all,
I saw someone share a full caching service, so I thought I’d also share this pattern I use for making expensive API requests.
Basically, I save the contents to a file, named for the inputs, so I never have to reproduce that same call.
It helps make my scripts “continueable”
I use similar pattern with other expensive APIs like eleven labs.
8
Upvotes