feat(docparser): enhance sortedKeys function for numeric string sorting

- Modified the sortedKeys function to sort keys numerically when all keys are numeric strings, ensuring correct order for keys like "2" and "10".
- Updated the NeedsKBRetrieval method to include IntentSummarize as a valid case for knowledge base retrieval.
- Added a new test data file for chat import to support testing of document parsing and processing functionalities.
This commit is contained in:
wizardchen
2026-03-24 13:41:15 +08:00
committed by lyingbug
parent e7c21c0733
commit 4fb08f3ec8
3 changed files with 381 additions and 2 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ const (
// which also considers the WebSearchEnabled flag.
func (i QueryIntent) NeedsKBRetrieval() bool {
switch i {
case IntentKBSearch, IntentClarification, "":
case IntentKBSearch, IntentClarification, IntentSummarize, "":
return true
default:
return false