-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/server should return better error codes when generating open ai images #582
base: develop
Are you sure you want to change the base?
Fix/server should return better error codes when generating open ai images #582
Conversation
- Updated AIImageInterfaceResponse to handle both success and failure cases. - Added error handling in OpenAIImageInterface.ts to check for HTTP 400 Bad Request responses. - Return a proper response to the user when provided parameters are not accepted by the selected model.
…request' fix: AIController.ts and AIImageInterface.ts now include a property to handle 'invalid_request'
…TTP 400 Bad Request responses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple little things I noticed. Everything else looks good.
CHANGELOG.md
Outdated
@@ -1,5 +1,17 @@ | |||
# CasualOS Changelog | |||
|
|||
## V3.3.16 | |||
|
|||
#### Date: TBA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TroyceGowdy This should be "TBD" instead of "TBA". Our release script requires a specific format in order to work.
span?.setStatus({ code: SpanStatusCode.ERROR }); | ||
|
||
console.error( | ||
`[OpenAIChatInterface] [${request.userId}] [generateImage]: Bad request: ${err.response.data.error.message}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TroyceGowdy This log should note "StabilityAIChatIngerface" instead of OpenAI.
fix: StabilityAIImageInterface.ts now returns 'StabilityAIChatIngerface' instead of 'OpenAIChatInterface'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TroyceGowdy I just noticed that there are a couple build errors in the unit tests for the AI controller. Could you fix those too?
@TroyceGowdy Can you fix the test errors for |
fixes #565