Replies: 1 comment
-
32k本身就没有工具调用功能 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ChatGLM3-6B的8k版本可以识别工具调用:
8k版本下输入问题:今天北京的天气怎么样啊
响应:
decoded_line = {'model': 'chatglm3-6b', 'object': 'chat.completion', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': "get_current_weather\n
python\ntool_call(location='Beijing', unit='celsius')\n
", 'name': None, 'function_call': {'name': 'get_current_weather', 'arguments': '{"location": "Beijing", "unit": "celsius"}'}}, 'finish_reason': 'function_call'}], 'created': 1701842176, 'usage': {'prompt_tokens': 207, 'total_tokens': 236, 'completion_tokens': 29}}8k版本下输入问题:今天上海的天气怎么样啊
响应:
decoded_line = {'model': 'chatglm3-6b', 'object': 'chat.completion', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': "get_current_weather\n
python\ntool_call(location='Shanghai', unit='celsius')\n
", 'name': None, 'function_call': {'name': 'get_current_weather', 'arguments': '{"location": "Shanghai", "unit": "celsius"}'}}, 'finish_reason': 'function_call'}], 'created': 1701841342, 'usage': {'prompt_tokens': 207, 'total_tokens': 237, 'completion_tokens': 30}}6B版本可以准确识别调用工具,回答function_call包含正确工具调用信息
=================================
ChatGLM3-6B的32k版本无法识别工具调用:
32k版本下输入问题:今天北京的天气怎么样啊
响应:
decoded_line = {'model': 'chatglm3-6b', 'object': 'chat.completion', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': '根据您的要求,北京今天的天气是晴朗的,气温为摄氏15度。', 'name': None, 'function_call': None}, 'finish_reason': 'stop'}], 'created': 1701841771, 'usage': {'prompt_tokens': 207, 'total_tokens': 229, 'completion_tokens': 22}}
32k版本使用北京提问时,回答编造,没有识别出可以调用工具
32k版本下输入问题:今天上海的天气怎么样啊
响应:
decoded_line = {'model': 'chatglm3-6b', 'object': 'chat.completion', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': '我无法实时获取上海的具体天气信息,但您可以使用 "get\_current\_weather" API 来查询。只需将上海市的名称和您希望使用的温度单位(如摄氏度或华氏度)作为参数传递即可。', 'name': None, 'function_call': None}, 'finish_reason': 'stop'}], 'created': 1701841703, 'usage': {'prompt_tokens': 207, 'total_tokens': 260, 'completion_tokens': 53}}
32k版本改用上海来提问,回答提示我们可以调用get_current_weather api来查询,但是回答不像8k版本那样包含正确的function_call信息
Beta Was this translation helpful? Give feedback.
All reactions