Skip to content

Commit 94dd172

Browse files
committed
author mode -> multiline input
1 parent 52e3190 commit 94dd172

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
@@ -274,10 +274,10 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
274274
params.embedding = true;
275275
} else if (arg == "--interactive-first") {
276276
params.interactive_first = true;
277-
} else if (arg == "--author-mode") {
278-
params.author_mode = true;
279277
} else if (arg == "-ins" || arg == "--instruct") {
280278
params.instruct = true;
279+
} else if (arg == "--multiline-input") {
280+
params.multiline_input = true;
281281
} else if (arg == "--color") {
282282
params.use_color = true;
283283
} else if (arg == "--mlock") {
@@ -368,7 +368,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
368368
fprintf(stderr, " -i, --interactive run in interactive mode\n");
369369
fprintf(stderr, " --interactive-first run in interactive mode and wait for input right away\n");
370370
fprintf(stderr, " -ins, --instruct run in instruction mode (use with Alpaca models)\n");
371-
fprintf(stderr, " --author-mode allows you to write or paste multiple lines without ending each in '\\'\n");
371+
fprintf(stderr, " --multiline-input allows you to write or paste multiple lines without ending each in '\\'\n");
372372
fprintf(stderr, " -r PROMPT, --reverse-prompt PROMPT\n");
373373
fprintf(stderr, " run in interactive mode and poll user input upon seeing PROMPT (can be\n");
374374
fprintf(stderr, " specified more than once for multiple prompts).\n");
@@ -644,7 +644,7 @@ bool console_readline(console_state & con_st, std::string & line) {
644644
}
645645
}
646646

647-
bool has_more = con_st.author_mode;
647+
bool has_more = con_st.multiline_input;
648648
if (is_special_char) {
649649
fputs("\b \b", stdout); // Move cursor back, print a space, and move cursor back again
650650

examples/common.h

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

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

6565
bool instruct = false; // instruction mode (used for Alpaca models)
6666
bool penalize_nl = true; // consider newlines as a repeatable token
@@ -109,7 +109,7 @@ enum console_color_t {
109109
};
110110

111111
struct console_state {
112-
bool author_mode = false;
112+
bool multiline_input = false;
113113
bool use_color = false;
114114
console_color_t color = CONSOLE_COLOR_DEFAULT;
115115
#if !defined (_WIN32)

examples/main/main.cpp

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

@@ -275,7 +275,7 @@ int main(int argc, char ** argv) {
275275

276276
if (params.interactive) {
277277
const char *control_message;
278-
if (con_st.author_mode) {
278+
if (con_st.multiline_input) {
279279
control_message = " - To return control to LLaMa, end your input with '\\'.\n"
280280
" - To return control without starting a new line, end your input with '/'.\n";
281281
} else {

0 commit comments

Comments
 (0)