feat: Update web search providers and enhance knowledge base management

- Added DuckDuckGo as a new web search provider in the configuration.
- Removed deprecated web search providers (Baidu, Bing, Bocha, Exa, Google, Kuaisou, Searxng, Tavily, Zhipu) to streamline the codebase.
- Enhanced knowledge base management by introducing temporary knowledge base handling in the session service.
- Updated the web search service to support RAG-based compression for improved search result processing.
- Refactored session and knowledge service interfaces to accommodate new functionalities.
This commit is contained in:
wizardchen
2025-11-10 22:45:27 +08:00
parent ac8c8e9af2
commit 244aaab328
40 changed files with 968 additions and 1027 deletions
@@ -52,7 +52,7 @@ func (r *knowledgeBaseRepository) ListKnowledgeBasesByTenantID(
ctx context.Context, tenantID uint,
) ([]*types.KnowledgeBase, error) {
var kbs []*types.KnowledgeBase
if err := r.db.WithContext(ctx).Where("tenant_id = ?", tenantID).
if err := r.db.WithContext(ctx).Where("tenant_id = ? AND is_temporary = ?", tenantID, false).
Order("created_at DESC").Find(&kbs).Error; err != nil {
return nil, err
}