-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve clarity of model run command's error message #4
Conversation
8162419
to
0fe7680
Compare
This applies both for when an empty string or an incorrect model name is specified. The prior had an error message already, but it was fairly vague. The latter was using the default error output from later in execution. This commit makes them consistent and more detailed, providing two suggestions.
0fe7680
to
fa846d3
Compare
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.
Looks reasonable to me! Can you verify that the new error message comes up if you try gh models run foo "hello world"
?
@@ -226,15 +226,23 @@ func NewRunCommand() *cobra.Command { | |||
modelName = args[0] | |||
} | |||
|
|||
noMatchErrorMessage := "The specified model name is not found. Run 'gh models list' to see available models or 'gh models run' to select interactively." |
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.
Could include the value that was given, like "The specified model name 'foo'".
Yep!
|
closes: github/models#322
Adds more detail to the error output when a given model name is either empty or otherwise not found.
Before (taken from issue):
After:
or