From f7615093dd3234890ba0c82f1361937927d4a1f8 Mon Sep 17 00:00:00 2001 From: fernsdavid25 <68889657+fernsdavid25@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:32:57 +0530 Subject: [PATCH] Update max_tokens in constants.ts max_tokens for llama 3.1 models must be less than or equal to 8000 but it is set to 8192. just change it to 8000 and the error is fixed. --- app/lib/.server/llm/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/.server/llm/constants.ts b/app/lib/.server/llm/constants.ts index b24acdf2..7b3a0f24 100644 --- a/app/lib/.server/llm/constants.ts +++ b/app/lib/.server/llm/constants.ts @@ -1,5 +1,5 @@ // see https://docs.anthropic.com/en/docs/about-claude/models -export const MAX_TOKENS = 8192; +export const MAX_TOKENS = 8000; // limits the number of model responses that can be returned in a single request export const MAX_RESPONSE_SEGMENTS = 2;