From 19b941be4ff3e4fa7e67b820a5aac51e5c8d4f60 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 15 Aug 2024 21:58:43 +0000
Subject: [PATCH 1/2] chore(types): define FilePurpose enum (#997)
---
.stats.yml | 2 +-
api.md | 1 +
src/index.ts | 1 +
src/resources/files.ts | 15 ++++++++++++++-
src/resources/index.ts | 1 +
src/resources/uploads/uploads.ts | 2 +-
6 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 2371b7b8d..185585b67 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -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
diff --git a/api.md b/api.md
index 25f08b130..9594a101c 100644
--- a/api.md
+++ b/api.md
@@ -76,6 +76,7 @@ Types:
- FileContent
- FileDeleted
- FileObject
+- FilePurpose
Methods:
diff --git a/src/index.ts b/src/index.ts
index 5f7dffd67..97ffb596d 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -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;
diff --git a/src/resources/files.ts b/src/resources/files.ts
index a2d3aaa44..ba01a9041 100644
--- a/src/resources/files.ts
+++ b/src/resources/files.ts
@@ -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.
@@ -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 {
@@ -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;
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 8d952e2db..a78808584 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -27,6 +27,7 @@ export {
FileContent,
FileDeleted,
FileObject,
+ FilePurpose,
FileCreateParams,
FileListParams,
FileObjectsPage,
diff --git a/src/resources/uploads/uploads.ts b/src/resources/uploads/uploads.ts
index ceb2b6d23..1c3ed708d 100644
--- a/src/resources/uploads/uploads.ts
+++ b/src/resources/uploads/uploads.ts
@@ -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 {
From aa206291a198a14f31d524fad5692c01d0afb7ee Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 15 Aug 2024 21:59:08 +0000
Subject: [PATCH 2/2] release: 4.55.8
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 8 ++++++++
README.md | 2 +-
package.json | 2 +-
scripts/build-deno | 2 +-
src/version.ts | 2 +-
6 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 3156504f7..50eb779fe 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.55.7"
+ ".": "4.55.8"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9aa0a024..d55b31275 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/README.md b/README.md
index 0d6a9b6ad..03364dbe2 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.55.7/mod.ts';
+import OpenAI from 'https://deno.land/x/openai@v4.55.8/mod.ts';
```
diff --git a/package.json b/package.json
index b746ad36c..bf193dcae 100644
--- a/package.json
+++ b/package.json
@@ -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 ",
"types": "dist/index.d.ts",
diff --git a/scripts/build-deno b/scripts/build-deno
index 296fad532..e31a7f76e 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.55.7/mod.ts";
+import OpenAI from "https://deno.land/x/openai@v4.55.8/mod.ts";
const client = new OpenAI();
\`\`\`
diff --git a/src/version.ts b/src/version.ts
index 2e8b039e5..f2078f00d 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '4.55.7'; // x-release-please-version
+export const VERSION = '4.55.8'; // x-release-please-version