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
refactor(knowledge.go): Modify the knowledge existence check condition to eliminate the parsing failure state
begoniezhao54570da047b0
diff --git a/internal/application/repository/knowledge.go b/internal/application/repository/knowledge.goindex 4284fe877..4c7623f3d 100644--- a/internal/application/repository/knowledge.go+++ b/internal/application/repository/knowledge.go@@ -118,7 +118,7 @@ func (r *knowledgeRepository) CheckKnowledgeExists(params *types.KnowledgeCheckParams,) (bool, *types.Knowledge, error) {query := r.db.WithContext(ctx).Model(&types.Knowledge{}).- Where("tenant_id = ? AND knowledge_base_id = ? AND enable_status = ?", tenantID, kbID, "enabled")+ Where("tenant_id = ? AND knowledge_base_id = ? AND parse_status <> ?", tenantID, kbID, "failed")if params.Type == "file" {// If file hash exists, prioritize exact match using hash