紧凑响应
curl --request POST \
--url https://api.hubto.ai/v1/responses/compact \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>"
}
'import requests
url = "https://api.hubto.ai/v1/responses/compact"
payload = {
"model": "<string>",
"input": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: '<string>'})
};
fetch('https://api.hubto.ai/v1/responses/compact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"output_text": "<string>"
}接口示例
紧凑响应
紧凑模式 Responses 接口。
POST
/
v1
/
responses
/
compact
紧凑响应
curl --request POST \
--url https://api.hubto.ai/v1/responses/compact \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>"
}
'import requests
url = "https://api.hubto.ai/v1/responses/compact"
payload = {
"model": "<string>",
"input": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: '<string>'})
};
fetch('https://api.hubto.ai/v1/responses/compact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"output_text": "<string>"
}⌘I