Platform APIEnterprise
Upload stream-message content
Continuously write UTF-8 output from a model or business service to the same stream message.
HTTP request
PUT {API_ADDRESS}/msg/append_stream_msg?conversationID={CONVERSATION_ID}&clientMsgID={CLIENT_MSG_ID}&operationID={OPERATION_ID}Request example
curl --request PUT "${API_ADDRESS}/msg/append_stream_msg?conversationID=si_user_001_user_002&clientMsgID=client_msg_001&operationID=${OPERATION_ID}" \
--header "Content-Type: text/plain; charset=utf-8" --header "token: ${TOKEN}" \
--data-binary 'Generated response content'Request parameters
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| conversationID | Query or header | Yes | string | Conversation containing the stream message. |
| clientMsgID | Query or header | Yes | string | Client message ID of the stream message. |
| operationID | Query or header | Yes | string | Unique trace ID for this request. |
| token | Header | Yes | string | Valid user or administrator token. |
| body | Body | Yes | bytes | UTF-8 stream-message content. |
Response
The server returns write results as a stream. Handle interrupted connections and partial writes; do not retry a chunk until its state is known.
Permissions and limits
- Available only in OpenIM Enterprise.
- The body must be valid UTF-8.
conversationIDandclientMsgIDmust identify the same appendable stream message.
Related pages
Was this page helpful?