feat: 优化内置智能体配置同步机制

改进内置智能体与自定义智能体的配置合并逻辑,确保内置智能体能正确应用API配置和默认值,同时优化了系统提示词的分离管理。
This commit is contained in:
wizardchen
2025-12-30 13:45:36 +08:00
committed by lyingbug
parent c2c4ee5777
commit 89e75bb6fe
4 changed files with 61 additions and 31 deletions
+8 -2
View File
@@ -229,8 +229,14 @@ func GetBuiltinQuickAnswerAgent(tenantID uint64) *CustomAgent {
IsBuiltin: true,
TenantID: tenantID,
Config: CustomAgentConfig{
AgentMode: AgentModeQuickAnswer,
SystemPrompt: "",
AgentMode: AgentModeQuickAnswer,
SystemPrompt: "",
ContextTemplate: `请根据以下参考资料回答用户问题。
参考资料:
{{contexts}}
用户问题:{{query}}`,
Temperature: 0.7,
MaxCompletionTokens: 2048,
WebSearchEnabled: true,