mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 05:16:54 +08:00
### What problem does this PR solve? feat: Added explanation on the parsing method of knowledge graph #1594 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -3,6 +3,7 @@ import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { useSelectParserList } from '@/hooks/user-setting-hooks';
|
||||
import { Col, Divider, Empty, Row, Typography } from 'antd';
|
||||
import DOMPurify from 'dompurify';
|
||||
import camelCase from 'lodash/camelCase';
|
||||
import { useMemo } from 'react';
|
||||
import styles from './index.less';
|
||||
import { ImageMap } from './utils';
|
||||
@ -18,7 +19,7 @@ const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
|
||||
if (item) {
|
||||
return {
|
||||
title: item.label,
|
||||
description: t(item.value),
|
||||
description: t(camelCase(item.value)),
|
||||
};
|
||||
}
|
||||
return { title: '', description: '' };
|
||||
|
||||
@ -37,6 +37,9 @@ export const useSubmitKnowledgeConfiguration = (form: FormInstance) => {
|
||||
};
|
||||
};
|
||||
|
||||
// The value that does not need to be displayed in the analysis method Select
|
||||
const HiddenFields = ['email', 'picture', 'audio'];
|
||||
|
||||
export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
||||
const parserList = useSelectParserList();
|
||||
const allOptions = useSelectLlmOptionsByModelType();
|
||||
@ -62,7 +65,9 @@ export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
||||
}, [form, knowledgeDetails]);
|
||||
|
||||
return {
|
||||
parserList,
|
||||
parserList: parserList.filter(
|
||||
(x) => !HiddenFields.some((y) => y === x.value),
|
||||
),
|
||||
embeddingModelOptions: allOptions[LlmModelType.Embedding],
|
||||
disabled: knowledgeDetails.chunk_num > 0,
|
||||
};
|
||||
|
||||
@ -15,6 +15,7 @@ export const ImageMap = {
|
||||
resume: getImageName('resume', 2),
|
||||
table: getImageName('table', 2),
|
||||
one: getImageName('one', 2),
|
||||
knowledge_graph: getImageName('knowledge-graph', 2),
|
||||
};
|
||||
|
||||
export const TextMap = {
|
||||
|
||||
Reference in New Issue
Block a user