From 5e05b31c132545ce166cea92c5f3e4410fd40711 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:28:09 -0400 Subject: [PATCH 1/2] docs(README): fix variable names in some examples (#327) --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2b5f53335..898bb5c6b 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,12 @@ const openai = new OpenAI({ }); async function main() { - const completion = await openai.chat.completions.create({ + const chatCompletion = await openai.chat.completions.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-3.5-turbo', }); - console.log(completion.choices); + console.log(chatCompletion.choices); } main(); @@ -81,7 +81,7 @@ async function main() { messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-3.5-turbo', }; - const completion: OpenAI.Chat.ChatCompletion = await openai.chat.completions.create(params); + const chatCompletion: OpenAI.Chat.ChatCompletion = await openai.chat.completions.create(params); } main(); @@ -226,8 +226,8 @@ You can use `for await … of` syntax to iterate through items across all pages: async function fetchAllFineTuningJobs(params) { const allFineTuningJobs = []; // Automatically fetches more pages as needed. - for await (const job of openai.fineTuning.jobs.list({ limit: 20 })) { - allFineTuningJobs.push(job); + for await (const fineTuningJob of openai.fineTuning.jobs.list({ limit: 20 })) { + allFineTuningJobs.push(fineTuningJob); } return allFineTuningJobs; } @@ -237,8 +237,8 @@ Alternatively, you can make request a single page at a time: ```ts let page = await openai.fineTuning.jobs.list({ limit: 20 }); -for (const job of page.data) { - console.log(job); +for (const fineTuningJob of page.data) { + console.log(fineTuningJob); } // Convenience methods are provided for manually paginating: @@ -265,11 +265,11 @@ const response = await openai.chat.completions console.log(response.headers.get('X-My-Header')); console.log(response.statusText); // access the underlying Response object -const { data: completions, response: raw } = await openai.chat.completions +const { data: chatCompletion, response: raw } = await openai.chat.completions .create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-3.5-turbo' }) .withResponse(); console.log(raw.headers.get('X-My-Header')); -console.log(completions.choices); +console.log(chatCompletion.choices); ``` ## Configuring an HTTP(S) Agent (e.g., for proxies) From d8ebe75cbaae7e4165ad61c8becfa3975fa5a76d Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:28:27 -0400 Subject: [PATCH 2/2] release: 4.9.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d9141eb34..25b3c3259 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.9.0" + ".": "4.9.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a079127e..ec37e8079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.9.1 (2023-09-21) + +Full Changelog: [v4.9.0...v4.9.1](https://github.com/openai/openai-node/compare/v4.9.0...v4.9.1) + +### Documentation + +* **README:** fix variable names in some examples ([#327](https://github.com/openai/openai-node/issues/327)) ([5e05b31](https://github.com/openai/openai-node/commit/5e05b31c132545ce166cea92c5f3e4410fd40711)) + ## 4.9.0 (2023-09-20) Full Changelog: [v4.8.0...v4.9.0](https://github.com/openai/openai-node/compare/v4.8.0...v4.9.0) diff --git a/package.json b/package.json index 85d526612..4754e3626 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.9.0", + "version": "4.9.1", "description": "Client library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 7e0a988a4..093c16710 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.9.0'; // x-release-please-version +export const VERSION = '4.9.1'; // x-release-please-version