Skip to content

Commit e3e5f8c

Browse files
committed
author mode -> multiline input
1 parent cd205b4 commit e3e5f8c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/common.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
168168
params.embedding = true;
169169
} else if (arg == "--interactive-first") {
170170
params.interactive_first = true;
171-
} else if (arg == "--author-mode") {
172-
params.author_mode = true;
171+
} else if (arg == "--multiline-input") {
172+
params.multiline_input = true;
173173
} else if (arg == "-ins" || arg == "--instruct") {
174174
params.instruct = true;
175175
} else if (arg == "--color") {
@@ -232,7 +232,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
232232
fprintf(stderr, " -i, --interactive run in interactive mode\n");
233233
fprintf(stderr, " --interactive-first run in interactive mode and wait for input right away\n");
234234
fprintf(stderr, " -ins, --instruct run in instruction mode (use with Alpaca models)\n");
235-
fprintf(stderr, " --author-mode allows you to write or paste multiple lines without ending each in '\\'\n");
235+
fprintf(stderr, " --multiline-input allows you to write or paste multiple lines without ending each in '\\'\n");
236236
fprintf(stderr, " -r PROMPT, --reverse-prompt PROMPT\n");
237237
fprintf(stderr, " run in interactive mode and poll user input upon seeing PROMPT (can be\n");
238238
fprintf(stderr, " specified more than once for multiple prompts).\n");
@@ -458,7 +458,7 @@ bool console_readline(console_state & con_st, std::string & line) {
458458
}
459459
}
460460

461-
bool has_more = con_st.author_mode;
461+
bool has_more = con_st.multiline_input;
462462
if (is_special_char) {
463463
fputs("\b \b", stdout); // Move cursor back, print a space, and move cursor back again
464464

examples/common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct gpt_params {
5050
bool interactive_first = false; // wait for user input immediately
5151

5252
bool instruct = false; // instruction mode (used for Alpaca models)
53-
bool author_mode = false; // reverse the usage of `\`
53+
bool multiline_input = false; // reverse the usage of `\`
5454
bool ignore_eos = false; // do not stop generating after eos
5555
bool perplexity = false; // compute perplexity over the prompt
5656
bool use_mmap = true; // use mmap for faster loads
@@ -91,7 +91,7 @@ enum console_color_t {
9191
};
9292

9393
struct console_state {
94-
bool author_mode = false;
94+
bool multiline_input = false;
9595
bool use_color = false;
9696
console_color_t color = CONSOLE_COLOR_DEFAULT;
9797
#if !defined (_WIN32)

examples/main/main.cpp

+2-2
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

@@ -240,7 +240,7 @@ int main(int argc, char ** argv) {
240240

241241
if (params.interactive) {
242242
const char *control_message;
243-
if (con_st.author_mode) {
243+
if (con_st.multiline_input) {
244244
control_message = " - To return control to LLaMa, end your input with '\\'.\n"
245245
" - To return control without starting a new line, end your input with '/'.\n";
246246
} else {

0 commit comments

Comments
 (0)