Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Fix npe

Liang Dingb08910aacc42
diff --git a/kernel/util/rhy.go b/kernel/util/rhy.go
index a469411e02..1c29aad401 100644
--- a/kernel/util/rhy.go
+++ b/kernel/util/rhy.go
@@ -33,7 +33,7 @@ func GetRhyResult(force bool, proxyURL string) (map[string]interface{}, error) {
defer rhyResultLock.Unlock()
now := time.Now().Unix()
- if 3600 >= now-rhyResultCacheTime && !force {
+ if 3600 >= now-rhyResultCacheTime && !force && 0 < len(cachedRhyResult) {
return cachedRhyResult, nil
}