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.42.0"
".": "4.43.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.43.0 (2024-05-08)

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

### Features

* **api:** adding file purposes ([#831](https://github.com/openai/openai-node/issues/831)) ([a62b877](https://github.com/openai/openai-node/commit/a62b8779ff7261cdd6aa7bf72fb6407cc7e3fd21))

## 4.42.0 (2024-05-06)

Full Changelog: [v4.41.1...v4.42.0](https://github.com/openai/openai-node/compare/v4.41.1...v4.42.0)
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/openai@v4.42.0/mod.ts';
import OpenAI from 'https://deno.land/x/openai@v4.43.0/mod.ts';
```

<!-- x-release-please-end -->
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.42.0",
"version": "4.43.0",
"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/openai@v4.42.0/mod.ts";
import OpenAI from "https://deno.land/x/openai@v4.43.0/mod.ts";

const client = new OpenAI();
\`\`\`
Expand Down
18 changes: 9 additions & 9 deletions src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
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.42.0'; // x-release-please-version
export const VERSION = '4.43.0'; // x-release-please-version
4 changes: 2 additions & 2 deletions tests/api-resources/files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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',
});
});

Expand Down