Simplify KB duplicate API and improve naming/docs coverage.
Drop client-supplied target_id, generate IDs server-side, localize duplicate names from request language, document the endpoint, and expand handler/client tests.
This commit is contained in:
@@ -135,8 +135,8 @@ export function copyKnowledgeBase(data: { source_id: string; target_id?: string
|
||||
return post(`/api/v1/knowledge-bases/copy`, data);
|
||||
}
|
||||
|
||||
export function duplicateKnowledgeBase(id: string, data: { target_id?: string } = {}) {
|
||||
return post(`/api/v1/knowledge-bases/${id}/duplicate`, data);
|
||||
export function duplicateKnowledgeBase(id: string) {
|
||||
return post(`/api/v1/knowledge-bases/${id}/duplicate`);
|
||||
}
|
||||
|
||||
// 获取可移动目标知识库列表(同类型、同Embedding模型)
|
||||
|
||||
Reference in New Issue
Block a user