You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When omitting --model from the command line (I have no config file), I get the following error:
error: the following required arguments were not provided:
--model <MODEL>
Usage: heygpt --model <MODEL> --api-key <API_KEY> --api-base-url <API_BASE_URL> [PROMPT]...
For more information, try '--help'.
Right. It's the problem of upstream ClapSerde. However, the changes proposed above may cause another problem - the value of "model" in config file (if exists) will always be overridden by "gpt-3.5-turbo".
To work around the problem, the only solution I can think of is to write lots of boilerplate code to manually parse arguments, such as
let opts_from_file = { ...read opts... }
...
clap::Arg::new("model").long("model").default_value(opts_from_file.model)
That means we can't use the macro to derive clap args anymore.
Even worse, we need to maintain 2 copies of arguments: one as the code above, and one as a struct for serde. It's a bit too heavy just for argument parsing...
When omitting
--model
from the command line (I have no config file), I get the following error:despite these
heygpt/src/main.rs
Lines 33 to 35 in 3be31cb
I've never worked with ClapSerde, and it looks like an issue on their part, but the following dublication fixes it for me.
Thanks for your work!
The text was updated successfully, but these errors were encountered: