openai 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +6 -2
- package/_shims/{ReadableStream.node.d.ts → ReadableStream-node.d.ts} +1 -1
- package/_shims/ReadableStream-node.d.ts.map +1 -0
- package/_shims/{ReadableStream.node.js → ReadableStream-node.js} +1 -1
- package/_shims/ReadableStream-node.js.map +1 -0
- package/_shims/{ReadableStream.node.mjs → ReadableStream-node.mjs} +1 -1
- package/_shims/ReadableStream-node.mjs.map +1 -0
- package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
- package/_shims/agent-node.d.ts.map +1 -0
- package/_shims/{agent.node.js → agent-node.js} +1 -1
- package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
- package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
- package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
- package/_shims/agent.d.ts +1 -1
- package/_shims/agent.js +1 -1
- package/_shims/agent.mjs +1 -1
- package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
- package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
- package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
- package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
- package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
- package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
- package/_shims/fileFromPath.d.ts +2 -2
- package/_shims/fileFromPath.d.ts.map +1 -1
- package/_shims/fileFromPath.js +1 -1
- package/_shims/fileFromPath.mjs +1 -1
- package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
- package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
- package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
- package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
- package/_shims/getMultipartRequestOptions.d.ts +1 -1
- package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
- package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
- package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
- package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
- package/_shims/node-readable-node.js.map +1 -0
- package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
- package/_shims/node-readable-node.mjs.map +1 -0
- package/core.d.ts +2 -1
- package/core.d.ts.map +1 -1
- package/core.js +5 -3
- package/core.js.map +1 -1
- package/core.mjs +3 -3
- package/core.mjs.map +1 -1
- package/error.d.ts +1 -1
- package/error.d.ts.map +1 -1
- package/error.js +2 -2
- package/error.js.map +1 -1
- package/error.mjs +2 -2
- package/error.mjs.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/package.json +28 -10
- package/resources/audio/audio.js +1 -1
- package/resources/audio/audio.mjs +1 -1
- package/resources/audio/transcriptions.js +2 -2
- package/resources/audio/transcriptions.mjs +2 -2
- package/resources/audio/translations.js +2 -2
- package/resources/audio/translations.mjs +2 -2
- package/resources/chat/chat.js +1 -1
- package/resources/chat/chat.mjs +1 -1
- package/resources/chat/completions.d.ts +5 -5
- package/resources/chat/completions.js +1 -1
- package/resources/chat/completions.mjs +1 -1
- package/resources/completions.d.ts +3 -3
- package/resources/completions.js +1 -1
- package/resources/completions.mjs +1 -1
- package/resources/edits.d.ts +1 -1
- package/resources/edits.js +1 -1
- package/resources/edits.mjs +1 -1
- package/resources/embeddings.js +1 -1
- package/resources/embeddings.mjs +1 -1
- package/resources/files.d.ts +14 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +24 -4
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +23 -3
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tunes.d.ts +2 -2
- package/resources/fine-tunes.js +2 -2
- package/resources/fine-tunes.mjs +2 -2
- package/resources/fine-tuning/fine-tuning.js +1 -1
- package/resources/fine-tuning/fine-tuning.mjs +1 -1
- package/resources/fine-tuning/jobs.d.ts +3 -3
- package/resources/fine-tuning/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs.js +3 -3
- package/resources/fine-tuning/jobs.mjs +3 -3
- package/resources/images.js +2 -2
- package/resources/images.mjs +2 -2
- package/resources/models.d.ts +3 -2
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +4 -3
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +4 -3
- package/resources/models.mjs.map +1 -1
- package/resources/moderations.js +1 -1
- package/resources/moderations.mjs +1 -1
- package/src/_shims/ReadableStream.d.ts +5 -5
- package/src/_shims/agent.ts +1 -1
- package/src/_shims/{fetch.node.d.ts → fetch-node.d.ts} +8 -8
- package/src/_shims/fetch.d.ts +10 -10
- package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
- package/src/_shims/fileFromPath.ts +2 -2
- package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
- package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
- package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
- package/src/_shims/getMultipartRequestOptions.ts +3 -3
- package/src/core.ts +12 -11
- package/src/error.ts +3 -3
- package/src/index.ts +7 -7
- package/src/pagination.ts +1 -1
- package/src/resource.ts +1 -1
- package/src/resources/audio/audio.ts +4 -4
- package/src/resources/audio/index.ts +3 -3
- package/src/resources/audio/transcriptions.ts +4 -4
- package/src/resources/audio/translations.ts +4 -4
- package/src/resources/chat/chat.ts +3 -3
- package/src/resources/chat/completions.ts +11 -11
- package/src/resources/chat/index.ts +2 -2
- package/src/resources/completions.ts +8 -8
- package/src/resources/edits.ts +5 -5
- package/src/resources/embeddings.ts +3 -3
- package/src/resources/files.ts +34 -6
- package/src/resources/fine-tunes.ts +9 -9
- package/src/resources/fine-tuning/fine-tuning.ts +3 -3
- package/src/resources/fine-tuning/index.ts +2 -2
- package/src/resources/fine-tuning/jobs.ts +9 -9
- package/src/resources/images.ts +4 -4
- package/src/resources/index.ts +11 -11
- package/src/resources/models.ts +7 -6
- package/src/resources/moderations.ts +3 -3
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +6 -6
- package/src/version.ts +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +7 -7
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/ReadableStream.node.d.ts.map +0 -1
- package/_shims/ReadableStream.node.js.map +0 -1
- package/_shims/ReadableStream.node.mjs.map +0 -1
- package/_shims/agent.node.d.ts.map +0 -1
- package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
- package/_shims/node-readable.node.js.map +0 -1
- package/_shims/node-readable.node.mjs.map +0 -1
- package/src/_shims/fetch.deno.ts +0 -23
- package/src/_shims/formdata.deno.ts +0 -16
- /package/_shims/{fetch.node.d.ts → fetch-node.d.ts} +0 -0
- /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
- /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
- /package/_shims/{formdata.js → form-data.js} +0 -0
- /package/_shims/{formdata.mjs → form-data.mjs} +0 -0
- /package/src/_shims/{ReadableStream.node.ts → ReadableStream-node.ts} +0 -0
- /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
- /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/src/_shims/{formdata.js → form-data.js} +0 -0
- /package/src/_shims/{formdata.mjs → form-data.mjs} +0 -0
- /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
package/resources/files.d.ts
CHANGED
|
@@ -27,6 +27,19 @@ export declare class Files extends APIResource {
|
|
|
27
27
|
* Returns the contents of the specified file
|
|
28
28
|
*/
|
|
29
29
|
retrieveContent(fileId: string, options?: Core.RequestOptions): Core.APIPromise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Waits for the given file to be processed, default timeout is 30 mins.
|
|
32
|
+
*/
|
|
33
|
+
waitForProcessing(
|
|
34
|
+
id: string,
|
|
35
|
+
{
|
|
36
|
+
pollInterval,
|
|
37
|
+
maxWait,
|
|
38
|
+
}?: {
|
|
39
|
+
pollInterval?: number;
|
|
40
|
+
maxWait?: number;
|
|
41
|
+
},
|
|
42
|
+
): Promise<FileObject>;
|
|
30
43
|
}
|
|
31
44
|
/**
|
|
32
45
|
* Note: no pagination actually occurs yet, this is for forwards-compatibility.
|
|
@@ -52,7 +65,7 @@ export interface FileObject {
|
|
|
52
65
|
*/
|
|
53
66
|
bytes: number;
|
|
54
67
|
/**
|
|
55
|
-
* The
|
|
68
|
+
* The Unix timestamp (in seconds) for when the file was created.
|
|
56
69
|
*/
|
|
57
70
|
created_at: number;
|
|
58
71
|
/**
|
package/resources/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,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
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.FileObjectsPage = exports.Files = void 0;
|
|
5
|
-
const resource_1 = require('openai/resource');
|
|
6
|
-
const core_1 = require('openai/core');
|
|
7
|
-
const
|
|
5
|
+
const resource_1 = require('openai/resource.js');
|
|
6
|
+
const core_1 = require('openai/core.js');
|
|
7
|
+
const error_1 = require('openai/error.js');
|
|
8
|
+
const core_2 = require('openai/core.js');
|
|
9
|
+
const pagination_1 = require('openai/pagination.js');
|
|
8
10
|
class Files extends resource_1.APIResource {
|
|
9
11
|
/**
|
|
10
12
|
* Upload a file that contains document(s) to be used across various
|
|
@@ -13,7 +15,7 @@ class Files extends resource_1.APIResource {
|
|
|
13
15
|
* storage limit.
|
|
14
16
|
*/
|
|
15
17
|
create(body, options) {
|
|
16
|
-
return this.post('/files', (0,
|
|
18
|
+
return this.post('/files', (0, core_2.multipartFormRequestOptions)({ body, ...options }));
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Returns information about a specific file.
|
|
@@ -45,6 +47,24 @@ class Files extends resource_1.APIResource {
|
|
|
45
47
|
},
|
|
46
48
|
});
|
|
47
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Waits for the given file to be processed, default timeout is 30 mins.
|
|
52
|
+
*/
|
|
53
|
+
async waitForProcessing(id, { pollInterval = 5000, maxWait = 30 * 60 * 1000 } = {}) {
|
|
54
|
+
const TERMINAL_STATES = new Set(['processed', 'error', 'deleted']);
|
|
55
|
+
const start = Date.now();
|
|
56
|
+
let file = await this.retrieve(id);
|
|
57
|
+
while (!file.status || !TERMINAL_STATES.has(file.status)) {
|
|
58
|
+
await (0, core_1.sleep)(pollInterval);
|
|
59
|
+
file = await this.retrieve(id);
|
|
60
|
+
if (Date.now() - start > maxWait) {
|
|
61
|
+
throw new error_1.APIConnectionTimeoutError({
|
|
62
|
+
message: `Giving up on waiting for file ${id} to finish processing after ${maxWait} milliseconds.`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return file;
|
|
67
|
+
}
|
|
48
68
|
}
|
|
49
69
|
exports.Files = Files;
|
|
50
70
|
/**
|
package/resources/files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,8CAA8C;
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,8CAA8C;AAC9C,sCAAoC;AACpC,wCAAyD;AAEzD,sCAA2E;AAC3E,kDAAyC;AAEzC,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;OAKG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAA,kCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAA6B;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,MAAc,EAAE,OAA6B;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,MAAc,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,MAAM,UAAU,EAAE;YAC1C,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,EAAU,EACV,EAAE,YAAY,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,KAAkD,EAAE;QAEnG,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;QAEnE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACxD,MAAM,IAAA,YAAK,EAAC,YAAY,CAAC,CAAC;YAE1B,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC/B,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,OAAO,EAAE;gBAChC,MAAM,IAAI,iCAAyB,CAAC;oBAClC,OAAO,EAAE,iCAAiC,EAAE,+BAA+B,OAAO,gBAAgB;iBACnG,CAAC,CAAC;aACJ;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAnED,sBAmEC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,iBAAgB;CAAG;AAAxD,0CAAwD;AA+ExD,WAAiB,KAAK;AAMtB,CAAC,EANgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAMrB"}
|
package/resources/files.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'openai/resource';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { APIResource } from 'openai/resource.mjs';
|
|
3
|
+
import { sleep } from 'openai/core.mjs';
|
|
4
|
+
import { APIConnectionTimeoutError } from 'openai/error.mjs';
|
|
5
|
+
import { multipartFormRequestOptions } from 'openai/core.mjs';
|
|
6
|
+
import { Page } from 'openai/pagination.mjs';
|
|
5
7
|
export class Files extends APIResource {
|
|
6
8
|
/**
|
|
7
9
|
* Upload a file that contains document(s) to be used across various
|
|
@@ -42,6 +44,24 @@ export class Files extends APIResource {
|
|
|
42
44
|
},
|
|
43
45
|
});
|
|
44
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Waits for the given file to be processed, default timeout is 30 mins.
|
|
49
|
+
*/
|
|
50
|
+
async waitForProcessing(id, { pollInterval = 5000, maxWait = 30 * 60 * 1000 } = {}) {
|
|
51
|
+
const TERMINAL_STATES = new Set(['processed', 'error', 'deleted']);
|
|
52
|
+
const start = Date.now();
|
|
53
|
+
let file = await this.retrieve(id);
|
|
54
|
+
while (!file.status || !TERMINAL_STATES.has(file.status)) {
|
|
55
|
+
await sleep(pollInterval);
|
|
56
|
+
file = await this.retrieve(id);
|
|
57
|
+
if (Date.now() - start > maxWait) {
|
|
58
|
+
throw new APIConnectionTimeoutError({
|
|
59
|
+
message: `Giving up on waiting for file ${id} to finish processing after ${maxWait} milliseconds.`,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return file;
|
|
64
|
+
}
|
|
45
65
|
}
|
|
46
66
|
/**
|
|
47
67
|
* Note: no pagination actually occurs yet, this is for forwards-compatibility.
|
package/resources/files.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;
|
|
1
|
+
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings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,KAAkD,EAAE;QAEnG,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;QAEnE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACxD,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC;YAE1B,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC/B,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,OAAO,EAAE;gBAChC,MAAM,IAAI,yBAAyB,CAAC;oBAClC,OAAO,EAAE,iCAAiC,EAAE,+BAA+B,OAAO,gBAAgB;iBACnG,CAAC,CAAC;aACJ;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,IAAgB;CAAG;AA+ExD,WAAiB,KAAK;AAMtB,CAAC,EANgB,KAAK,KAAL,KAAK,QAMrB"}
|
|
@@ -63,7 +63,7 @@ export interface FineTune {
|
|
|
63
63
|
*/
|
|
64
64
|
id: string;
|
|
65
65
|
/**
|
|
66
|
-
* The
|
|
66
|
+
* The Unix timestamp (in seconds) for when the fine-tuning job was created.
|
|
67
67
|
*/
|
|
68
68
|
created_at: number;
|
|
69
69
|
/**
|
|
@@ -102,7 +102,7 @@ export interface FineTune {
|
|
|
102
102
|
*/
|
|
103
103
|
training_files: Array<Files.FileObject>;
|
|
104
104
|
/**
|
|
105
|
-
* The
|
|
105
|
+
* The Unix timestamp (in seconds) for when the fine-tuning job was last updated.
|
|
106
106
|
*/
|
|
107
107
|
updated_at: number;
|
|
108
108
|
/**
|
package/resources/fine-tunes.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.FineTunesPage = exports.FineTunes = void 0;
|
|
5
|
-
const resource_1 = require('openai/resource');
|
|
6
|
-
const pagination_1 = require('openai/pagination');
|
|
5
|
+
const resource_1 = require('openai/resource.js');
|
|
6
|
+
const pagination_1 = require('openai/pagination.js');
|
|
7
7
|
class FineTunes extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Creates a job that fine-tunes a specified model from a given dataset.
|
package/resources/fine-tunes.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'openai/resource';
|
|
3
|
-
import { Page } from 'openai/pagination';
|
|
2
|
+
import { APIResource } from 'openai/resource.mjs';
|
|
3
|
+
import { Page } from 'openai/pagination.mjs';
|
|
4
4
|
export class FineTunes extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Creates a job that fine-tunes a specified model from a given dataset.
|
|
@@ -42,7 +42,7 @@ var __importStar =
|
|
|
42
42
|
};
|
|
43
43
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
44
44
|
exports.FineTuning = void 0;
|
|
45
|
-
const resource_1 = require('openai/resource');
|
|
45
|
+
const resource_1 = require('openai/resource.js');
|
|
46
46
|
const jobs_1 = require('./jobs.js');
|
|
47
47
|
const API = __importStar(require('./index.js'));
|
|
48
48
|
class FineTuning extends resource_1.APIResource {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'openai/resource';
|
|
2
|
+
import { APIResource } from 'openai/resource.mjs';
|
|
3
3
|
import { Jobs } from './jobs.mjs';
|
|
4
4
|
import * as API from './index.mjs';
|
|
5
5
|
export class FineTuning extends APIResource {
|
|
@@ -58,7 +58,7 @@ export interface FineTuningJob {
|
|
|
58
58
|
*/
|
|
59
59
|
id: string;
|
|
60
60
|
/**
|
|
61
|
-
* The
|
|
61
|
+
* The Unix timestamp (in seconds) for when the fine-tuning job was created.
|
|
62
62
|
*/
|
|
63
63
|
created_at: number;
|
|
64
64
|
/**
|
|
@@ -102,9 +102,9 @@ export interface FineTuningJob {
|
|
|
102
102
|
/**
|
|
103
103
|
* The file ID used for validation.
|
|
104
104
|
*/
|
|
105
|
-
validation_file: string;
|
|
105
|
+
validation_file: string | null;
|
|
106
106
|
/**
|
|
107
|
-
* The
|
|
107
|
+
* The Unix timestamp (in seconds) for when the fine-tuning job was finished.
|
|
108
108
|
*/
|
|
109
109
|
finished_at?: number;
|
|
110
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/resources/fine-tuning/jobs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;IAI5F;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;IAIhG;;OAEG;IACH,IAAI,CACF,KAAK,CAAC,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GA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AAe,CAAC;IACpD,MAAM,QAAQ,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IAChD,MAAM,QAAQ,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;CAC7D"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.FineTuningJobEventsPage = exports.FineTuningJobsPage = exports.Jobs = void 0;
|
|
5
|
-
const resource_1 = require('openai/resource');
|
|
6
|
-
const core_1 = require('openai/core');
|
|
7
|
-
const pagination_1 = require('openai/pagination');
|
|
5
|
+
const resource_1 = require('openai/resource.js');
|
|
6
|
+
const core_1 = require('openai/core.js');
|
|
7
|
+
const pagination_1 = require('openai/pagination.js');
|
|
8
8
|
class Jobs extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Creates a job that fine-tunes a specified model from a given dataset.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'openai/resource';
|
|
3
|
-
import { isRequestOptions } from 'openai/core';
|
|
4
|
-
import { CursorPage } from 'openai/pagination';
|
|
2
|
+
import { APIResource } from 'openai/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'openai/core.mjs';
|
|
4
|
+
import { CursorPage } from 'openai/pagination.mjs';
|
|
5
5
|
export class Jobs extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Creates a job that fine-tunes a specified model from a given dataset.
|
package/resources/images.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.Images = void 0;
|
|
5
|
-
const resource_1 = require('openai/resource');
|
|
6
|
-
const core_1 = require('openai/core');
|
|
5
|
+
const resource_1 = require('openai/resource.js');
|
|
6
|
+
const core_1 = require('openai/core.js');
|
|
7
7
|
class Images extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Creates a variation of a given image.
|
package/resources/images.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'openai/resource';
|
|
3
|
-
import { multipartFormRequestOptions } from 'openai/core';
|
|
2
|
+
import { APIResource } from 'openai/resource.mjs';
|
|
3
|
+
import { multipartFormRequestOptions } from 'openai/core.mjs';
|
|
4
4
|
export class Images extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Creates a variation of a given image.
|
package/resources/models.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ export declare class Models extends APIResource {
|
|
|
14
14
|
*/
|
|
15
15
|
list(options?: Core.RequestOptions): Core.PagePromise<ModelsPage, Model>;
|
|
16
16
|
/**
|
|
17
|
-
* Delete a fine-tuned model. You must have the Owner role in your organization
|
|
17
|
+
* Delete a fine-tuned model. You must have the Owner role in your organization to
|
|
18
|
+
* delete a model.
|
|
18
19
|
*/
|
|
19
20
|
del(model: string, options?: Core.RequestOptions): Core.APIPromise<ModelDeleted>;
|
|
20
21
|
}
|
|
@@ -32,7 +33,7 @@ export interface Model {
|
|
|
32
33
|
*/
|
|
33
34
|
id: string;
|
|
34
35
|
/**
|
|
35
|
-
* The
|
|
36
|
+
* The Unix timestamp (in seconds) when the model was created.
|
|
36
37
|
*/
|
|
37
38
|
created: number;
|
|
38
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,qBAAa,MAAO,SAAQ,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AAC;IAEf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yBAAiB,MAAM,CAAC;IACtB,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAChC,MAAM,QAAQ,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC9C,KAAY,UAAU,GAAG,WAAW,CAAC;CACtC"}
|
package/resources/models.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.ModelsPage = exports.Models = void 0;
|
|
5
|
-
const resource_1 = require('openai/resource');
|
|
6
|
-
const pagination_1 = require('openai/pagination');
|
|
5
|
+
const resource_1 = require('openai/resource.js');
|
|
6
|
+
const pagination_1 = require('openai/pagination.js');
|
|
7
7
|
class Models extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Retrieves a model instance, providing basic information about the model such as
|
|
@@ -20,7 +20,8 @@ class Models extends resource_1.APIResource {
|
|
|
20
20
|
return this.getAPIList('/models', ModelsPage, options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Delete a fine-tuned model. You must have the Owner role in your organization
|
|
23
|
+
* Delete a fine-tuned model. You must have the Owner role in your organization to
|
|
24
|
+
* delete a model.
|
|
24
25
|
*/
|
|
25
26
|
del(model, options) {
|
|
26
27
|
return this.delete(`/models/${model}`, options);
|
package/resources/models.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,8CAA8C;AAE9C,kDAAyC;AAEzC,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,8CAA8C;AAE9C,kDAAyC;AAEzC,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,KAAa,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAxBD,wBAwBC;AAED;;GAEG;AACH,MAAa,UAAW,SAAQ,iBAAW;CAAG;AAA9C,gCAA8C;AAqC9C,WAAiB,MAAM;AAIvB,CAAC,EAJgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAItB"}
|
package/resources/models.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'openai/resource';
|
|
3
|
-
import { Page } from 'openai/pagination';
|
|
2
|
+
import { APIResource } from 'openai/resource.mjs';
|
|
3
|
+
import { Page } from 'openai/pagination.mjs';
|
|
4
4
|
export class Models extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves a model instance, providing basic information about the model such as
|
|
@@ -17,7 +17,8 @@ export class Models extends APIResource {
|
|
|
17
17
|
return this.getAPIList('/models', ModelsPage, options);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Delete a fine-tuned model. You must have the Owner role in your organization
|
|
20
|
+
* Delete a fine-tuned model. You must have the Owner role in your organization to
|
|
21
|
+
* delete a model.
|
|
21
22
|
*/
|
|
22
23
|
del(model, options) {
|
|
23
24
|
return this.delete(`/models/${model}`, options);
|
package/resources/models.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OAEtC,EAAE,IAAI,EAAE,MAAM,mBAAmB;AAExC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OAEtC,EAAE,IAAI,EAAE,MAAM,mBAAmB;AAExC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,KAAa,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAW;CAAG;AAqC9C,WAAiB,MAAM;AAIvB,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
|
package/resources/moderations.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.Moderations = void 0;
|
|
5
|
-
const resource_1 = require('openai/resource');
|
|
5
|
+
const resource_1 = require('openai/resource.js');
|
|
6
6
|
class Moderations extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Classifies if text violates OpenAI's Content Policy
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
// @ts-ignore
|
|
14
|
-
type _ReadableStream<R = any> =
|
|
14
|
+
type _ReadableStream<R = any> = ReadableStream<R>;
|
|
15
15
|
declare const _ReadableStream: {
|
|
16
16
|
prototype: _ReadableStream;
|
|
17
17
|
new (
|
|
@@ -26,13 +26,13 @@ declare const _ReadableStream: {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// @ts-ignore
|
|
29
|
-
type _UnderlyingSource<R = any> =
|
|
29
|
+
type _UnderlyingSource<R = any> = UnderlyingSource<R>;
|
|
30
30
|
// @ts-ignore
|
|
31
|
-
type _UnderlyingByteSource =
|
|
31
|
+
type _UnderlyingByteSource = UnderlyingByteSource;
|
|
32
32
|
type _UnderlyingDefaultSource<R = any> =
|
|
33
33
|
// @ts-ignore
|
|
34
|
-
|
|
34
|
+
UnderlyingDefaultSource<R>;
|
|
35
35
|
// @ts-ignore
|
|
36
|
-
type _QueuingStrategy<R = any> =
|
|
36
|
+
type _QueuingStrategy<R = any> = QueuingStrategy<R>;
|
|
37
37
|
|
|
38
38
|
export { _ReadableStream as ReadableStream };
|
package/src/_shims/agent.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*
|
|
4
4
|
* This is a stub for non-node environments.
|
|
5
|
-
* In node environments, it gets replaced agent
|
|
5
|
+
* In node environments, it gets replaced agent-node.ts by the package export map
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export type Agent = any;
|
|
@@ -17,26 +17,26 @@ import * as nf from 'node-fetch';
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
type _fetch = unknown extends typeof fetch ? typeof nf.default : typeof fetch;
|
|
19
19
|
// @ts-ignore
|
|
20
|
-
type _Request =
|
|
20
|
+
type _Request = Request;
|
|
21
21
|
// @ts-ignore
|
|
22
|
-
type _RequestInfo =
|
|
22
|
+
type _RequestInfo = RequestInfo;
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
type _RequestInit =
|
|
24
|
+
type _RequestInit = RequestInit;
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
type _Response =
|
|
26
|
+
type _Response = Response;
|
|
27
27
|
// @ts-ignore
|
|
28
|
-
type _ResponseInit =
|
|
28
|
+
type _ResponseInit = ResponseInit;
|
|
29
29
|
type _ResponseType =
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
unknown extends ResponseType ? 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect'
|
|
32
32
|
: // @ts-ignore
|
|
33
33
|
ResponseType;
|
|
34
34
|
// @ts-ignore
|
|
35
|
-
type _BodyInit =
|
|
35
|
+
type _BodyInit = BodyInit;
|
|
36
36
|
// @ts-ignore
|
|
37
|
-
type _Headers =
|
|
37
|
+
type _Headers = Headers;
|
|
38
38
|
// @ts-ignore
|
|
39
|
-
type _HeadersInit =
|
|
39
|
+
type _HeadersInit = HeadersInit;
|
|
40
40
|
|
|
41
41
|
declare const _fetch: _fetch;
|
|
42
42
|
declare const _Request: {
|
package/src/_shims/fetch.d.ts
CHANGED
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
// @ts-ignore
|
|
17
|
-
type _fetch =
|
|
17
|
+
type _fetch = typeof fetch;
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
type _Request =
|
|
19
|
+
type _Request = Request;
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
type _RequestInfo =
|
|
21
|
+
type _RequestInfo = RequestInfo;
|
|
22
22
|
// @ts-ignore
|
|
23
|
-
type _RequestInit =
|
|
23
|
+
type _RequestInit = RequestInit;
|
|
24
24
|
// @ts-ignore
|
|
25
|
-
type _Response =
|
|
25
|
+
type _Response = Response;
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
type _ResponseInit =
|
|
27
|
+
type _ResponseInit = ResponseInit;
|
|
28
28
|
// @ts-ignore
|
|
29
|
-
type _ResponseType =
|
|
29
|
+
type _ResponseType = ResponseType;
|
|
30
30
|
// @ts-ignore
|
|
31
|
-
type _BodyInit =
|
|
31
|
+
type _BodyInit = BodyInit;
|
|
32
32
|
// @ts-ignore
|
|
33
|
-
type _Headers =
|
|
33
|
+
type _Headers = Headers;
|
|
34
34
|
// @ts-ignore
|
|
35
|
-
type _HeadersInit =
|
|
35
|
+
type _HeadersInit = HeadersInit;
|
|
36
36
|
|
|
37
37
|
declare const _fetch: _fetch;
|
|
38
38
|
declare const _Request: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { fileFromPath as _fileFromPath } from 'formdata-node/file-from-path';
|
|
6
|
-
import type { File, FilePropertyBag } from './
|
|
6
|
+
import type { File, FilePropertyBag } from './form-data-node.js';
|
|
7
7
|
|
|
8
8
|
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*
|
|
4
|
-
* This is a stub that gets replaced by fileFromPath
|
|
4
|
+
* This is a stub that gets replaced by fileFromPath-node.js for node environments
|
|
5
5
|
* in the package export map
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { FilePropertyBag, File } from './
|
|
8
|
+
import type { FilePropertyBag, File } from './form-data.js';
|
|
9
9
|
|
|
10
10
|
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as fd from 'formdata-node';
|
|
6
6
|
|
|
7
|
-
import type { BlobPart } from '../uploads';
|
|
7
|
+
import type { BlobPart } from '../uploads.js';
|
|
8
8
|
|
|
9
9
|
type EndingType = 'native' | 'transparent';
|
|
10
10
|
|
|
@@ -21,11 +21,11 @@ export interface FilePropertyBag extends BlobPropertyBag {
|
|
|
21
21
|
// Use builtin web types if present; else formdata-node types
|
|
22
22
|
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
type _FormData =
|
|
24
|
+
type _FormData = FormData;
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
type _File =
|
|
26
|
+
type _File = File;
|
|
27
27
|
// @ts-ignore
|
|
28
|
-
type _Blob =
|
|
28
|
+
type _Blob = Blob;
|
|
29
29
|
|
|
30
30
|
declare const _FormData: {
|
|
31
31
|
new (form?: any): _FormData;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { BlobPart } from '../uploads';
|
|
5
|
+
import type { BlobPart } from '../uploads.js';
|
|
6
6
|
|
|
7
7
|
type EndingType = 'native' | 'transparent';
|
|
8
8
|
|
|
@@ -19,11 +19,11 @@ export interface FilePropertyBag extends BlobPropertyBag {
|
|
|
19
19
|
// add appropriate lib or types to tsconfig)
|
|
20
20
|
|
|
21
21
|
// @ts-ignore
|
|
22
|
-
type _FormData =
|
|
22
|
+
type _FormData = FormData;
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
type _File =
|
|
24
|
+
type _File = File;
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
type _Blob =
|
|
26
|
+
type _Blob = Blob;
|
|
27
27
|
|
|
28
28
|
declare const _FormData: {
|
|
29
29
|
new (form?: any): _FormData;
|
package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts}
RENAMED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { FormData } from './
|
|
6
|
-
import type { RequestOptions } from '../core';
|
|
5
|
+
import { FormData } from './form-data-node.js';
|
|
6
|
+
import type { RequestOptions } from '../core.js';
|
|
7
7
|
import { Readable } from 'node:stream';
|
|
8
8
|
import { FormDataEncoder } from 'form-data-encoder';
|
|
9
|
-
import { MultipartBody } from '../uploads';
|
|
9
|
+
import { MultipartBody } from '../uploads.js';
|
|
10
10
|
|
|
11
11
|
export async function getMultipartRequestOptions<T extends {} = Record<string, unknown>>(
|
|
12
12
|
form: FormData,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { FormData } from './
|
|
6
|
-
import type { RequestOptions } from '../core';
|
|
7
|
-
import { MultipartBody } from '../uploads';
|
|
5
|
+
import { FormData } from './form-data.js';
|
|
6
|
+
import type { RequestOptions } from '../core.js';
|
|
7
|
+
import { MultipartBody } from '../uploads.js';
|
|
8
8
|
|
|
9
9
|
export async function getMultipartRequestOptions<T extends {} = Record<string, unknown>>(
|
|
10
10
|
form: FormData,
|