File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ int main(int argc, char ** argv) {
264
264
bool is_stop_prompt = false ;
265
265
} antiprompt;
266
266
267
- bool input_noecho = false ;
267
+ bool input_echo = true ;
268
268
269
269
int n_past = 0 ;
270
270
int n_remain = params.n_predict ;
@@ -346,7 +346,7 @@ int main(int argc, char ** argv) {
346
346
embd.push_back (id);
347
347
348
348
// echo this to console
349
- input_noecho = false ;
349
+ input_echo = true ;
350
350
351
351
// decrement remaining sampling budget
352
352
--n_remain;
@@ -364,14 +364,14 @@ int main(int argc, char ** argv) {
364
364
}
365
365
366
366
// display text
367
- if (!input_noecho ) {
367
+ if (input_echo ) {
368
368
for (auto id : embd) {
369
369
printf (" %s" , llama_token_to_str (ctx, id));
370
370
}
371
371
fflush (stdout);
372
372
}
373
373
// reset color to default if we there is no pending user input
374
- if (!input_noecho && (int )embd_inp.size () == n_consumed) {
374
+ if (input_echo && (int )embd_inp.size () == n_consumed) {
375
375
set_console_color (con_st, CONSOLE_COLOR_DEFAULT);
376
376
}
377
377
@@ -507,7 +507,7 @@ int main(int argc, char ** argv) {
507
507
n_remain -= line_inp.size ();
508
508
}
509
509
510
- input_noecho = true ; // do not echo this again
510
+ input_echo = false ; // do not echo this again
511
511
}
512
512
513
513
if (n_past > 0 ) {
You can’t perform that action at this time.
0 commit comments