File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ type HybridSearchResponse struct {
136136}
137137
138138type CopyKnowledgeBaseRequest struct {
139+ TaskID string `json:"task_id,omitempty"`
139140 SourceID string `json:"source_id"`
140141 TargetID string `json:"target_id"`
141142}
Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ func (h *KnowledgeBaseHandler) DeleteKnowledgeBase(c *gin.Context) {
331331}
332332
333333type CopyKnowledgeBaseRequest struct {
334+ TaskID string `json:"task_id"`
334335 SourceID string `json:"source_id" binding:"required"`
335336 TargetID string `json:"target_id"`
336337}
@@ -372,8 +373,11 @@ func (h *KnowledgeBaseHandler) CopyKnowledgeBase(c *gin.Context) {
372373 return
373374 }
374375
375- // Generate task ID
376- taskID := uuid .New ().String ()
376+ // Generate task ID if not provided
377+ taskID := req .TaskID
378+ if taskID == "" {
379+ taskID = uuid .New ().String ()
380+ }
377381
378382 // Create KB clone payload
379383 payload := types.KBClonePayload {
You can’t perform that action at this time.
0 commit comments