From 8f3bbee0b76a7f6762806cb0f0a8fff40b28f1af Mon Sep 17 00:00:00 2001 From: yingying Date: Tue, 15 Oct 2024 15:24:27 +0800 Subject: [PATCH] fix: fix chunk --- client/app/factory/edit/components/Knowledge.tsx | 3 ++- client/app/factory/edit/page.tsx | 3 ++- client/app/services/BotsController.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/app/factory/edit/components/Knowledge.tsx b/client/app/factory/edit/components/Knowledge.tsx index ba38d1e7..668eafdc 100644 --- a/client/app/factory/edit/components/Knowledge.tsx +++ b/client/app/factory/edit/components/Knowledge.tsx @@ -20,6 +20,7 @@ import { convertToLocalTime } from '@/app/utils/time'; import { useBotTask } from './TaskContext'; type IProps = { + botId: string; repoName: string; goBack: () => void; }; @@ -78,7 +79,7 @@ const ChunkList = ({ data }: { data: RAGDoc[] }) => { ); }; -export default function Knowledge({ repoName, goBack }: IProps) { +export default function Knowledge({ botId, repoName, goBack }: IProps) { const { botProfile } = useBot(); const [pageSize, setPageSize] = React.useState(12); const [pageNumber, setPageNumber] = React.useState(1); diff --git a/client/app/factory/edit/page.tsx b/client/app/factory/edit/page.tsx index 5a119046..a7902f1c 100644 --- a/client/app/factory/edit/page.tsx +++ b/client/app/factory/edit/page.tsx @@ -489,7 +489,8 @@ export default function Edit() { {visibleType === VisibleTypeEnum.KNOWLEDGE_DETAIL ? ( { setVisibleType(VisibleTypeEnum.BOT_CONFIG); }} diff --git a/client/app/services/BotsController.ts b/client/app/services/BotsController.ts index 72978c21..0164233a 100644 --- a/client/app/services/BotsController.ts +++ b/client/app/services/BotsController.ts @@ -79,7 +79,7 @@ export async function getChunkList( page_number: number, ): Promise<{ rows: RAGDoc[]; total: number }> { const response = await axios.get( - `${apiDomain}/api/rag/chunk/list?bot_id=${repo_name}&page_size=${page_size}&page_number=${page_number}`, + `${apiDomain}/api/rag/chunk/list?repo_name=${repo_name}&page_size=${page_size}&page_number=${page_number}`, ); return response.data; }