feat: Enhance knowledge base functionality by adding document search capability and updating related API and UI components
This commit is contained in:
@@ -54,7 +54,7 @@ export function createManualKnowledge(kbId: string, data: { title: string; conte
|
||||
|
||||
export function listKnowledgeFiles(
|
||||
kbId: string,
|
||||
params: { page: number; page_size: number; tag_id?: string },
|
||||
params: { page: number; page_size: number; tag_id?: string; keyword?: string },
|
||||
) {
|
||||
const query = new URLSearchParams();
|
||||
query.append('page', String(params.page));
|
||||
@@ -62,6 +62,9 @@ export function listKnowledgeFiles(
|
||||
if (params.tag_id) {
|
||||
query.append('tag_id', params.tag_id);
|
||||
}
|
||||
if (params.keyword) {
|
||||
query.append('keyword', params.keyword);
|
||||
}
|
||||
const qs = query.toString();
|
||||
return get(`/api/v1/knowledge-bases/${kbId}/knowledge?${qs}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user