From f0104fe1a9a21bb4be08ebf74553b4aa4318b7ad Mon Sep 17 00:00:00 2001 From: Timothy Carambat Date: Wed, 7 May 2025 09:37:31 -0700 Subject: [PATCH] Merge commit from fork --- .../src/components/LLMSelection/OllamaLLMOptions/index.jsx | 4 +++- server/models/systemSettings.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx b/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx index c98877c5..0721dfa8 100644 --- a/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx +++ b/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx @@ -19,7 +19,6 @@ export default function OllamaLLMOptions({ settings }) { } = useProviderEndpointAutoDiscovery({ provider: "ollama", initialBasePath: settings?.OllamaLLMBasePath, - initialAuthToken: settings?.OllamaLLMAuthToken, ENDPOINTS: OLLAMA_COMMON_URLS, }); const [performanceMode, setPerformanceMode] = useState( @@ -209,6 +208,9 @@ export default function OllamaLLMOptions({ settings }) { name="OllamaLLMAuthToken" className="border-none bg-theme-settings-input-bg mt-2 text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg outline-none block w-full p-2.5" placeholder="Ollama Auth Token" + defaultValue={ + settings?.OllamaLLMAuthToken ? "*".repeat(20) : "" + } value={authTokenValue.value} onChange={authToken.onChange} onBlur={authToken.onBlur} diff --git a/server/models/systemSettings.js b/server/models/systemSettings.js index 566632aa..5f8c761c 100644 --- a/server/models/systemSettings.js +++ b/server/models/systemSettings.js @@ -467,12 +467,12 @@ const SystemSettings = { LocalAiTokenLimit: process.env.LOCAL_AI_MODEL_TOKEN_LIMIT, // Ollama LLM Keys + OllamaLLMAuthToken: !!process.env.OLLAMA_AUTH_TOKEN, OllamaLLMBasePath: process.env.OLLAMA_BASE_PATH, OllamaLLMModelPref: process.env.OLLAMA_MODEL_PREF, OllamaLLMTokenLimit: process.env.OLLAMA_MODEL_TOKEN_LIMIT, OllamaLLMKeepAliveSeconds: process.env.OLLAMA_KEEP_ALIVE_TIMEOUT ?? 300, OllamaLLMPerformanceMode: process.env.OLLAMA_PERFORMANCE_MODE ?? "base", - OllamaLLMAuthToken: process.env.OLLAMA_AUTH_TOKEN ?? null, // Novita LLM Keys NovitaLLMApiKey: !!process.env.NOVITA_LLM_API_KEY,