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): increase page size for tag retrieval in buildTagMap function
wizardchen68dd6aa77841
diff --git a/internal/application/service/knowledge.go b/internal/application/service/knowledge.goindex 9c445cb6d..0ae767228 100644--- a/internal/application/service/knowledge.go+++ b/internal/application/service/knowledge.go@@ -5901,7 +5901,7 @@ func (s *knowledgeService) ExportFAQEntries(ctx context.Context, kbID string) ([// buildTagMap builds a map from tag_id to tag_name for the given knowledge base.func (s *knowledgeService) buildTagMap(ctx context.Context, tenantID uint64, kbID string) (map[string]string, error) {- const pageSize = 100+ const pageSize = 1000tagMap := make(map[string]string)for pageNum := 1; ; pageNum++ {diff --git a/internal/types/search.go b/internal/types/search.goindex 367f1266c..011d7764e 100644--- a/internal/types/search.go+++ b/internal/types/search.go@@ -175,7 +175,7 @@ type Pagination struct {// PagePage int `form:"page" json:"page" binding:"omitempty,min=1"`// Page size- PageSize int `form:"page_size" json:"page_size" binding:"omitempty,min=1,max=100"`+ PageSize int `form:"page_size" json:"page_size" binding:"omitempty,min=1,max=1000"`}// GetPage gets the page number, default is 1@@ -191,8 +191,8 @@ func (p *Pagination) GetPageSize() int {if p.PageSize < 1 {return 20}- if p.PageSize > 100 {- return 100+ if p.PageSize > 1000 {+ return 1000}return p.PageSize}