Skip to content

Commit

Permalink
fix: fix chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwanying committed Oct 15, 2024
1 parent 1fc24e3 commit 8f3bbee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion client/app/factory/edit/components/Knowledge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { convertToLocalTime } from '@/app/utils/time';
import { useBotTask } from './TaskContext';

type IProps = {
botId: string;
repoName: string;
goBack: () => void;
};
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion client/app/factory/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ export default function Edit() {

{visibleType === VisibleTypeEnum.KNOWLEDGE_DETAIL ? (
<Knowledge
repoName={botProfile.repoName}
botId={botProfile.id}
repoName={botProfile.repoName!}
goBack={() => {
setVisibleType(VisibleTypeEnum.BOT_CONFIG);
}}
Expand Down
2 changes: 1 addition & 1 deletion client/app/services/BotsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8f3bbee

Please sign in to comment.