Hostitud veebiotsing
Kasutage eraldiseisva lõpp-punkti asemel tööriista Responses API web_search.
Hostitud veebiotsing
Model Gate ei avalda eraldi /v1/web-search lepingut taotlema. Kasuta POST /v1/responses koos võõrustajaga web_search tööriist.
Taotlus
curl https://api.model-gate.com/v1/responses \
-H "Authorization: Bearer mg_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"input": [{"role": "user", "content": [{"type": "input_text", "text": "Find the latest official release notes."}]}],
"tools": [{"type": "web_search"}],
"tool_choice": "required",
"include": ["web_search_call.action.sources"],
"stream": false
}'
Vastus
Valmis vastuseobjekt sisaldab mudeli väljundit ja auditeeritavaid veebiotsingu allikaid, kui ülesvoolu mudel toetab hostitud otsingut.
{
"id": "resp_...",
"object": "response",
"status": "completed",
"output": [
{
"type": "web_search_call",
"action": {
"sources": [
{"type": "url", "url": "https://example.com/source"}
]
}
},
{
"type": "message",
"content": [
{"type": "output_text", "text": "..."}
]
}
]
}