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:
Kerfuffle authored and GitHub committed 2023-06-11 08:19:17 -06:00
1 parent 12b063f0ec
commit fa84c4b3e8
3 files changed
+21 -1

No files matched your search

+2 -1
View File
@@ -112,7 +112,8 @@ struct llama_context * llama_init_from_gpt_params(const gpt_params & params);
enum console_color_t {
CONSOLE_COLOR_DEFAULT=0,
CONSOLE_COLOR_PROMPT,
CONSOLE_COLOR_USER_INPUT
CONSOLE_COLOR_USER_INPUT,
CONSOLE_COLOR_ERROR
};
struct console_state {