diff --git a/web/src/components/max-token-number-from-field.tsx b/web/src/components/max-token-number-from-field.tsx index b01598d93..c4e07da4f 100644 --- a/web/src/components/max-token-number-from-field.tsx +++ b/web/src/components/max-token-number-from-field.tsx @@ -17,7 +17,7 @@ export function MaxTokenNumberFormField({ max = 2048, initialValue }: IProps) { tooltip={t('chunkTokenNumberTip')} max={max} defaultValue={initialValue ?? 0} - layout={FormLayout.Horizontal} + layout={FormLayout.Vertical} > ); } diff --git a/web/src/components/slider-input-form-field.tsx b/web/src/components/slider-input-form-field.tsx index c31408192..c91007f22 100644 --- a/web/src/components/slider-input-form-field.tsx +++ b/web/src/components/slider-input-form-field.tsx @@ -1,6 +1,6 @@ import { FormLayout } from '@/constants/form'; import { cn } from '@/lib/utils'; -import { ReactNode } from 'react'; +import { ReactNode, useMemo } from 'react'; import { useFormContext } from 'react-hook-form'; import { SingleFormSlider } from './ui/dual-range-slider'; import { @@ -40,7 +40,7 @@ export function SliderInputFormField({ }: SliderInputFormFieldProps) { const form = useFormContext(); - const isHorizontal = layout === FormLayout.Horizontal; + const isHorizontal = useMemo(() => layout === FormLayout.Vertical, [layout]); return ( ( -
+
- * {t('embeddingModel')} -
+