From 403b465c0f54fde036e0214823549ea3d457b523 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 12 Nov 2024 23:15:09 -0800 Subject: [PATCH] update context length for gpt and max tokens --- core/llm/constants.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/llm/constants.ts b/core/llm/constants.ts index 52265d509..59a9c301a 100644 --- a/core/llm/constants.ts +++ b/core/llm/constants.ts @@ -1,4 +1,4 @@ -const DEFAULT_MAX_TOKENS = 2048; +const DEFAULT_MAX_TOKENS = 4096; const DEFAULT_CONTEXT_LENGTH = 8096; const DEFAULT_TEMPERATURE = 0.5; @@ -7,7 +7,7 @@ const DEFAULT_ARGS = { temperature: DEFAULT_TEMPERATURE, }; -const GPT_4_CTX_LEN = 4096; +const GPT_4_CTX_LEN = 128_000; const CONTEXT_LENGTH_FOR_MODEL: { [name: string]: number } = { "gpt-3.5-turbo": 4096, @@ -16,9 +16,9 @@ const CONTEXT_LENGTH_FOR_MODEL: { [name: string]: number } = { "gpt-35-turbo-16k": 16_384, "gpt-35-turbo-0613": 4096, "gpt-35-turbo": 4096, - "gpt-4": GPT_4_CTX_LEN, - "gpt-4-32k": GPT_4_CTX_LEN, - "gpt-4-turbo-preview": GPT_4_CTX_LEN, + "gpt-4": 4096, + "gpt-4-32k": 32_000, + "gpt-4-turbo-preview": 32_000, "gpt-4o": GPT_4_CTX_LEN, "gpt-4o-mini": GPT_4_CTX_LEN, "gpt-4-vision": GPT_4_CTX_LEN,