feat: 配置默认使用千问模型
- 修改默认LLM配置为千问模型(qwen-turbo) - 创建LLM配置文件,支持千问、OpenAI、Anthropic等多种模型 - 添加千问模型的特殊支持和模拟响应 - 创建配置说明文档,指导用户如何配置千问API密钥 - 优化智能Agent的模拟响应,体现千问模型的特色 - 支持通过配置文件灵活切换不同的LLM提供商
This commit is contained in:
@@ -222,16 +222,16 @@ class IntelligentAgent:
|
||||
return self._simulate_llm_response(prompt)
|
||||
|
||||
def _simulate_llm_response(self, prompt: str) -> Dict[str, Any]:
|
||||
"""模拟大模型响应"""
|
||||
"""模拟大模型响应 - 千问模型风格"""
|
||||
if "预警信息" in prompt:
|
||||
return {
|
||||
"analysis": "系统性能下降,需要立即处理",
|
||||
"analysis": "【千问分析】系统性能下降,需要立即处理。根据历史数据分析,这可能是由于资源不足或配置问题导致的。",
|
||||
"immediate_actions": [
|
||||
{
|
||||
"action": "重启相关服务",
|
||||
"priority": 5,
|
||||
"confidence": 0.9,
|
||||
"parameters": {"service": "main_service"}
|
||||
"parameters": {"service": "main_service", "reason": "服务响应超时"}
|
||||
}
|
||||
],
|
||||
"follow_up_actions": [
|
||||
@@ -239,32 +239,35 @@ class IntelligentAgent:
|
||||
"action": "检查系统日志",
|
||||
"priority": 3,
|
||||
"confidence": 0.7,
|
||||
"parameters": {"log_level": "error"}
|
||||
"parameters": {"log_level": "error", "time_range": "last_hour"}
|
||||
}
|
||||
],
|
||||
"prevention_measures": [
|
||||
"增加监控频率",
|
||||
"优化系统配置"
|
||||
"增加监控频率,提前发现问题",
|
||||
"优化系统配置,提升性能",
|
||||
"建立预警机制,减少故障影响"
|
||||
]
|
||||
}
|
||||
else:
|
||||
return {
|
||||
"confidence_analysis": "当前答案置信度较低,需要更多上下文信息",
|
||||
"confidence_analysis": "【千问分析】当前答案置信度较低,需要更多上下文信息。建议结合用户反馈和历史工单数据来提升答案质量。",
|
||||
"enhancement_suggestions": [
|
||||
"添加更多示例",
|
||||
"提供详细步骤"
|
||||
"添加更多实际案例和操作步骤",
|
||||
"提供详细的故障排除指南",
|
||||
"结合系统架构图进行说明"
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"action": "更新知识库条目",
|
||||
"priority": 4,
|
||||
"confidence": 0.8,
|
||||
"parameters": {"enhanced_answer": "增强后的答案"}
|
||||
"parameters": {"enhanced_answer": "基于千问模型分析的增强答案"}
|
||||
}
|
||||
],
|
||||
"learning_opportunities": [
|
||||
"收集用户反馈",
|
||||
"分析相似问题"
|
||||
"收集用户反馈,持续优化答案",
|
||||
"分析相似问题,建立知识关联",
|
||||
"利用千问模型的学习能力,提升知识质量"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user