We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
接口兼容性问题,与硬件无关
No response
{ "messages": [ { "content": "What's the weather like in San Francisco", "role": "user" } ], "model": "glm4", "stream": false, "temperature": 0.8, "tools": [ { "type": "function", "function": { "description": "根据传入的城市获取天气信息", "name": "getCurrentWeather", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "城市名称,如:武汉" } }, "required": [ "location" ] } } } ], "tool_choice": "auto" }
{ "model": "glm4", "id": "", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "getCurrentWeather\n{\"location\": \"San Francisco\"}", "name": null, "function_call": { "name": "getCurrentWeather", "arguments": "{\"location\": \"San Francisco\"}" } }, "finish_reason": "function_call" } ], "created": 1717641432, "usage": { "prompt_tokens": 157, "total_tokens": 168, "completion_tokens": 11 } }
期望能够返回与GPT4最新的tool_calls调用相兼容的api { "model": "glm4", "id": "", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "getCurrentWeather\n ```python\ntool_call(location='San Francisco')\n```", "tool_calls": [ { "id": "call0", "type": "function", "function": { "name": "getCurrentWeather", "arguments": "{\"location\": \"San Francisco\"}" } } ] }, "finish_reason": "tool_calls" } ], "created": 1717635659, "usage": { "prompt_tokens": 162, "total_tokens": 183, "completion_tokens": 21 } }
{ "model": "glm4", "id": "", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "getCurrentWeather\n ```python\ntool_call(location='San Francisco')\n```", "tool_calls": [ { "id": "call0", "type": "function", "function": { "name": "getCurrentWeather", "arguments": "{\"location\": \"San Francisco\"}" } } ] }, "finish_reason": "tool_calls" } ], "created": 1717635659, "usage": { "prompt_tokens": 162, "total_tokens": 183, "completion_tokens": 21 } }
The text was updated successfully, but these errors were encountered:
看到这个请求了,我们会在之后的排期中做
Sorry, something went wrong.
vllm应该还不支持FunctionCall和ToolCall,有相关的PR:https://github.com/vllm-project/vllm/pull/4656,这个特性跟踪了好久了,有半年了,还没开发好。期待完全兼容OpenAI接口!
遇到了同样的问题,在使用 langchain 的结构化输出功能的时候(with_structured_output),由于返回格式不一样,解析不了
with_structured_output
openai demo update
abe93e0
#64 #36
已经修了
zRzRzRzRzRzRzR
No branches or pull requests
System Info / 系統信息
接口兼容性问题,与硬件无关
Who can help? / 谁可以帮助到您?
No response
Information / 问题信息
Reproduction / 复现过程
{ "messages": [ { "content": "What's the weather like in San Francisco", "role": "user" } ], "model": "glm4", "stream": false, "temperature": 0.8, "tools": [ { "type": "function", "function": { "description": "根据传入的城市获取天气信息", "name": "getCurrentWeather", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "城市名称,如:武汉" } }, "required": [ "location" ] } } } ], "tool_choice": "auto" }
{ "model": "glm4", "id": "", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "getCurrentWeather\n{\"location\": \"San Francisco\"}", "name": null, "function_call": { "name": "getCurrentWeather", "arguments": "{\"location\": \"San Francisco\"}" } }, "finish_reason": "function_call" } ], "created": 1717641432, "usage": { "prompt_tokens": 157, "total_tokens": 168, "completion_tokens": 11 } }
Expected behavior / 期待表现
期望能够返回与GPT4最新的tool_calls调用相兼容的api
{ "model": "glm4", "id": "", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "getCurrentWeather\n ```python\ntool_call(location='San Francisco')\n```", "tool_calls": [ { "id": "call0", "type": "function", "function": { "name": "getCurrentWeather", "arguments": "{\"location\": \"San Francisco\"}" } } ] }, "finish_reason": "tool_calls" } ], "created": 1717635659, "usage": { "prompt_tokens": 162, "total_tokens": 183, "completion_tokens": 21 } }
The text was updated successfully, but these errors were encountered: