Prevent users from using the instruct mode and interactive mode at the same time.

This commit is contained in:
mmyjona 2023-03-24 12:19:37 +08:00
parent 4870e455b3
commit a34ba06b38
No known key found for this signature in database

View file

@ -150,6 +150,13 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
exit(1); exit(1);
} }
} }
if (params.instruct && params.interactive) {
fprintf(stderr, "error: Do not use instruct mode (-ins) and interactive mode (-i) at the same time to avoid output being cut off.\n");
gpt_print_usage(argc, argv, params);
exit(1);
}
if (invalid_param) { if (invalid_param) {
fprintf(stderr, "error: invalid parameter for argument: %s\n", arg.c_str()); fprintf(stderr, "error: invalid parameter for argument: %s\n", arg.c_str());
gpt_print_usage(argc, argv, params); gpt_print_usage(argc, argv, params);