-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: sort models by name in default model dropdowns #805
feat: sort models by name in default model dropdowns #805
Conversation
@@ -12,7 +12,7 @@ type ModelManifest struct { | |||
ModelProvider string `json:"modelProvider,omitempty"` | |||
Alias string `json:"alias,omitempty"` | |||
Active bool `json:"active"` | |||
Usage ModelUsage `json:"usage,omitempty"` | |||
Usage ModelUsage `json:"usage"` |
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.
Made this change so the frontend can map to the backend response via enum
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.
im explicitly OKing this. We'll see if a real dev yells at me later.
- sorts models by name in default model dropdowns - adds an "Other" group to dropdowns for models that don't have a usage - ensures that backend always returns a value for model usage Signed-off-by: Ryan Hopper-Lowe <[email protected]>
Signed-off-by: Ryan Hopper-Lowe <[email protected]>
a02efb1
to
2f50107
Compare
getModelUsageFromAlias(alias) ?? | ||
ModelUsage.Unknown; | ||
|
||
const modelOptions = filterModelsByUsage( |
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: Just a thought but wondering if a usage is set, should the options show both ones marked as usage
and the unknowns? In case a type is set for one, but maybe a user wanted to find one of the unknowns?
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.
check the renderSelectModelContent
method :)
Signed-off-by: Ryan Hopper-Lowe [email protected]