diff --git a/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx b/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx index 67367c7f..bbe85ded 100644 --- a/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx +++ b/frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx @@ -1,10 +1,10 @@ import React, { useEffect, useState } from "react"; import System from "@/models/system"; -import PreLoader from "@/components/Preloader"; import { OLLAMA_COMMON_URLS } from "@/utils/constants"; -import { CaretDown, CaretUp, Info } from "@phosphor-icons/react"; +import { CaretDown, CaretUp, Info, CircleNotch } from "@phosphor-icons/react"; import useProviderEndpointAutoDiscovery from "@/hooks/useProviderEndpointAutoDiscovery"; import { Tooltip } from "react-tooltip"; +import { Link } from "react-router-dom"; export default function OllamaLLMOptions({ settings }) { const { @@ -21,9 +21,6 @@ export default function OllamaLLMOptions({ settings }) { initialBasePath: settings?.OllamaLLMBasePath, ENDPOINTS: OLLAMA_COMMON_URLS, }); - const [performanceMode, setPerformanceMode] = useState( - settings?.OllamaLLMPerformanceMode || "base" - ); const [maxTokens, setMaxTokens] = useState( settings?.OllamaLLMTokenLimit || "" ); @@ -56,14 +53,36 @@ export default function OllamaLLMOptions({ settings }) {
- Enter the URL where Ollama is running. -
+ Specify the maximum number of tokens that can be used for
+ the model context window.
+
+ If you leave this field blank, the context window limit will
+ be auto-detected from the model and applied to all chats. If
+ auto-detection fails, a fallback context window limit of
+ 4096 will be used.
+
+ Important: Some models have very large context
+ windows using the full context window limit can dramatically
+ increase the memory usage of your system. For this reason,
+ we will automatically cap the context window limit to 16,384
+ tokens if the model supports more than that and no value is
+ specified.
+
+ If an invalid value is entered, AnythingLLM will handle this
+ for you so that chats do not fail.
+
- Override the context window limit. Leave empty to auto-detect - from the model (defaults to 4096 if detection fails). -
- Enter a Bearer Auth Token for interacting with your
- Ollama server.
-
- Used only if running Ollama behind an authentication
- server.
-
+ Enter a Bearer Auth Token for interacting with
+ your Ollama server.
+
+ Used only if running Ollama behind an authentication
+ server.
+