mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: display chunk token number when category of knowledge as general and unavailable llm models appear disabled and if the backend returns 401, it will jump to the login page and fixed the issue where the greeting would disappear when clicking on a new dialog (#117)
* feat: Fixed the issue where the greeting would disappear when clicking on a new dialog * feat: replace favicon with logo.svg * feat: if the backend returns 401, it will jump to the login page. * feat: unavailable llm models appear disabled * feat: display chunk token number when category of knowledge as general
This commit is contained in:
@ -10,10 +10,13 @@ import {
|
||||
import {
|
||||
Button,
|
||||
Divider,
|
||||
Flex,
|
||||
Form,
|
||||
Input,
|
||||
InputNumber,
|
||||
Radio,
|
||||
Select,
|
||||
Slider,
|
||||
Space,
|
||||
Typography,
|
||||
Upload,
|
||||
@ -80,6 +83,7 @@ const Configuration = () => {
|
||||
'permission',
|
||||
'embd_id',
|
||||
'parser_id',
|
||||
'parser_config.chunk_token_num',
|
||||
]),
|
||||
avatar: fileList,
|
||||
});
|
||||
@ -144,6 +148,7 @@ const Configuration = () => {
|
||||
name="embd_id"
|
||||
label="Embedding Model"
|
||||
rules={[{ required: true }]}
|
||||
tooltip="xx"
|
||||
>
|
||||
<Select
|
||||
placeholder="Please select a country"
|
||||
@ -153,6 +158,7 @@ const Configuration = () => {
|
||||
<Form.Item
|
||||
name="parser_id"
|
||||
label="Knowledge base category"
|
||||
tooltip="xx"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Select placeholder="Please select a country">
|
||||
@ -163,6 +169,48 @@ const Configuration = () => {
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item noStyle dependencies={['parser_id']}>
|
||||
{({ getFieldValue }) => {
|
||||
const parserId = getFieldValue('parser_id');
|
||||
|
||||
if (parserId === 'general') {
|
||||
return (
|
||||
<Form.Item label="Chunk token number" tooltip="xxx">
|
||||
<Flex gap={20} align="center">
|
||||
<Flex flex={1}>
|
||||
<Form.Item
|
||||
name={['parser_config', 'chunk_token_num']}
|
||||
noStyle
|
||||
initialValue={128}
|
||||
rules={[
|
||||
{ required: true, message: 'Province is required' },
|
||||
]}
|
||||
>
|
||||
<Slider className={styles.variableSlider} max={2048} />
|
||||
</Form.Item>
|
||||
</Flex>
|
||||
<Form.Item
|
||||
name={['parser_config', 'chunk_token_num']}
|
||||
noStyle
|
||||
initialValue={128}
|
||||
rules={[
|
||||
{ required: true, message: 'Street is required' },
|
||||
]}
|
||||
>
|
||||
<InputNumber
|
||||
className={styles.sliderInputNumber}
|
||||
max={2048}
|
||||
min={0}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Flex>
|
||||
</Form.Item>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}}
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<div className={styles.buttonWrapper}>
|
||||
<Space>
|
||||
|
||||
Reference in New Issue
Block a user