diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d3e848620..92fcace17 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.73.0" + ".": "4.73.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 51741f552..c32a0ce32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.73.1 (2024-11-25) + +Full Changelog: [v4.73.0...v4.73.1](https://github.com/openai/openai-node/compare/v4.73.0...v4.73.1) + +### Documentation + +* **readme:** mention `.withResponse()` for streaming request ID ([#1202](https://github.com/openai/openai-node/issues/1202)) ([b6800d4](https://github.com/openai/openai-node/commit/b6800d4dea2729fe3b0864171ce8fb3b2cc1b21c)) + ## 4.73.0 (2024-11-20) Full Changelog: [v4.72.0...v4.73.0](https://github.com/openai/openai-node/compare/v4.72.0...v4.73.0) diff --git a/README.md b/README.md index ec17427a6..ac9c84a42 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,18 @@ const completion = await client.chat.completions.create({ messages: [{ role: 'us console.log(completion._request_id) // req_123 ``` +You can also access the Request ID using the `.withResponse()` method: + +```ts +const { data: stream, request_id } = await openai.chat.completions + .create({ + model: 'gpt-4', + messages: [{ role: 'user', content: 'Say this is a test' }], + stream: true, + }) + .withResponse(); +``` + ## Microsoft Azure OpenAI To use this library with [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/overview), use the `AzureOpenAI` diff --git a/jsr.json b/jsr.json index f09f5bbab..0bd5eab3f 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "4.73.0", + "version": "4.73.1", "exports": "./index.ts", "publish": { "exclude": [ diff --git a/package.json b/package.json index 13e8ee3bc..685d59f56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.73.0", + "version": "4.73.1", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 4e3a33b17..28fbb6572 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.73.0'; // x-release-please-version +export const VERSION = '4.73.1'; // x-release-please-version