diff --git a/web/screens/Chat/ModelSetting/SettingComponent.tsx b/web/screens/Chat/ModelSetting/SettingComponent.tsx index 396043f77a..43df16430d 100644 --- a/web/screens/Chat/ModelSetting/SettingComponent.tsx +++ b/web/screens/Chat/ModelSetting/SettingComponent.tsx @@ -3,17 +3,12 @@ import { InputComponentProps, CheckboxComponentProps, SliderComponentProps, - InferenceEngine, } from '@janhq/core' -import { useAtomValue } from 'jotai/react' - import Checkbox from '@/containers/Checkbox' import ModelConfigInput from '@/containers/ModelConfigInput' import SliderRightPanel from '@/containers/SliderRightPanel' -import { activeThreadAtom } from '@/helpers/atoms/Thread.atom' - type Props = { componentProps: SettingComponentProps[] disabled?: boolean @@ -25,7 +20,6 @@ const SettingComponent: React.FC = ({ disabled = false, onValueUpdated, }) => { - const activeThread = useAtomValue(activeThreadAtom) const components = componentProps.map((data) => { switch (data.controllerType) { case 'slider': { @@ -37,16 +31,7 @@ const SettingComponent: React.FC = ({ title={data.title} description={data.description} min={min} - max={ - data.key === 'max_tokens' && - activeThread && - activeThread.assistants[0].model.engine === InferenceEngine.nitro - ? Number( - activeThread && - activeThread.assistants[0].model.settings.ctx_len - ) - : max - } + max={max} step={step} value={value} name={data.key} diff --git a/web/screens/Chat/ModelSetting/predefinedComponent.ts b/web/screens/Chat/ModelSetting/predefinedComponent.ts index 91c3f71e1e..eeb2274a39 100644 --- a/web/screens/Chat/ModelSetting/predefinedComponent.ts +++ b/web/screens/Chat/ModelSetting/predefinedComponent.ts @@ -36,7 +36,7 @@ export const presetConfiguration: Record = { min: 128, max: 4096, step: 128, - value: 2048, + value: 4096, }, requireModelReload: true, configType: 'setting',