Tools调用输出格式变化
Closed this issue · 3 comments
System Info / 系統信息
Count | 1 |
---|---|
CPU Info | Usage: 0.03Total: 8.00 |
CPU Memory Info | Usage: 3411.63MiBTotal: 29692.37MiB |
GPU Info | Total: 1.00 |
GPU Memory Info | Usage: 1609.31MiBTotal: 23028.00MiB |
Version | Release: v1.0.1Commit: 8dd5715e10d5a7f22f437a794eddd844e6b8d686 |
Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?
- docker / docker
- pip install / 通过 pip install 安装
- installation from source / 从源码安装
Version info / 版本信息
0.6.3
1.0.0
1.0.1
pip install 和docker部署均存在此问题
The command used to start Xinference / 用以启动 xinference 的命令
xinference-local --host 0.0.0.0
Reproduction / 复现过程
返回的arguments缺少"arg0"参数这一层
请求:
curl --location 'http://127.0.0.1:9997/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "model": "qwen2.5-instruct", "messages": [ { "role": "user", "content": "Use '\''process'\'' tool to process the following: Klaus is 37 years old, 1.78m height and single" } ], "temperature": 0.0, "tools": [ { "type": "function", "function": { "name": "process", "parameters": { "type": "object", "properties": { "arg0": { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer" }, "height": { "type": "number" }, "married": { "type": "boolean" } }, "required": [ "name", "age", "height", "married" ] } }, "required": [ "arg0" ] } } } ] }'
响应:
{ "id": "chatcmpl-f4b14c2c-3792-4a03-af14-0563c1a59c7f", "model": "qwen2.5-instruct", "object": "chat.completion", "created": 1733103048, "choices": [ { "index": 0, "message": { "role": "assistant", "content": null, "tool_calls": [ { "id": "call_f4b14c2c-3792-4a03-af14-0563c1a59c7f", "type": "function", "function": { "name": "process", "arguments": "{\"name\": \"Klaus\", \"age\": 37, \"height\": 178, \"married\": false}" } } ] }, "finish_reason": "tool_calls" } ], "usage": { "prompt_tokens": 235, "completion_tokens": 49, "total_tokens": 284 } }
Expected behavior / 期待表现
期待arguments数据格式如下
{ "arg0": { "name": "Klaus", "age": 37, "height": 178, "married": false } }
这个是模型问题吧。比较小的模型能力有限。
This issue is stale because it has been open for 7 days with no activity.
This issue was closed because it has been inactive for 5 days since being marked as stale.