summaryrefslogtreecommitdiff
path: root/examples/common.h
diff options
context:
space:
mode:
authorKerfuffle <44031344+KerfuffleV2@users.noreply.github.com>2023-06-11 08:19:17 -0600
committerGitHub <noreply@github.com>2023-06-11 08:19:17 -0600
commitfa84c4b3e80199a5683438f062009c031a06c4fa (patch)
treec0c088e617ec6137a1ea47dc0167fc164c05e2bb /examples/common.h
parent12b063f0ecf280e98028e444fc492ee6222cdcdc (diff)
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
Diffstat (limited to 'examples/common.h')
-rw-r--r--examples/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/common.h b/examples/common.h
index 826e2ae5..6fedb414 100644
--- a/examples/common.h
+++ b/examples/common.h
@@ -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 {