@@ -4,7 +4,6 @@ import { Dispatch, SetStateAction, useMemo, useState } from "react";
44import { useSWRConfig } from "swr" ;
55import { useFormikContext } from "formik" ;
66import { InputDivider , InputVertical , toast } from "@opal/layouts" ;
7- import { markdown } from "@opal/utils" ;
87import PasswordInputTypeInField from "@/refresh-components/form/PasswordInputTypeInField" ;
98import {
109 LLMProviderFormProps ,
@@ -20,11 +19,11 @@ import {
2019import { submitProvider } from "@/sections/modals/languageModels/svc" ;
2120import { LLMProviderConfiguredSource } from "@/lib/analytics/utils" ;
2221import {
23- CONTAINERIZED_HOST_NOTE ,
2422 ModelSelectionField ,
2523 DisplayNameField ,
2624 ModelAccessField ,
2725 ModalWrapper ,
26+ useApiBaseSubDescription ,
2827} from "@/sections/modals/languageModels/shared" ;
2928import { fetchOllamaModels } from "@/lib/languageModels/svc" ;
3029import { Card , Tabs } from "@opal/components" ;
@@ -56,7 +55,9 @@ function OllamaModalInternals({
5655 setTab,
5756} : OllamaModalInternalsProps ) {
5857 const formikProps = useFormikContext < OllamaModalValues > ( ) ;
59- const settings = useSettings ( ) ;
58+ const apiBaseSubDescription = useApiBaseSubDescription (
59+ "The base URL for your Ollama instance."
60+ ) ;
6061
6162 const isFetchDisabled = useMemo (
6263 ( ) =>
@@ -104,13 +105,7 @@ function OllamaModalInternals({
104105 < InputVertical
105106 withLabel = "api_base"
106107 title = "API Base URL"
107- subDescription = {
108- settings . is_containerized
109- ? markdown (
110- `The base URL for your Ollama instance. ${ CONTAINERIZED_HOST_NOTE } `
111- )
112- : "The base URL for your Ollama instance."
113- }
108+ subDescription = { apiBaseSubDescription }
114109 >
115110 < InputTypeInField
116111 name = "api_base"
0 commit comments