fix label for chunk length setting (#4515)
This commit is contained in:
parent
8bc6aa7126
commit
4e6f0b33ab
@ -1,5 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { CaretDown, CaretUp } from "@phosphor-icons/react";
|
||||
import { CaretDown, CaretUp, Info } from "@phosphor-icons/react";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
|
||||
export default function GenericOpenAiEmbeddingOptions({ settings }) {
|
||||
const [showAdvancedControls, setShowAdvancedControls] = useState(false);
|
||||
@ -37,9 +38,22 @@ export default function GenericOpenAiEmbeddingOptions({ settings }) {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col w-60">
|
||||
<label className="text-white text-sm font-semibold block mb-3">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<div
|
||||
data-tooltip-place="top"
|
||||
data-tooltip-id="max-embedding-chunk-length-tooltip"
|
||||
className="flex gap-x-1 items-center mb-3"
|
||||
>
|
||||
<Info
|
||||
size={16}
|
||||
className="text-theme-text-secondary cursor-pointer"
|
||||
/>
|
||||
<label className="text-white text-sm font-semibold block">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<Tooltip id="max-embedding-chunk-length-tooltip">
|
||||
Maximum length of text chunks, in characters, for embedding.
|
||||
</Tooltip>
|
||||
</div>
|
||||
<input
|
||||
type="number"
|
||||
name="EmbeddingModelMaxChunkLength"
|
||||
|
||||
@ -2,7 +2,8 @@ import React, { useEffect, useState } from "react";
|
||||
import System from "@/models/system";
|
||||
import PreLoader from "@/components/Preloader";
|
||||
import { LMSTUDIO_COMMON_URLS } from "@/utils/constants";
|
||||
import { CaretDown, CaretUp } from "@phosphor-icons/react";
|
||||
import { CaretDown, CaretUp, Info } from "@phosphor-icons/react";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
import useProviderEndpointAutoDiscovery from "@/hooks/useProviderEndpointAutoDiscovery";
|
||||
|
||||
export default function LMStudioEmbeddingOptions({ settings }) {
|
||||
@ -32,9 +33,22 @@ export default function LMStudioEmbeddingOptions({ settings }) {
|
||||
<div className="w-full flex items-start gap-[36px] mt-1.5">
|
||||
<LMStudioModelSelection settings={settings} basePath={basePath.value} />
|
||||
<div className="flex flex-col w-60">
|
||||
<label className="text-white text-sm font-semibold block mb-2">
|
||||
Max Embedding Chunk Length
|
||||
</label>
|
||||
<div
|
||||
data-tooltip-place="top"
|
||||
data-tooltip-id="max-embedding-chunk-length-tooltip"
|
||||
className="flex gap-x-1 items-center mb-3"
|
||||
>
|
||||
<Info
|
||||
size={16}
|
||||
className="text-theme-text-secondary cursor-pointer"
|
||||
/>
|
||||
<label className="text-white text-sm font-semibold block">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<Tooltip id="max-embedding-chunk-length-tooltip">
|
||||
Maximum length of text chunks, in characters, for embedding.
|
||||
</Tooltip>
|
||||
</div>
|
||||
<input
|
||||
type="number"
|
||||
name="EmbeddingModelMaxChunkLength"
|
||||
@ -48,7 +62,7 @@ export default function LMStudioEmbeddingOptions({ settings }) {
|
||||
autoComplete="off"
|
||||
/>
|
||||
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
|
||||
Maximum length of text chunks for embedding.
|
||||
Maximum length of text chunks, in characters, for embedding.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import System from "@/models/system";
|
||||
import { Warning } from "@phosphor-icons/react";
|
||||
import { Warning, Info } from "@phosphor-icons/react";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
|
||||
export default function LiteLLMOptions({ settings }) {
|
||||
@ -35,9 +35,22 @@ export default function LiteLLMOptions({ settings }) {
|
||||
apiKey={apiKey}
|
||||
/>
|
||||
<div className="flex flex-col w-60">
|
||||
<label className="text-white text-sm font-semibold block mb-3">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<div
|
||||
data-tooltip-place="top"
|
||||
data-tooltip-id="max-embedding-chunk-length-tooltip"
|
||||
className="flex gap-x-1 items-center mb-3"
|
||||
>
|
||||
<Info
|
||||
size={16}
|
||||
className="text-theme-text-secondary cursor-pointer"
|
||||
/>
|
||||
<label className="text-white text-sm font-semibold block">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<Tooltip id="max-embedding-chunk-length-tooltip">
|
||||
Maximum length of text chunks, in characters, for embedding.
|
||||
</Tooltip>
|
||||
</div>
|
||||
<input
|
||||
type="number"
|
||||
name="EmbeddingModelMaxChunkLength"
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { CaretDown, CaretUp } from "@phosphor-icons/react";
|
||||
import { CaretDown, CaretUp, Info } from "@phosphor-icons/react";
|
||||
import System from "@/models/system";
|
||||
import PreLoader from "@/components/Preloader";
|
||||
import { LOCALAI_COMMON_URLS } from "@/utils/constants";
|
||||
import useProviderEndpointAutoDiscovery from "@/hooks/useProviderEndpointAutoDiscovery";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
|
||||
export default function LocalAiOptions({ settings }) {
|
||||
const {
|
||||
@ -30,9 +31,22 @@ export default function LocalAiOptions({ settings }) {
|
||||
basePath={basePath.value}
|
||||
/>
|
||||
<div className="flex flex-col w-60">
|
||||
<label className="text-white text-sm font-semibold block mb-2">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<div
|
||||
data-tooltip-place="top"
|
||||
data-tooltip-id="max-embedding-chunk-length-tooltip"
|
||||
className="flex gap-x-1 items-center mb-3"
|
||||
>
|
||||
<Info
|
||||
size={16}
|
||||
className="text-theme-text-secondary cursor-pointer"
|
||||
/>
|
||||
<label className="text-white text-sm font-semibold block">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<Tooltip id="max-embedding-chunk-length-tooltip">
|
||||
Maximum length of text chunks, in characters, for embedding.
|
||||
</Tooltip>
|
||||
</div>
|
||||
<input
|
||||
type="number"
|
||||
name="EmbeddingModelMaxChunkLength"
|
||||
|
||||
@ -2,7 +2,8 @@ import React, { useEffect, useState } from "react";
|
||||
import System from "@/models/system";
|
||||
import PreLoader from "@/components/Preloader";
|
||||
import { OLLAMA_COMMON_URLS } from "@/utils/constants";
|
||||
import { CaretDown, CaretUp } from "@phosphor-icons/react";
|
||||
import { CaretDown, CaretUp, Info } from "@phosphor-icons/react";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
import useProviderEndpointAutoDiscovery from "@/hooks/useProviderEndpointAutoDiscovery";
|
||||
|
||||
export default function OllamaEmbeddingOptions({ settings }) {
|
||||
@ -35,9 +36,22 @@ export default function OllamaEmbeddingOptions({ settings }) {
|
||||
basePath={basePath.value}
|
||||
/>
|
||||
<div className="flex flex-col w-60">
|
||||
<label className="text-white text-sm font-semibold block mb-2">
|
||||
Max Embedding Chunk Length
|
||||
</label>
|
||||
<div
|
||||
data-tooltip-place="top"
|
||||
data-tooltip-id="max-embedding-chunk-length-tooltip"
|
||||
className="flex gap-x-1 items-center mb-3"
|
||||
>
|
||||
<Info
|
||||
size={16}
|
||||
className="text-theme-text-secondary cursor-pointer"
|
||||
/>
|
||||
<label className="text-white text-sm font-semibold block">
|
||||
Max embedding chunk length
|
||||
</label>
|
||||
<Tooltip id="max-embedding-chunk-length-tooltip">
|
||||
Maximum length of text chunks, in characters, for embedding.
|
||||
</Tooltip>
|
||||
</div>
|
||||
<input
|
||||
type="number"
|
||||
name="EmbeddingModelMaxChunkLength"
|
||||
@ -50,9 +64,6 @@ export default function OllamaEmbeddingOptions({ settings }) {
|
||||
required={true}
|
||||
autoComplete="off"
|
||||
/>
|
||||
<p className="text-xs leading-[18px] font-base text-white text-opacity-60 mt-2">
|
||||
Maximum length of text chunks for embedding.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-start mt-4">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user