Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
feat: 支持复制知识库时指定任务ID
wizardchen9af1fc18f507
diff --git a/client/knowledgebase.go b/client/knowledgebase.goindex 10983fc6a..6412c4b41 100644--- a/client/knowledgebase.go+++ b/client/knowledgebase.go@@ -136,6 +136,7 @@ type HybridSearchResponse struct {}type CopyKnowledgeBaseRequest struct {+ TaskID string `json:"task_id,omitempty"`SourceID string `json:"source_id"`TargetID string `json:"target_id"`}diff --git a/internal/handler/knowledgebase.go b/internal/handler/knowledgebase.goindex bbfcc36d0..775640ebf 100644--- a/internal/handler/knowledgebase.go+++ b/internal/handler/knowledgebase.go@@ -331,6 +331,7 @@ func (h *KnowledgeBaseHandler) DeleteKnowledgeBase(c *gin.Context) {}type CopyKnowledgeBaseRequest struct {+ TaskID string `json:"task_id"`SourceID string `json:"source_id" binding:"required"`TargetID string `json:"target_id"`}@@ -372,8 +373,11 @@ func (h *KnowledgeBaseHandler) CopyKnowledgeBase(c *gin.Context) {return}- // Generate task ID- taskID := uuid.New().String()+ // Generate task ID if not provided+ taskID := req.TaskID+ if taskID == "" {+ taskID = uuid.New().String()+ }// Create KB clone payloadpayload := types.KBClonePayload{