From feca6fa297f5b1d316f761e2ee8ae12459886888 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 6 Jun 2024 00:13:42 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20don't=20override=20max=20tokens?= =?UTF-8?q?=20for=20local=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/completionProvider.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index c94a5c1118..0bc8aaf440 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -637,7 +637,10 @@ export class CompletionProvider { "llamafile", "text-gen-webui", ]; - if (LOCAL_PROVIDERS.includes(llm.providerName)) { + if ( + !config.tabAutocompleteOptions?.maxPromptTokens && + LOCAL_PROVIDERS.includes(llm.providerName) + ) { options.maxPromptTokens = 500; }