From 4b6eceb339430ed3cd55e3425a59e5923eede49a Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 3 Jan 2025 12:54:21 +0700 Subject: [PATCH] fix: max_tokens revert back to 8192 automatically when creating a new thread --- web/hooks/useCreateNewThread.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/hooks/useCreateNewThread.ts b/web/hooks/useCreateNewThread.ts index 9291577a0d..126fa1a940 100644 --- a/web/hooks/useCreateNewThread.ts +++ b/web/hooks/useCreateNewThread.ts @@ -98,7 +98,7 @@ export const useCreateNewThread = () => { // Use ctx length by default const overriddenParameters = { max_tokens: !isLocalEngine(defaultModel?.engine) - ? (defaultModel?.parameters.token_limit ?? 8192) + ? (defaultModel?.parameters.max_tokens ?? 8192) : defaultContextLength, }