Updated copies

This commit is contained in:
Lucas Oliveira 2025-09-24 11:51:47 -03:00
parent 004c955fba
commit ed370f02bc
5 changed files with 30 additions and 42 deletions

View file

@ -48,7 +48,7 @@ export function AdvancedOnboarding({
<LabelWrapper <LabelWrapper
label="Embedding model" label="Embedding model"
description="Its recommended that you use XYZ, ABC, or DEF models for best performance." description="Its recommended that you use XYZ, ABC, or DEF models for best performance."
helperText="The embedding model for your Ollama server." helperText="Model used for knowledge ingest and retrieval"
id="embedding-model" id="embedding-model"
required={true} required={true}
> >
@ -64,7 +64,7 @@ export function AdvancedOnboarding({
<LabelWrapper <LabelWrapper
label="Language model" label="Language model"
description="Its recommended that you use XYZ, ABC, or DEF models for best performance." description="Its recommended that you use XYZ, ABC, or DEF models for best performance."
helperText="The embedding model for your Ollama server." helperText="Model used for chat"
id="embedding-model" id="embedding-model"
required={true} required={true}
> >
@ -79,7 +79,7 @@ export function AdvancedOnboarding({
{(hasLanguageModels || hasEmbeddingModels) && <Separator />} {(hasLanguageModels || hasEmbeddingModels) && <Separator />}
<LabelWrapper <LabelWrapper
label="Sample dataset" label="Sample dataset"
description="Ingest two small PDFs" description="Load 2 sample PDFs to chat with data immediately."
id="sample-dataset" id="sample-dataset"
flex flex
> >

View file

@ -104,7 +104,7 @@ export function IBMOnboarding({
<div className="space-y-4"> <div className="space-y-4">
<LabelWrapper <LabelWrapper
label="watsonx.ai API Endpoint" label="watsonx.ai API Endpoint"
helperText="The API endpoint for your watsonx.ai account." helperText="Base URL of the API"
id="api-endpoint" id="api-endpoint"
required required
> >
@ -143,16 +143,9 @@ export function IBMOnboarding({
)} )}
{modelsError && ( {modelsError && (
<p className="text-mmd text-accent-amber-foreground"> <p className="text-mmd text-accent-amber-foreground">
Invalid configuration or connection failed Connection failed. Check your configuration.
</p> </p>
)} )}
{modelsData &&
(modelsData.language_models?.length > 0 ||
modelsData.embedding_models?.length > 0) && (
<p className="text-mmd text-accent-emerald-foreground">
Configuration is valid
</p>
)}
</div> </div>
<AdvancedOnboarding <AdvancedOnboarding
icon={<IBMLogo className="w-4 h-4" />} icon={<IBMLogo className="w-4 h-4" />}

View file

@ -73,8 +73,8 @@ export function OllamaOnboarding({
<div className="space-y-4"> <div className="space-y-4">
<div className="space-y-1"> <div className="space-y-1">
<LabelInput <LabelInput
label="Ollama Endpoint" label="Ollama Base URL"
helperText="The endpoint for your Ollama server." helperText="Base URL of your Ollama server"
id="api-endpoint" id="api-endpoint"
required required
placeholder="http://localhost:11434" placeholder="http://localhost:11434"
@ -88,43 +88,41 @@ export function OllamaOnboarding({
)} )}
{hasConnectionError && ( {hasConnectionError && (
<p className="text-mmd text-accent-amber-foreground"> <p className="text-mmd text-accent-amber-foreground">
Cant reach Ollama at {debouncedEndpoint}. Update the endpoint or Cant reach Ollama at {debouncedEndpoint}. Update the base URL or
start the server. start the server.
</p> </p>
)} )}
{hasNoModels && ( {hasNoModels && (
<p className="text-mmd text-accent-amber-foreground"> <p className="text-mmd text-accent-amber-foreground">
No models found. Please install some models on your Ollama server. No models found. Install embedding and agent models on your Ollama
</p> server.
)}
{isValidConnection && (
<p className="text-mmd text-accent-emerald-foreground">
Connected successfully
</p> </p>
)} )}
</div> </div>
<LabelWrapper <LabelWrapper
label="Embedding model" label="Embedding model"
helperText="The embedding model for your Ollama server." helperText="Model used for knowledge ingest and retrieval"
id="embedding-model" id="embedding-model"
required={true} required={true}
> >
<ModelSelector <ModelSelector
options={embeddingModels} options={embeddingModels}
icon={<OllamaLogo className="w-4 h-4" />} icon={<OllamaLogo className="w-4 h-4" />}
noOptionsPlaceholder="No embedding models detected. Install an embedding model to continue."
value={embeddingModel} value={embeddingModel}
onValueChange={setEmbeddingModel} onValueChange={setEmbeddingModel}
/> />
</LabelWrapper> </LabelWrapper>
<LabelWrapper <LabelWrapper
label="Language model" label="Language model"
helperText="The embedding model for your Ollama server." helperText="Model used for chat"
id="embedding-model" id="embedding-model"
required={true} required={true}
> >
<ModelSelector <ModelSelector
options={languageModels} options={languageModels}
icon={<OllamaLogo className="w-4 h-4" />} icon={<OllamaLogo className="w-4 h-4" />}
noOptionsPlaceholder="No language models detected. Install a language model to continue."
value={languageModel} value={languageModel}
onValueChange={setLanguageModel} onValueChange={setLanguageModel}
/> />

View file

@ -71,16 +71,9 @@ export function OpenAIOnboarding({
)} )}
{modelsError && ( {modelsError && (
<p className="text-mmd text-accent-amber-foreground"> <p className="text-mmd text-accent-amber-foreground">
Invalid API key Invalid OpenAI API key. Verify or replace the key.
</p> </p>
)} )}
{modelsData &&
(modelsData.language_models?.length > 0 ||
modelsData.embedding_models?.length > 0) && (
<p className="text-mmd text-accent-emerald-foreground">
API Key is valid
</p>
)}
</div> </div>
<AdvancedOnboarding <AdvancedOnboarding
icon={<OpenAILogo className="w-4 h-4" />} icon={<OpenAILogo className="w-4 h-4" />}

View file

@ -186,18 +186,22 @@ function OnboardingPage() {
<CardFooter className="flex justify-end"> <CardFooter className="flex justify-end">
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>
<Button <div>
size="sm" <Button
onClick={handleComplete} size="sm"
disabled={!isComplete} onClick={handleComplete}
loading={onboardingMutation.isPending} disabled={!isComplete}
> loading={onboardingMutation.isPending}
Complete >
</Button> Complete
</Button>
</div>
</TooltipTrigger> </TooltipTrigger>
<TooltipContent> {!isComplete && (
{!isComplete ? "Please fill in all required fields" : ""} <TooltipContent>
</TooltipContent> Please fill in all required fields
</TooltipContent>
)}
</Tooltip> </Tooltip>
</CardFooter> </CardFooter>
</Card> </Card>