make ollama onboarding have localhost url by default
This commit is contained in:
parent
4f3bad9a9d
commit
622eb422b2
1 changed files with 137 additions and 135 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import { useGetSettingsQuery } from "@/app/api/queries/useGetSettingsQuery";
|
||||||
import { LabelInput } from "@/components/label-input";
|
import { LabelInput } from "@/components/label-input";
|
||||||
import { LabelWrapper } from "@/components/label-wrapper";
|
import { LabelWrapper } from "@/components/label-wrapper";
|
||||||
import OllamaLogo from "@/components/logo/ollama-logo";
|
import OllamaLogo from "@/components/logo/ollama-logo";
|
||||||
|
|
@ -19,7 +20,8 @@ export function OllamaOnboarding({
|
||||||
sampleDataset: boolean;
|
sampleDataset: boolean;
|
||||||
setSampleDataset: (dataset: boolean) => void;
|
setSampleDataset: (dataset: boolean) => void;
|
||||||
}) {
|
}) {
|
||||||
const [endpoint, setEndpoint] = useState("http://localhost:11434");
|
const { data: settings } = useGetSettingsQuery();
|
||||||
|
const [endpoint, setEndpoint] = useState(`http://${settings?.localhost_url ?? "localhost"}:11434`);
|
||||||
const [showConnecting, setShowConnecting] = useState(false);
|
const [showConnecting, setShowConnecting] = useState(false);
|
||||||
const debouncedEndpoint = useDebouncedValue(endpoint, 500);
|
const debouncedEndpoint = useDebouncedValue(endpoint, 500);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue