diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85d792c44..fe24c0dcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,26 @@ jobs: - name: Run tests run: ./scripts/test + examples: + name: examples + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '18' + - name: Install dependencies + run: | + yarn install + + - env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + run: | + yarn tsn examples/demo.ts + ecosystem_tests: name: ecosystem tests (v${{ matrix.node-version }}) runs-on: ubuntu-latest diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 92b3782ff..a889d24b4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.86.1" + ".": "4.86.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd57c5ae..38d54fdc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.86.2 (2025-03-05) + +Full Changelog: [v4.86.1...v4.86.2](https://github.com/openai/openai-node/compare/v4.86.1...v4.86.2) + +### Chores + +* **internal:** run example files in CI ([#1357](https://github.com/openai/openai-node/issues/1357)) ([88d0050](https://github.com/openai/openai-node/commit/88d0050336749deb3810b4cb43473de1f84e42bd)) + ## 4.86.1 (2025-02-27) Full Changelog: [v4.86.0...v4.86.1](https://github.com/openai/openai-node/compare/v4.86.0...v4.86.1) diff --git a/jsr.json b/jsr.json index c3addf639..1c0948aaa 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@openai/openai", - "version": "4.86.1", + "version": "4.86.2", "exports": { ".": "./index.ts", "./helpers/zod": "./helpers/zod.ts", diff --git a/package.json b/package.json index 236815732..78afb8946 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.86.1", + "version": "4.86.2", "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 35e82c4c1..ac529db52 100644 --- a/src/resources/audio/speech.ts +++ b/src/resources/audio/speech.ts @@ -20,6 +20,10 @@ export class Speech extends APIResource { export type SpeechModel = 'tts-1' | 'tts-1-hd'; +export type SpeechVoice = 'alloy' | 'ash' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer'; + +export type SpeechResponseFormat = 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'; + export interface SpeechCreateParams { /** * The text to generate audio for. The maximum length is 4096 characters. @@ -38,13 +42,13 @@ export interface SpeechCreateParams { * voices are available in the * [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). */ - voice: 'alloy' | 'ash' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer'; + voice: (string & {}) | SpeechVoice; /** * The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, * `wav`, and `pcm`. */ - response_format?: 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'; + response_format?: (string & {}) | SpeechResponseFormat; /** * The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is @@ -54,5 +58,10 @@ export interface SpeechCreateParams { } export declare namespace Speech { - export { type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams }; + export { + type SpeechModel as SpeechModel, + type SpeechCreateParams as SpeechCreateParams, + type SpeechVoice as SpeechVoice, + type SpeechResponseFormat as SpeechResponseFormat, + }; } diff --git a/src/version.ts b/src/version.ts index 759b28a99..c43a3c320 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.86.1'; // x-release-please-version +export const VERSION = '4.86.2'; // x-release-please-version