{
"messages": [
{
"role": "user",
"content": "你好"
},
{
"role": "assistant",
"content": "你好!有什么我可以帮助你的吗?"
},
{
"role": "user",
"content": "介绍一下你自己"
}],
"model": "Qwen3-32B"
}curl --location --request POST '/test/chat/v2' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"role": "user",
"content": "你好"
},
{
"role": "assistant",
"content": "你好!有什么我可以帮助你的吗?"
},
{
"role": "user",
"content": "介绍一下你自己"
}],
"model": "Qwen3-32B"
}'data: 开头(遵守SSE标准),后包含一个 JSON 对象,具有以下字段:| 字段名 | 类型 | 描述 |
|---|---|---|
| role | string | 角色名称,比如 "assistant" |
| content | string | 当前生成的文本片段 |
[DONE] 消息。error 字段的 JSON 数据。data: {"role": "assistant", "content": "你好"}
data: {"role": "assistant", "content": ","}
data: {"role": "assistant", "content": "我是"}
data: {"role": "assistant", "content": "Q"}
data: {"role": "assistant", "content": "wen"}
...
data: [DONE]