Closed ssfun closed 1 month ago
例行检查
问题描述 steam 设为 true 时,无法获取正确结果 复现步骤
curl -X POST https://url/v1/chat/completions \ -H 'Authorization: Bearer sk-key' \ -H "Content-Type: application/json" \ -d '{ "temperature":0.5, "model": "command-r-plus", "messages": [ {"role": "system", "content": "小助手"}, {"role": "user", "content": "回复Hi!"} ], "stream": true }'
得到的结果:
data: [DONE]
stream 设为 false 时,有正确返回
curl -X POST https://url/api/v1/chat/completions \ -H 'Authorization: Bearer sk-key' \ -H "Content-Type: application/json" \ -d '{ "temperature":0.5, "model": "command-r-plus", "messages": [ {"role": "system", "content": "小助手"}, {"role": "user", "content": "回复Hi!"} ], "stream": false }'
返回结果:
{ "id":"cc3efeac-a5be-4c82-8306-926c90e5b935", "object":"chat.completion", "created":1721809537, "model":"command-r-plus", "choices":[ { "index":0, "message":{"role":"assistant","content":"你好!有什么可以帮到你的吗?"}, "finish_reason":"stop" } ], "usage": { "prompt_tokens":6, "completion_tokens":11, "total_tokens":17 } }
预期结果 希望优化支持 cohere 的 steam 模式
已修复
最新代码构建版本确认修复,非常感谢!!!
例行检查
问题描述 steam 设为 true 时,无法获取正确结果 复现步骤
得到的结果:
stream 设为 false 时,有正确返回
返回结果:
预期结果 希望优化支持 cohere 的 steam 模式