Skip to content
New issue

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

GLM4携带工具并设置为流式返回但实际返回非流式消息 #709

Open
1 of 2 tasks
243006306 opened this issue Jan 23, 2025 · 0 comments
Open
1 of 2 tasks
Assignees

Comments

@243006306
Copy link

243006306 commented Jan 23, 2025

System Info / 系統信息

1、使用的最新主干代码、最新模型仓库
2、vllm版本更改为0.6.6.post,cuda版本12.6
3、使用openai_api_server.py启动

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

问题现象:不携带工具的情况下,正常流式返回;请求携带了参数,触发了工具也是正常流式返回,但是没有触发工具则是非流式返回。

测试采用的Openai的rest接口进行测试,测试参数如下:
{
"model": "glm-4",
"messages": [
{
"role": "system",
"content": "你是一个优秀的智能问答助手"
},
{
"role": "user",
"content": "你好啊,请用100字打招呼"
}
],
"temperature": 0.7,
"top_p": 1.0,
"stream": true,
"tool_choice": "auto",
"tools": [
{
"type": "function",
"function": {
"name": "weather_check",
"description": "天气查询",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "城市名称"
}
},
"required": [
"city"
]
}
}
}
]
}

Image

Expected behavior / 期待表现

携带工具时未命中工具的消息均正常流式返回

@zhipuch zhipuch self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants