bytechefhq / bytechefhq/bytechef

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

Open
#1,325 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1k
Forks
170
Avg merge
11h 25m
Merged PRs (30d)
115

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.