Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.53.2"
".": "4.54.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-77cfff37114bc9f141c7e6107eb5f1b38d8cc99bc3d4ce03a066db2b6b649c69.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-b04761ffd2adad3cc19a6dc6fc696ac445878219972f891881a967340fa9a6b0.yml
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 4.54.0 (2024-08-02)

Full Changelog: [v4.53.2...v4.54.0](https://github.com/openai/openai-node/compare/v4.53.2...v4.54.0)

### Features

* extract out `ImageModel`, `AudioModel`, `SpeechModel` ([#964](https://github.com/openai/openai-node/issues/964)) ([1edf957](https://github.com/openai/openai-node/commit/1edf957e1cb86c2a7b2d29e28f2b8f428ea0cd7d))
* make enums not nominal ([#965](https://github.com/openai/openai-node/issues/965)) ([0dd0cd1](https://github.com/openai/openai-node/commit/0dd0cd158d6765c3a04ac983aad03c2ecad14502))


### Chores

* **ci:** correctly tag pre-release npm packages ([#963](https://github.com/openai/openai-node/issues/963)) ([f1a4a68](https://github.com/openai/openai-node/commit/f1a4a686bbf4a38919b8597f008d895d1b99d8df))
* **internal:** add constant for default timeout ([#960](https://github.com/openai/openai-node/issues/960)) ([55c01f4](https://github.com/openai/openai-node/commit/55c01f4dc5d132c21713f9e8606b95abc76fcd44))
* **internal:** cleanup event stream helpers ([#950](https://github.com/openai/openai-node/issues/950)) ([8f49956](https://github.com/openai/openai-node/commit/8f499566c47bd7d4799a8cbe0d980553348b8f48))


### Documentation

* **README:** link Lifecycle in Polling Helpers section ([#962](https://github.com/openai/openai-node/issues/962)) ([c610c81](https://github.com/openai/openai-node/commit/c610c813e8d7f96b5b8315ae194e0a9ff565f43d))

## 4.53.2 (2024-07-26)

Full Changelog: [v4.53.1...v4.53.2](https://github.com/openai/openai-node/compare/v4.53.1...v4.53.2)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can import in Deno via:
<!-- x-release-please-start-version -->

```ts
import OpenAI from 'https://deno.land/x/openai@v4.53.2/mod.ts';
import OpenAI from 'https://deno.land/x/openai@v4.54.0/mod.ts';
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -115,7 +115,7 @@ const run = await openai.beta.threads.runs.createAndPoll(thread.id, {
});
```

More information on the lifecycle of a Run can be found in the [Run Lifecycle Documentation](https://platform.openai.com/docs/assistants/how-it-works/run-lifecycle)
More information on the lifecycle of a Run can be found in the [Run Lifecycle Documentation](https://platform.openai.com/docs/assistants/deep-dive/run-lifecycle)

### Bulk Upload Helpers

Expand Down
10 changes: 10 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Methods:
Types:

- <code><a href="./src/resources/images.ts">Image</a></code>
- <code><a href="./src/resources/images.ts">ImageModel</a></code>
- <code><a href="./src/resources/images.ts">ImagesResponse</a></code>

Methods:
Expand All @@ -98,6 +99,10 @@ Methods:

# Audio

Types:

- <code><a href="./src/resources/audio/audio.ts">AudioModel</a></code>

## Transcriptions

Types:
Expand All @@ -120,6 +125,10 @@ Methods:

## Speech

Types:

- <code><a href="./src/resources/audio/speech.ts">SpeechModel</a></code>

Methods:

- <code title="post /audio/speech">client.audio.speech.<a href="./src/resources/audio/speech.ts">create</a>({ ...params }) -> Response</code>
Expand All @@ -129,6 +138,7 @@ Methods:
Types:

- <code><a href="./src/resources/moderations.ts">Moderation</a></code>
- <code><a href="./src/resources/moderations.ts">ModerationModel</a></code>
- <code><a href="./src/resources/moderations.ts">ModerationCreateResponse</a></code>

Methods:
Expand Down
20 changes: 18 additions & 2 deletions bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@

set -eux

npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"

# Build the project
yarn build

# Navigate to the dist directory
cd dist
yarn publish --access public

# Get the version from package.json
VERSION="$(node -p "require('./package.json').version")"

# Extract the pre-release tag if it exists
if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
# Extract the part before any dot in the pre-release identifier
TAG="${BASH_REMATCH[1]}"
else
TAG="latest"
fi

# Publish with the appropriate tag
yarn publish --access public --tag "$TAG"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "4.53.2",
"version": "4.54.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-deno
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is a build produced from https://github.com/openai/openai-node – please g
Usage:

\`\`\`ts
import OpenAI from "https://deno.land/x/openai@v4.53.2/mod.ts";
import OpenAI from "https://deno.land/x/openai@v4.54.0/mod.ts";

const client = new OpenAI();
\`\`\`
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export class OpenAI extends Core.APIClient {
}

static OpenAI = this;
static DEFAULT_TIMEOUT = 600000; // 10 minutes

static OpenAIError = Errors.OpenAIError;
static APIError = Errors.APIError;
Expand Down Expand Up @@ -281,15 +282,18 @@ export namespace OpenAI {

export import Images = API.Images;
export import Image = API.Image;
export import ImageModel = API.ImageModel;
export import ImagesResponse = API.ImagesResponse;
export import ImageCreateVariationParams = API.ImageCreateVariationParams;
export import ImageEditParams = API.ImageEditParams;
export import ImageGenerateParams = API.ImageGenerateParams;

export import Audio = API.Audio;
export import AudioModel = API.AudioModel;

export import Moderations = API.Moderations;
export import Moderation = API.Moderation;
export import ModerationModel = API.ModerationModel;
export import ModerationCreateResponse = API.ModerationCreateResponse;
export import ModerationCreateParams = API.ModerationCreateParams;

Expand Down
Loading