mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 18:59:12 +08:00
### What problem does this PR solve? Feat: Add keyword item to AssistantSetting #4543 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
240e7d7c22
commit
b23a4a8fea
@ -1,3 +1,4 @@
|
|||||||
|
import { DocumentParserType } from '@/constants/knowledge';
|
||||||
import { useTranslate } from '@/hooks/common-hooks';
|
import { useTranslate } from '@/hooks/common-hooks';
|
||||||
import { useFetchKnowledgeList } from '@/hooks/knowledge-hooks';
|
import { useFetchKnowledgeList } from '@/hooks/knowledge-hooks';
|
||||||
import { UserOutlined } from '@ant-design/icons';
|
import { UserOutlined } from '@ant-design/icons';
|
||||||
@ -8,7 +9,11 @@ const KnowledgeBaseItem = () => {
|
|||||||
|
|
||||||
const { list: knowledgeList } = useFetchKnowledgeList(true);
|
const { list: knowledgeList } = useFetchKnowledgeList(true);
|
||||||
|
|
||||||
const knowledgeOptions = knowledgeList.map((x) => ({
|
const filteredKnowledgeList = knowledgeList.filter(
|
||||||
|
(x) => x.parser_id !== DocumentParserType.Tag,
|
||||||
|
);
|
||||||
|
|
||||||
|
const knowledgeOptions = filteredKnowledgeList.map((x) => ({
|
||||||
label: (
|
label: (
|
||||||
<Space>
|
<Space>
|
||||||
<Avatar size={20} icon={<UserOutlined />} src={x.avatar} />
|
<Avatar size={20} icon={<UserOutlined />} src={x.avatar} />
|
||||||
|
@ -63,3 +63,20 @@ export enum DocumentType {
|
|||||||
Virtual = 'virtual',
|
Virtual = 'virtual',
|
||||||
Visual = 'visual',
|
Visual = 'visual',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum DocumentParserType {
|
||||||
|
Naive = 'naive',
|
||||||
|
Qa = 'qa',
|
||||||
|
Resume = 'resume',
|
||||||
|
Manual = 'manual',
|
||||||
|
Table = 'table',
|
||||||
|
Paper = 'paper',
|
||||||
|
Book = 'book',
|
||||||
|
Laws = 'laws',
|
||||||
|
Presentation = 'presentation',
|
||||||
|
Picture = 'picture',
|
||||||
|
One = 'one',
|
||||||
|
Audio = 'audio',
|
||||||
|
Email = 'email',
|
||||||
|
Tag = 'tag',
|
||||||
|
}
|
||||||
|
@ -520,6 +520,8 @@ This procedure will improve precision of retrieval by adding more information to
|
|||||||
useKnowledgeGraph: 'Use knowledge graph',
|
useKnowledgeGraph: 'Use knowledge graph',
|
||||||
useKnowledgeGraphTip:
|
useKnowledgeGraphTip:
|
||||||
'It will retrieve descriptions of relevant entities,relations and community reports, which will enhance inference of multi-hop and complex question.',
|
'It will retrieve descriptions of relevant entities,relations and community reports, which will enhance inference of multi-hop and complex question.',
|
||||||
|
keyword: 'Keyword analysis',
|
||||||
|
keywordTip: `Apply LLM to analyze user's questions, extract keywords which will be emphesize during the relevance omputation.`,
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: 'Profile',
|
profile: 'Profile',
|
||||||
|
@ -504,6 +504,8 @@ export default {
|
|||||||
useKnowledgeGraph: '使用知識圖譜',
|
useKnowledgeGraph: '使用知識圖譜',
|
||||||
useKnowledgeGraph提示:
|
useKnowledgeGraph提示:
|
||||||
'它將檢索相關實體、關係和社區報告的描述,這將增強多跳和複雜問題的推理。',
|
'它將檢索相關實體、關係和社區報告的描述,這將增強多跳和複雜問題的推理。',
|
||||||
|
keyword: '關鍵字分析',
|
||||||
|
keywordTip: `應用LLM分析使用者的問題,提取在相關性計算中需要強調的關鍵字。`,
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: '概述',
|
profile: '概述',
|
||||||
|
@ -521,6 +521,8 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于
|
|||||||
useKnowledgeGraph: '使用知识图谱',
|
useKnowledgeGraph: '使用知识图谱',
|
||||||
useKnowledgeGraphTip:
|
useKnowledgeGraphTip:
|
||||||
'它将检索相关实体、关系和社区报告的描述,这将增强多跳和复杂问题的推理。',
|
'它将检索相关实体、关系和社区报告的描述,这将增强多跳和复杂问题的推理。',
|
||||||
|
keyword: '关键词分析',
|
||||||
|
keywordTip: `应用 LLM 分析用户的问题,提取在相关性计算中要强调的关键词。`,
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: '概要',
|
profile: '概要',
|
||||||
|
@ -107,6 +107,15 @@ const AssistantSetting = ({ show, form }: ISegmentedContentProps) => {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t('keyword')}
|
||||||
|
valuePropName="checked"
|
||||||
|
name={['prompt_config', 'keyword']}
|
||||||
|
tooltip={t('keywordTip')}
|
||||||
|
initialValue={false}
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
{/* <Form.Item
|
{/* <Form.Item
|
||||||
label={t('selfRag')}
|
label={t('selfRag')}
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user