Skip to content

Commit 26ec0a8

Browse files
committed
author mode -> multiline input
1 parent 623055e commit 26ec0a8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/common.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
218218
params.embedding = true;
219219
} else if (arg == "--interactive-first") {
220220
params.interactive_first = true;
221-
} else if (arg == "--author-mode") {
222-
params.author_mode = true;
223221
} else if (arg == "-ins" || arg == "--instruct") {
224222
params.instruct = true;
223+
} else if (arg == "--multiline-input") {
224+
params.multiline_input = true;
225225
} else if (arg == "--color") {
226226
params.use_color = true;
227227
} else if (arg == "--mlock") {
@@ -303,7 +303,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
303303
fprintf(stderr, " -i, --interactive run in interactive mode\n");
304304
fprintf(stderr, " --interactive-first run in interactive mode and wait for input right away\n");
305305
fprintf(stderr, " -ins, --instruct run in instruction mode (use with Alpaca models)\n");
306-
fprintf(stderr, " --author-mode allows you to write or paste multiple lines without ending each in '\\'\n");
306+
fprintf(stderr, " --multiline-input allows you to write or paste multiple lines without ending each in '\\'\n");
307307
fprintf(stderr, " -r PROMPT, --reverse-prompt PROMPT\n");
308308
fprintf(stderr, " run in interactive mode and poll user input upon seeing PROMPT (can be\n");
309309
fprintf(stderr, " specified more than once for multiple prompts).\n");
@@ -544,7 +544,7 @@ bool console_readline(console_state & con_st, std::string & line) {
544544
}
545545
}
546546

547-
bool has_more = con_st.author_mode;
547+
bool has_more = con_st.multiline_input;
548548
if (is_special_char) {
549549
fputs("\b \b", stdout); // Move cursor back, print a space, and move cursor back again
550550

examples/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct gpt_params {
5858

5959
bool embedding = false; // get only sentence embedding
6060
bool interactive_first = false; // wait for user input immediately
61-
bool author_mode = false; // reverse the usage of `\`
61+
bool multiline_input = false; // reverse the usage of `\`
6262

6363
bool instruct = false; // instruction mode (used for Alpaca models)
6464
bool penalize_nl = true; // consider newlines as a repeatable token
@@ -101,7 +101,7 @@ enum console_color_t {
101101
};
102102

103103
struct console_state {
104-
bool author_mode = false;
104+
bool multiline_input = false;
105105
bool use_color = false;
106106
console_color_t color = CONSOLE_COLOR_DEFAULT;
107107
#if !defined (_WIN32)

examples/main/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(int argc, char ** argv) {
5555
// save choice to use color for later
5656
// (note for later: this is a slightly awkward choice)
5757
con_st.use_color = params.use_color;
58-
con_st.author_mode = params.author_mode;
58+
con_st.multiline_input = params.multiline_input;
5959
console_init(con_st);
6060
atexit([]() { console_cleanup(con_st); });
6161

@@ -286,7 +286,7 @@ int main(int argc, char ** argv) {
286286

287287
if (params.interactive) {
288288
const char *control_message;
289-
if (con_st.author_mode) {
289+
if (con_st.multiline_input) {
290290
control_message = " - To return control to LLaMa, end your input with '\\'.\n"
291291
" - To return control without starting a new line, end your input with '/'.\n";
292292
} else {

0 commit comments

Comments
 (0)