PaddlePaddle/ERNIE-SDK

智能体需要多次执法FC,而在文心返回结果中只有一个FC及其相关参数

zhougx88 opened this issue · 3 comments

智能体已经判断出需要执行两个FC:get_current_temperature,get_current_swing.(这需要我调用'get_current_temperature'和'get_current_swing'工具)
但在返回结果中只有一个FC:
name': 'get_current_temperature', 'arguments': '{"location":"深圳","unit":"摄氏度"}
第二个需要执行的FC没有返回结果,应该如何处理?
如下:
env3.10) [root@localhost Langchain-Chatchat-2.6]# /home/env3.10/bin/python3.10 /home/env3.10/Langchain-Chatchat-2.6/erniebot/agent_tool.py
{'name': 'get_current_temperature', 'thoughts': "用户想要知道深圳市今天的天气情况,以及是否适合进行户外活动。这需要我调用'get_current_temperature'和'get_current_swing'工具。任务拆解:[sub-task1: 使用[get_current_temperature]获取深圳市今天的温度,sub-task2: 使用[get_current_swing]获取深圳市今天的风力]。接下来需要调用[get_current_temperature]工具来获取深圳市今天的温度信息。", 'arguments': '{"location":"深圳","unit":"摄氏度"}'}
2024-03-13 14:39:45,271 - _client.py[line:1013] - INFO: HTTP Request: GET http://10.74.1.13:8020/get_current_temperature1?city=%E5%8C%97%E4%BA%AC&unit=%E6%91%84%E6%B0%8F%E5%BA%A6 "HTTP/1.1 200 OK"
根据您提供的信息,深圳市今天的温度为20摄氏度。这个温度对于户外活动来说是比较适宜的,但具体是否适合还需要考虑其他因素,如风力、降水等。如果您需要更详细的信息,建议查询当地的天气预报或咨询相关专业人士。希望这个回答能对您有所帮助。

需要开启多工具调用支持哈,enable_multi_step_tool_call,参考文档:https://ernie-bot-agent.readthedocs.io/zh-cn/latest/modules/agents/#22-function-agent

指定enable_multi_step_tool_call为True以启用多步工具调用功能,默认为false

好的,谢谢