fix:修复全模块时缺少prompt_template配置的问题

This commit is contained in:
3030332422
2025-10-31 20:36:55 +08:00
parent cc9d5306e6
commit 32ecbe55fc
3 changed files with 7 additions and 1 deletions
@@ -68,6 +68,9 @@ def get_config_from_api(config):
"vision_explain": config["server"].get("vision_explain", ""),
"auth_key": config["server"].get("auth_key", ""),
}
# 如果服务器没有prompt_template,则从本地配置读取
if not config_data.get("prompt_template"):
config_data["prompt_template"] = config.get("prompt_template")
return config_data
+3 -1
View File
@@ -22,4 +22,6 @@ manager-api:
# 如果使用docker部署,请使用填写成 http://xiaozhi-esp32-server-web:8002/xiaozhi
url: http://127.0.0.1:8002/xiaozhi
# 你的manager-api的token,就是刚才复制出来的server.secret
secret: 你的server.secret值
secret: 你的server.secret值
# 默认系统提示词模板文件
prompt_template: agent-base-prompt.txt
@@ -225,6 +225,7 @@ class PromptManager:
weather_info=weather_info,
emojiList=EMOJI_List,
device_id=device_id,
client_ip=client_ip,
*args, **kwargs
)
device_cache_key = f"device_prompt:{device_id}"