Adding exception handling for further OpenAI API errors as e.g. timeout or general API error and beautification for the log output in terminal.
Background is that I did observe sporadic runtime errors. The error log did point to "BadGateway" or "GatewayTimeout" in most cases and once or twice "Timeout". With the changes I have far fewer abortions and as a consequence significantly longer (unobserved) runtime for this awesome baby... :-)
Hope this is useful for other people as well. Maybe I am not the only one having such problems.
Adding exception handling for further OpenAI API errors as e.g. timeout or general API error and beautification for the log output in terminal.
Background is that I did observe sporadic runtime errors. The error log did point to "BadGateway" or "GatewayTimeout" in most cases and once or twice "Timeout". With the changes I have far fewer abortions and as a consequence significantly longer (unobserved) runtime for this awesome baby... :-)
Hope this is useful for other people as well. Maybe I am not the only one having such problems.