使用tool_using_demo中的openai_api_demo.py无法调用工具 #1248
JefferyLJF1129
started this conversation in
Bad Case
Replies: 0 comments
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.
-
使用的代码都是demo的源码:
https://github.com/THUDM/ChatGLM3/blob/fd4de6cf11a982a47cb2cc313a80ddf7b269e11e/tools_using_demo/openai_api_demo.py
https://github.com/THUDM/ChatGLM3/blob/fd4de6cf11a982a47cb2cc313a80ddf7b269e11e/tools_using_demo/tool_register.py
测试输入query:Get the current weather for Hangzhou.
输出每轮的结果似乎都没有去调用get_weather工具


尝试查看返回的具体结果(我是流式输出),finish reason都是None,显然模型每次都是判别不用工具:
Beta Was this translation helpful? Give feedback.
All reactions