-
- {service === "embedding" ? t("Endpoint URL") : t("Base URL")}
-
-
- updateProfileField(service, "base_url", e.target.value)
- }
- placeholder={
- service === "embedding"
- ? "https://api.openai.com/v1/embeddings"
- : "https://api.openai.com/v1"
- }
- />
- {service === "embedding" && (
-
- {t(
- "Embedding requests are sent to this URL exactly; DeepTutor does not append /embeddings or /api/embed at request time.",
- )}
-
- )}
-
-
- {t("API Key")}
-
-
+ {fields.baseUrl && (
+
+
+ {service === "embedding" ? t("Endpoint URL") : t("Base URL")}
+
- updateProfileField(service, "api_key", e.target.value)
+ updateProfileField(service, "base_url", e.target.value)
+ }
+ placeholder={
+ service === "embedding"
+ ? "https://api.openai.com/v1/embeddings"
+ : service === "search"
+ ? "http://localhost:8888"
+ : "https://api.openai.com/v1"
}
- placeholder="sk-..."
/>
-
+ {service === "embedding" && (
+
+ {t(
+ "Embedding requests are sent to this URL exactly; DeepTutor does not append /embeddings or /api/embed at request time.",
+ )}
+
+ )}
+ {searxngMissingBaseUrl && (
+
+ {t("Required — without it, search falls back to DuckDuckGo.")}
+
+ )}
-
+ )}
+ {fields.apiKey && (
+
+
+ {t("API Key")}
+
+
+
+ updateProfileField(service, "api_key", e.target.value)
+ }
+ placeholder="sk-..."
+ />
+
+
+
+ )}