feat(configuration): update asynq concurrency settings and enhance FAQ handling

- Increased the default worker pool size for the asynq server from 16 to 32 to improve performance during concurrent uploads.
- Updated the .env.example and docker-compose.yml files to reflect the new default concurrency setting.
- Enhanced the handling of FAQ entries in the tool results, ensuring distinct identification through standard questions, improving user experience and clarity in the output.
- Refactored related components to utilize the new FAQ attributes, ensuring consistent display and interaction across the application.
This commit is contained in:
wizardchen
2026-06-04 14:21:50 +08:00
committed by lyingbug
parent 8a3e21cd46
commit 035093dc35
14 changed files with 330 additions and 28 deletions
+13 -1
View File
@@ -1566,7 +1566,7 @@ func (s *knowledgeService) ensureFAQKnowledge(
KnowledgeBaseID: kb.ID,
Type: types.KnowledgeTypeFAQ,
Channel: types.ChannelWeb,
Title: fmt.Sprintf("%s - FAQ", kb.Name),
Title: buildFAQKnowledgeTitle(kb.Name),
Description: "FAQ 条目容器",
Source: types.KnowledgeTypeFAQ,
ParseStatus: "completed",
@@ -1581,6 +1581,18 @@ func (s *knowledgeService) ensureFAQKnowledge(
return knowledge, nil
}
// buildFAQKnowledgeTitle derives the display title for the FAQ container
// knowledge. The title is simply the knowledge base name (falling back to "FAQ"
// when empty) — no suffix is appended, so a KB named "FAQ" stays "FAQ" instead
// of becoming the redundant "FAQ - FAQ".
func buildFAQKnowledgeTitle(kbName string) string {
name := strings.TrimSpace(kbName)
if name == "" {
return "FAQ"
}
return name
}
func (s *knowledgeService) chunkToFAQEntry(chunk *types.Chunk, kb *types.KnowledgeBase, tagSeqIDMap map[string]int64) (*types.FAQEntry, error) {
meta, err := chunk.FAQMetadata()
if err != nil {