Files
anything-llm/frontend/src/pages/WorkspaceSettings/VectorDatabase/DocumentSimilarityThreshold/index.jsx
Timothy Carambat 610c87ce19 Init support of i18n and English, Mandarin, Spanish, French (#1317)
* Init support of i18n and English and mandarin

* Update common.js (#1320)

* add General Appearance and Chat setting zh translate (#1414)

* add config zh translate (#1461)

* patch some translation pages

* Update locality fixes

* update: complete login page Mandarin translation. (#1709)

update: complete Mandarin translation.

* complete translation

* update github to run validator

* bump to test workflow failure

* bump to fix tests

* update workflow

* refactor lang selector support

* add Spanish and French

* add dictionaries

---------

Co-authored-by: GetOffer.help <13744916+getofferhelp@users.noreply.github.com>
Co-authored-by: AIR <129256286+KochabStar@users.noreply.github.com>
Co-authored-by: Ezio T <ezio5600@gmail.com>
2024-06-19 14:48:19 -07:00

33 lines
1.1 KiB
JavaScript

import { useTranslation } from "react-i18next";
export default function DocumentSimilarityThreshold({
workspace,
setHasChanges,
}) {
const { t } = useTranslation();
return (
<div>
<div className="flex flex-col">
<label htmlFor="name" className="block input-label">
{t("vector-workspace.doc.title")}
</label>
<p className="text-white text-opacity-60 text-xs font-medium py-1.5">
{t("vector-workspace.doc.description")}
</p>
</div>
<select
name="similarityThreshold"
defaultValue={workspace?.similarityThreshold ?? 0.25}
className="bg-zinc-900 text-white text-sm mt-2 rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
onChange={() => setHasChanges(true)}
required={true}
>
<option value={0.0}>{t("vector-workspace.doc.zero")}</option>
<option value={0.25}>{t("vector-workspace.doc.low")}</option>
<option value={0.5}>{t("vector-workspace.doc.medium")}</option>
<option value={0.75}>{t("vector-workspace.doc.high")}</option>
</select>
</div>
);
}