From 94dd17247af7bbf28098bc29d4a71849d8554e1f Mon Sep 17 00:00:00 2001 From: Danny Daemonic Date: Sun, 23 Apr 2023 07:05:02 -0700 Subject: [PATCH] author mode -> multiline input --- examples/common.cpp | 8 ++++---- examples/common.h | 4 ++-- examples/main/main.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/common.cpp b/examples/common.cpp index cd37f96f4..f7973fc52 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -274,10 +274,10 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) { params.embedding = true; } else if (arg == "--interactive-first") { params.interactive_first = true; - } else if (arg == "--author-mode") { - params.author_mode = true; } else if (arg == "-ins" || arg == "--instruct") { params.instruct = true; + } else if (arg == "--multiline-input") { + params.multiline_input = true; } else if (arg == "--color") { params.use_color = true; } else if (arg == "--mlock") { @@ -368,7 +368,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) { fprintf(stderr, " -i, --interactive run in interactive mode\n"); fprintf(stderr, " --interactive-first run in interactive mode and wait for input right away\n"); fprintf(stderr, " -ins, --instruct run in instruction mode (use with Alpaca models)\n"); - fprintf(stderr, " --author-mode allows you to write or paste multiple lines without ending each in '\\'\n"); + fprintf(stderr, " --multiline-input allows you to write or paste multiple lines without ending each in '\\'\n"); fprintf(stderr, " -r PROMPT, --reverse-prompt PROMPT\n"); fprintf(stderr, " run in interactive mode and poll user input upon seeing PROMPT (can be\n"); fprintf(stderr, " specified more than once for multiple prompts).\n"); @@ -644,7 +644,7 @@ bool console_readline(console_state & con_st, std::string & line) { } } - bool has_more = con_st.author_mode; + bool has_more = con_st.multiline_input; if (is_special_char) { fputs("\b \b", stdout); // Move cursor back, print a space, and move cursor back again diff --git a/examples/common.h b/examples/common.h index cb1e384e2..0950fc7c3 100644 --- a/examples/common.h +++ b/examples/common.h @@ -60,7 +60,7 @@ struct gpt_params { bool embedding = false; // get only sentence embedding bool interactive_first = false; // wait for user input immediately - bool author_mode = false; // reverse the usage of `\` + bool multiline_input = false; // reverse the usage of `\` bool instruct = false; // instruction mode (used for Alpaca models) bool penalize_nl = true; // consider newlines as a repeatable token @@ -109,7 +109,7 @@ enum console_color_t { }; struct console_state { - bool author_mode = false; + bool multiline_input = false; bool use_color = false; console_color_t color = CONSOLE_COLOR_DEFAULT; #if !defined (_WIN32) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 5124b8aa9..10ae61422 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -59,7 +59,7 @@ int main(int argc, char ** argv) { // save choice to use color for later // (note for later: this is a slightly awkward choice) con_st.use_color = params.use_color; - con_st.author_mode = params.author_mode; + con_st.multiline_input = params.multiline_input; console_init(con_st); atexit([]() { console_cleanup(con_st); }); @@ -275,7 +275,7 @@ int main(int argc, char ** argv) { if (params.interactive) { const char *control_message; - if (con_st.author_mode) { + if (con_st.multiline_input) { control_message = " - To return control to LLaMa, end your input with '\\'.\n" " - To return control without starting a new line, end your input with '/'.\n"; } else {