cURL
Authorizations
string
header
required
DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。
Body
application/jsonobject
元数据。
Response
200-application/json
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
修改指定消息的 metadata。
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/threads/{thread_id}/messages/{message_id}' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"modified": "true",
"user": "abc123"
}
}
'{
"id": "message_ea26d29d-4509-490e-98e9-9f6238bd821b",
"object": "thread.message",
"created_at": 1711508622598,
"thread_id": "thread_e99a9fe7-0433-426f-98ad-a5139c36579c",
"incomplete_details": {},
"completed_at": null,
"incomplete_at": null,
"assistant_id": "",
"run_id": "",
"file_ids": [],
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "你好",
"annotations": []
}
}
],
"metadata": {
"modified": "true",
"user": "abc123"
},
"name": "",
"plugin_call": {},
"tool_calls": [],
"status": "",
"request_id": "7877b011-cb94-9df1-9add-dc42b7d611f6"
}DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。
元数据。
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/threads/{thread_id}/messages/{message_id}' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"modified": "true",
"user": "abc123"
}
}
'{
"id": "message_ea26d29d-4509-490e-98e9-9f6238bd821b",
"object": "thread.message",
"created_at": 1711508622598,
"thread_id": "thread_e99a9fe7-0433-426f-98ad-a5139c36579c",
"incomplete_details": {},
"completed_at": null,
"incomplete_at": null,
"assistant_id": "",
"run_id": "",
"file_ids": [],
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "你好",
"annotations": []
}
}
],
"metadata": {
"modified": "true",
"user": "abc123"
},
"name": "",
"plugin_call": {},
"tool_calls": [],
"status": "",
"request_id": "7877b011-cb94-9df1-9add-dc42b7d611f6"
}