web搜索
POST /v1/chat/completions
说明
概览
| Method | POST |
|---|---|
| Path | /v1/chat/completions |
| Type | http |
| Status | -2 |
| Module | 2102810 |
| Folder | 58632873 |
参数
{ "header": [ { "name": "Authorization", "required": true, "description": "", "id": "u4oxZ9wVji", "type": "string", "enable": true, "sampleValue": "Bearer $OPENAI_API_KEY" }, { "name": "Content-type", "required": true, "description": "", "id": "P8YmwpolyQ", "type": "string", "enable": true, "sampleValue": "application/json" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "model": { "type": "string" }, "web_search_options": { "type": "object", "properties": {} }, "messages": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string" }, "content": { "type": "string" } } } } }, "required": [ "model", "web_search_options", "messages" ] }, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\n \"model\": \"gpt-4o-search-preview\",\n \"web_search_options\": {},\n \"messages\": [{\n \"role\": \"user\",\n \"content\": \"What was a positive news story from today?\"\n }]\n }", "name": "示例" } ], "oasExtensions": "" }
响应
[ { "id": 693614272, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]