-
Notifications
You must be signed in to change notification settings - Fork 377
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: Improve reliability of Orchestrator downloader #6672
Conversation
Composer/packages/client/src/components/Orchestrator/DownloadNotification.tsx
Outdated
Show resolved
Hide resolved
Composer/packages/client/src/components/Orchestrator/DownloadNotification.tsx
Outdated
Show resolved
Hide resolved
// Licensed under the MIT License. | ||
|
||
export type IOrchestratorModelRequest = { | ||
type: 'en_intent' | 'multilingual_intent'; |
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.
nit: type is a reserved keyword, I suggest using somethingType
or kind
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.
Thanks @hatpick , I was using the convention that others used here. Is interface
ok?
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.
I meant the key you use here, type
, in strict mode it will complain about it but I guess we are not in that mode. It's still a good practice if you replace it with somethingType or kind:
type: 'en_intent' | 'multilingual_intent';
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.
Ah ok understood thanks, will change to kind
.
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.
Changed to kind
here, enclosed the orchestrator
controller in a class, added all other requested changes. Thanks @hatpick
Composer/packages/client/src/recoilModel/dispatchers/orchestrator.ts
Outdated
Show resolved
Hide resolved
* Improve reliability of Orchestrator downloader Co-authored-by: Soroush <[email protected]>
Description
The Orchestrator language model downloader did not properly catch exceptions in
Orchestrator.baseModelGetAsync
. This would lead to the download notification spinning endlessly if the language model download fails in some cases, though it can be dismissed.This PR propagates the error messages by forwarding errors with >400 status codes. This will be caught by the axios promise rejection in the frontend, and a notification failure with the error message will be shown if the download fails.
Task Item
#minor