|
| 1 | +method: POST |
| 2 | +path: chat/completions |
| 3 | +-- begin request body -- |
| 4 | +{"messages":[{"content":"David Nguyen is a sophomore majoring in computer science at Stanford University and has a GPA of 3.8.\nDavid is an active member of the university's Chess Club and the South Asian Student Association.\nHe hopes to pursue a career in software engineering after graduating.","role":"user"}],"model":"gpt-4o-mini","tool_choice":{"function":{"name":"extract_student_info"},"type":"function"},"tools":[{"function":{"name":"extract_student_info","description":"Get the student information from the body of the input text","parameters":{"type":"object","properties":{"name":{"type":"string","description":"Name of the person"},"major":{"type":"string","description":"Major subject."},"school":{"type":"string","description":"The university name."},"grades":{"type":"integer","description":"GPA of the student."},"clubs":{"type":"array","description":"School clubs for extracurricular activities. ","items":{"type":"string","description":"Name of School Club"}}}}},"type":"function"}]} |
| 5 | +-- end request body -- |
| 6 | +status code: 200 |
| 7 | +-- begin response headers -- |
| 8 | +access-control-expose-headers: X-Request-ID |
| 9 | +alt-svc: h3=":443"; ma=86400 |
| 10 | +cf-cache-status: DYNAMIC |
| 11 | +cf-ray: 9e52289bcf4b6811-SEA |
| 12 | +content-type: application/json |
| 13 | +date: Tue, 31 Mar 2026 20:38:37 GMT |
| 14 | +openai-organization: datadog-staging |
| 15 | +openai-processing-ms: 975 |
| 16 | +openai-project: proj_gt6TQZPRbZfoY2J9AQlEJMpd |
| 17 | +openai-version: 2020-10-01 |
| 18 | +server: cloudflare |
| 19 | +set-cookie: __cf_bm=8UpsxSUpYP5PmHi3NoNcvUAPHElwZCix7hG5h.Jprr8-1774989516.1296408-1.0.1.1-2GEVgpgzsaA8PIC.4pr9thdXAw7zglpkJZF_LD08k1itVMbyhtxUjskkov5EnFuRLGkMaXiKrl5sngZSQF3mFA_h_Cfh.bCgd.k3ovK4p9VcbEmkfWy7MStLsa5i3LFh; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Tue, 31 Mar 2026 21:08:37 GMT |
| 20 | +strict-transport-security: max-age=31536000; includeSubDomains; preload |
| 21 | +x-content-type-options: nosniff |
| 22 | +x-openai-proxy-wasm: v0.1 |
| 23 | +x-ratelimit-limit-requests: 30000 |
| 24 | +x-ratelimit-limit-tokens: 150000000 |
| 25 | +x-ratelimit-remaining-requests: 29999 |
| 26 | +x-ratelimit-remaining-tokens: 149999927 |
| 27 | +x-ratelimit-reset-requests: 2ms |
| 28 | +x-ratelimit-reset-tokens: 0s |
| 29 | +x-request-id: req_6de1d82c867f4dc3a10eb169eda01c8f |
| 30 | +-- end response headers -- |
| 31 | +-- begin response body -- |
| 32 | +{ |
| 33 | + "id": "chatcmpl-DPa96rNBMqoTGuLjKfIw3huHXDuai", |
| 34 | + "object": "chat.completion", |
| 35 | + "created": 1774989516, |
| 36 | + "model": "gpt-4o-mini-2024-07-18", |
| 37 | + "choices": [ |
| 38 | + { |
| 39 | + "index": 0, |
| 40 | + "message": { |
| 41 | + "role": "assistant", |
| 42 | + "content": null, |
| 43 | + "tool_calls": [ |
| 44 | + { |
| 45 | + "id": "call_FPVMvOQnA8cKnmYI83lMmQ75", |
| 46 | + "type": "function", |
| 47 | + "function": { |
| 48 | + "name": "extract_student_info", |
| 49 | + "arguments": "{\"name\":\"David Nguyen\",\"major\":\"computer science\",\"school\":\"Stanford University\",\"grades\":3.8,\"clubs\":[\"Chess Club\",\"South Asian Student Association\"]}" |
| 50 | + } |
| 51 | + } |
| 52 | + ], |
| 53 | + "refusal": null, |
| 54 | + "annotations": [] |
| 55 | + }, |
| 56 | + "logprobs": null, |
| 57 | + "finish_reason": "stop" |
| 58 | + } |
| 59 | + ], |
| 60 | + "usage": { |
| 61 | + "prompt_tokens": 162, |
| 62 | + "completion_tokens": 34, |
| 63 | + "total_tokens": 196, |
| 64 | + "prompt_tokens_details": { |
| 65 | + "cached_tokens": 0, |
| 66 | + "audio_tokens": 0 |
| 67 | + }, |
| 68 | + "completion_tokens_details": { |
| 69 | + "reasoning_tokens": 0, |
| 70 | + "audio_tokens": 0, |
| 71 | + "accepted_prediction_tokens": 0, |
| 72 | + "rejected_prediction_tokens": 0 |
| 73 | + } |
| 74 | + }, |
| 75 | + "service_tier": "default", |
| 76 | + "system_fingerprint": "fp_1bf41b89ce" |
| 77 | +} |
| 78 | +� |
| 79 | +-- end response body -- |
0 commit comments