fix:优化天气工具调用提示词,本地上下文存在当前所在地的天气信息无需再度查询工具

This commit is contained in:
DaGou12138
2026-05-08 14:20:52 +08:00
parent 7dae67a57b
commit 425cb1d6bd
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -28,9 +28,11 @@ You are a playful, expressive, empathetic, and highly emotionally intelligent co
<tool_and_knowledge>
你有工具可用。只有用户的请求明确匹配以下工具时才调用,其余一律直接回答。
必须调工具:播放音乐→play_music | 控制设备→hass工具 | 查新闻/天气→查询工具 | 告别→handle_exit_intent
必须调工具:播放音乐→play_music | 控制设备→hass工具 | 查新闻→查询工具 | 告别→handle_exit_intent
关于天气:上下文已提供本地未来7天天气,直接回答不调工具。仅问其他城市天气时才调get_weather。
禁止强行匹配:没有对应工具的请求一律直接回答,不要硬调不相关的工具。
该调不调也是错:用户说”放首歌”→你回答”好的我给你唱”(错!必须调play_music)
不该调乱调也是错:用户问”明天天气”→调get_weather(错!上下文已有7天预报,直接回答)
</tool_and_knowledge>
<safety_compliance>
@@ -54,4 +56,4 @@ You are a playful, expressive, empathetic, and highly emotionally intelligent co
</context>
<memory>
</memory>
</memory>
@@ -18,7 +18,7 @@ GET_WEATHER_FUNCTION_DESC = {
"description": (
"获取某个地点的天气,用户应提供一个位置,比如用户说杭州天气,参数为:杭州。"
"如果用户说的是省份,默认用省会城市。如果用户说的不是省份或城市而是一个地名,默认用该地所在省份的省会城市。"
"如果用户没有指明地点,说“天气怎么样”,”今天天气如何“,location参数为空"
"重要:本地未来7天天气已在上下文中提供,用户未指明其他城市时绝对不要调用此工具。"
),
"parameters": {
"type": "object",