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.55.7"
".": "4.55.8"
}
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-285bce7dcdae7eea5fe84a8d6e5af2c1473d65ea193109370fb2257851eef7eb.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-8ff62fa1091460d68fbd36d72c17d91b709917bebf2983c9c4de5784bc384a2e.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.55.8 (2024-08-15)

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

### Chores

* **types:** define FilePurpose enum ([#997](https://github.com/openai/openai-node/issues/997)) ([19b941b](https://github.com/openai/openai-node/commit/19b941be4ff3e4fa7e67b820a5aac51e5c8d4f60))

## 4.55.7 (2024-08-13)

Full Changelog: [v4.55.6...v4.55.7](https://github.com/openai/openai-node/compare/v4.55.6...v4.55.7)
Expand Down
2 changes: 1 addition & 1 deletion 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/[email protected].7/mod.ts';
import OpenAI from 'https://deno.land/x/[email protected].8/mod.ts';
```

<!-- x-release-please-end -->
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Types:
- <code><a href="./src/resources/files.ts">FileContent</a></code>
- <code><a href="./src/resources/files.ts">FileDeleted</a></code>
- <code><a href="./src/resources/files.ts">FileObject</a></code>
- <code><a href="./src/resources/files.ts">FilePurpose</a></code>

Methods:

Expand Down
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.55.7",
"version": "4.55.8",
"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/[email protected].7/mod.ts";
import OpenAI from "https://deno.land/x/[email protected].8/mod.ts";

const client = new OpenAI();
\`\`\`
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export namespace OpenAI {
export import FileContent = API.FileContent;
export import FileDeleted = API.FileDeleted;
export import FileObject = API.FileObject;
export import FilePurpose = API.FilePurpose;
export import FileObjectsPage = API.FileObjectsPage;
export import FileCreateParams = API.FileCreateParams;
export import FileListParams = API.FileListParams;
Expand Down
15 changes: 14 additions & 1 deletion src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ export interface FileObject {
status_details?: string;
}

/**
* The intended purpose of the uploaded file.
*
* Use "assistants" for
* [Assistants](https://platform.openai.com/docs/api-reference/assistants) and
* [Message](https://platform.openai.com/docs/api-reference/messages) files,
* "vision" for Assistants image file inputs, "batch" for
* [Batch API](https://platform.openai.com/docs/guides/batch), and "fine-tune" for
* [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning).
*/
export type FilePurpose = 'assistants' | 'batch' | 'fine-tune' | 'vision';

export interface FileCreateParams {
/**
* The File object (not file name) to be uploaded.
Expand All @@ -199,7 +211,7 @@ export interface FileCreateParams {
* [Batch API](https://platform.openai.com/docs/guides/batch), and "fine-tune" for
* [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning).
*/
purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision';
purpose: FilePurpose;
}

export interface FileListParams {
Expand All @@ -213,6 +225,7 @@ export namespace Files {
export import FileContent = FilesAPI.FileContent;
export import FileDeleted = FilesAPI.FileDeleted;
export import FileObject = FilesAPI.FileObject;
export import FilePurpose = FilesAPI.FilePurpose;
export import FileObjectsPage = FilesAPI.FileObjectsPage;
export import FileCreateParams = FilesAPI.FileCreateParams;
export import FileListParams = FilesAPI.FileListParams;
Expand Down
1 change: 1 addition & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export {
FileContent,
FileDeleted,
FileObject,
FilePurpose,
FileCreateParams,
FileListParams,
FileObjectsPage,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/uploads/uploads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export interface UploadCreateParams {
* See the
* [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose).
*/
purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision';
purpose: FilesAPI.FilePurpose;
}

export interface UploadCompleteParams {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.55.7'; // x-release-please-version
export const VERSION = '4.55.8'; // x-release-please-version