4 ms·
Per the README (and the source code), requests to GPT are cached. I know that doesn't solve the stability problem, since the cache is keyed on the exact prompt
by wging 4y ago
Per the README (and the source code), requests to GPT are cached. I know that doesn't solve the stability problem, since the cache is keyed on the exact prompt among other parameters, but it's something at least.
The source code shows that it's using pickling to store OpenAI responses on the local filesystem. See here:
https://github.com/ianb/infinite-ai-array/blob/main/iaia/gptclient.py#L50-L56 https://github.com/ianb/infinite-ai-array/blob/main/iaia/gpt...
and here:
https://github.com/ianb/infinite-ai-array/blob/main/iaia/gptclient.py#L76-L87 https://github.com/ianb/infinite-ai-array/blob/main/iaia/gpt...
- ianbicking 4y agoIt really should be saving them to JSON instead of Pickle, but I gave up trying to figure out how to properly rehydrate the openai Completion objects. If it was JSON then it wouldn't be crazy to add it to your repository. (I guess Pickle is stable enough in practice, but it would offend my personal sensibilities to check them in.)
- HyperSane 4y agoWhat is wrong with Pickle?
- andreareina 4y agoArbitrary code execution is a big one.
- HyperSane 4y agoI'm aware, but it is not an issue if you only use it with your own data. You can even cryptographically sign it.
- ianbicking 4y agoBesides security it's pretty opaque, and unnecessarily so. The data all comes over JSON so there's no non-JSONable types involved. It would be nice to be able to run tools like cost summarizing over the JSON without having to load up any other code.