diff --git a/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx b/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx index e1b4c518..83ad0c60 100644 --- a/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx +++ b/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx @@ -1,7 +1,13 @@ import React, { useEffect, useState } from "react"; import System from "@/models/system"; import { LMSTUDIO_COMMON_URLS } from "@/utils/constants"; -import { CaretDown, CaretUp, Info, CircleNotch } from "@phosphor-icons/react"; +import { + CaretDown, + CaretUp, + Info, + CircleNotch, + Warning, +} from "@phosphor-icons/react"; import { Tooltip } from "react-tooltip"; import useProviderEndpointAutoDiscovery from "@/hooks/useProviderEndpointAutoDiscovery"; @@ -224,24 +230,51 @@ function LMStudioModelSelection({ settings, basePath = null, apiKey = null }) { if (loading || customModels.length == 0) { return (
- +
+ + {!loading && !!basePath && ( + <> + + +

+ Could not reach LM Studio. Verify the URL is correct and the + LMStudio server is running and accessible. +

+
+ + )} +
-

- Select the LM Studio model for embeddings. Models will load after - entering a valid LM Studio URL. -

); } diff --git a/frontend/src/components/LLMSelection/LMStudioOptions/index.jsx b/frontend/src/components/LLMSelection/LMStudioOptions/index.jsx index 15a749cf..8ec992bf 100644 --- a/frontend/src/components/LLMSelection/LMStudioOptions/index.jsx +++ b/frontend/src/components/LLMSelection/LMStudioOptions/index.jsx @@ -1,5 +1,11 @@ import { useEffect, useState } from "react"; -import { Info, CaretDown, CaretUp, CircleNotch } from "@phosphor-icons/react"; +import { + Info, + CaretDown, + CaretUp, + CircleNotch, + Warning, +} from "@phosphor-icons/react"; import paths from "@/utils/paths"; import System from "@/models/system"; import { LMSTUDIO_COMMON_URLS } from "@/utils/constants"; @@ -249,18 +255,49 @@ function LMStudioModelSelection({ settings, basePath = null, apiKey = null }) { if (loading || customModels.length === 0) { return (
- +
+ + {!loading && !!basePath && ( + <> + + +

+ Could not reach LM Studio. Verify the URL is correct and the + LMStudio server is running and accessible. +

+
+ + )} +
@@ -270,7 +307,7 @@ function LMStudioModelSelection({ settings, basePath = null, apiKey = null }) { return (