feat: Introduce query expansion feature and enhance related configurations
- Added support for query expansion in conversation settings, allowing the system to generate additional queries when recall is low. - Updated localization files in English, Russian, and Chinese to include new strings for the query expansion feature. - Enhanced UI in AgentSettings.vue to allow users to toggle query expansion settings. - Refactored related API and service logic to accommodate the new query expansion functionality in session management and chat processing.
This commit is contained in:
@@ -353,8 +353,6 @@ func (h *TenantHandler) updateTenantAgentConfigInternal(c *gin.Context) {
|
||||
c.Error(errors.NewAgentInvalidTemperatureError())
|
||||
return
|
||||
}
|
||||
// thinking_model_id 不再强制要求,允许先启用 Agent 再设置模型
|
||||
// 实际使用时会在 AgentQA 中进行验证
|
||||
if len(req.AllowedTools) == 0 {
|
||||
c.Error(errors.NewAgentMissingAllowedToolsError())
|
||||
return
|
||||
@@ -531,6 +529,7 @@ func (h *TenantHandler) buildDefaultConversationConfig() *types.ConversationConf
|
||||
RerankTopK: h.config.Conversation.RerankTopK,
|
||||
RerankThreshold: h.config.Conversation.RerankThreshold,
|
||||
EnableRewrite: h.config.Conversation.EnableRewrite,
|
||||
EnableQueryExpansion: h.config.Conversation.EnableQueryExpansion,
|
||||
FallbackStrategy: h.config.Conversation.FallbackStrategy,
|
||||
FallbackResponse: h.config.Conversation.FallbackResponse,
|
||||
FallbackPrompt: h.config.Conversation.FallbackPrompt,
|
||||
@@ -641,6 +640,9 @@ func (h *TenantHandler) GetTenantConversationConfig(c *gin.Context) {
|
||||
// EnableRewrite 需要允许显式关闭,因此直接覆盖
|
||||
defaultCfg.EnableRewrite = tc.EnableRewrite
|
||||
|
||||
// Query expansion toggle
|
||||
defaultCfg.EnableQueryExpansion = tc.EnableQueryExpansion
|
||||
|
||||
// Model IDs
|
||||
if tc.SummaryModelID != "" {
|
||||
defaultCfg.SummaryModelID = tc.SummaryModelID
|
||||
|
||||
Reference in New Issue
Block a user