From 290c92ee39c4e7d1fc1edb4bc34ca90de8e40270 Mon Sep 17 00:00:00 2001 From: Chingfeng Li Date: Tue, 16 Sep 2025 17:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87ID=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=88=B0=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/agent-base-prompt.txt | 1 + main/xiaozhi-server/core/utils/prompt_manager.py | 1 + 2 files changed, 2 insertions(+) diff --git a/main/xiaozhi-server/agent-base-prompt.txt b/main/xiaozhi-server/agent-base-prompt.txt index 9eb7731b..34245291 100644 --- a/main/xiaozhi-server/agent-base-prompt.txt +++ b/main/xiaozhi-server/agent-base-prompt.txt @@ -67,6 +67,7 @@ 【重要!以下信息已实时提供,无需调用工具查询,请直接使用:】 +- **设备ID:** {{device_id}} - **当前时间:** {{current_time}} - **今天日期:** {{today_date}} ({{today_weekday}}) - **今天农历:** {{lunar_date}} diff --git a/main/xiaozhi-server/core/utils/prompt_manager.py b/main/xiaozhi-server/core/utils/prompt_manager.py index b6c4bef0..2b6bde15 100644 --- a/main/xiaozhi-server/core/utils/prompt_manager.py +++ b/main/xiaozhi-server/core/utils/prompt_manager.py @@ -224,6 +224,7 @@ class PromptManager: local_address=local_address, weather_info=weather_info, emojiList=EMOJI_List, + device_id=device_id, ) device_cache_key = f"device_prompt:{device_id}" self.cache_manager.set(