From 9521390ce41a4a6934333b01fd8c13c4d0f3fd89 Mon Sep 17 00:00:00 2001 From: mgroeber9110 Date: Sat, 22 Apr 2023 20:29:05 +0200 Subject: [PATCH] Rename structure member for `--interactive-first` to be consistent with external parameter --- examples/common.cpp | 2 +- examples/common.h | 2 +- examples/main/main.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/common.cpp b/examples/common.cpp index a0b6f10ad..451941a61 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -159,7 +159,7 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) { } else if (arg == "--interactive-start") { params.interactive = true; } else if (arg == "--interactive-first") { - params.interactive_start = true; + params.interactive_first = true; } else if (arg == "-ins" || arg == "--instruct") { params.instruct = true; } else if (arg == "--color") { diff --git a/examples/common.h b/examples/common.h index cbbc2dfab..232d1ac19 100644 --- a/examples/common.h +++ b/examples/common.h @@ -43,7 +43,7 @@ struct gpt_params { bool interactive = false; // interactive mode bool embedding = false; // get only sentence embedding - bool interactive_start = false; // wait for user input immediately + bool interactive_first = false; // wait for user input immediately bool instruct = false; // instruction mode (used for Alpaca models) bool ignore_eos = false; // do not stop generating after eos diff --git a/examples/main/main.cpp b/examples/main/main.cpp index b7b3c4196..f1eafa0fa 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -175,12 +175,12 @@ int main(int argc, char ** argv) { // in instruct mode, we inject a prefix and a suffix to each input by the user if (params.instruct) { - params.interactive_start = true; + params.interactive_first = true; params.antiprompt.push_back("### Instruction:\n\n"); } // enable interactive mode if reverse prompt or interactive start is specified - if (params.antiprompt.size() != 0 || params.interactive_start) { + if (params.antiprompt.size() != 0 || params.interactive_first) { params.interactive = true; } @@ -243,7 +243,7 @@ int main(int argc, char ** argv) { #endif " - Press Return to return control to LLaMa.\n" " - If you want to submit another line, end your input in '\\'.\n\n"); - is_interacting = params.interactive_start; + is_interacting = params.interactive_first; } bool is_antiprompt = false;