Fix issue where interactive mode crashes when input exceeds ctx size (#1789)
* Fix issue where interactive mode in the main example crashes when input exceeds ctx size * Ensure the context size is at least 8 tokens in the main example. Closes #1768
This commit is contained in:
parent
12b063f0ec
commit
fa84c4b3e8
3 changed files with 21 additions and 1 deletions
|
@ -632,6 +632,9 @@ void console_set_color(console_state & con_st, console_color_t color) {
|
|||
case CONSOLE_COLOR_USER_INPUT:
|
||||
fprintf(con_st.out, ANSI_BOLD ANSI_COLOR_GREEN);
|
||||
break;
|
||||
case CONSOLE_COLOR_ERROR:
|
||||
fprintf(con_st.out, ANSI_BOLD ANSI_COLOR_RED);
|
||||
break;
|
||||
}
|
||||
con_st.color = color;
|
||||
fflush(con_st.out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue