You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -361,6 +361,17 @@ Error codes are as followed:
361
361
| >=500 |`InternalServerError`|
362
362
| N/A |`APIConnectionError`|
363
363
364
+
## Request IDs
365
+
366
+
> For more information on debugging requests, see [these docs](https://platform.openai.com/docs/api-reference/debugging-requests)
367
+
368
+
All object responses in the SDK provide a `_request_id` property which is added from the `x-request-id` response header so that you can quickly log failing requests and report them back to OpenAI.
369
+
370
+
```ts
371
+
const completion =awaitclient.chat.completions.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-4' });
372
+
console.log(completion._request_id) // req_123
373
+
```
374
+
364
375
## Microsoft Azure OpenAI
365
376
366
377
To use this library with [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/overview), use the `AzureOpenAI`
0 commit comments