Fix knowledge base crash

This commit is contained in:
Xin Wang
2026-02-09 08:14:17 +08:00
parent 0d13d6acdb
commit 479cfb797b
2 changed files with 40 additions and 18 deletions

View File

@@ -527,6 +527,11 @@ export const fetchKnowledgeBases = async (): Promise<KnowledgeBase[]> => {
return list.map((item) => mapKnowledgeBase(item));
};
export const fetchKnowledgeBaseById = async (kbId: string): Promise<KnowledgeBase> => {
const response = await apiRequest<AnyRecord>(`/knowledge/bases/${kbId}`);
return mapKnowledgeBase(response);
};
export const createKnowledgeBase = async (data: {
name: string;
description?: string;