bytechef icon indicating copy to clipboard operation
bytechef copied to clipboard

[improve]: OpenAI component should prompt user about Billing issues and Timeouts

Open igorbeslic opened this issue 1 year ago • 0 comments

Improvement target

OpenAI component

Improvement description

Improvement 1 OpenAI request may fail because of Billing issues. Here is Exception example: com.theokanning.openai.OpenAiHttpException: Billing hard limit has been reached ByteChef should WARN user about inability to work with component because of insufficient budget in OpenAI account. Issue can easily be tested by using an API key with reached budget maximum. SUGGESTION: we should throw ProviderException as provider received request, process it and rejected.

Improvement 2 OpenAI request may fail because of timeout. It can easily be recreated by setting REQUEST READ TIMEOUT parameter in Advanced Options for OpenAIGenerateImageAction. ByteChef should WARN user about issue. In this moment it is visible that there is Error 501 but it is not true... It is not server issue, it is component configuration issue. SUGGESTION: we should throw ComponentException. It is component that did not wait for provider's response so provider is not source of issue.

Observed Version

2.3.1

igorbeslic avatar Aug 09 '24 14:08 igorbeslic