diff --git a/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx b/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx index da0e7b9f..b288dc6c 100644 --- a/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx +++ b/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx @@ -21,6 +21,9 @@ function castToType(key, value) { similarityThreshold: { cast: (value) => parseFloat(value), }, + topN: { + cast: (value) => Number(value), + }, }; if (!definitions.hasOwnProperty(key)) return value; @@ -236,6 +239,38 @@ export default function WorkspaceSettings({ active, workspace, settings }) { autoComplete="off" onChange={() => setHasChanges(true)} /> + +
+
+ +

+ This setting controls the maximum amount of context + snippets the will be sent to the LLM for per chat or + query. +
+ Recommended: 4 +

+
+ e.target.blur()} + defaultValue={workspace?.topN ?? 4} + className="bg-zinc-900 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" + placeholder="4" + required={true} + autoComplete="off" + onChange={() => setHasChanges(true)} + /> +