From a34ba06b38d817845b8172f4f0d81721a8bfeff7 Mon Sep 17 00:00:00 2001 From: mmyjona Date: Fri, 24 Mar 2023 12:19:37 +0800 Subject: [PATCH] Prevent users from using the instruct mode and interactive mode at the same time. --- utils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils.cpp b/utils.cpp index 45c9cabb1..34f35e98c 100644 --- a/utils.cpp +++ b/utils.cpp @@ -150,6 +150,13 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) { 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) { fprintf(stderr, "error: invalid parameter for argument: %s\n", arg.c_str()); gpt_print_usage(argc, argv, params);