获取生成指定 Response 时所使用的输入项列表。在多轮对话(使用 previous_response_id 串联)中,会一并返回历史轮次的用户输入和模型回复。仅当原创建请求中 store=true 时,返回的 Response ID 才支持查询。
华北2(北京)
SDK 调用配置的base_url:https://dashscope.aliyuncs.com/compatible-mode/v1
HTTP 请求地址:GET https://dashscope.aliyuncs.com/compatible-mode/v1/responses/{response_id}/input_items
路径参数response_id 要查询输入项的 Response ID,格式为 |
默认查询Python
Node.js
curl
按条件查询Python
Node.js
curl
|
查询参数after 以指定的 item ID(格式为 |
|
|
limit 返回的最大条数,取值范围 [1, 100],默认值为 20。 |
|
|
order 排序方式,支持 |
返回结果 |
|
|
data 输入项列表。每个元素是一个消息对象,包含 |
|
|
first_id 列表中第一个元素的 ID。 |
|
|
last_id 列表中最后一个元素的 ID。 |
|
|
has_more 是否还有未返回的数据。当为 |
|
|
id 对应的 Response ID。 |
|
|
model 生成该 Response 时使用的模型名称。 |
|
|
created_at Response 创建时间的 Unix 时间戳(毫秒)。注意:与"创建响应/检索响应"接口返回的 |
|
|
previous_response_id 多轮对话(使用 |
错误响应
当指定的 Response ID 不存在时,返回以下错误:
{
"error": {
"message": "Response with id 'resp_xxx' not found.",
"type": "InvalidParameter"
}
}