move the check for incompatible parameters to gpt_params_parse
This commit is contained in:
parent
8c88b172c5
commit
8826fb8e2f
2 changed files with 7 additions and 5 deletions
|
@ -344,6 +344,13 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
|
|||
gpt_print_usage(argc, argv, default_params);
|
||||
exit(1);
|
||||
}
|
||||
if (params.prompt_cache_all &&
|
||||
(params.interactive || params.interactive_first ||
|
||||
params.instruct || params.antiprompt.size())) {
|
||||
fprintf(stderr, "error: --prompt-cache-all not supported in interactive mode yet\n");
|
||||
gpt_print_usage(argc, argv, default_params);
|
||||
exit(1);
|
||||
}
|
||||
if (escape_prompt) {
|
||||
process_escapes(params.prompt);
|
||||
}
|
||||
|
|
|
@ -235,11 +235,6 @@ int main(int argc, char ** argv) {
|
|||
}
|
||||
|
||||
if (params.interactive) {
|
||||
if (params.prompt_cache_all) {
|
||||
fprintf(stderr, "error: --prompt-cache-all not supported in interactive mode yet\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
|
||||
struct sigaction sigint_action;
|
||||
sigint_action.sa_handler = sigint_handler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue