feat: 添加智能体文件类型限制,内置数据分析师智能体

This commit is contained in:
wizardchen
2025-12-31 18:18:22 +08:00
committed by lyingbug
parent 884153aeb8
commit d72b6997cb
10 changed files with 290 additions and 56 deletions
+6 -2
View File
@@ -232,6 +232,10 @@ export function getFAQImportProgress(taskId: string) {
return get(`/api/v1/faq/import/progress/${taskId}`);
}
export function searchKnowledge(keyword: string, offset = 0, limit = 20) {
return get(`/api/v1/knowledge/search?keyword=${encodeURIComponent(keyword)}&offset=${offset}&limit=${limit}`);
export function searchKnowledge(keyword: string, offset = 0, limit = 20, fileTypes?: string[]) {
let url = `/api/v1/knowledge/search?keyword=${encodeURIComponent(keyword)}&offset=${offset}&limit=${limit}`;
if (fileTypes && fileTypes.length > 0) {
url += `&file_types=${encodeURIComponent(fileTypes.join(','))}`;
}
return get(url);
}