查询输入项列表
curl --request GET \
--url https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items \
--header 'Authorization: Bearer <token>'import requests
url = "https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"type": "message",
"role": "user",
"content": "<string>"
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Response
查询输入项列表
分页列出某次 Response 的输入项。创建时须 store=true。点击 Try it 可试用。
GET
/
v1
/
responses
/
{response_id}
/
input_items
查询输入项列表
curl --request GET \
--url https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items \
--header 'Authorization: Bearer <token>'import requests
url = "https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://open.bigmodel.cn/api/v1/responses/{response_id}/input_items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"type": "message",
"role": "user",
"content": "<string>"
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Path Parameters
要检索的响应 ID,即创建响应时返回的 id。
Example:
"resp_xxx"
Query Parameters
排序方式:desc(默认)/ asc。
Available options:
desc, asc 单页返回条数,范围 1–100,默认 20。
Required range:
1 <= x <= 100分页游标,取上一页返回的 last_id;首页留空。
Response
业务处理成功
当前页的输入项,元素为 message / reasoning / function_call / function_call_output 等。
一条输入项。
- 用户消息
- 工具命中
- 工具返回
- 思维链输入
Show child attributes
Show child attributes
当前页首条输入项的 id;空页为 null。
当前页末条输入项的 id,作为下一页 after;空页为 null。
是否还有下一页。
Was this page helpful?