Fix: Resolved the issue where the Generate button must be refreshed after generating chunk to take effect #9869 (#10742)

### What problem does this PR solve?

Fix: Resolved the issue where the Generate button must be refreshed
after generating chunk to take effect

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-10-23 11:54:45 +08:00
committed by GitHub
parent 494f84cd69
commit d121033208
3 changed files with 11 additions and 3 deletions

View File

@ -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.',

View File

@ -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: `请总结以下段落。 小心数字,不要编造。 段落如下:

View File

@ -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 {