diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 01fad1d40..b299eb65b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.38.3" + ".": "4.38.4" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f4ad2ee3e..06d0e4b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 4.38.4 (2024-04-24) + +Full Changelog: [v4.38.3...v4.38.4](https://github.com/openai/openai-node/compare/v4.38.3...v4.38.4) + +### Bug Fixes + +* **api:** change timestamps to unix integers ([#798](https://github.com/openai/openai-node/issues/798)) ([7271a6c](https://github.com/openai/openai-node/commit/7271a6cdc7d37151d2cae18fdd20b87d97624a84)) +* **docs:** doc improvements ([#796](https://github.com/openai/openai-node/issues/796)) ([49fcc86](https://github.com/openai/openai-node/commit/49fcc86b44958795a6f5e0901f369653dfbcc637)) + ## 4.38.3 (2024-04-22) Full Changelog: [v4.38.2...v4.38.3](https://github.com/openai/openai-node/compare/v4.38.2...v4.38.3) diff --git a/README.md b/README.md index 1f763a096..328744dc0 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.38.3/mod.ts'; +import OpenAI from 'https://deno.land/x/openai@v4.38.4/mod.ts'; ``` @@ -119,7 +119,7 @@ More information on the lifecycle of a Run can be found in the [Run Lifecycle Do ### Bulk Upload Helpers -When creating an interacting with vector stores, you can use the polling helpers to monitor the status of operations. +When creating and interacting with vector stores, you can use the polling helpers to monitor the status of operations. For convenience, we also provide a bulk upload helper to allow you to simultaneously upload several files at once. ```ts diff --git a/build-deno b/build-deno index 0f27c0f35..1e5c4096d 100755 --- a/build-deno +++ b/build-deno @@ -14,7 +14,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.38.3/mod.ts"; +import OpenAI from "https://deno.land/x/openai@v4.38.4/mod.ts"; const client = new OpenAI(); \`\`\` diff --git a/package.json b/package.json index 7ccc457c3..7576402c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.38.3", + "version": "4.38.4", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/src/resources/batches.ts b/src/resources/batches.ts index d0bb891e3..fb0470dcd 100644 --- a/src/resources/batches.ts +++ b/src/resources/batches.ts @@ -57,7 +57,7 @@ export interface Batch { /** * The Unix timestamp (in seconds) for when the batch was created. */ - created_at: string; + created_at: number; /** * The OpenAI API endpoint used by the batch. @@ -90,17 +90,17 @@ export interface Batch { /** * The Unix timestamp (in seconds) for when the batch was cancelled. */ - cancelled_at?: string; + cancelled_at?: number; /** * The Unix timestamp (in seconds) for when the batch started cancelling. */ - cancelling_at?: string; + cancelling_at?: number; /** * The Unix timestamp (in seconds) for when the batch was completed. */ - completed_at?: string; + completed_at?: number; /** * The ID of the file containing the outputs of requests with errors. @@ -112,27 +112,27 @@ export interface Batch { /** * The Unix timestamp (in seconds) for when the batch expired. */ - expired_at?: string; + expired_at?: number; /** * The Unix timestamp (in seconds) for when the batch will expire. */ - expires_at?: string; + expires_at?: number; /** * The Unix timestamp (in seconds) for when the batch failed. */ - failed_at?: string; + failed_at?: number; /** * The Unix timestamp (in seconds) for when the batch started finalizing. */ - finalizing_at?: string; + finalizing_at?: number; /** * The Unix timestamp (in seconds) for when the batch started processing. */ - in_progress_at?: string; + in_progress_at?: number; /** * Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -225,8 +225,9 @@ export interface BatchCreateParams { * See [upload file](https://platform.openai.com/docs/api-reference/files/create) * for how to upload a file. * - * Your input file must be formatted as a JSONL file, and must be uploaded with the - * purpose `batch`. + * Your input file must be formatted as a + * [JSONL file](https://platform.openai.com/docs/api-reference/batch/requestInput), + * and must be uploaded with the purpose `batch`. */ input_file_id: string; diff --git a/src/resources/beta/vector-stores/files.ts b/src/resources/beta/vector-stores/files.ts index 40b97e9a9..a18211221 100644 --- a/src/resources/beta/vector-stores/files.ts +++ b/src/resources/beta/vector-stores/files.ts @@ -203,6 +203,12 @@ export interface VectorStoreFile { */ status: 'in_progress' | 'completed' | 'cancelled' | 'failed'; + /** + * The total vector store usage in bytes. Note that this may be different from the + * original file size. + */ + usage_bytes: number; + /** * The ID of the * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) diff --git a/src/resources/beta/vector-stores/vector-stores.ts b/src/resources/beta/vector-stores/vector-stores.ts index 892d06aa4..0409f3af7 100644 --- a/src/resources/beta/vector-stores/vector-stores.ts +++ b/src/resources/beta/vector-stores/vector-stores.ts @@ -93,11 +93,6 @@ export interface VectorStore { */ id: string; - /** - * The byte size of the vector store. - */ - bytes: number; - /** * The Unix timestamp (in seconds) for when the vector store was created. */ @@ -135,6 +130,11 @@ export interface VectorStore { */ status: 'expired' | 'in_progress' | 'completed'; + /** + * The total number of bytes used by the files in the vector store. + */ + usage_bytes: number; + /** * The expiration policy for a vector store. */ diff --git a/src/version.ts b/src/version.ts index 848b87c16..6071af9d7 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.38.3'; // x-release-please-version +export const VERSION = '4.38.4'; // x-release-please-version