Replace saved response text¶
Replace modified_response text in a message record.
PUT https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/llm/sessions/{session_id}/messages/{message_id}/modify-response
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Configure Workspace identity and variables in the same environment.
Request¶
curl --request PUT \
"$BASE_URL/workspaces/$WORKSPACE_ID/llm/sessions/$SESSION_ID/messages/$MESSAGE_ID/modify-response" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data-raw '{"modified_response":"修改后的文本"}'
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Path |
string |
Yes |
Target Workspace, matching X-Workspace-ID. |
|
Path |
integer |
Yes |
Positive integer ID returned by this service. |
|
Path |
integer |
Yes |
Positive integer ID returned by this service. |
|
Body |
string |
No |
Replacement text. Omitted/null/empty string sets it to an empty string. |
The message must belong to the current user and path conversation. Read message details after success to confirm modified_response. This does not change original response or call the model to regenerate.
Successful response¶
HTTP/1.1 204 No Content
HTTP 204 with no body. This operation returns no JSON data object.
Error response¶
Error formats and read scope explains differing identity, parameter, resource-read, and storage-failure outcomes.