diff --git a/.stats.yml b/.stats.yml index 49956282b..50c6b293d 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-edb5af3ade0cd27cf366b0654b90c7a81c43c433e11fc3f6e621e2c779de10d4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-2e14236d4015bf3b956290ea8b656224a0c7b206a356c6af2a7ae43fdbceb04c.yml diff --git a/src/resources/files.ts b/src/resources/files.ts index 820c7a1fa..63dff5bd4 100644 --- a/src/resources/files.ts +++ b/src/resources/files.ts @@ -148,10 +148,11 @@ export interface FileObject { object: 'file'; /** - * The intended purpose of the file. Supported values are `fine-tune`, - * `fine-tune-results`, `assistants`, and `assistants_output`. + * The intended purpose of the file. Supported values are `assistants`, + * `assistants_output`, `batch`, `batch_output`, `fine-tune`, and + * `fine-tune-results`. */ - purpose: 'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output'; + purpose: 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'fine-tune' | 'fine-tune-results'; /** * @deprecated: Deprecated. The current status of the file, which can be either @@ -175,14 +176,13 @@ export interface FileCreateParams { /** * The intended purpose of the uploaded file. * - * Use "fine-tune" for - * [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning) and - * "assistants" for + * Use "assistants" for * [Assistants](https://platform.openai.com/docs/api-reference/assistants) and - * [Messages](https://platform.openai.com/docs/api-reference/messages). This allows - * us to validate the format of the uploaded file is correct for fine-tuning. + * [Messages](https://platform.openai.com/docs/api-reference/messages), "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). */ - purpose: 'fine-tune' | 'assistants'; + purpose: 'assistants' | 'batch' | 'fine-tune'; } export interface FileListParams { diff --git a/tests/api-resources/files.test.ts b/tests/api-resources/files.test.ts index 514f42e3a..2fda1c947 100644 --- a/tests/api-resources/files.test.ts +++ b/tests/api-resources/files.test.ts @@ -12,7 +12,7 @@ describe('resource files', () => { test('create: only required params', async () => { const responsePromise = openai.files.create({ file: await toFile(Buffer.from('# my file contents'), 'README.md'), - purpose: 'fine-tune', + purpose: 'assistants', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -26,7 +26,7 @@ describe('resource files', () => { test('create: required and optional params', async () => { const response = await openai.files.create({ file: await toFile(Buffer.from('# my file contents'), 'README.md'), - purpose: 'fine-tune', + purpose: 'assistants', }); });