Fix knowledge base crash
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user