LlmStreamChat
Invokes a large language model in streaming mode by using the Server-Sent Events (SSE) API.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-greenweb:LlmStreamChat |
get |
*All Resource
|
None | None |
Request syntax
POST /portal/llm/streamChat HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Messages |
any |
No |
The conversation messages. |
[{"content":"Hello","role":"user"}] |
| Temperature |
number |
No |
The temperature value for the large language model. |
0.5 |
| TopP |
number |
No |
The top-p parameter that controls the randomness of the output generated by the large language model. |
0.5 |
| Type |
string |
No |
The conversation type. |
image |
| Channel |
string |
No |
The identifier of the call channel. |
guardCustomTest |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Usage |
string |
The token usage. |
null |
| Choices |
array<object> |
The list of model generation results. |
|
|
array<object> |
The model generation result. |
||
| Delta |
object |
The incremental content object. |
|
| Role |
string |
The role identifier. |
assistant |
| Content |
string |
The text content generated in real time. |
I am DeepSeek-V3. How can I help you? |
| Logprobs |
string |
The token probability information. |
null |
| Index |
integer |
The stream sequence number. |
0 |
| FinishReason |
string |
For streaming output, this parameter is null during generation. If the generation ends due to a stop token, the value is stop. |
stop |
| Model |
string |
The model identifier. |
deepseek-v3 |
| SystemFingerprint |
string |
The system fingerprint. |
null |
| Object |
string |
The response type. |
chat.completion.chunk |
| Id |
string |
The unique ID of the current session. |
chatcmpl-777bce52-93d3-9f8c-89c3-e99884f4f57f |
| Created |
integer |
The timestamp when the session was created. |
1750990728 |
| RequestId |
string |
The unique request ID. |
21d296d6-594e-97de-812f-925ec6e05673 |
| Error |
object |
The fault message content in the streaming response. |
|
| Code |
string |
The error code. |
data_inspection_failed |
| Message |
string |
The error message. |
Input data may contain inappropriate content. |
| Param |
string |
The parameter that caused the error. |
null |
| Type |
string |
The error type. |
data_inspection_failed |
Examples
Success response
JSON format
{
"Usage": "null",
"Choices": [
{
"Delta": {
"Role": "assistant",
"Content": "I am Deepseek-V3. How can I help you?"
},
"Logprobs": "null",
"Index": 0,
"FinishReason": "stop"
}
],
"Model": "deepseek-v3",
"SystemFingerprint": "null",
"Object": "chat.completion.chunk",
"Id": "chatcmpl-777bce52-93d3-9f8c-89c3-e99884f4f57f",
"Created": 1750990728,
"RequestId": "21d296d6-594e-97de-812f-925ec6e05673",
"Error": {
"Code": "data_inspection_failed",
"Message": "Input data may contain inappropriate content.",
"Param": "null",
"Type": "data_inspection_failed"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.