heygpt
heygpt copied to clipboard
Running master fails
I'm getting the following error:
thread 'main' panicked at /home/malte/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.7/src/builder/debug_asserts.rs:832:5:
Argument "stream"
Arg::is_takes_value_set is required when Arg::is_hide_possible_values_set is set.
when building with
cargo 1.76.0-nightly (26333c732 2023-11-28)
rustc 1.76.0-nightly (b10cfcd65 2023-11-29)
but I've tried stable aswell.
The following patch fixes it for me, without showing possible values when running with heygpt --help
diff --git a/src/main.rs b/src/main.rs
index 7263c4c..2631142 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -26,7 +26,7 @@ use spinner::Spinner;
struct Options {
/// Whether to use streaming API (default: true)
#[default(true)]
- #[arg(long, hide_possible_values = true)]
+ #[arg(long)]
pub stream: bool,
/// The model to query (default: gpt-3.5-turbo)
I could send a PR, if that's okay with you. Thanks for your work!
Hi, Thanks for the feedback. Several issues recently discovered are related to the clap_serde library. I plan to remove it soon.