minimaxir / simpleaichat

Python package for easily interfacing with chat apps, with robust features and minimal code complexity.
MIT License
3.47k stars 229 forks source link

Build-in tenacity #43

Open keyboardAnt opened 1 year ago

keyboardAnt commented 1 year ago

Consider implementing tenacity fallbacks as in OpenAI's example to avoid such failures (when sending multiple requests):

KeyError: "No AI generation: {'error': {'message': 'That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID c7dddc8edaadb3d6ab49204671f84edf in your message.)', 'type': 'server_error', 'param': None, 'code': None}}"