openai 4.8.0 → 4.9.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 +8 -0
- package/README.md +4 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/{src/_shims/ReadableStream-node.ts → _shims/auto/runtime-bun.d.ts} +2 -3
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +99 -0
- package/_shims/{ReadableStream.js → auto/types.js} +0 -2
- package/{src/_shims/ReadableStream.js → _shims/auto/types.mjs} +0 -2
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +79 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +87 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +54 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +35 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +39 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +35 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +70 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +63 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +82 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +170 -218
- package/core.d.ts.map +1 -1
- package/core.js +679 -737
- package/core.js.map +1 -1
- package/core.mjs +673 -688
- package/core.mjs.map +1 -1
- package/error.d.ts +32 -34
- package/error.js +95 -109
- package/error.mjs +92 -94
- package/index.d.mts +164 -175
- package/index.d.ts +164 -175
- package/index.d.ts.map +1 -1
- package/index.js +110 -161
- package/index.mjs +88 -109
- package/package.json +31 -58
- package/pagination.d.ts +31 -41
- package/pagination.js +52 -48
- package/pagination.mjs +50 -46
- package/resource.d.ts +10 -10
- package/resource.js +12 -12
- package/resource.mjs +10 -10
- package/resources/audio/audio.d.ts +12 -12
- package/resources/audio/audio.js +33 -50
- package/resources/audio/audio.mjs +11 -11
- package/resources/audio/index.d.ts +4 -4
- package/resources/audio/index.js +9 -24
- package/resources/audio/index.mjs +4 -4
- package/resources/audio/transcriptions.d.ts +44 -44
- package/resources/audio/transcriptions.js +13 -12
- package/resources/audio/transcriptions.mjs +9 -8
- package/resources/audio/translations.d.ts +38 -38
- package/resources/audio/translations.js +13 -12
- package/resources/audio/translations.mjs +9 -8
- package/resources/chat/chat.d.ts +17 -17
- package/resources/chat/chat.js +30 -47
- package/resources/chat/chat.mjs +8 -8
- package/resources/chat/completions.d.ts +330 -353
- package/resources/chat/completions.js +10 -13
- package/resources/chat/completions.mjs +7 -10
- package/resources/chat/index.d.ts +3 -17
- package/resources/chat/index.js +7 -17
- package/resources/chat/index.mjs +3 -3
- package/resources/completions.d.ts +216 -232
- package/resources/completions.js +10 -13
- package/resources/completions.mjs +7 -10
- package/resources/edits.d.ts +73 -73
- package/resources/edits.js +16 -15
- package/resources/edits.mjs +13 -12
- package/resources/embeddings.d.ts +73 -76
- package/resources/embeddings.js +12 -11
- package/resources/embeddings.mjs +9 -8
- package/resources/files.d.ts +91 -96
- package/resources/files.js +64 -65
- package/resources/files.mjs +57 -58
- package/resources/fine-tunes.d.ts +277 -290
- package/resources/fine-tunes.js +49 -50
- package/resources/fine-tunes.mjs +45 -46
- package/resources/fine-tuning/fine-tuning.d.ts +12 -12
- package/resources/fine-tuning/fine-tuning.js +32 -49
- package/resources/fine-tuning/fine-tuning.mjs +10 -10
- package/resources/fine-tuning/index.d.ts +3 -12
- package/resources/fine-tuning/index.js +9 -29
- package/resources/fine-tuning/index.mjs +3 -3
- package/resources/fine-tuning/jobs.d.ts +173 -179
- package/resources/fine-tuning/jobs.js +50 -47
- package/resources/fine-tuning/jobs.mjs +45 -42
- package/resources/images.d.ts +116 -119
- package/resources/images.js +25 -24
- package/resources/images.mjs +21 -20
- package/resources/index.d.ts +12 -37
- package/resources/index.js +29 -113
- package/resources/index.mjs +12 -12
- package/resources/models.d.ts +41 -40
- package/resources/models.js +30 -28
- package/resources/models.mjs +26 -24
- package/resources/moderations.d.ts +153 -156
- package/resources/moderations.js +12 -11
- package/resources/moderations.mjs +9 -8
- package/shims/node.d.ts +29 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +99 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +79 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +79 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +62 -0
- package/src/_shims/web-runtime.ts +91 -0
- package/src/_shims/web-types.d.ts +82 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +34 -17
- package/src/error.ts +1 -1
- package/src/index.ts +6 -6
- 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 +6 -6
- package/src/resources/chat/index.ts +2 -2
- package/src/resources/completions.ts +5 -5
- package/src/resources/edits.ts +4 -4
- package/src/resources/embeddings.ts +3 -3
- package/src/resources/files.ts +7 -7
- package/src/resources/fine-tunes.ts +7 -7
- 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 +6 -6
- package/src/resources/images.ts +4 -4
- package/src/resources/index.ts +11 -11
- package/src/resources/models.ts +4 -4
- package/src/resources/moderations.ts +3 -3
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/streaming.ts +1 -1
- package/src/uploads.ts +12 -16
- package/src/version.ts +1 -1
- package/streaming.d.ts +9 -8
- package/streaming.d.ts.map +1 -1
- package/streaming.js +194 -185
- package/streaming.mjs +192 -183
- package/uploads.d.ts +23 -39
- package/uploads.d.ts.map +1 -1
- package/uploads.js +115 -157
- package/uploads.js.map +1 -1
- package/uploads.mjs +111 -133
- package/uploads.mjs.map +1 -1
- package/version.d.ts +2 -2
- package/version.js +4 -4
- package/version.mjs +2 -2
- package/_shims/ReadableStream-node.d.ts +0 -6
- package/_shims/ReadableStream-node.d.ts.map +0 -1
- package/_shims/ReadableStream-node.js +0 -14
- package/_shims/ReadableStream-node.js.map +0 -1
- package/_shims/ReadableStream-node.mjs +0 -3
- package/_shims/ReadableStream-node.mjs.map +0 -1
- package/_shims/ReadableStream.d.ts +0 -38
- package/_shims/ReadableStream.mjs +0 -7
- package/_shims/agent-node.d.ts +0 -7
- package/_shims/agent-node.d.ts.map +0 -1
- package/_shims/agent-node.js +0 -28
- package/_shims/agent-node.js.map +0 -1
- package/_shims/agent-node.mjs +0 -16
- package/_shims/agent-node.mjs.map +0 -1
- package/_shims/agent.d.ts +0 -9
- package/_shims/agent.d.ts.map +0 -1
- package/_shims/agent.js +0 -14
- package/_shims/agent.js.map +0 -1
- package/_shims/agent.mjs +0 -10
- package/_shims/agent.mjs.map +0 -1
- package/_shims/fetch-node.d.ts +0 -64
- package/_shims/fetch-node.js +0 -12
- package/_shims/fetch-node.mjs +0 -14
- package/_shims/fetch.d.ts +0 -60
- package/_shims/fetch.js +0 -13
- package/_shims/fetch.mjs +0 -15
- package/_shims/fileFromPath-node.d.ts +0 -17
- package/_shims/fileFromPath-node.d.ts.map +0 -1
- package/_shims/fileFromPath-node.js +0 -17
- package/_shims/fileFromPath-node.js.map +0 -1
- package/_shims/fileFromPath-node.mjs +0 -13
- package/_shims/fileFromPath-node.mjs.map +0 -1
- package/_shims/fileFromPath.d.ts +0 -22
- package/_shims/fileFromPath.d.ts.map +0 -1
- package/_shims/fileFromPath.js +0 -16
- package/_shims/fileFromPath.js.map +0 -1
- package/_shims/fileFromPath.mjs +0 -12
- package/_shims/fileFromPath.mjs.map +0 -1
- package/_shims/form-data-node.d.ts +0 -45
- package/_shims/form-data-node.js +0 -11
- package/_shims/form-data-node.mjs +0 -9
- package/_shims/form-data.d.ts +0 -43
- package/_shims/form-data.js +0 -17
- package/_shims/form-data.mjs +0 -20
- package/_shims/getMultipartRequestOptions-node.d.ts +0 -10
- package/_shims/getMultipartRequestOptions-node.d.ts.map +0 -1
- package/_shims/getMultipartRequestOptions-node.js +0 -22
- package/_shims/getMultipartRequestOptions-node.js.map +0 -1
- package/_shims/getMultipartRequestOptions-node.mjs +0 -18
- package/_shims/getMultipartRequestOptions-node.mjs.map +0 -1
- package/_shims/getMultipartRequestOptions.d.ts +0 -10
- package/_shims/getMultipartRequestOptions.d.ts.map +0 -1
- package/_shims/getMultipartRequestOptions.js +0 -12
- package/_shims/getMultipartRequestOptions.js.map +0 -1
- package/_shims/getMultipartRequestOptions.mjs +0 -8
- package/_shims/getMultipartRequestOptions.mjs.map +0 -1
- package/_shims/node-readable-node.d.ts +0 -8
- package/_shims/node-readable-node.d.ts.map +0 -1
- package/_shims/node-readable-node.js +0 -9
- package/_shims/node-readable-node.js.map +0 -1
- package/_shims/node-readable-node.mjs +0 -5
- package/_shims/node-readable-node.mjs.map +0 -1
- package/_shims/node-readable.d.ts +0 -23
- package/_shims/node-readable.d.ts.map +0 -1
- package/_shims/node-readable.js +0 -11
- package/_shims/node-readable.js.map +0 -1
- package/_shims/node-readable.mjs +0 -7
- package/_shims/node-readable.mjs.map +0 -1
- package/src/_shims/ReadableStream.d.ts +0 -38
- package/src/_shims/ReadableStream.mjs +0 -7
- package/src/_shims/agent-node.ts +0 -22
- package/src/_shims/agent.ts +0 -12
- package/src/_shims/fetch-node.d.ts +0 -64
- package/src/_shims/fetch-node.js +0 -12
- package/src/_shims/fetch-node.mjs +0 -14
- package/src/_shims/fetch.d.ts +0 -60
- package/src/_shims/fetch.js +0 -13
- package/src/_shims/fetch.mjs +0 -15
- package/src/_shims/fileFromPath-node.ts +0 -29
- package/src/_shims/fileFromPath.ts +0 -29
- package/src/_shims/form-data-node.d.ts +0 -45
- package/src/_shims/form-data-node.js +0 -11
- package/src/_shims/form-data-node.mjs +0 -9
- package/src/_shims/form-data.d.ts +0 -43
- package/src/_shims/form-data.js +0 -17
- package/src/_shims/form-data.mjs +0 -20
- package/src/_shims/getMultipartRequestOptions-node.ts +0 -25
- package/src/_shims/getMultipartRequestOptions.ts +0 -14
- package/src/_shims/node-readable-node.ts +0 -10
- package/src/_shims/node-readable.ts +0 -30
package/index.d.mts
CHANGED
|
@@ -1,185 +1,174 @@
|
|
|
1
|
-
import * as Core from
|
|
2
|
-
import * as Pagination from
|
|
3
|
-
import * as API from
|
|
4
|
-
import * as Errors from
|
|
5
|
-
import type
|
|
6
|
-
import * as Uploads from
|
|
1
|
+
import * as Core from "./core.js";
|
|
2
|
+
import * as Pagination from "./pagination.js";
|
|
3
|
+
import * as API from "./resources/index.js";
|
|
4
|
+
import * as Errors from "./error.js";
|
|
5
|
+
import { type Agent } from "./_shims/index.js";
|
|
6
|
+
import * as Uploads from "./uploads.js";
|
|
7
7
|
export interface ClientOptions {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Defaults to process.env["OPENAI_API_KEY"].
|
|
10
|
+
*/
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
14
|
+
*/
|
|
15
|
+
baseURL?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
18
|
+
* from the server before timing out a single request.
|
|
19
|
+
*
|
|
20
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
21
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
22
|
+
*/
|
|
23
|
+
timeout?: number;
|
|
24
|
+
/**
|
|
25
|
+
* An HTTP agent used to manage HTTP(S) connections.
|
|
26
|
+
*
|
|
27
|
+
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
28
|
+
* otherwise no agent is used.
|
|
29
|
+
*/
|
|
30
|
+
httpAgent?: Agent;
|
|
31
|
+
/**
|
|
32
|
+
* Specify a custom `fetch` function implementation.
|
|
33
|
+
*
|
|
34
|
+
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
35
|
+
* defined globally.
|
|
36
|
+
*/
|
|
37
|
+
fetch?: Core.Fetch | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
40
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
41
|
+
*
|
|
42
|
+
* @default 2
|
|
43
|
+
*/
|
|
44
|
+
maxRetries?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Default headers to include with every request to the API.
|
|
47
|
+
*
|
|
48
|
+
* These can be removed in individual requests by explicitly setting the
|
|
49
|
+
* header to `undefined` or `null` in request options.
|
|
50
|
+
*/
|
|
51
|
+
defaultHeaders?: Core.Headers;
|
|
52
|
+
/**
|
|
53
|
+
* Default query parameters to include with every request to the API.
|
|
54
|
+
*
|
|
55
|
+
* These can be removed in individual requests by explicitly setting the
|
|
56
|
+
* param to `undefined` in request options.
|
|
57
|
+
*/
|
|
58
|
+
defaultQuery?: Core.DefaultQuery;
|
|
59
|
+
/**
|
|
60
|
+
* By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
|
|
61
|
+
* Only set this option to `true` if you understand the risks and have appropriate mitigations in place.
|
|
62
|
+
*/
|
|
63
|
+
dangerouslyAllowBrowser?: boolean;
|
|
64
|
+
organization?: string | null;
|
|
65
65
|
}
|
|
66
66
|
/** API Client for interfacing with the OpenAI API. */
|
|
67
67
|
export declare class OpenAI extends Core.APIClient {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
68
|
+
apiKey: string;
|
|
69
|
+
organization?: string | null;
|
|
70
|
+
private _options;
|
|
71
|
+
/**
|
|
72
|
+
* API Client for interfacing with the OpenAI API.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} [opts.apiKey=process.env['OPENAI_API_KEY']] - The API Key to send to the API.
|
|
75
|
+
* @param {string} [opts.baseURL] - Override the default base URL for the API.
|
|
76
|
+
* @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
77
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
78
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
79
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
80
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
81
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
82
|
+
* @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
|
|
83
|
+
* @param {string | null} [opts.organization]
|
|
84
|
+
*/
|
|
85
|
+
constructor({ apiKey, organization, ...opts }?: ClientOptions);
|
|
86
|
+
completions: API.Completions;
|
|
87
|
+
chat: API.Chat;
|
|
88
|
+
edits: API.Edits;
|
|
89
|
+
embeddings: API.Embeddings;
|
|
90
|
+
files: API.Files;
|
|
91
|
+
images: API.Images;
|
|
92
|
+
audio: API.Audio;
|
|
93
|
+
moderations: API.Moderations;
|
|
94
|
+
models: API.Models;
|
|
95
|
+
fineTuning: API.FineTuning;
|
|
96
|
+
fineTunes: API.FineTunes;
|
|
97
|
+
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
98
|
+
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
99
|
+
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
100
|
+
static OpenAI: typeof OpenAI;
|
|
101
|
+
static APIError: typeof Errors.APIError;
|
|
102
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
103
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
104
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
105
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
106
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
107
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
108
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
109
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
110
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
111
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
112
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
113
113
|
}
|
|
114
|
-
export declare const APIError: typeof Errors.APIError,
|
|
115
|
-
APIConnectionError: typeof Errors.APIConnectionError,
|
|
116
|
-
APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError,
|
|
117
|
-
APIUserAbortError: typeof Errors.APIUserAbortError,
|
|
118
|
-
NotFoundError: typeof Errors.NotFoundError,
|
|
119
|
-
ConflictError: typeof Errors.ConflictError,
|
|
120
|
-
RateLimitError: typeof Errors.RateLimitError,
|
|
121
|
-
BadRequestError: typeof Errors.BadRequestError,
|
|
122
|
-
AuthenticationError: typeof Errors.AuthenticationError,
|
|
123
|
-
InternalServerError: typeof Errors.InternalServerError,
|
|
124
|
-
PermissionDeniedError: typeof Errors.PermissionDeniedError,
|
|
125
|
-
UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
114
|
+
export declare const APIError: typeof Errors.APIError, APIConnectionError: typeof Errors.APIConnectionError, APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError, APIUserAbortError: typeof Errors.APIUserAbortError, NotFoundError: typeof Errors.NotFoundError, ConflictError: typeof Errors.ConflictError, RateLimitError: typeof Errors.RateLimitError, BadRequestError: typeof Errors.BadRequestError, AuthenticationError: typeof Errors.AuthenticationError, InternalServerError: typeof Errors.InternalServerError, PermissionDeniedError: typeof Errors.PermissionDeniedError, UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
126
115
|
export import toFile = Uploads.toFile;
|
|
127
116
|
export import fileFromPath = Uploads.fileFromPath;
|
|
128
117
|
export declare namespace OpenAI {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
118
|
+
export import toFile = Uploads.toFile;
|
|
119
|
+
export import fileFromPath = Uploads.fileFromPath;
|
|
120
|
+
export import RequestOptions = Core.RequestOptions;
|
|
121
|
+
export import Page = Pagination.Page;
|
|
122
|
+
export import PageResponse = Pagination.PageResponse;
|
|
123
|
+
export import CursorPage = Pagination.CursorPage;
|
|
124
|
+
export import CursorPageParams = Pagination.CursorPageParams;
|
|
125
|
+
export import CursorPageResponse = Pagination.CursorPageResponse;
|
|
126
|
+
export import Completions = API.Completions;
|
|
127
|
+
export import Completion = API.Completion;
|
|
128
|
+
export import CompletionChoice = API.CompletionChoice;
|
|
129
|
+
export import CompletionUsage = API.CompletionUsage;
|
|
130
|
+
export import CompletionCreateParams = API.CompletionCreateParams;
|
|
131
|
+
export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
|
|
132
|
+
export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
|
|
133
|
+
export import Chat = API.Chat;
|
|
134
|
+
export import Edits = API.Edits;
|
|
135
|
+
export import Edit = API.Edit;
|
|
136
|
+
export import EditCreateParams = API.EditCreateParams;
|
|
137
|
+
export import Embeddings = API.Embeddings;
|
|
138
|
+
export import CreateEmbeddingResponse = API.CreateEmbeddingResponse;
|
|
139
|
+
export import Embedding = API.Embedding;
|
|
140
|
+
export import EmbeddingCreateParams = API.EmbeddingCreateParams;
|
|
141
|
+
export import Files = API.Files;
|
|
142
|
+
export import FileContent = API.FileContent;
|
|
143
|
+
export import FileDeleted = API.FileDeleted;
|
|
144
|
+
export import FileObject = API.FileObject;
|
|
145
|
+
export import FileObjectsPage = API.FileObjectsPage;
|
|
146
|
+
export import FileCreateParams = API.FileCreateParams;
|
|
147
|
+
export import Images = API.Images;
|
|
148
|
+
export import Image = API.Image;
|
|
149
|
+
export import ImagesResponse = API.ImagesResponse;
|
|
150
|
+
export import ImageCreateVariationParams = API.ImageCreateVariationParams;
|
|
151
|
+
export import ImageEditParams = API.ImageEditParams;
|
|
152
|
+
export import ImageGenerateParams = API.ImageGenerateParams;
|
|
153
|
+
export import Audio = API.Audio;
|
|
154
|
+
export import Moderations = API.Moderations;
|
|
155
|
+
export import Moderation = API.Moderation;
|
|
156
|
+
export import ModerationCreateResponse = API.ModerationCreateResponse;
|
|
157
|
+
export import ModerationCreateParams = API.ModerationCreateParams;
|
|
158
|
+
export import Models = API.Models;
|
|
159
|
+
export import Model = API.Model;
|
|
160
|
+
export import ModelDeleted = API.ModelDeleted;
|
|
161
|
+
export import ModelsPage = API.ModelsPage;
|
|
162
|
+
export import FineTuning = API.FineTuning;
|
|
163
|
+
export import FineTunes = API.FineTunes;
|
|
164
|
+
export import FineTune = API.FineTune;
|
|
165
|
+
export import FineTuneEvent = API.FineTuneEvent;
|
|
166
|
+
export import FineTuneEventsListResponse = API.FineTuneEventsListResponse;
|
|
167
|
+
export import FineTunesPage = API.FineTunesPage;
|
|
168
|
+
export import FineTuneCreateParams = API.FineTuneCreateParams;
|
|
169
|
+
export import FineTuneListEventsParams = API.FineTuneListEventsParams;
|
|
170
|
+
export import FineTuneListEventsParamsNonStreaming = API.FineTuneListEventsParamsNonStreaming;
|
|
171
|
+
export import FineTuneListEventsParamsStreaming = API.FineTuneListEventsParamsStreaming;
|
|
183
172
|
}
|
|
184
173
|
export default OpenAI;
|
|
185
|
-
//# sourceMappingURL=index.d.ts.map
|
|
174
|
+
//# sourceMappingURL=index.d.ts.map
|