diff --git a/ecosystem-tests/bun/openai.test.ts b/ecosystem-tests/bun/openai.test.ts index 6eb1ca947..867d547ad 100644 --- a/ecosystem-tests/bun/openai.test.ts +++ b/ecosystem-tests/bun/openai.test.ts @@ -130,7 +130,7 @@ if (typeof Blob !== 'undefined') { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } test('toFile handles Uint8Array', async function () { @@ -142,7 +142,7 @@ test('toFile handles Uint8Array', async function () { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); test('toFile handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -153,7 +153,7 @@ test('toFile handles ArrayBuffer', async function () { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); test('toFile handles DataView', async function () { const result = await client.files.create({ @@ -164,5 +164,5 @@ test('toFile handles DataView', async function () { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); diff --git a/ecosystem-tests/node-ts-cjs-auto/tests/test.ts b/ecosystem-tests/node-ts-cjs-auto/tests/test.ts index bc0cbbd8d..b44959121 100644 --- a/ecosystem-tests/node-ts-cjs-auto/tests/test.ts +++ b/ecosystem-tests/node-ts-cjs-auto/tests/test.ts @@ -207,7 +207,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); // @ts-ignore avoid DOM lib for testing purposes if (typeof Blob !== 'undefined') { @@ -220,7 +220,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -232,7 +232,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -243,7 +243,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ @@ -254,6 +254,6 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-cjs-web/tests/test-jsdom.ts b/ecosystem-tests/node-ts-cjs-web/tests/test-jsdom.ts index 3abc9e6e4..5ffe2dd50 100644 --- a/ecosystem-tests/node-ts-cjs-web/tests/test-jsdom.ts +++ b/ecosystem-tests/node-ts-cjs-web/tests/test-jsdom.ts @@ -140,27 +140,27 @@ describe.skip('toFile', () => { file: await toFile(new Blob([new TextEncoder().encode(fineTune)]), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles Uint8Array', async function () { const result = await client.files.create({ file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-cjs-web/tests/test-node.ts b/ecosystem-tests/node-ts-cjs-web/tests/test-node.ts index 9d1abf435..428e6ec09 100644 --- a/ecosystem-tests/node-ts-cjs-web/tests/test-node.ts +++ b/ecosystem-tests/node-ts-cjs-web/tests/test-node.ts @@ -126,7 +126,7 @@ describe('toFile', () => { file: await toFile(new Blob([new TextEncoder().encode(fineTune)]), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -134,20 +134,20 @@ describe('toFile', () => { file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-cjs/tests/test-jsdom.ts b/ecosystem-tests/node-ts-cjs/tests/test-jsdom.ts index 1f5d75f28..178bf8c97 100644 --- a/ecosystem-tests/node-ts-cjs/tests/test-jsdom.ts +++ b/ecosystem-tests/node-ts-cjs/tests/test-jsdom.ts @@ -108,7 +108,7 @@ describe.skip('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles Uint8Array', async function () { const result = await client.files.create({ @@ -119,7 +119,7 @@ describe.skip('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -130,7 +130,7 @@ describe.skip('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ @@ -141,6 +141,6 @@ describe.skip('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-cjs/tests/test-node.ts b/ecosystem-tests/node-ts-cjs/tests/test-node.ts index 14db8938b..f3c6c281f 100644 --- a/ecosystem-tests/node-ts-cjs/tests/test-node.ts +++ b/ecosystem-tests/node-ts-cjs/tests/test-node.ts @@ -142,7 +142,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); // @ts-ignore avoid DOM lib for testing purposes if (typeof Blob !== 'undefined') { @@ -155,7 +155,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -167,7 +167,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -178,7 +178,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ @@ -189,6 +189,6 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-esm-auto/tests/test.ts b/ecosystem-tests/node-ts-esm-auto/tests/test.ts index d8ecba1ef..44858b844 100644 --- a/ecosystem-tests/node-ts-esm-auto/tests/test.ts +++ b/ecosystem-tests/node-ts-esm-auto/tests/test.ts @@ -144,7 +144,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); // @ts-ignore avoid DOM lib for testing purposes if (typeof Blob !== 'undefined') { @@ -157,7 +157,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -169,7 +169,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -180,7 +180,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ @@ -191,6 +191,6 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-esm-web/tests/test.ts b/ecosystem-tests/node-ts-esm-web/tests/test.ts index 7b9b6b6d9..684d860c2 100644 --- a/ecosystem-tests/node-ts-esm-web/tests/test.ts +++ b/ecosystem-tests/node-ts-esm-web/tests/test.ts @@ -127,7 +127,7 @@ describe('toFile', () => { file: await toFile(new Blob([new TextEncoder().encode(fineTune)]), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -135,20 +135,20 @@ describe('toFile', () => { file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts-esm/tests/test.ts b/ecosystem-tests/node-ts-esm/tests/test.ts index c62012114..9a55d9eef 100644 --- a/ecosystem-tests/node-ts-esm/tests/test.ts +++ b/ecosystem-tests/node-ts-esm/tests/test.ts @@ -123,7 +123,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); // @ts-ignore avoid DOM lib for testing purposes if (typeof Blob !== 'undefined') { @@ -136,7 +136,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -148,7 +148,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -159,7 +159,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ @@ -170,6 +170,6 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/node-ts4.5-jest27/tests/test.ts b/ecosystem-tests/node-ts4.5-jest27/tests/test.ts index 14db8938b..f3c6c281f 100644 --- a/ecosystem-tests/node-ts4.5-jest27/tests/test.ts +++ b/ecosystem-tests/node-ts4.5-jest27/tests/test.ts @@ -142,7 +142,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); // @ts-ignore avoid DOM lib for testing purposes if (typeof Blob !== 'undefined') { @@ -155,7 +155,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -167,7 +167,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ @@ -178,7 +178,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ @@ -189,6 +189,6 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/ts-browser-webpack/src/index.ts b/ecosystem-tests/ts-browser-webpack/src/index.ts index a5e9101e3..7203c25ef 100644 --- a/ecosystem-tests/ts-browser-webpack/src/index.ts +++ b/ecosystem-tests/ts-browser-webpack/src/index.ts @@ -183,7 +183,7 @@ describe('toFile', () => { ), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); } it('handles Uint8Array', async function () { @@ -191,21 +191,21 @@ describe('toFile', () => { file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles ArrayBuffer', async function () { const result = await client.files.create({ file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); it('handles DataView', async function () { const result = await client.files.create({ file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'), purpose: 'fine-tune', }); - expect(result.status).toEqual('uploaded'); + expect(result.filename).toEqual('finetunes.jsonl'); }); }); diff --git a/ecosystem-tests/vercel-edge/src/pages/api/query-params.ts b/ecosystem-tests/vercel-edge/src/pages/api/query-params.ts index 3f3ff4db3..0f0831846 100644 --- a/ecosystem-tests/vercel-edge/src/pages/api/query-params.ts +++ b/ecosystem-tests/vercel-edge/src/pages/api/query-params.ts @@ -14,7 +14,7 @@ export const config = { export default async (request: NextRequest) => { const openai = new OpenAI(); - const result = await openai.fineTunes.listEvents('ft-Gj8mUJrEPe9sIsnxJdbzye0Z', { stream: false }); + const result = await openai.beta.assistants.list({ limit: 10 }); return NextResponse.json(result); };