diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9785f7c4a..3218ab333 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.78.0" + ".": "4.78.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc82e722..320d00140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.78.1 (2025-01-10) + +Full Changelog: [v4.78.0...v4.78.1](https://github.com/openai/openai-node/compare/v4.78.0...v4.78.1) + +### Bug Fixes + +* send correct Accept header for certain endpoints ([#1257](https://github.com/openai/openai-node/issues/1257)) ([8756693](https://github.com/openai/openai-node/commit/8756693c5690b16045cdd8d33636fe7643d45f3a)) + ## 4.78.0 (2025-01-09) Full Changelog: [v4.77.4...v4.78.0](https://github.com/openai/openai-node/compare/v4.77.4...v4.78.0) diff --git a/jsr.json b/jsr.json index e26f2d5d8..257faa02d 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "4.78.0", + "version": "4.78.1", "exports": "./index.ts", "publish": { "exclude": [ diff --git a/package.json b/package.json index ab06be9cf..ff6ec16bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.78.0", + "version": "4.78.1", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/resources/audio/speech.ts b/src/resources/audio/speech.ts index 1cda80f79..bd2ed9f65 100644 --- a/src/resources/audio/speech.ts +++ b/src/resources/audio/speech.ts @@ -9,7 +9,12 @@ export class Speech extends APIResource { * Generates audio from the input text. */ create(body: SpeechCreateParams, options?: Core.RequestOptions): Core.APIPromise { - return this._client.post('/audio/speech', { body, ...options, __binaryResponse: true }); + return this._client.post('/audio/speech', { + body, + ...options, + headers: { Accept: 'application/octet-stream', ...options?.headers }, + __binaryResponse: true, + }); } } diff --git a/src/resources/files.ts b/src/resources/files.ts index 42a7bdfba..43708310b 100644 --- a/src/resources/files.ts +++ b/src/resources/files.ts @@ -69,7 +69,11 @@ export class Files extends APIResource { * Returns the contents of the specified file. */ content(fileId: string, options?: Core.RequestOptions): Core.APIPromise { - return this._client.get(`/files/${fileId}/content`, { ...options, __binaryResponse: true }); + return this._client.get(`/files/${fileId}/content`, { + ...options, + headers: { Accept: 'application/binary', ...options?.headers }, + __binaryResponse: true, + }); } /** @@ -78,10 +82,7 @@ export class Files extends APIResource { * @deprecated The `.content()` method should be used instead */ retrieveContent(fileId: string, options?: Core.RequestOptions): Core.APIPromise { - return this._client.get(`/files/${fileId}/content`, { - ...options, - headers: { Accept: 'application/json', ...options?.headers }, - }); + return this._client.get(`/files/${fileId}/content`, options); } /** diff --git a/src/version.ts b/src/version.ts index 7ab855b86..a8ac58ba2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.78.0'; // x-release-please-version +export const VERSION = '4.78.1'; // x-release-please-version