diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index f9fceb9f4..3d9ee54fe 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -430,7 +430,7 @@ export default { `, useRaptor: 'RAPTOR', useRaptorTip: - 'Enable RAPTOR for multi-hop question-answering tasks. See https://ragflow.io/docs/dev/enable_raptor for details.', + 'RAPTOR can be used for multi-hop question-answering tasks. Navigate to the Files page, click Generate > RAPTOR to enable it. See https://ragflow.io/docs/dev/enable_raptor for details.', prompt: 'Prompt', promptTip: 'Use the system prompt to describe the task for the LLM, specify how it should respond, and outline other miscellaneous requirements. The system prompt is often used in conjunction with keys (variables), which serve as various data inputs for the LLM. Use a forward slash `/` or the (x) button to show the keys to use.', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index 20469e14c..537fc8f23 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -425,7 +425,7 @@ export default { `, useRaptor: '使用召回增强 RAPTOR 策略', useRaptorTip: - '为多跳问答任务启用 RAPTOR,详情请见 : https://ragflow.io/docs/dev/enable_raptor。', + 'RAPTOR 常应用于复杂的多跳问答任务。如需打开,请跳转至知识库的文件页面,点击生成 > RAPTOR 开启。详见: https://ragflow.io/docs/dev/enable_raptor。', prompt: '提示词', promptMessage: '提示词是必填项', promptText: `请总结以下段落。 小心数字,不要编造。 段落如下: diff --git a/web/src/pages/dataset/dataset/index.tsx b/web/src/pages/dataset/dataset/index.tsx index be34f7f9d..6c156781d 100644 --- a/web/src/pages/dataset/dataset/index.tsx +++ b/web/src/pages/dataset/dataset/index.tsx @@ -14,6 +14,7 @@ import { useRowSelection } from '@/hooks/logic-hooks/use-row-selection'; import { useFetchDocumentList } from '@/hooks/use-document-request'; import { useFetchKnowledgeBaseConfiguration } from '@/hooks/use-knowledge-request'; import { Upload } from 'lucide-react'; +import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { DatasetTable } from './dataset-table'; import Generate from './generate-button/generate'; @@ -31,7 +32,6 @@ export default function Dataset() { onDocumentUploadOk, documentUploadLoading, } = useHandleUploadDocument(); - const { data: dataSetData } = useFetchKnowledgeBaseConfiguration(); const { searchString, @@ -43,6 +43,14 @@ export default function Dataset() { handleFilterSubmit, loading, } = useFetchDocumentList(); + + const refreshCount = useMemo(() => { + return documents.findIndex((doc) => doc.run === '1') + documents.length; + }, [documents]); + + const { data: dataSetData } = useFetchKnowledgeBaseConfiguration({ + refreshCount, + }); const { filters, onOpenChange } = useSelectDatasetFilters(); const {