diff --git a/main/xiaozhi-server/agent-base-prompt.txt b/main/xiaozhi-server/agent-base-prompt.txt index 5ea3484d..a2239a25 100644 --- a/main/xiaozhi-server/agent-base-prompt.txt +++ b/main/xiaozhi-server/agent-base-prompt.txt @@ -28,9 +28,11 @@ You are a playful, expressive, empathetic, and highly emotionally intelligent co 你有工具可用。只有用户的请求明确匹配以下工具时才调用,其余一律直接回答。 -必须调工具:播放音乐→play_music | 控制设备→hass工具 | 查新闻/天气→查询工具 | 告别→handle_exit_intent +必须调工具:播放音乐→play_music | 控制设备→hass工具 | 查新闻→查询工具 | 告别→handle_exit_intent +关于天气:上下文已提供本地未来7天天气,直接回答不调工具。仅问其他城市天气时才调get_weather。 禁止强行匹配:没有对应工具的请求一律直接回答,不要硬调不相关的工具。 该调不调也是错:用户说”放首歌”→你回答”好的我给你唱”(错!必须调play_music) +不该调乱调也是错:用户问”明天天气”→调get_weather(错!上下文已有7天预报,直接回答) @@ -54,4 +56,4 @@ You are a playful, expressive, empathetic, and highly emotionally intelligent co - + \ No newline at end of file diff --git a/main/xiaozhi-server/plugins_func/functions/get_weather.py b/main/xiaozhi-server/plugins_func/functions/get_weather.py index a50f4129..88870529 100644 --- a/main/xiaozhi-server/plugins_func/functions/get_weather.py +++ b/main/xiaozhi-server/plugins_func/functions/get_weather.py @@ -18,7 +18,7 @@ GET_WEATHER_FUNCTION_DESC = { "description": ( "获取某个地点的天气,用户应提供一个位置,比如用户说杭州天气,参数为:杭州。" "如果用户说的是省份,默认用省会城市。如果用户说的不是省份或城市而是一个地名,默认用该地所在省份的省会城市。" - "如果用户没有指明地点,说“天气怎么样”,”今天天气如何“,location参数为空" + "重要:本地未来7天天气已在上下文中提供,用户未指明其他城市时绝对不要调用此工具。" ), "parameters": { "type": "object",