-
Notifications
You must be signed in to change notification settings - Fork 1k
[Bug]: GLM 4.7 工具解析出错 #7856
Copy link
Copy link
Open
Labels
Description
Your current environment
使用的是双机910B,16卡,GLM-4.7-w8a8-with-float-mtp部署过程参考:https://docs.vllm.ai/projects/ascend/en/latest/tutorials/models/GLM4.x.html
针对opencode场景下调用“洛杉矶天气怎么样”之类的问题,模型输出的tool_calls格式不正确,且json格式不正确,导致tool_calls调用失败!
🐛 Describe the bug
针对opencode场景下调用“洛杉矶天气怎么样”之类的问题,模型输出的tool_calls格式不正确,且json格式不正确,导致tool_calls调用失败!
实际解析出来工具调用的json格式都不正确:
请求以及模型响应日志:
C1.txt
解析程序:
import json
s=json.load(open("C1.txt","r",encoding="utf-8")); STR=""
for xxx in s["response"]["raw_datalines"]:
if xxx!="[DONE]" and (tc:=((json.loads(xxx).get("choices") or [{}])[0].get("delta",{}).get("tool_calls"))): STR+=tc[0].get("function",{}).get("arguments","")
print(STR)cc: @yiz-liu
Reactions are currently unavailable