Skip to content
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

Running master fails #15

Open
MalteT opened this issue Dec 14, 2023 · 1 comment
Open

Running master fails #15

MalteT opened this issue Dec 14, 2023 · 1 comment

Comments

@MalteT
Copy link

MalteT commented Dec 14, 2023

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!

@fuyufjh
Copy link
Owner

fuyufjh commented Mar 18, 2024

Hi, Thanks for the feedback. Several issues recently discovered are related to the clap_serde library. I plan to remove it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants