feat: 支持知识库选择模式和标题生成模型配置
- 移除对rerankModel的强制检查,支持无知识库场景 - 优化知识库解析逻辑,优先处理用户明确指定的知识库
This commit is contained in:
@@ -83,9 +83,8 @@ func (s *agentService) CreateAgentEngine(
|
||||
return nil, fmt.Errorf("chat model is nil after initialization")
|
||||
}
|
||||
|
||||
if rerankModel == nil {
|
||||
return nil, fmt.Errorf("rerank model is nil after initialization")
|
||||
}
|
||||
// Note: rerankModel can be nil when no knowledge bases are configured
|
||||
// The registerTools function will filter out knowledge-related tools in this case
|
||||
|
||||
// Create tool registry
|
||||
toolRegistry := tools.NewToolRegistry(s.knowledgeService, s.chunkService, s.db)
|
||||
|
||||
Reference in New Issue
Block a user