openai 4.12.0 → 4.12.2
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 +33 -0
- package/README.md +3 -3
- package/_shims/auto/types.d.ts +3 -1
- package/_shims/index.d.ts +2 -0
- package/_shims/node-runtime.d.ts.map +1 -1
- package/_shims/node-runtime.js +2 -0
- package/_shims/node-runtime.js.map +1 -1
- package/_shims/node-runtime.mjs +2 -0
- package/_shims/node-runtime.mjs.map +1 -1
- package/_shims/node-types.d.ts +1 -1
- package/_shims/registry.d.ts +2 -0
- package/_shims/registry.d.ts.map +1 -1
- package/_shims/registry.js +3 -1
- package/_shims/registry.js.map +1 -1
- package/_shims/registry.mjs +2 -0
- package/_shims/registry.mjs.map +1 -1
- package/_shims/web-runtime.d.ts.map +1 -1
- package/_shims/web-runtime.js +8 -0
- package/_shims/web-runtime.js.map +1 -1
- package/_shims/web-runtime.mjs +8 -0
- package/_shims/web-runtime.mjs.map +1 -1
- package/_shims/web-types.d.ts +2 -1
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +28 -14
- package/core.js.map +1 -1
- package/core.mjs +26 -12
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/error.js +14 -4
- package/error.js.map +1 -1
- package/error.mjs +14 -4
- package/error.mjs.map +1 -1
- package/index.d.mts +48 -45
- package/index.d.ts +48 -45
- package/index.d.ts.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 +3 -2
- package/resources/audio/audio.d.ts +4 -4
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.ts +2 -2
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js +2 -0
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs +2 -0
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.ts +2 -2
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js +2 -0
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs +2 -0
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/chat/chat.d.ts +15 -12
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +15 -12
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +2 -0
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +2 -0
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/completions.d.ts +6 -6
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +2 -0
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +2 -0
- package/resources/completions.mjs.map +1 -1
- package/resources/edits.d.ts +2 -2
- package/resources/edits.d.ts.map +1 -1
- package/resources/edits.js +2 -0
- package/resources/edits.js.map +1 -1
- package/resources/edits.mjs +2 -0
- package/resources/edits.mjs.map +1 -1
- package/resources/embeddings.d.ts +3 -3
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +2 -0
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +2 -0
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files.d.ts +4 -4
- package/resources/files.d.ts.map +1 -1
- package/resources/fine-tunes.d.ts +7 -7
- package/resources/fine-tunes.d.ts.map +1 -1
- package/resources/fine-tuning/fine-tuning.d.ts +5 -5
- package/resources/fine-tuning/fine-tuning.d.ts.map +1 -1
- package/resources/fine-tuning/jobs.d.ts +5 -5
- package/resources/fine-tuning/jobs.d.ts.map +1 -1
- package/resources/images.d.ts +5 -5
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +2 -0
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +2 -0
- package/resources/images.mjs.map +1 -1
- package/resources/models.d.ts +2 -2
- package/resources/models.d.ts.map +1 -1
- package/resources/moderations.d.ts +3 -3
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +2 -0
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +2 -0
- package/resources/moderations.mjs.map +1 -1
- package/shims/node.d.ts +1 -1
- package/shims/node.d.ts.map +1 -1
- package/shims/web.d.ts +1 -1
- package/shims/web.d.ts.map +1 -1
- package/src/_shims/auto/types.d.ts +3 -1
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/node-runtime.ts +2 -0
- package/src/_shims/node-types.d.ts +1 -1
- package/src/_shims/registry.ts +3 -0
- package/src/_shims/web-runtime.ts +12 -0
- package/src/_shims/web-types.d.ts +2 -1
- package/src/core.ts +29 -10
- package/src/error.ts +15 -5
- package/src/index.ts +50 -47
- package/src/resources/audio/audio.ts +4 -4
- package/src/resources/audio/transcriptions.ts +2 -2
- package/src/resources/audio/translations.ts +2 -2
- package/src/resources/chat/chat.ts +15 -12
- package/src/resources/chat/completions.ts +15 -13
- package/src/resources/completions.ts +6 -6
- package/src/resources/edits.ts +2 -2
- package/src/resources/embeddings.ts +3 -3
- package/src/resources/files.ts +4 -4
- package/src/resources/fine-tunes.ts +7 -7
- package/src/resources/fine-tuning/fine-tuning.ts +5 -5
- package/src/resources/fine-tuning/jobs.ts +5 -5
- package/src/resources/images.ts +5 -5
- package/src/resources/models.ts +2 -2
- package/src/resources/moderations.ts +3 -3
- package/src/shims/node.ts +1 -1
- package/src/shims/web.ts +1 -1
- package/src/streaming.ts +162 -44
- package/src/version.ts +1 -1
- package/streaming.d.ts +8 -6
- package/streaming.d.ts.map +1 -1
- package/streaming.js +157 -46
- package/streaming.js.map +1 -1
- package/streaming.mjs +157 -46
- package/streaming.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/index.ts
CHANGED
|
@@ -9,10 +9,15 @@ import * as API from "./resources/index";
|
|
|
9
9
|
|
|
10
10
|
export interface ClientOptions {
|
|
11
11
|
/**
|
|
12
|
-
* Defaults to process.env[
|
|
12
|
+
* Defaults to process.env['OPENAI_API_KEY'].
|
|
13
13
|
*/
|
|
14
14
|
apiKey?: string;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Defaults to process.env['OPENAI_ORG_ID'].
|
|
18
|
+
*/
|
|
19
|
+
organization?: string | null;
|
|
20
|
+
|
|
16
21
|
/**
|
|
17
22
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
18
23
|
*/
|
|
@@ -72,21 +77,20 @@ export interface ClientOptions {
|
|
|
72
77
|
* Only set this option to `true` if you understand the risks and have appropriate mitigations in place.
|
|
73
78
|
*/
|
|
74
79
|
dangerouslyAllowBrowser?: boolean;
|
|
75
|
-
|
|
76
|
-
organization?: string | null;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
/** API Client for interfacing with the OpenAI API. */
|
|
80
83
|
export class OpenAI extends Core.APIClient {
|
|
81
84
|
apiKey: string;
|
|
82
|
-
organization
|
|
85
|
+
organization: string | null;
|
|
83
86
|
|
|
84
87
|
private _options: ClientOptions;
|
|
85
88
|
|
|
86
89
|
/**
|
|
87
90
|
* API Client for interfacing with the OpenAI API.
|
|
88
91
|
*
|
|
89
|
-
* @param {string} [opts.apiKey
|
|
92
|
+
* @param {string} [opts.apiKey==process.env['OPENAI_API_KEY'] ?? undefined]
|
|
93
|
+
* @param {string | null} [opts.organization==process.env['OPENAI_ORG_ID'] ?? null]
|
|
90
94
|
* @param {string} [opts.baseURL] - Override the default base URL for the API.
|
|
91
95
|
* @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
92
96
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
@@ -95,7 +99,6 @@ export class OpenAI extends Core.APIClient {
|
|
|
95
99
|
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
96
100
|
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
97
101
|
* @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.
|
|
98
|
-
* @param {string | null} [opts.organization]
|
|
99
102
|
*/
|
|
100
103
|
constructor({
|
|
101
104
|
apiKey = Core.readEnv('OPENAI_API_KEY'),
|
|
@@ -104,7 +107,7 @@ export class OpenAI extends Core.APIClient {
|
|
|
104
107
|
}: ClientOptions = {}) {
|
|
105
108
|
if (apiKey === undefined) {
|
|
106
109
|
throw new Errors.OpenAIError(
|
|
107
|
-
"The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: '
|
|
110
|
+
"The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).",
|
|
108
111
|
);
|
|
109
112
|
}
|
|
110
113
|
|
|
@@ -213,69 +216,69 @@ export namespace OpenAI {
|
|
|
213
216
|
export import CursorPageResponse = Pagination.CursorPageResponse;
|
|
214
217
|
|
|
215
218
|
export import Completions = API.Completions;
|
|
216
|
-
export
|
|
217
|
-
export
|
|
218
|
-
export
|
|
219
|
-
export
|
|
220
|
-
export
|
|
221
|
-
export
|
|
219
|
+
export import Completion = API.Completion;
|
|
220
|
+
export import CompletionChoice = API.CompletionChoice;
|
|
221
|
+
export import CompletionUsage = API.CompletionUsage;
|
|
222
|
+
export import CompletionCreateParams = API.CompletionCreateParams;
|
|
223
|
+
export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
|
|
224
|
+
export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
|
|
222
225
|
|
|
223
226
|
export import Chat = API.Chat;
|
|
224
|
-
export
|
|
225
|
-
export
|
|
226
|
-
export
|
|
227
|
-
export
|
|
228
|
-
export
|
|
229
|
-
export
|
|
230
|
-
export
|
|
231
|
-
export
|
|
227
|
+
export import ChatCompletion = API.ChatCompletion;
|
|
228
|
+
export import ChatCompletionChunk = API.ChatCompletionChunk;
|
|
229
|
+
export import ChatCompletionMessage = API.ChatCompletionMessage;
|
|
230
|
+
export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
|
|
231
|
+
export import ChatCompletionRole = API.ChatCompletionRole;
|
|
232
|
+
export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
|
|
233
|
+
export import ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming;
|
|
234
|
+
export import ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming;
|
|
232
235
|
|
|
233
236
|
export import Edits = API.Edits;
|
|
234
|
-
export
|
|
235
|
-
export
|
|
237
|
+
export import Edit = API.Edit;
|
|
238
|
+
export import EditCreateParams = API.EditCreateParams;
|
|
236
239
|
|
|
237
240
|
export import Embeddings = API.Embeddings;
|
|
238
|
-
export
|
|
239
|
-
export
|
|
240
|
-
export
|
|
241
|
+
export import CreateEmbeddingResponse = API.CreateEmbeddingResponse;
|
|
242
|
+
export import Embedding = API.Embedding;
|
|
243
|
+
export import EmbeddingCreateParams = API.EmbeddingCreateParams;
|
|
241
244
|
|
|
242
245
|
export import Files = API.Files;
|
|
243
|
-
export
|
|
244
|
-
export
|
|
245
|
-
export
|
|
246
|
+
export import FileContent = API.FileContent;
|
|
247
|
+
export import FileDeleted = API.FileDeleted;
|
|
248
|
+
export import FileObject = API.FileObject;
|
|
246
249
|
export import FileObjectsPage = API.FileObjectsPage;
|
|
247
|
-
export
|
|
250
|
+
export import FileCreateParams = API.FileCreateParams;
|
|
248
251
|
|
|
249
252
|
export import Images = API.Images;
|
|
250
|
-
export
|
|
251
|
-
export
|
|
252
|
-
export
|
|
253
|
-
export
|
|
254
|
-
export
|
|
253
|
+
export import Image = API.Image;
|
|
254
|
+
export import ImagesResponse = API.ImagesResponse;
|
|
255
|
+
export import ImageCreateVariationParams = API.ImageCreateVariationParams;
|
|
256
|
+
export import ImageEditParams = API.ImageEditParams;
|
|
257
|
+
export import ImageGenerateParams = API.ImageGenerateParams;
|
|
255
258
|
|
|
256
259
|
export import Audio = API.Audio;
|
|
257
260
|
|
|
258
261
|
export import Moderations = API.Moderations;
|
|
259
|
-
export
|
|
260
|
-
export
|
|
261
|
-
export
|
|
262
|
+
export import Moderation = API.Moderation;
|
|
263
|
+
export import ModerationCreateResponse = API.ModerationCreateResponse;
|
|
264
|
+
export import ModerationCreateParams = API.ModerationCreateParams;
|
|
262
265
|
|
|
263
266
|
export import Models = API.Models;
|
|
264
|
-
export
|
|
265
|
-
export
|
|
267
|
+
export import Model = API.Model;
|
|
268
|
+
export import ModelDeleted = API.ModelDeleted;
|
|
266
269
|
export import ModelsPage = API.ModelsPage;
|
|
267
270
|
|
|
268
271
|
export import FineTuning = API.FineTuning;
|
|
269
272
|
|
|
270
273
|
export import FineTunes = API.FineTunes;
|
|
271
|
-
export
|
|
272
|
-
export
|
|
273
|
-
export
|
|
274
|
+
export import FineTune = API.FineTune;
|
|
275
|
+
export import FineTuneEvent = API.FineTuneEvent;
|
|
276
|
+
export import FineTuneEventsListResponse = API.FineTuneEventsListResponse;
|
|
274
277
|
export import FineTunesPage = API.FineTunesPage;
|
|
275
|
-
export
|
|
276
|
-
export
|
|
277
|
-
export
|
|
278
|
-
export
|
|
278
|
+
export import FineTuneCreateParams = API.FineTuneCreateParams;
|
|
279
|
+
export import FineTuneListEventsParams = API.FineTuneListEventsParams;
|
|
280
|
+
export import FineTuneListEventsParamsNonStreaming = API.FineTuneListEventsParamsNonStreaming;
|
|
281
|
+
export import FineTuneListEventsParamsStreaming = API.FineTuneListEventsParamsStreaming;
|
|
279
282
|
}
|
|
280
283
|
|
|
281
284
|
export default OpenAI;
|
|
@@ -11,9 +11,9 @@ export class Audio extends APIResource {
|
|
|
11
11
|
|
|
12
12
|
export namespace Audio {
|
|
13
13
|
export import Transcriptions = TranscriptionsAPI.Transcriptions;
|
|
14
|
-
export
|
|
15
|
-
export
|
|
14
|
+
export import Transcription = TranscriptionsAPI.Transcription;
|
|
15
|
+
export import TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams;
|
|
16
16
|
export import Translations = TranslationsAPI.Translations;
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export import Translation = TranslationsAPI.Translation;
|
|
18
|
+
export import TranslationCreateParams = TranslationsAPI.TranslationCreateParams;
|
|
19
19
|
}
|
|
@@ -62,6 +62,6 @@ export interface TranscriptionCreateParams {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export namespace Transcriptions {
|
|
65
|
-
export
|
|
66
|
-
export
|
|
65
|
+
export import Transcription = TranscriptionsAPI.Transcription;
|
|
66
|
+
export import TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams;
|
|
67
67
|
}
|
|
@@ -55,6 +55,6 @@ export interface TranslationCreateParams {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export namespace Translations {
|
|
58
|
-
export
|
|
59
|
-
export
|
|
58
|
+
export import Translation = TranslationsAPI.Translation;
|
|
59
|
+
export import TranslationCreateParams = TranslationsAPI.TranslationCreateParams;
|
|
60
60
|
}
|
|
@@ -9,16 +9,19 @@ export class Chat extends APIResource {
|
|
|
9
9
|
|
|
10
10
|
export namespace Chat {
|
|
11
11
|
export import Completions = CompletionsAPI.Completions;
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
12
|
+
export import ChatCompletion = CompletionsAPI.ChatCompletion;
|
|
13
|
+
export import ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk;
|
|
14
|
+
export import ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage;
|
|
15
|
+
export import ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam;
|
|
16
|
+
export import ChatCompletionRole = CompletionsAPI.ChatCompletionRole;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated ChatCompletionMessageParam should be used instead
|
|
19
|
+
*/
|
|
20
|
+
export import CreateChatCompletionRequestMessage = CompletionsAPI.CreateChatCompletionRequestMessage;
|
|
21
|
+
export import ChatCompletionCreateParams = CompletionsAPI.ChatCompletionCreateParams;
|
|
22
|
+
export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
|
|
23
|
+
export import ChatCompletionCreateParamsNonStreaming = CompletionsAPI.ChatCompletionCreateParamsNonStreaming;
|
|
24
|
+
export import CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;
|
|
25
|
+
export import ChatCompletionCreateParamsStreaming = CompletionsAPI.ChatCompletionCreateParamsStreaming;
|
|
26
|
+
export import CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming;
|
|
24
27
|
}
|
|
@@ -504,17 +504,19 @@ export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreat
|
|
|
504
504
|
export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming;
|
|
505
505
|
|
|
506
506
|
export namespace Completions {
|
|
507
|
-
export
|
|
508
|
-
export
|
|
509
|
-
export
|
|
510
|
-
export
|
|
511
|
-
export
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
export
|
|
516
|
-
|
|
517
|
-
export
|
|
518
|
-
export
|
|
519
|
-
export
|
|
507
|
+
export import ChatCompletion = ChatCompletionsAPI.ChatCompletion;
|
|
508
|
+
export import ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk;
|
|
509
|
+
export import ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage;
|
|
510
|
+
export import ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam;
|
|
511
|
+
export import ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole;
|
|
512
|
+
/**
|
|
513
|
+
* @deprecated ChatCompletionMessageParam should be used instead
|
|
514
|
+
*/
|
|
515
|
+
export import CreateChatCompletionRequestMessage = ChatCompletionsAPI.CreateChatCompletionRequestMessage;
|
|
516
|
+
export import ChatCompletionCreateParams = ChatCompletionsAPI.ChatCompletionCreateParams;
|
|
517
|
+
export import CompletionCreateParams = ChatCompletionsAPI.CompletionCreateParams;
|
|
518
|
+
export import ChatCompletionCreateParamsNonStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming;
|
|
519
|
+
export import CompletionCreateParamsNonStreaming = ChatCompletionsAPI.CompletionCreateParamsNonStreaming;
|
|
520
|
+
export import ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming;
|
|
521
|
+
export import CompletionCreateParamsStreaming = ChatCompletionsAPI.CompletionCreateParamsStreaming;
|
|
520
522
|
}
|
|
@@ -305,10 +305,10 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
export namespace Completions {
|
|
308
|
-
export
|
|
309
|
-
export
|
|
310
|
-
export
|
|
311
|
-
export
|
|
312
|
-
export
|
|
313
|
-
export
|
|
308
|
+
export import Completion = CompletionsAPI.Completion;
|
|
309
|
+
export import CompletionChoice = CompletionsAPI.CompletionChoice;
|
|
310
|
+
export import CompletionUsage = CompletionsAPI.CompletionUsage;
|
|
311
|
+
export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
|
|
312
|
+
export import CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;
|
|
313
|
+
export import CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming;
|
|
314
314
|
}
|
package/src/resources/edits.ts
CHANGED
|
@@ -104,6 +104,6 @@ export interface EditCreateParams {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export namespace Edits {
|
|
107
|
-
export
|
|
108
|
-
export
|
|
107
|
+
export import Edit = EditsAPI.Edit;
|
|
108
|
+
export import EditCreateParams = EditsAPI.EditCreateParams;
|
|
109
109
|
}
|
|
@@ -106,7 +106,7 @@ export interface EmbeddingCreateParams {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export namespace Embeddings {
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
export
|
|
109
|
+
export import CreateEmbeddingResponse = EmbeddingsAPI.CreateEmbeddingResponse;
|
|
110
|
+
export import Embedding = EmbeddingsAPI.Embedding;
|
|
111
|
+
export import EmbeddingCreateParams = EmbeddingsAPI.EmbeddingCreateParams;
|
|
112
112
|
}
|
package/src/resources/files.ts
CHANGED
|
@@ -159,9 +159,9 @@ export interface FileCreateParams {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
export namespace Files {
|
|
162
|
-
export
|
|
163
|
-
export
|
|
164
|
-
export
|
|
162
|
+
export import FileContent = FilesAPI.FileContent;
|
|
163
|
+
export import FileDeleted = FilesAPI.FileDeleted;
|
|
164
|
+
export import FileObject = FilesAPI.FileObject;
|
|
165
165
|
export import FileObjectsPage = FilesAPI.FileObjectsPage;
|
|
166
|
-
export
|
|
166
|
+
export import FileCreateParams = FilesAPI.FileCreateParams;
|
|
167
167
|
}
|
|
@@ -412,12 +412,12 @@ export interface FineTuneListEventsParamsStreaming extends FineTuneListEventsPar
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
export namespace FineTunes {
|
|
415
|
-
export
|
|
416
|
-
export
|
|
417
|
-
export
|
|
415
|
+
export import FineTune = FineTunesAPI.FineTune;
|
|
416
|
+
export import FineTuneEvent = FineTunesAPI.FineTuneEvent;
|
|
417
|
+
export import FineTuneEventsListResponse = FineTunesAPI.FineTuneEventsListResponse;
|
|
418
418
|
export import FineTunesPage = FineTunesAPI.FineTunesPage;
|
|
419
|
-
export
|
|
420
|
-
export
|
|
421
|
-
export
|
|
422
|
-
export
|
|
419
|
+
export import FineTuneCreateParams = FineTunesAPI.FineTuneCreateParams;
|
|
420
|
+
export import FineTuneListEventsParams = FineTunesAPI.FineTuneListEventsParams;
|
|
421
|
+
export import FineTuneListEventsParamsNonStreaming = FineTunesAPI.FineTuneListEventsParamsNonStreaming;
|
|
422
|
+
export import FineTuneListEventsParamsStreaming = FineTunesAPI.FineTuneListEventsParamsStreaming;
|
|
423
423
|
}
|
|
@@ -9,11 +9,11 @@ export class FineTuning extends APIResource {
|
|
|
9
9
|
|
|
10
10
|
export namespace FineTuning {
|
|
11
11
|
export import Jobs = JobsAPI.Jobs;
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export import FineTuningJob = JobsAPI.FineTuningJob;
|
|
13
|
+
export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent;
|
|
14
14
|
export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage;
|
|
15
15
|
export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage;
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
16
|
+
export import JobCreateParams = JobsAPI.JobCreateParams;
|
|
17
|
+
export import JobListParams = JobsAPI.JobListParams;
|
|
18
|
+
export import JobListEventsParams = JobsAPI.JobListEventsParams;
|
|
19
19
|
}
|
|
@@ -296,11 +296,11 @@ export interface JobListParams extends CursorPageParams {}
|
|
|
296
296
|
export interface JobListEventsParams extends CursorPageParams {}
|
|
297
297
|
|
|
298
298
|
export namespace Jobs {
|
|
299
|
-
export
|
|
300
|
-
export
|
|
299
|
+
export import FineTuningJob = JobsAPI.FineTuningJob;
|
|
300
|
+
export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent;
|
|
301
301
|
export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage;
|
|
302
302
|
export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage;
|
|
303
|
-
export
|
|
304
|
-
export
|
|
305
|
-
export
|
|
303
|
+
export import JobCreateParams = JobsAPI.JobCreateParams;
|
|
304
|
+
export import JobListParams = JobsAPI.JobListParams;
|
|
305
|
+
export import JobListEventsParams = JobsAPI.JobListEventsParams;
|
|
306
306
|
}
|
package/src/resources/images.ts
CHANGED
|
@@ -163,9 +163,9 @@ export interface ImageGenerateParams {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
export namespace Images {
|
|
166
|
-
export
|
|
167
|
-
export
|
|
168
|
-
export
|
|
169
|
-
export
|
|
170
|
-
export
|
|
166
|
+
export import Image = ImagesAPI.Image;
|
|
167
|
+
export import ImagesResponse = ImagesAPI.ImagesResponse;
|
|
168
|
+
export import ImageCreateVariationParams = ImagesAPI.ImageCreateVariationParams;
|
|
169
|
+
export import ImageEditParams = ImagesAPI.ImageEditParams;
|
|
170
|
+
export import ImageGenerateParams = ImagesAPI.ImageGenerateParams;
|
|
171
171
|
}
|
package/src/resources/models.ts
CHANGED
|
@@ -70,7 +70,7 @@ export interface ModelDeleted {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export namespace Models {
|
|
73
|
-
export
|
|
74
|
-
export
|
|
73
|
+
export import Model = ModelsAPI.Model;
|
|
74
|
+
export import ModelDeleted = ModelsAPI.ModelDeleted;
|
|
75
75
|
export import ModelsPage = ModelsAPI.ModelsPage;
|
|
76
76
|
}
|
|
@@ -210,7 +210,7 @@ export interface ModerationCreateParams {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
export namespace Moderations {
|
|
213
|
-
export
|
|
214
|
-
export
|
|
215
|
-
export
|
|
213
|
+
export import Moderation = ModerationsAPI.Moderation;
|
|
214
|
+
export import ModerationCreateResponse = ModerationsAPI.ModerationCreateResponse;
|
|
215
|
+
export import ModerationCreateParams = ModerationsAPI.ModerationCreateParams;
|
|
216
216
|
}
|
package/src/shims/node.ts
CHANGED
package/src/shims/web.ts
CHANGED