mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-07-30 04:42:02 +08:00
### What problem does this PR solve? Fix: Remove the max token parameter. #5640 #5646 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
251ba7f058
commit
94d7af00b8
@ -273,54 +273,6 @@ const LlmSettingItems = ({ prefix, formItemLayout = {} }: IProps) => {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
label={t('maxTokens')}
|
|
||||||
tooltip={t('maxTokensTip')}
|
|
||||||
{...formItemLayout}
|
|
||||||
>
|
|
||||||
<Flex gap={20} align="center">
|
|
||||||
<Form.Item
|
|
||||||
name={'maxTokensEnabled'}
|
|
||||||
valuePropName="checked"
|
|
||||||
noStyle
|
|
||||||
>
|
|
||||||
<Switch size="small" />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item noStyle dependencies={['maxTokensEnabled']}>
|
|
||||||
{({ getFieldValue }) => {
|
|
||||||
const disabled = !getFieldValue('maxTokensEnabled');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Flex flex={1}>
|
|
||||||
<Form.Item
|
|
||||||
name={[...memorizedPrefix, 'max_tokens']}
|
|
||||||
noStyle
|
|
||||||
>
|
|
||||||
<Slider
|
|
||||||
className={styles.variableSlider}
|
|
||||||
max={128000}
|
|
||||||
disabled={disabled}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
</Flex>
|
|
||||||
<Form.Item
|
|
||||||
name={[...memorizedPrefix, 'max_tokens']}
|
|
||||||
noStyle
|
|
||||||
>
|
|
||||||
<InputNumber
|
|
||||||
disabled={disabled}
|
|
||||||
className={styles.sliderInputNumber}
|
|
||||||
max={128000}
|
|
||||||
min={0}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</Form.Item>
|
|
||||||
</Flex>
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user