Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 4.24.7 #627

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.24.6"
".": "4.24.7"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 4.24.7 (2024-01-13)

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

### Chores

* **ecosystem-tests:** fix flaky vercel-edge, cloudflare-worker, and deno tests ([#626](https://github.com/openai/openai-node/issues/626)) ([ae412a5](https://github.com/openai/openai-node/commit/ae412a5f12e701e07e71bd9791c55a56858e8383))
* **ecosystem-tests:** fix typo in deno test ([#628](https://github.com/openai/openai-node/issues/628)) ([048ec94](https://github.com/openai/openai-node/commit/048ec943f8d12acba9829c35ebf0b2d3f24930c8))

## 4.24.6 (2024-01-12)

Full Changelog: [v4.24.5...v4.24.6](https://github.com/openai/openai-node/compare/v4.24.5...v4.24.6)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can import in Deno via:
<!-- x-release-please-start-version -->

```ts
import OpenAI from 'https://deno.land/x/[email protected].6/mod.ts';
import OpenAI from 'https://deno.land/x/[email protected].7/mod.ts';
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion build-deno
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].6/mod.ts";
import OpenAI from "https://deno.land/x/[email protected].7/mod.ts";

const client = new OpenAI();
\`\`\`
Expand Down
10 changes: 5 additions & 5 deletions ecosystem-tests/cloudflare-worker/src/uploadWebApiTestCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,31 +116,31 @@ export function uploadWebApiTestCases({
// @ts-expect-error we don't type support for `string` to avoid a footgun with passing the file path
const file = await toFile(fineTune, 'finetune.jsonl');
const result = await client.files.create({ file, purpose: 'fine-tune' });
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles Blob', async () => {
const result = await client.files.create({ file: await toFile(new Blob([fineTune]), 'finetune.jsonl'), purpose: 'fine-tune' });
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles Uint8Array', async () => {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles ArrayBuffer', async () => {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles DataView', async () => {
const result = await client.files.create({
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
}
10 changes: 5 additions & 5 deletions ecosystem-tests/deno/main_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,26 @@ Deno.test(async function toFileHandlesBlob() {
file: await toFile(new Blob([fineTune]), 'finetune.jsonl'),
purpose: 'fine-tune',
});
assertEquals(result.status, 'uploaded');
assertEquals(result.filename, 'finetune.jsonl');
});
Deno.test(async function toFileHandlesUint8Array() {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'),
purpose: 'fine-tune',
});
assertEquals(result.status, 'uploaded');
assertEquals(result.filename, 'finetune.jsonl');
});
Deno.test(async function toFileHandlesArrayBuffer() {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'),
purpose: 'fine-tune',
});
assertEquals(result.status, 'uploaded');
assertEquals(result.filename, 'finetune.jsonl');
});
Deno.test(async function toFileHandlesDataView() {
const result = await client.files.create({
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.json'),
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'),
purpose: 'fine-tune',
});
assertEquals(result.status, 'uploaded');
assertEquals(result.filename, 'finetune.jsonl');
});
10 changes: 5 additions & 5 deletions ecosystem-tests/vercel-edge/src/uploadWebApiTestCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,28 +147,28 @@ export function uploadWebApiTestCases({
// @ts-ignore this only doesn't error in vercel build...
const file = await toFile(fineTune, 'finetune.jsonl');
const result = await client.files.create({ file, purpose: 'fine-tune' });
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles Blob', async () => {
const result = await client.files.create({
file: await toFile(new Blob([fineTune]), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles Uint8Array', async () => {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
it('toFile handles ArrayBuffer', async () => {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
if (runtime !== 'edge') {
// this fails in edge for some reason
Expand All @@ -177,7 +177,7 @@ export function uploadWebApiTestCases({
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expectEqual(result.status, 'uploaded');
expectEqual(result.filename, 'finetune.jsonl');
});
}
}
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.24.6",
"version": "4.24.7",
"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 src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.24.6'; // x-release-please-version
export const VERSION = '4.24.7'; // x-release-please-version