mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: add image for chunk method (#139)
* feat: add image of chunk method * feat: add image for chunk method
This commit is contained in:
@ -15,6 +15,7 @@ import {
|
||||
getUploadFileListFromBase64,
|
||||
} from '@/utils/fileUtil';
|
||||
import { Form, UploadFile } from 'antd';
|
||||
import { FormInstance } from 'antd/lib';
|
||||
import pick from 'lodash/pick';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import { LlmModelType } from '../../constant';
|
||||
@ -39,9 +40,8 @@ export const useSubmitKnowledgeConfiguration = () => {
|
||||
return { submitKnowledgeConfiguration, submitLoading };
|
||||
};
|
||||
|
||||
export const useFetchKnowledgeConfigurationOnMount = () => {
|
||||
const [form] = Form.useForm();
|
||||
const loading = useOneNamespaceEffectsLoading('kSModel', ['getKbDetail']);
|
||||
export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
||||
// const [form] = Form.useForm();
|
||||
|
||||
const knowledgeDetails = useSelectKnowledgeDetails();
|
||||
const parserList = useSelectParserList();
|
||||
@ -69,5 +69,15 @@ export const useFetchKnowledgeConfigurationOnMount = () => {
|
||||
});
|
||||
}, [form, knowledgeDetails]);
|
||||
|
||||
return { form, parserList, embeddingModelOptions, loading };
|
||||
return { parserList, embeddingModelOptions };
|
||||
};
|
||||
|
||||
export const useSelectKnowledgeDetailsLoading = () =>
|
||||
useOneNamespaceEffectsLoading('kSModel', ['getKbDetail']);
|
||||
|
||||
export const useHandleChunkMethodChange = () => {
|
||||
const [form] = Form.useForm();
|
||||
const chunkMethod = Form.useWatch('parser_id', form);
|
||||
|
||||
return { form, chunkMethod };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user