From 123d19d5a157110c8ada556c107caf0eb8b2ccc6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:42:54 +0000 Subject: [PATCH 1/5] chore(docs): mention support of web browser runtimes (#938) --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6d971d138..3ad75fbda 100644 --- a/README.md +++ b/README.md @@ -617,6 +617,18 @@ The following runtimes are supported: - Vercel Edge Runtime. - Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time). - Nitro v2.6 or greater. +- Web browsers: disabled by default to avoid exposing your secret API credentials. Enable browser support by explicitly setting `dangerouslyAllowBrowser` to true'. +
+ More explanation + ### Why is this dangerous? + Enabling the `dangerouslyAllowBrowser` option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments, + any user with access to the browser can potentially inspect, extract, and misuse these credentials. This could lead to unauthorized access using your credentials and potentially compromise sensitive data or functionality. + ### When might this not be dangerous? + In certain scenarios where enabling browser support might not pose significant risks: + - Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated. + - Public APIs with Limited Scope: If your API has very limited scope and the exposed credentials do not grant access to sensitive data or critical operations, the potential impact of exposure is reduced. + - Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated. +
Note that React Native is not supported at this time. From 8b5db1f53e66ce4b6e554f40a8dd2fd474085027 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:35:33 +0000 Subject: [PATCH 2/5] chore(docs): use client instead of package name in Node examples (#941) --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3ad75fbda..3d303e5b0 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The full API of this library can be found in [api.md file](api.md) along with ma ```js import OpenAI from 'openai'; -const openai = new OpenAI({ +const client = new OpenAI({ apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted }); @@ -53,7 +53,7 @@ We provide support for streaming responses using Server Sent Events (SSE). ```ts import OpenAI from 'openai'; -const openai = new OpenAI(); +const client = new OpenAI(); async function main() { const stream = await openai.chat.completions.create({ @@ -80,7 +80,7 @@ This library includes TypeScript definitions for all request params and response ```ts import OpenAI from 'openai'; -const openai = new OpenAI({ +const client = new OpenAI({ apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted }); @@ -301,7 +301,7 @@ import fs from 'fs'; import fetch from 'node-fetch'; import OpenAI, { toFile } from 'openai'; -const openai = new OpenAI(); +const client = new OpenAI(); // If you have access to Node `fs` we recommend using `fs.createReadStream()`: await openai.files.create({ file: fs.createReadStream('input.jsonl'), purpose: 'fine-tune' }); @@ -399,7 +399,7 @@ You can use the `maxRetries` option to configure or disable this: ```js // Configure the default for all requests: -const openai = new OpenAI({ +const client = new OpenAI({ maxRetries: 0, // default is 2 }); @@ -416,7 +416,7 @@ Requests time out after 10 minutes by default. You can configure this with a `ti ```ts // Configure the default for all requests: -const openai = new OpenAI({ +const client = new OpenAI({ timeout: 20 * 1000, // 20 seconds (default is 10 minutes) }); @@ -471,7 +471,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi ```ts -const openai = new OpenAI(); +const client = new OpenAI(); const response = await openai.chat.completions .create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-3.5-turbo' }) @@ -582,7 +582,7 @@ import http from 'http'; import { HttpsProxyAgent } from 'https-proxy-agent'; // Configure the default for all requests: -const openai = new OpenAI({ +const client = new OpenAI({ httpAgent: new HttpsProxyAgent(process.env.PROXY_URL), }); From 7ac10ddbb87e9eb0e8e34d58a13a4775cbba1c24 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:54:27 +0000 Subject: [PATCH 3/5] feat(api): add new gpt-4o-mini models (#942) --- .stats.yml | 2 +- src/resources/beta/assistants.ts | 2 ++ src/resources/beta/threads/runs/runs.ts | 2 ++ src/resources/beta/threads/threads.ts | 2 ++ src/resources/chat/chat.ts | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 57f5afaff..27e2ce5ed 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 64 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-27d8d6da893c1cdd53b491ec05153df22b1e113965f253a1d6eb8d75b628173f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-518ca6c60061d3e8bc0971facf40d752f2aea62e3522cc168ad29a1f29cab3dd.yml diff --git a/src/resources/beta/assistants.ts b/src/resources/beta/assistants.ts index 5d326a593..abacfd06e 100644 --- a/src/resources/beta/assistants.ts +++ b/src/resources/beta/assistants.ts @@ -1057,6 +1057,8 @@ export interface AssistantCreateParams { | (string & {}) | 'gpt-4o' | 'gpt-4o-2024-05-13' + | 'gpt-4o-mini' + | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' diff --git a/src/resources/beta/threads/runs/runs.ts b/src/resources/beta/threads/runs/runs.ts index b4ed09cc2..24b6ce4a2 100644 --- a/src/resources/beta/threads/runs/runs.ts +++ b/src/resources/beta/threads/runs/runs.ts @@ -672,6 +672,8 @@ export interface RunCreateParamsBase { | (string & {}) | 'gpt-4o' | 'gpt-4o-2024-05-13' + | 'gpt-4o-mini' + | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' diff --git a/src/resources/beta/threads/threads.ts b/src/resources/beta/threads/threads.ts index aded9daf1..04ce7b57d 100644 --- a/src/resources/beta/threads/threads.ts +++ b/src/resources/beta/threads/threads.ts @@ -549,6 +549,8 @@ export interface ThreadCreateAndRunParamsBase { | (string & {}) | 'gpt-4o' | 'gpt-4o-2024-05-13' + | 'gpt-4o-mini' + | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts index da4e90d42..74cda326e 100644 --- a/src/resources/chat/chat.ts +++ b/src/resources/chat/chat.ts @@ -11,6 +11,8 @@ export class Chat extends APIResource { export type ChatModel = | 'gpt-4o' | 'gpt-4o-2024-05-13' + | 'gpt-4o-mini' + | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' From 8709ceb0e01c5a1f96704c998f35ca1117ecadac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:10:38 +0000 Subject: [PATCH 4/5] feat(api): add uploads endpoints (#946) --- .stats.yml | 4 +- api.md | 22 +++ src/index.ts | 6 + src/resources/chat/completions.ts | 1 + src/resources/index.ts | 1 + src/resources/uploads/index.ts | 4 + src/resources/uploads/parts.ts | 68 ++++++++ src/resources/uploads/uploads.ts | 169 ++++++++++++++++++++ tests/api-resources/uploads/parts.test.ts | 30 ++++ tests/api-resources/uploads/uploads.test.ts | 74 +++++++++ 10 files changed, 377 insertions(+), 2 deletions(-) create mode 100644 src/resources/uploads/index.ts create mode 100644 src/resources/uploads/parts.ts create mode 100644 src/resources/uploads/uploads.ts create mode 100644 tests/api-resources/uploads/parts.test.ts create mode 100644 tests/api-resources/uploads/uploads.test.ts diff --git a/.stats.yml b/.stats.yml index 27e2ce5ed..4e4cb5509 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 64 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-518ca6c60061d3e8bc0971facf40d752f2aea62e3522cc168ad29a1f29cab3dd.yml +configured_endpoints: 68 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-77cfff37114bc9f141c7e6107eb5f1b38d8cc99bc3d4ce03a066db2b6b649c69.yml diff --git a/api.md b/api.md index 17a3f9632..ddc9fce38 100644 --- a/api.md +++ b/api.md @@ -388,3 +388,25 @@ Methods: - client.batches.retrieve(batchId) -> Batch - client.batches.list({ ...params }) -> BatchesPage - client.batches.cancel(batchId) -> Batch + +# Uploads + +Types: + +- Upload + +Methods: + +- client.uploads.create({ ...params }) -> Upload +- client.uploads.cancel(uploadId) -> Upload +- client.uploads.complete(uploadId, { ...params }) -> Upload + +## Parts + +Types: + +- UploadPart + +Methods: + +- client.uploads.parts.create(uploadId, { ...params }) -> UploadPart diff --git a/src/index.ts b/src/index.ts index ce455108e..7e5df0505 100644 --- a/src/index.ts +++ b/src/index.ts @@ -164,6 +164,7 @@ export class OpenAI extends Core.APIClient { fineTuning: API.FineTuning = new API.FineTuning(this); beta: API.Beta = new API.Beta(this); batches: API.Batches = new API.Batches(this); + uploads: API.Uploads = new API.Uploads(this); protected override defaultQuery(): Core.DefaultQuery | undefined { return this._options.defaultQuery; @@ -309,6 +310,11 @@ export namespace OpenAI { export import BatchCreateParams = API.BatchCreateParams; export import BatchListParams = API.BatchListParams; + export import Uploads = API.Uploads; + export import Upload = API.Upload; + export import UploadCreateParams = API.UploadCreateParams; + export import UploadCompleteParams = API.UploadCompleteParams; + export import ErrorObject = API.ErrorObject; export import FunctionDefinition = API.FunctionDefinition; export import FunctionParameters = API.FunctionParameters; diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index 44eb9520c..4027e995b 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -820,6 +820,7 @@ export interface ChatCompletionCreateParamsBase { * exhausted. * - If set to 'default', the request will be processed using the default service * tier with a lower uptime SLA and no latency guarentee. + * - When not set, the default behavior is 'auto'. * * When this parameter is set, the response body will include the `service_tier` * utilized. diff --git a/src/resources/index.ts b/src/resources/index.ts index 6f8e8564c..9f2a3cbe7 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -43,3 +43,4 @@ export { } from './images'; export { Model, ModelDeleted, ModelsPage, Models } from './models'; export { Moderation, ModerationCreateResponse, ModerationCreateParams, Moderations } from './moderations'; +export { Upload, UploadCreateParams, UploadCompleteParams, Uploads } from './uploads/uploads'; diff --git a/src/resources/uploads/index.ts b/src/resources/uploads/index.ts new file mode 100644 index 000000000..1a353d312 --- /dev/null +++ b/src/resources/uploads/index.ts @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Upload, UploadCreateParams, UploadCompleteParams, Uploads } from './uploads'; +export { UploadPart, PartCreateParams, Parts } from './parts'; diff --git a/src/resources/uploads/parts.ts b/src/resources/uploads/parts.ts new file mode 100644 index 000000000..a4af5c606 --- /dev/null +++ b/src/resources/uploads/parts.ts @@ -0,0 +1,68 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; +import * as PartsAPI from './parts'; + +export class Parts extends APIResource { + /** + * Adds a + * [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an + * [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. + * A Part represents a chunk of bytes from the file you are trying to upload. + * + * Each Part can be at most 64 MB, and you can add Parts until you hit the Upload + * maximum of 8 GB. + * + * It is possible to add multiple Parts in parallel. You can decide the intended + * order of the Parts when you + * [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + */ + create( + uploadId: string, + body: PartCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + return this._client.post( + `/uploads/${uploadId}/parts`, + Core.multipartFormRequestOptions({ body, ...options }), + ); + } +} + +/** + * The upload Part represents a chunk of bytes we can add to an Upload object. + */ +export interface UploadPart { + /** + * The upload Part unique identifier, which can be referenced in API endpoints. + */ + id: string; + + /** + * The Unix timestamp (in seconds) for when the Part was created. + */ + created_at: number; + + /** + * The object type, which is always `upload.part`. + */ + object: 'upload.part'; + + /** + * The ID of the Upload object that this Part was added to. + */ + upload_id: string; +} + +export interface PartCreateParams { + /** + * The chunk of bytes for this Part. + */ + data: Core.Uploadable; +} + +export namespace Parts { + export import UploadPart = PartsAPI.UploadPart; + export import PartCreateParams = PartsAPI.PartCreateParams; +} diff --git a/src/resources/uploads/uploads.ts b/src/resources/uploads/uploads.ts new file mode 100644 index 000000000..ceb2b6d23 --- /dev/null +++ b/src/resources/uploads/uploads.ts @@ -0,0 +1,169 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; +import * as UploadsAPI from './uploads'; +import * as FilesAPI from '../files'; +import * as PartsAPI from './parts'; + +export class Uploads extends APIResource { + parts: PartsAPI.Parts = new PartsAPI.Parts(this._client); + + /** + * Creates an intermediate + * [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object + * that you can add + * [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to. + * Currently, an Upload can accept at most 8 GB in total and expires after an hour + * after you create it. + * + * Once you complete the Upload, we will create a + * [File](https://platform.openai.com/docs/api-reference/files/object) object that + * contains all the parts you uploaded. This File is usable in the rest of our + * platform as a regular File object. + * + * For certain `purpose`s, the correct `mime_type` must be specified. Please refer + * to documentation for the supported MIME types for your use case: + * + * - [Assistants](https://platform.openai.com/docs/assistants/tools/file-search/supported-files) + * + * For guidance on the proper filename extensions for each purpose, please follow + * the documentation on + * [creating a File](https://platform.openai.com/docs/api-reference/files/create). + */ + create(body: UploadCreateParams, options?: Core.RequestOptions): Core.APIPromise { + return this._client.post('/uploads', { body, ...options }); + } + + /** + * Cancels the Upload. No Parts may be added after an Upload is cancelled. + */ + cancel(uploadId: string, options?: Core.RequestOptions): Core.APIPromise { + return this._client.post(`/uploads/${uploadId}/cancel`, options); + } + + /** + * Completes the + * [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + * + * Within the returned Upload object, there is a nested + * [File](https://platform.openai.com/docs/api-reference/files/object) object that + * is ready to use in the rest of the platform. + * + * You can specify the order of the Parts by passing in an ordered list of the Part + * IDs. + * + * The number of bytes uploaded upon completion must match the number of bytes + * initially specified when creating the Upload object. No Parts may be added after + * an Upload is completed. + */ + complete( + uploadId: string, + body: UploadCompleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + return this._client.post(`/uploads/${uploadId}/complete`, { body, ...options }); + } +} + +/** + * The Upload object can accept byte chunks in the form of Parts. + */ +export interface Upload { + /** + * The Upload unique identifier, which can be referenced in API endpoints. + */ + id: string; + + /** + * The intended number of bytes to be uploaded. + */ + bytes: number; + + /** + * The Unix timestamp (in seconds) for when the Upload was created. + */ + created_at: number; + + /** + * The Unix timestamp (in seconds) for when the Upload was created. + */ + expires_at: number; + + /** + * The name of the file to be uploaded. + */ + filename: string; + + /** + * The object type, which is always "upload". + */ + object: 'upload'; + + /** + * The intended purpose of the file. + * [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) + * for acceptable values. + */ + purpose: string; + + /** + * The status of the Upload. + */ + status: 'pending' | 'completed' | 'cancelled' | 'expired'; + + /** + * The ready File object after the Upload is completed. + */ + file?: FilesAPI.FileObject | null; +} + +export interface UploadCreateParams { + /** + * The number of bytes in the file you are uploading. + */ + bytes: number; + + /** + * The name of the file to upload. + */ + filename: string; + + /** + * The MIME type of the file. + * + * This must fall within the supported MIME types for your file purpose. See the + * supported MIME types for assistants and vision. + */ + mime_type: string; + + /** + * The intended purpose of the uploaded file. + * + * See the + * [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + */ + purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision'; +} + +export interface UploadCompleteParams { + /** + * The ordered list of Part IDs. + */ + part_ids: Array; + + /** + * The optional md5 checksum for the file contents to verify if the bytes uploaded + * matches what you expect. + */ + md5?: string; +} + +export namespace Uploads { + export import Upload = UploadsAPI.Upload; + export import UploadCreateParams = UploadsAPI.UploadCreateParams; + export import UploadCompleteParams = UploadsAPI.UploadCompleteParams; + export import Parts = PartsAPI.Parts; + export import UploadPart = PartsAPI.UploadPart; + export import PartCreateParams = PartsAPI.PartCreateParams; +} diff --git a/tests/api-resources/uploads/parts.test.ts b/tests/api-resources/uploads/parts.test.ts new file mode 100644 index 000000000..5e69c5861 --- /dev/null +++ b/tests/api-resources/uploads/parts.test.ts @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import OpenAI, { toFile } from 'openai'; +import { Response } from 'node-fetch'; + +const openai = new OpenAI({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource parts', () => { + test('create: only required params', async () => { + const responsePromise = openai.uploads.parts.create('upload_abc123', { + data: await toFile(Buffer.from('# my file contents'), 'README.md'), + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await openai.uploads.parts.create('upload_abc123', { + data: await toFile(Buffer.from('# my file contents'), 'README.md'), + }); + }); +}); diff --git a/tests/api-resources/uploads/uploads.test.ts b/tests/api-resources/uploads/uploads.test.ts new file mode 100644 index 000000000..08f059d1b --- /dev/null +++ b/tests/api-resources/uploads/uploads.test.ts @@ -0,0 +1,74 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import OpenAI from 'openai'; +import { Response } from 'node-fetch'; + +const openai = new OpenAI({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource uploads', () => { + test('create: only required params', async () => { + const responsePromise = openai.uploads.create({ + bytes: 0, + filename: 'filename', + mime_type: 'mime_type', + purpose: 'assistants', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await openai.uploads.create({ + bytes: 0, + filename: 'filename', + mime_type: 'mime_type', + purpose: 'assistants', + }); + }); + + test('cancel', async () => { + const responsePromise = openai.uploads.cancel('upload_abc123'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('cancel: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + openai.uploads.cancel('upload_abc123', { path: '/_stainless_unknown_path' }), + ).rejects.toThrow(OpenAI.NotFoundError); + }); + + test('complete: only required params', async () => { + const responsePromise = openai.uploads.complete('upload_abc123', { + part_ids: ['string', 'string', 'string'], + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('complete: required and optional params', async () => { + const response = await openai.uploads.complete('upload_abc123', { + part_ids: ['string', 'string', 'string'], + md5: 'md5', + }); + }); +}); From 2ac5e60557c42c9b586a49e3d8f082969747a250 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:12:13 +0000 Subject: [PATCH 5/5] release: 4.53.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ README.md | 2 +- package.json | 2 +- scripts/build-deno | 2 +- src/version.ts | 2 +- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dc058ce75..bdcacbf65 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.52.7" + ".": "4.53.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bff5e4eb..00fc14e39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 4.53.0 (2024-07-22) + +Full Changelog: [v4.52.7...v4.53.0](https://github.com/openai/openai-node/compare/v4.52.7...v4.53.0) + +### Features + +* **api:** add new gpt-4o-mini models ([#942](https://github.com/openai/openai-node/issues/942)) ([7ac10dd](https://github.com/openai/openai-node/commit/7ac10ddbb87e9eb0e8e34d58a13a4775cbba1c24)) +* **api:** add uploads endpoints ([#946](https://github.com/openai/openai-node/issues/946)) ([8709ceb](https://github.com/openai/openai-node/commit/8709ceb0e01c5a1f96704c998f35ca1117ecadac)) + + +### Chores + +* **docs:** mention support of web browser runtimes ([#938](https://github.com/openai/openai-node/issues/938)) ([123d19d](https://github.com/openai/openai-node/commit/123d19d5a157110c8ada556c107caf0eb8b2ccc6)) +* **docs:** use client instead of package name in Node examples ([#941](https://github.com/openai/openai-node/issues/941)) ([8b5db1f](https://github.com/openai/openai-node/commit/8b5db1f53e66ce4b6e554f40a8dd2fd474085027)) + ## 4.52.7 (2024-07-11) Full Changelog: [v4.52.6...v4.52.7](https://github.com/openai/openai-node/compare/v4.52.6...v4.52.7) diff --git a/README.md b/README.md index 3d303e5b0..bf6f5ac76 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ You can import in Deno via: ```ts -import OpenAI from 'https://deno.land/x/openai@v4.52.7/mod.ts'; +import OpenAI from 'https://deno.land/x/openai@v4.53.0/mod.ts'; ``` diff --git a/package.json b/package.json index 1f00b2180..40d45a905 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.52.7", + "version": "4.53.0", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/scripts/build-deno b/scripts/build-deno index ba47751d8..930f16d53 100755 --- a/scripts/build-deno +++ b/scripts/build-deno @@ -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.52.7/mod.ts"; +import OpenAI from "https://deno.land/x/openai@v4.53.0/mod.ts"; const client = new OpenAI(); \`\`\` diff --git a/src/version.ts b/src/version.ts index b9a220285..0f53607fc 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.52.7'; // x-release-please-version +export const VERSION = '4.53.0'; // x-release-please-version