diff --git a/frontend/src/components/LLMSelection/LiteLLMOptions/index.jsx b/frontend/src/components/LLMSelection/LiteLLMOptions/index.jsx index 34324859..8ed8aefd 100644 --- a/frontend/src/components/LLMSelection/LiteLLMOptions/index.jsx +++ b/frontend/src/components/LLMSelection/LiteLLMOptions/index.jsx @@ -40,7 +40,7 @@ export default function LiteLLMOptions({ settings }) { type="number" name="LiteLLMTokenLimit" className="border-none bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" - placeholder="4096" + placeholder="8192" min={1} onScroll={(e) => e.target.blur()} defaultValue={settings?.LiteLLMTokenLimit} diff --git a/server/utils/AiProviders/liteLLM/index.js b/server/utils/AiProviders/liteLLM/index.js index 5ff8bbe5..5fa1cb35 100644 --- a/server/utils/AiProviders/liteLLM/index.js +++ b/server/utils/AiProviders/liteLLM/index.js @@ -22,7 +22,7 @@ class LiteLLM { apiKey: process.env.LITE_LLM_API_KEY ?? null, }); this.model = modelPreference ?? process.env.LITE_LLM_MODEL_PREF ?? null; - this.maxTokens = process.env.LITE_LLM_MODEL_TOKEN_LIMIT ?? 1024; + if (!this.model) throw new Error("LiteLLM must have a valid model set."); this.limits = { history: this.promptWindowLimit() * 0.15, @@ -132,7 +132,6 @@ class LiteLLM { model: this.model, messages, temperature, - max_tokens: parseInt(this.maxTokens), // LiteLLM requires int }) .catch((e) => { throw new Error(e.message); @@ -168,7 +167,6 @@ class LiteLLM { stream: true, messages, temperature, - max_tokens: parseInt(this.maxTokens), // LiteLLM requires int }), messages, runPromptTokenCalculation: true,