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
fix(app): prevent UTF-8 truncation in summary fallback
ChenRussell27d4525ba93d
diff --git a/internal/application/service/knowledge.go b/internal/application/service/knowledge.goindex 3a6b89476..595836d6a 100644--- a/internal/application/service/knowledge.go+++ b/internal/application/service/knowledge.go@@ -2082,7 +2082,11 @@ func (s *knowledgeService) ProcessSummaryGeneration(ctx context.Context, t *asynif len(textChunks) > 0 {summary = textChunks[0].Contentif len(summary) > 500 {- summary = summary[:500]+ // Use rune-based truncation to avoid cutting UTF-8 multi-byte characters+ runes := []rune(summary)+ if len(runes) > 500 {+ summary = string(runes[:500])+ }}}}