openai 2.0.5 → 3.0.1
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/.openapi-generator/VERSION +1 -1
- package/README.md +13 -3
- package/api.ts +728 -380
- package/base.ts +1 -1
- package/common.ts +23 -13
- package/configuration.ts +1 -1
- package/dist/api.d.ts +606 -319
- package/dist/api.js +248 -130
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +20 -14
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* OpenAI API
|
|
3
3
|
* APIs for sampling from and fine-tuning language models
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.
|
|
5
|
+
* The version of the OpenAPI document: 1.0.6
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -19,7 +19,7 @@ import { RequestArgs, BaseAPI } from './base';
|
|
|
19
19
|
*/
|
|
20
20
|
export interface CreateAnswerRequest {
|
|
21
21
|
/**
|
|
22
|
-
* ID of the
|
|
22
|
+
* ID of the model to use for completion. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
23
23
|
* @type {string}
|
|
24
24
|
* @memberof CreateAnswerRequest
|
|
25
25
|
*/
|
|
@@ -55,7 +55,7 @@ export interface CreateAnswerRequest {
|
|
|
55
55
|
*/
|
|
56
56
|
'file'?: string | null;
|
|
57
57
|
/**
|
|
58
|
-
* ID of the
|
|
58
|
+
* ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
59
59
|
* @type {string}
|
|
60
60
|
* @memberof CreateAnswerRequest
|
|
61
61
|
*/
|
|
@@ -73,7 +73,7 @@ export interface CreateAnswerRequest {
|
|
|
73
73
|
*/
|
|
74
74
|
'temperature'?: number | null;
|
|
75
75
|
/**
|
|
76
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact
|
|
76
|
+
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs.
|
|
77
77
|
* @type {number}
|
|
78
78
|
* @memberof CreateAnswerRequest
|
|
79
79
|
*/
|
|
@@ -85,11 +85,11 @@ export interface CreateAnswerRequest {
|
|
|
85
85
|
*/
|
|
86
86
|
'max_tokens'?: number | null;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
89
|
-
* @type {
|
|
88
|
+
*
|
|
89
|
+
* @type {CreateAnswerRequestStop}
|
|
90
90
|
* @memberof CreateAnswerRequest
|
|
91
91
|
*/
|
|
92
|
-
'stop'?:
|
|
92
|
+
'stop'?: CreateAnswerRequestStop | null;
|
|
93
93
|
/**
|
|
94
94
|
* How many answers to generate for each question.
|
|
95
95
|
* @type {number}
|
|
@@ -127,6 +127,12 @@ export interface CreateAnswerRequest {
|
|
|
127
127
|
*/
|
|
128
128
|
'user'?: string;
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @type CreateAnswerRequestStop
|
|
132
|
+
* Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
|
|
133
|
+
* @export
|
|
134
|
+
*/
|
|
135
|
+
export declare type CreateAnswerRequestStop = Array<string> | string;
|
|
130
136
|
/**
|
|
131
137
|
*
|
|
132
138
|
* @export
|
|
@@ -165,27 +171,27 @@ export interface CreateAnswerResponse {
|
|
|
165
171
|
'answers'?: Array<string>;
|
|
166
172
|
/**
|
|
167
173
|
*
|
|
168
|
-
* @type {Array<
|
|
174
|
+
* @type {Array<CreateAnswerResponseSelectedDocumentsInner>}
|
|
169
175
|
* @memberof CreateAnswerResponse
|
|
170
176
|
*/
|
|
171
|
-
'selected_documents'?: Array<
|
|
177
|
+
'selected_documents'?: Array<CreateAnswerResponseSelectedDocumentsInner>;
|
|
172
178
|
}
|
|
173
179
|
/**
|
|
174
180
|
*
|
|
175
181
|
* @export
|
|
176
|
-
* @interface
|
|
182
|
+
* @interface CreateAnswerResponseSelectedDocumentsInner
|
|
177
183
|
*/
|
|
178
|
-
export interface
|
|
184
|
+
export interface CreateAnswerResponseSelectedDocumentsInner {
|
|
179
185
|
/**
|
|
180
186
|
*
|
|
181
187
|
* @type {number}
|
|
182
|
-
* @memberof
|
|
188
|
+
* @memberof CreateAnswerResponseSelectedDocumentsInner
|
|
183
189
|
*/
|
|
184
190
|
'document'?: number;
|
|
185
191
|
/**
|
|
186
192
|
*
|
|
187
193
|
* @type {string}
|
|
188
|
-
* @memberof
|
|
194
|
+
* @memberof CreateAnswerResponseSelectedDocumentsInner
|
|
189
195
|
*/
|
|
190
196
|
'text'?: string;
|
|
191
197
|
}
|
|
@@ -196,7 +202,7 @@ export interface CreateAnswerResponseSelectedDocuments {
|
|
|
196
202
|
*/
|
|
197
203
|
export interface CreateClassificationRequest {
|
|
198
204
|
/**
|
|
199
|
-
* ID of the
|
|
205
|
+
* ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
|
|
200
206
|
* @type {string}
|
|
201
207
|
* @memberof CreateClassificationRequest
|
|
202
208
|
*/
|
|
@@ -226,7 +232,7 @@ export interface CreateClassificationRequest {
|
|
|
226
232
|
*/
|
|
227
233
|
'labels'?: Array<string> | null;
|
|
228
234
|
/**
|
|
229
|
-
* ID of the
|
|
235
|
+
* ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
230
236
|
* @type {string}
|
|
231
237
|
* @memberof CreateClassificationRequest
|
|
232
238
|
*/
|
|
@@ -238,7 +244,7 @@ export interface CreateClassificationRequest {
|
|
|
238
244
|
*/
|
|
239
245
|
'temperature'?: number | null;
|
|
240
246
|
/**
|
|
241
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact
|
|
247
|
+
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs.
|
|
242
248
|
* @type {number}
|
|
243
249
|
* @memberof CreateClassificationRequest
|
|
244
250
|
*/
|
|
@@ -318,170 +324,60 @@ export interface CreateClassificationResponse {
|
|
|
318
324
|
'label'?: string;
|
|
319
325
|
/**
|
|
320
326
|
*
|
|
321
|
-
* @type {Array<
|
|
327
|
+
* @type {Array<CreateClassificationResponseSelectedExamplesInner>}
|
|
322
328
|
* @memberof CreateClassificationResponse
|
|
323
329
|
*/
|
|
324
|
-
'selected_examples'?: Array<
|
|
330
|
+
'selected_examples'?: Array<CreateClassificationResponseSelectedExamplesInner>;
|
|
325
331
|
}
|
|
326
332
|
/**
|
|
327
333
|
*
|
|
328
334
|
* @export
|
|
329
|
-
* @interface
|
|
335
|
+
* @interface CreateClassificationResponseSelectedExamplesInner
|
|
330
336
|
*/
|
|
331
|
-
export interface
|
|
337
|
+
export interface CreateClassificationResponseSelectedExamplesInner {
|
|
332
338
|
/**
|
|
333
339
|
*
|
|
334
340
|
* @type {number}
|
|
335
|
-
* @memberof
|
|
341
|
+
* @memberof CreateClassificationResponseSelectedExamplesInner
|
|
336
342
|
*/
|
|
337
343
|
'document'?: number;
|
|
338
344
|
/**
|
|
339
345
|
*
|
|
340
346
|
* @type {string}
|
|
341
|
-
* @memberof
|
|
347
|
+
* @memberof CreateClassificationResponseSelectedExamplesInner
|
|
342
348
|
*/
|
|
343
349
|
'text'?: string;
|
|
344
350
|
/**
|
|
345
351
|
*
|
|
346
352
|
* @type {string}
|
|
347
|
-
* @memberof
|
|
353
|
+
* @memberof CreateClassificationResponseSelectedExamplesInner
|
|
348
354
|
*/
|
|
349
355
|
'label'?: string;
|
|
350
356
|
}
|
|
351
357
|
/**
|
|
352
358
|
*
|
|
353
359
|
* @export
|
|
354
|
-
* @interface
|
|
355
|
-
*/
|
|
356
|
-
export interface CreateCompletionFromModelRequest {
|
|
357
|
-
/**
|
|
358
|
-
* The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
|
|
359
|
-
* @type {string | Array<string> | Array<number> | Array<any>}
|
|
360
|
-
* @memberof CreateCompletionFromModelRequest
|
|
361
|
-
*/
|
|
362
|
-
'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
|
|
363
|
-
/**
|
|
364
|
-
* The suffix that comes after a completion of inserted text, encoded as a string or array of strings.
|
|
365
|
-
* @type {string | Array<string>}
|
|
366
|
-
* @memberof CreateCompletionFromModelRequest
|
|
367
|
-
*/
|
|
368
|
-
'suffix'?: string | Array<string> | null;
|
|
369
|
-
/**
|
|
370
|
-
* The maximum number of [tokens](/tokenizer) to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model\'s context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).
|
|
371
|
-
* @type {number}
|
|
372
|
-
* @memberof CreateCompletionFromModelRequest
|
|
373
|
-
*/
|
|
374
|
-
'max_tokens'?: number | null;
|
|
375
|
-
/**
|
|
376
|
-
* What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or `top_p` but not both.
|
|
377
|
-
* @type {number}
|
|
378
|
-
* @memberof CreateCompletionFromModelRequest
|
|
379
|
-
*/
|
|
380
|
-
'temperature'?: number | null;
|
|
381
|
-
/**
|
|
382
|
-
* An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
|
|
383
|
-
* @type {number}
|
|
384
|
-
* @memberof CreateCompletionFromModelRequest
|
|
385
|
-
*/
|
|
386
|
-
'top_p'?: number | null;
|
|
387
|
-
/**
|
|
388
|
-
* How many completions to generate for each prompt. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
|
|
389
|
-
* @type {number}
|
|
390
|
-
* @memberof CreateCompletionFromModelRequest
|
|
391
|
-
*/
|
|
392
|
-
'n'?: number | null;
|
|
393
|
-
/**
|
|
394
|
-
* Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message.
|
|
395
|
-
* @type {boolean}
|
|
396
|
-
* @memberof CreateCompletionFromModelRequest
|
|
397
|
-
*/
|
|
398
|
-
'stream'?: boolean | null;
|
|
399
|
-
/**
|
|
400
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact support@openai.com and describe your use case.
|
|
401
|
-
* @type {number}
|
|
402
|
-
* @memberof CreateCompletionFromModelRequest
|
|
403
|
-
*/
|
|
404
|
-
'logprobs'?: number | null;
|
|
405
|
-
/**
|
|
406
|
-
* Echo back the prompt in addition to the completion
|
|
407
|
-
* @type {boolean}
|
|
408
|
-
* @memberof CreateCompletionFromModelRequest
|
|
409
|
-
*/
|
|
410
|
-
'echo'?: boolean | null;
|
|
411
|
-
/**
|
|
412
|
-
* Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
|
|
413
|
-
* @type {string | Array<string>}
|
|
414
|
-
* @memberof CreateCompletionFromModelRequest
|
|
415
|
-
*/
|
|
416
|
-
'stop'?: string | Array<string> | null;
|
|
417
|
-
/**
|
|
418
|
-
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model\'s likelihood to talk about new topics. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
|
|
419
|
-
* @type {number}
|
|
420
|
-
* @memberof CreateCompletionFromModelRequest
|
|
421
|
-
*/
|
|
422
|
-
'presence_penalty'?: number | null;
|
|
423
|
-
/**
|
|
424
|
-
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model\'s likelihood to repeat the same line verbatim. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
|
|
425
|
-
* @type {number}
|
|
426
|
-
* @memberof CreateCompletionFromModelRequest
|
|
427
|
-
*/
|
|
428
|
-
'frequency_penalty'?: number | null;
|
|
429
|
-
/**
|
|
430
|
-
* Generates `best_of` completions server-side and returns the \"best\" (the one with the lowest log probability per token). Results cannot be streamed. When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
|
|
431
|
-
* @type {number}
|
|
432
|
-
* @memberof CreateCompletionFromModelRequest
|
|
433
|
-
*/
|
|
434
|
-
'best_of'?: number | null;
|
|
435
|
-
/**
|
|
436
|
-
* Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.
|
|
437
|
-
* @type {object}
|
|
438
|
-
* @memberof CreateCompletionFromModelRequest
|
|
439
|
-
*/
|
|
440
|
-
'logit_bias'?: object | null;
|
|
441
|
-
/**
|
|
442
|
-
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
443
|
-
* @type {string}
|
|
444
|
-
* @memberof CreateCompletionFromModelRequest
|
|
445
|
-
*/
|
|
446
|
-
'user'?: string;
|
|
447
|
-
/**
|
|
448
|
-
* ID of the model to use for completion.
|
|
449
|
-
* @type {string}
|
|
450
|
-
* @memberof CreateCompletionFromModelRequest
|
|
451
|
-
*/
|
|
452
|
-
'model'?: string;
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
*
|
|
456
|
-
* @export
|
|
457
|
-
* @interface CreateCompletionFromModelRequestAllOf
|
|
360
|
+
* @interface CreateCompletionRequest
|
|
458
361
|
*/
|
|
459
|
-
export interface
|
|
362
|
+
export interface CreateCompletionRequest {
|
|
460
363
|
/**
|
|
461
|
-
* ID of the model to use for
|
|
364
|
+
* ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
|
|
462
365
|
* @type {string}
|
|
463
|
-
* @memberof
|
|
366
|
+
* @memberof CreateCompletionRequest
|
|
464
367
|
*/
|
|
465
|
-
'model'
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
*
|
|
469
|
-
* @export
|
|
470
|
-
* @interface CreateCompletionRequest
|
|
471
|
-
*/
|
|
472
|
-
export interface CreateCompletionRequest {
|
|
368
|
+
'model': string;
|
|
473
369
|
/**
|
|
474
|
-
*
|
|
475
|
-
* @type {
|
|
370
|
+
*
|
|
371
|
+
* @type {CreateCompletionRequestPrompt}
|
|
476
372
|
* @memberof CreateCompletionRequest
|
|
477
373
|
*/
|
|
478
|
-
'prompt'?:
|
|
374
|
+
'prompt'?: CreateCompletionRequestPrompt | null;
|
|
479
375
|
/**
|
|
480
|
-
* The suffix that comes after a completion of inserted text
|
|
481
|
-
* @type {string
|
|
376
|
+
* The suffix that comes after a completion of inserted text.
|
|
377
|
+
* @type {string}
|
|
482
378
|
* @memberof CreateCompletionRequest
|
|
483
379
|
*/
|
|
484
|
-
'suffix'?: string |
|
|
380
|
+
'suffix'?: string | null;
|
|
485
381
|
/**
|
|
486
382
|
* The maximum number of [tokens](/tokenizer) to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model\'s context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).
|
|
487
383
|
* @type {number}
|
|
@@ -513,7 +409,7 @@ export interface CreateCompletionRequest {
|
|
|
513
409
|
*/
|
|
514
410
|
'stream'?: boolean | null;
|
|
515
411
|
/**
|
|
516
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact
|
|
412
|
+
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case.
|
|
517
413
|
* @type {number}
|
|
518
414
|
* @memberof CreateCompletionRequest
|
|
519
415
|
*/
|
|
@@ -525,11 +421,11 @@ export interface CreateCompletionRequest {
|
|
|
525
421
|
*/
|
|
526
422
|
'echo'?: boolean | null;
|
|
527
423
|
/**
|
|
528
|
-
*
|
|
529
|
-
* @type {
|
|
424
|
+
*
|
|
425
|
+
* @type {CreateCompletionRequestStop}
|
|
530
426
|
* @memberof CreateCompletionRequest
|
|
531
427
|
*/
|
|
532
|
-
'stop'?:
|
|
428
|
+
'stop'?: CreateCompletionRequestStop | null;
|
|
533
429
|
/**
|
|
534
430
|
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model\'s likelihood to talk about new topics. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
|
|
535
431
|
* @type {number}
|
|
@@ -543,7 +439,7 @@ export interface CreateCompletionRequest {
|
|
|
543
439
|
*/
|
|
544
440
|
'frequency_penalty'?: number | null;
|
|
545
441
|
/**
|
|
546
|
-
* Generates `best_of` completions server-side and returns the \"best\" (the one with the
|
|
442
|
+
* Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed. When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
|
|
547
443
|
* @type {number}
|
|
548
444
|
* @memberof CreateCompletionRequest
|
|
549
445
|
*/
|
|
@@ -561,6 +457,18 @@ export interface CreateCompletionRequest {
|
|
|
561
457
|
*/
|
|
562
458
|
'user'?: string;
|
|
563
459
|
}
|
|
460
|
+
/**
|
|
461
|
+
* @type CreateCompletionRequestPrompt
|
|
462
|
+
* The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
|
|
463
|
+
* @export
|
|
464
|
+
*/
|
|
465
|
+
export declare type CreateCompletionRequestPrompt = Array<any> | Array<number> | Array<string> | string;
|
|
466
|
+
/**
|
|
467
|
+
* @type CreateCompletionRequestStop
|
|
468
|
+
* Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
|
|
469
|
+
* @export
|
|
470
|
+
*/
|
|
471
|
+
export declare type CreateCompletionRequestStop = Array<string> | string;
|
|
564
472
|
/**
|
|
565
473
|
*
|
|
566
474
|
* @export
|
|
@@ -572,100 +480,137 @@ export interface CreateCompletionResponse {
|
|
|
572
480
|
* @type {string}
|
|
573
481
|
* @memberof CreateCompletionResponse
|
|
574
482
|
*/
|
|
575
|
-
'id'
|
|
483
|
+
'id': string;
|
|
576
484
|
/**
|
|
577
485
|
*
|
|
578
486
|
* @type {string}
|
|
579
487
|
* @memberof CreateCompletionResponse
|
|
580
488
|
*/
|
|
581
|
-
'object'
|
|
489
|
+
'object': string;
|
|
582
490
|
/**
|
|
583
491
|
*
|
|
584
492
|
* @type {number}
|
|
585
493
|
* @memberof CreateCompletionResponse
|
|
586
494
|
*/
|
|
587
|
-
'created'
|
|
495
|
+
'created': number;
|
|
588
496
|
/**
|
|
589
497
|
*
|
|
590
498
|
* @type {string}
|
|
591
499
|
* @memberof CreateCompletionResponse
|
|
592
500
|
*/
|
|
593
|
-
'model'
|
|
501
|
+
'model': string;
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @type {Array<CreateCompletionResponseChoicesInner>}
|
|
505
|
+
* @memberof CreateCompletionResponse
|
|
506
|
+
*/
|
|
507
|
+
'choices': Array<CreateCompletionResponseChoicesInner>;
|
|
594
508
|
/**
|
|
595
509
|
*
|
|
596
|
-
* @type {
|
|
510
|
+
* @type {CreateCompletionResponseUsage}
|
|
597
511
|
* @memberof CreateCompletionResponse
|
|
598
512
|
*/
|
|
599
|
-
'
|
|
513
|
+
'usage'?: CreateCompletionResponseUsage;
|
|
600
514
|
}
|
|
601
515
|
/**
|
|
602
516
|
*
|
|
603
517
|
* @export
|
|
604
|
-
* @interface
|
|
518
|
+
* @interface CreateCompletionResponseChoicesInner
|
|
605
519
|
*/
|
|
606
|
-
export interface
|
|
520
|
+
export interface CreateCompletionResponseChoicesInner {
|
|
607
521
|
/**
|
|
608
522
|
*
|
|
609
523
|
* @type {string}
|
|
610
|
-
* @memberof
|
|
524
|
+
* @memberof CreateCompletionResponseChoicesInner
|
|
611
525
|
*/
|
|
612
526
|
'text'?: string;
|
|
613
527
|
/**
|
|
614
528
|
*
|
|
615
529
|
* @type {number}
|
|
616
|
-
* @memberof
|
|
530
|
+
* @memberof CreateCompletionResponseChoicesInner
|
|
617
531
|
*/
|
|
618
532
|
'index'?: number;
|
|
619
533
|
/**
|
|
620
534
|
*
|
|
621
|
-
* @type {
|
|
622
|
-
* @memberof
|
|
535
|
+
* @type {CreateCompletionResponseChoicesInnerLogprobs}
|
|
536
|
+
* @memberof CreateCompletionResponseChoicesInner
|
|
623
537
|
*/
|
|
624
|
-
'logprobs'?:
|
|
538
|
+
'logprobs'?: CreateCompletionResponseChoicesInnerLogprobs | null;
|
|
625
539
|
/**
|
|
626
540
|
*
|
|
627
541
|
* @type {string}
|
|
628
|
-
* @memberof
|
|
542
|
+
* @memberof CreateCompletionResponseChoicesInner
|
|
629
543
|
*/
|
|
630
544
|
'finish_reason'?: string;
|
|
631
545
|
}
|
|
632
546
|
/**
|
|
633
547
|
*
|
|
634
548
|
* @export
|
|
635
|
-
* @interface
|
|
549
|
+
* @interface CreateCompletionResponseChoicesInnerLogprobs
|
|
636
550
|
*/
|
|
637
|
-
export interface
|
|
551
|
+
export interface CreateCompletionResponseChoicesInnerLogprobs {
|
|
638
552
|
/**
|
|
639
553
|
*
|
|
640
554
|
* @type {Array<string>}
|
|
641
|
-
* @memberof
|
|
555
|
+
* @memberof CreateCompletionResponseChoicesInnerLogprobs
|
|
642
556
|
*/
|
|
643
557
|
'tokens'?: Array<string>;
|
|
644
558
|
/**
|
|
645
559
|
*
|
|
646
560
|
* @type {Array<number>}
|
|
647
|
-
* @memberof
|
|
561
|
+
* @memberof CreateCompletionResponseChoicesInnerLogprobs
|
|
648
562
|
*/
|
|
649
563
|
'token_logprobs'?: Array<number>;
|
|
650
564
|
/**
|
|
651
565
|
*
|
|
652
566
|
* @type {Array<object>}
|
|
653
|
-
* @memberof
|
|
567
|
+
* @memberof CreateCompletionResponseChoicesInnerLogprobs
|
|
654
568
|
*/
|
|
655
569
|
'top_logprobs'?: Array<object>;
|
|
656
570
|
/**
|
|
657
571
|
*
|
|
658
572
|
* @type {Array<number>}
|
|
659
|
-
* @memberof
|
|
573
|
+
* @memberof CreateCompletionResponseChoicesInnerLogprobs
|
|
660
574
|
*/
|
|
661
575
|
'text_offset'?: Array<number>;
|
|
662
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
*
|
|
579
|
+
* @export
|
|
580
|
+
* @interface CreateCompletionResponseUsage
|
|
581
|
+
*/
|
|
582
|
+
export interface CreateCompletionResponseUsage {
|
|
583
|
+
/**
|
|
584
|
+
*
|
|
585
|
+
* @type {number}
|
|
586
|
+
* @memberof CreateCompletionResponseUsage
|
|
587
|
+
*/
|
|
588
|
+
'prompt_tokens': number;
|
|
589
|
+
/**
|
|
590
|
+
*
|
|
591
|
+
* @type {number}
|
|
592
|
+
* @memberof CreateCompletionResponseUsage
|
|
593
|
+
*/
|
|
594
|
+
'completion_tokens': number;
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @type {number}
|
|
598
|
+
* @memberof CreateCompletionResponseUsage
|
|
599
|
+
*/
|
|
600
|
+
'total_tokens': number;
|
|
601
|
+
}
|
|
663
602
|
/**
|
|
664
603
|
*
|
|
665
604
|
* @export
|
|
666
605
|
* @interface CreateEditRequest
|
|
667
606
|
*/
|
|
668
607
|
export interface CreateEditRequest {
|
|
608
|
+
/**
|
|
609
|
+
* ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
|
|
610
|
+
* @type {string}
|
|
611
|
+
* @memberof CreateEditRequest
|
|
612
|
+
*/
|
|
613
|
+
'model': string;
|
|
669
614
|
/**
|
|
670
615
|
* The input text to use as a starting point for the edit.
|
|
671
616
|
* @type {string}
|
|
@@ -678,6 +623,12 @@ export interface CreateEditRequest {
|
|
|
678
623
|
* @memberof CreateEditRequest
|
|
679
624
|
*/
|
|
680
625
|
'instruction': string;
|
|
626
|
+
/**
|
|
627
|
+
* How many edits to generate for the input and instruction.
|
|
628
|
+
* @type {number}
|
|
629
|
+
* @memberof CreateEditRequest
|
|
630
|
+
*/
|
|
631
|
+
'n'?: number | null;
|
|
681
632
|
/**
|
|
682
633
|
* What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or `top_p` but not both.
|
|
683
634
|
* @type {number}
|
|
@@ -702,31 +653,37 @@ export interface CreateEditResponse {
|
|
|
702
653
|
* @type {string}
|
|
703
654
|
* @memberof CreateEditResponse
|
|
704
655
|
*/
|
|
705
|
-
'id'
|
|
656
|
+
'id': string;
|
|
706
657
|
/**
|
|
707
658
|
*
|
|
708
659
|
* @type {string}
|
|
709
660
|
* @memberof CreateEditResponse
|
|
710
661
|
*/
|
|
711
|
-
'object'
|
|
662
|
+
'object': string;
|
|
712
663
|
/**
|
|
713
664
|
*
|
|
714
665
|
* @type {number}
|
|
715
666
|
* @memberof CreateEditResponse
|
|
716
667
|
*/
|
|
717
|
-
'created'
|
|
668
|
+
'created': number;
|
|
718
669
|
/**
|
|
719
670
|
*
|
|
720
671
|
* @type {string}
|
|
721
672
|
* @memberof CreateEditResponse
|
|
722
673
|
*/
|
|
723
|
-
'model'
|
|
674
|
+
'model': string;
|
|
724
675
|
/**
|
|
725
676
|
*
|
|
726
|
-
* @type {Array<
|
|
677
|
+
* @type {Array<CreateCompletionResponseChoicesInner>}
|
|
727
678
|
* @memberof CreateEditResponse
|
|
728
679
|
*/
|
|
729
|
-
'choices'
|
|
680
|
+
'choices': Array<CreateCompletionResponseChoicesInner>;
|
|
681
|
+
/**
|
|
682
|
+
*
|
|
683
|
+
* @type {CreateCompletionResponseUsage}
|
|
684
|
+
* @memberof CreateEditResponse
|
|
685
|
+
*/
|
|
686
|
+
'usage': CreateCompletionResponseUsage;
|
|
730
687
|
}
|
|
731
688
|
/**
|
|
732
689
|
*
|
|
@@ -735,11 +692,17 @@ export interface CreateEditResponse {
|
|
|
735
692
|
*/
|
|
736
693
|
export interface CreateEmbeddingRequest {
|
|
737
694
|
/**
|
|
738
|
-
*
|
|
739
|
-
* @type {string
|
|
695
|
+
* ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
|
|
696
|
+
* @type {string}
|
|
740
697
|
* @memberof CreateEmbeddingRequest
|
|
741
698
|
*/
|
|
742
|
-
'
|
|
699
|
+
'model': string;
|
|
700
|
+
/**
|
|
701
|
+
*
|
|
702
|
+
* @type {CreateEmbeddingRequestInput}
|
|
703
|
+
* @memberof CreateEmbeddingRequest
|
|
704
|
+
*/
|
|
705
|
+
'input': CreateEmbeddingRequestInput;
|
|
743
706
|
/**
|
|
744
707
|
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
745
708
|
* @type {string}
|
|
@@ -747,6 +710,12 @@ export interface CreateEmbeddingRequest {
|
|
|
747
710
|
*/
|
|
748
711
|
'user'?: string;
|
|
749
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* @type CreateEmbeddingRequestInput
|
|
715
|
+
* Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 2048 tokens in length. Unless you are embedding code, we suggest replacing newlines (`\\n`) in your input with a single space, as we have observed inferior results when newlines are present.
|
|
716
|
+
* @export
|
|
717
|
+
*/
|
|
718
|
+
export declare type CreateEmbeddingRequestInput = Array<any> | Array<number> | Array<string> | string;
|
|
750
719
|
/**
|
|
751
720
|
*
|
|
752
721
|
* @export
|
|
@@ -758,44 +727,69 @@ export interface CreateEmbeddingResponse {
|
|
|
758
727
|
* @type {string}
|
|
759
728
|
* @memberof CreateEmbeddingResponse
|
|
760
729
|
*/
|
|
761
|
-
'object'
|
|
730
|
+
'object': string;
|
|
762
731
|
/**
|
|
763
732
|
*
|
|
764
733
|
* @type {string}
|
|
765
734
|
* @memberof CreateEmbeddingResponse
|
|
766
735
|
*/
|
|
767
|
-
'model'
|
|
736
|
+
'model': string;
|
|
768
737
|
/**
|
|
769
738
|
*
|
|
770
|
-
* @type {Array<
|
|
739
|
+
* @type {Array<CreateEmbeddingResponseDataInner>}
|
|
771
740
|
* @memberof CreateEmbeddingResponse
|
|
772
741
|
*/
|
|
773
|
-
'data'
|
|
742
|
+
'data': Array<CreateEmbeddingResponseDataInner>;
|
|
743
|
+
/**
|
|
744
|
+
*
|
|
745
|
+
* @type {CreateEmbeddingResponseUsage}
|
|
746
|
+
* @memberof CreateEmbeddingResponse
|
|
747
|
+
*/
|
|
748
|
+
'usage': CreateEmbeddingResponseUsage;
|
|
774
749
|
}
|
|
775
750
|
/**
|
|
776
751
|
*
|
|
777
752
|
* @export
|
|
778
|
-
* @interface
|
|
753
|
+
* @interface CreateEmbeddingResponseDataInner
|
|
779
754
|
*/
|
|
780
|
-
export interface
|
|
755
|
+
export interface CreateEmbeddingResponseDataInner {
|
|
781
756
|
/**
|
|
782
757
|
*
|
|
783
758
|
* @type {number}
|
|
784
|
-
* @memberof
|
|
759
|
+
* @memberof CreateEmbeddingResponseDataInner
|
|
785
760
|
*/
|
|
786
|
-
'index'
|
|
761
|
+
'index': number;
|
|
787
762
|
/**
|
|
788
763
|
*
|
|
789
764
|
* @type {string}
|
|
790
|
-
* @memberof
|
|
765
|
+
* @memberof CreateEmbeddingResponseDataInner
|
|
791
766
|
*/
|
|
792
|
-
'object'
|
|
767
|
+
'object': string;
|
|
793
768
|
/**
|
|
794
769
|
*
|
|
795
770
|
* @type {Array<number>}
|
|
796
|
-
* @memberof
|
|
771
|
+
* @memberof CreateEmbeddingResponseDataInner
|
|
772
|
+
*/
|
|
773
|
+
'embedding': Array<number>;
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
*
|
|
777
|
+
* @export
|
|
778
|
+
* @interface CreateEmbeddingResponseUsage
|
|
779
|
+
*/
|
|
780
|
+
export interface CreateEmbeddingResponseUsage {
|
|
781
|
+
/**
|
|
782
|
+
*
|
|
783
|
+
* @type {number}
|
|
784
|
+
* @memberof CreateEmbeddingResponseUsage
|
|
797
785
|
*/
|
|
798
|
-
'
|
|
786
|
+
'prompt_tokens': number;
|
|
787
|
+
/**
|
|
788
|
+
*
|
|
789
|
+
* @type {number}
|
|
790
|
+
* @memberof CreateEmbeddingResponseUsage
|
|
791
|
+
*/
|
|
792
|
+
'total_tokens': number;
|
|
799
793
|
}
|
|
800
794
|
/**
|
|
801
795
|
*
|
|
@@ -816,7 +810,7 @@ export interface CreateFineTuneRequest {
|
|
|
816
810
|
*/
|
|
817
811
|
'validation_file'?: string | null;
|
|
818
812
|
/**
|
|
819
|
-
* The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\",
|
|
813
|
+
* The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\", \"davinci\", or a fine-tuned model created after 2022-04-21. To learn more about these models, see the [Models](https://beta.openai.com/docs/models) documentation.
|
|
820
814
|
* @type {string}
|
|
821
815
|
* @memberof CreateFineTuneRequest
|
|
822
816
|
*/
|
|
@@ -876,6 +870,179 @@ export interface CreateFineTuneRequest {
|
|
|
876
870
|
*/
|
|
877
871
|
'suffix'?: string | null;
|
|
878
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
*
|
|
875
|
+
* @export
|
|
876
|
+
* @interface CreateModerationRequest
|
|
877
|
+
*/
|
|
878
|
+
export interface CreateModerationRequest {
|
|
879
|
+
/**
|
|
880
|
+
*
|
|
881
|
+
* @type {CreateModerationRequestInput}
|
|
882
|
+
* @memberof CreateModerationRequest
|
|
883
|
+
*/
|
|
884
|
+
'input': CreateModerationRequestInput;
|
|
885
|
+
/**
|
|
886
|
+
* Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.
|
|
887
|
+
* @type {string}
|
|
888
|
+
* @memberof CreateModerationRequest
|
|
889
|
+
*/
|
|
890
|
+
'model'?: string;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* @type CreateModerationRequestInput
|
|
894
|
+
* The input text to classify
|
|
895
|
+
* @export
|
|
896
|
+
*/
|
|
897
|
+
export declare type CreateModerationRequestInput = Array<string> | string;
|
|
898
|
+
/**
|
|
899
|
+
*
|
|
900
|
+
* @export
|
|
901
|
+
* @interface CreateModerationResponse
|
|
902
|
+
*/
|
|
903
|
+
export interface CreateModerationResponse {
|
|
904
|
+
/**
|
|
905
|
+
*
|
|
906
|
+
* @type {string}
|
|
907
|
+
* @memberof CreateModerationResponse
|
|
908
|
+
*/
|
|
909
|
+
'id': string;
|
|
910
|
+
/**
|
|
911
|
+
*
|
|
912
|
+
* @type {string}
|
|
913
|
+
* @memberof CreateModerationResponse
|
|
914
|
+
*/
|
|
915
|
+
'model': string;
|
|
916
|
+
/**
|
|
917
|
+
*
|
|
918
|
+
* @type {Array<CreateModerationResponseResultsInner>}
|
|
919
|
+
* @memberof CreateModerationResponse
|
|
920
|
+
*/
|
|
921
|
+
'results': Array<CreateModerationResponseResultsInner>;
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
*
|
|
925
|
+
* @export
|
|
926
|
+
* @interface CreateModerationResponseResultsInner
|
|
927
|
+
*/
|
|
928
|
+
export interface CreateModerationResponseResultsInner {
|
|
929
|
+
/**
|
|
930
|
+
*
|
|
931
|
+
* @type {boolean}
|
|
932
|
+
* @memberof CreateModerationResponseResultsInner
|
|
933
|
+
*/
|
|
934
|
+
'flagged': boolean;
|
|
935
|
+
/**
|
|
936
|
+
*
|
|
937
|
+
* @type {CreateModerationResponseResultsInnerCategories}
|
|
938
|
+
* @memberof CreateModerationResponseResultsInner
|
|
939
|
+
*/
|
|
940
|
+
'categories': CreateModerationResponseResultsInnerCategories;
|
|
941
|
+
/**
|
|
942
|
+
*
|
|
943
|
+
* @type {CreateModerationResponseResultsInnerCategoryScores}
|
|
944
|
+
* @memberof CreateModerationResponseResultsInner
|
|
945
|
+
*/
|
|
946
|
+
'category_scores': CreateModerationResponseResultsInnerCategoryScores;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* @export
|
|
951
|
+
* @interface CreateModerationResponseResultsInnerCategories
|
|
952
|
+
*/
|
|
953
|
+
export interface CreateModerationResponseResultsInnerCategories {
|
|
954
|
+
/**
|
|
955
|
+
*
|
|
956
|
+
* @type {boolean}
|
|
957
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
958
|
+
*/
|
|
959
|
+
'hate': boolean;
|
|
960
|
+
/**
|
|
961
|
+
*
|
|
962
|
+
* @type {boolean}
|
|
963
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
964
|
+
*/
|
|
965
|
+
'hate/threatening': boolean;
|
|
966
|
+
/**
|
|
967
|
+
*
|
|
968
|
+
* @type {boolean}
|
|
969
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
970
|
+
*/
|
|
971
|
+
'self-harm': boolean;
|
|
972
|
+
/**
|
|
973
|
+
*
|
|
974
|
+
* @type {boolean}
|
|
975
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
976
|
+
*/
|
|
977
|
+
'sexual': boolean;
|
|
978
|
+
/**
|
|
979
|
+
*
|
|
980
|
+
* @type {boolean}
|
|
981
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
982
|
+
*/
|
|
983
|
+
'sexual/minors': boolean;
|
|
984
|
+
/**
|
|
985
|
+
*
|
|
986
|
+
* @type {boolean}
|
|
987
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
988
|
+
*/
|
|
989
|
+
'violence': boolean;
|
|
990
|
+
/**
|
|
991
|
+
*
|
|
992
|
+
* @type {boolean}
|
|
993
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
994
|
+
*/
|
|
995
|
+
'violence/graphic': boolean;
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
*
|
|
999
|
+
* @export
|
|
1000
|
+
* @interface CreateModerationResponseResultsInnerCategoryScores
|
|
1001
|
+
*/
|
|
1002
|
+
export interface CreateModerationResponseResultsInnerCategoryScores {
|
|
1003
|
+
/**
|
|
1004
|
+
*
|
|
1005
|
+
* @type {number}
|
|
1006
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1007
|
+
*/
|
|
1008
|
+
'hate': number;
|
|
1009
|
+
/**
|
|
1010
|
+
*
|
|
1011
|
+
* @type {number}
|
|
1012
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1013
|
+
*/
|
|
1014
|
+
'hate/threatening': number;
|
|
1015
|
+
/**
|
|
1016
|
+
*
|
|
1017
|
+
* @type {number}
|
|
1018
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1019
|
+
*/
|
|
1020
|
+
'self-harm': number;
|
|
1021
|
+
/**
|
|
1022
|
+
*
|
|
1023
|
+
* @type {number}
|
|
1024
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1025
|
+
*/
|
|
1026
|
+
'sexual': number;
|
|
1027
|
+
/**
|
|
1028
|
+
*
|
|
1029
|
+
* @type {number}
|
|
1030
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1031
|
+
*/
|
|
1032
|
+
'sexual/minors': number;
|
|
1033
|
+
/**
|
|
1034
|
+
*
|
|
1035
|
+
* @type {number}
|
|
1036
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1037
|
+
*/
|
|
1038
|
+
'violence': number;
|
|
1039
|
+
/**
|
|
1040
|
+
*
|
|
1041
|
+
* @type {number}
|
|
1042
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1043
|
+
*/
|
|
1044
|
+
'violence/graphic': number;
|
|
1045
|
+
}
|
|
879
1046
|
/**
|
|
880
1047
|
*
|
|
881
1048
|
* @export
|
|
@@ -939,33 +1106,33 @@ export interface CreateSearchResponse {
|
|
|
939
1106
|
'model'?: string;
|
|
940
1107
|
/**
|
|
941
1108
|
*
|
|
942
|
-
* @type {Array<
|
|
1109
|
+
* @type {Array<CreateSearchResponseDataInner>}
|
|
943
1110
|
* @memberof CreateSearchResponse
|
|
944
1111
|
*/
|
|
945
|
-
'data'?: Array<
|
|
1112
|
+
'data'?: Array<CreateSearchResponseDataInner>;
|
|
946
1113
|
}
|
|
947
1114
|
/**
|
|
948
1115
|
*
|
|
949
1116
|
* @export
|
|
950
|
-
* @interface
|
|
1117
|
+
* @interface CreateSearchResponseDataInner
|
|
951
1118
|
*/
|
|
952
|
-
export interface
|
|
1119
|
+
export interface CreateSearchResponseDataInner {
|
|
953
1120
|
/**
|
|
954
1121
|
*
|
|
955
1122
|
* @type {string}
|
|
956
|
-
* @memberof
|
|
1123
|
+
* @memberof CreateSearchResponseDataInner
|
|
957
1124
|
*/
|
|
958
1125
|
'object'?: string;
|
|
959
1126
|
/**
|
|
960
1127
|
*
|
|
961
1128
|
* @type {number}
|
|
962
|
-
* @memberof
|
|
1129
|
+
* @memberof CreateSearchResponseDataInner
|
|
963
1130
|
*/
|
|
964
1131
|
'document'?: number;
|
|
965
1132
|
/**
|
|
966
1133
|
*
|
|
967
1134
|
* @type {number}
|
|
968
|
-
* @memberof
|
|
1135
|
+
* @memberof CreateSearchResponseDataInner
|
|
969
1136
|
*/
|
|
970
1137
|
'score'?: number;
|
|
971
1138
|
}
|
|
@@ -980,19 +1147,19 @@ export interface DeleteFileResponse {
|
|
|
980
1147
|
* @type {string}
|
|
981
1148
|
* @memberof DeleteFileResponse
|
|
982
1149
|
*/
|
|
983
|
-
'id'
|
|
1150
|
+
'id': string;
|
|
984
1151
|
/**
|
|
985
1152
|
*
|
|
986
1153
|
* @type {string}
|
|
987
1154
|
* @memberof DeleteFileResponse
|
|
988
1155
|
*/
|
|
989
|
-
'object'
|
|
1156
|
+
'object': string;
|
|
990
1157
|
/**
|
|
991
1158
|
*
|
|
992
1159
|
* @type {boolean}
|
|
993
1160
|
* @memberof DeleteFileResponse
|
|
994
1161
|
*/
|
|
995
|
-
'deleted'
|
|
1162
|
+
'deleted': boolean;
|
|
996
1163
|
}
|
|
997
1164
|
/**
|
|
998
1165
|
*
|
|
@@ -1005,19 +1172,19 @@ export interface DeleteModelResponse {
|
|
|
1005
1172
|
* @type {string}
|
|
1006
1173
|
* @memberof DeleteModelResponse
|
|
1007
1174
|
*/
|
|
1008
|
-
'id'
|
|
1175
|
+
'id': string;
|
|
1009
1176
|
/**
|
|
1010
1177
|
*
|
|
1011
1178
|
* @type {string}
|
|
1012
1179
|
* @memberof DeleteModelResponse
|
|
1013
1180
|
*/
|
|
1014
|
-
'object'
|
|
1181
|
+
'object': string;
|
|
1015
1182
|
/**
|
|
1016
1183
|
*
|
|
1017
1184
|
* @type {boolean}
|
|
1018
1185
|
* @memberof DeleteModelResponse
|
|
1019
1186
|
*/
|
|
1020
|
-
'deleted'
|
|
1187
|
+
'deleted': boolean;
|
|
1021
1188
|
}
|
|
1022
1189
|
/**
|
|
1023
1190
|
*
|
|
@@ -1030,25 +1197,25 @@ export interface Engine {
|
|
|
1030
1197
|
* @type {string}
|
|
1031
1198
|
* @memberof Engine
|
|
1032
1199
|
*/
|
|
1033
|
-
'id'
|
|
1200
|
+
'id': string;
|
|
1034
1201
|
/**
|
|
1035
1202
|
*
|
|
1036
1203
|
* @type {string}
|
|
1037
1204
|
* @memberof Engine
|
|
1038
1205
|
*/
|
|
1039
|
-
'object'
|
|
1206
|
+
'object': string;
|
|
1040
1207
|
/**
|
|
1041
1208
|
*
|
|
1042
1209
|
* @type {number}
|
|
1043
1210
|
* @memberof Engine
|
|
1044
1211
|
*/
|
|
1045
|
-
'created'
|
|
1212
|
+
'created': number | null;
|
|
1046
1213
|
/**
|
|
1047
1214
|
*
|
|
1048
1215
|
* @type {boolean}
|
|
1049
1216
|
* @memberof Engine
|
|
1050
1217
|
*/
|
|
1051
|
-
'ready'
|
|
1218
|
+
'ready': boolean;
|
|
1052
1219
|
}
|
|
1053
1220
|
/**
|
|
1054
1221
|
*
|
|
@@ -1061,73 +1228,73 @@ export interface FineTune {
|
|
|
1061
1228
|
* @type {string}
|
|
1062
1229
|
* @memberof FineTune
|
|
1063
1230
|
*/
|
|
1064
|
-
'id'
|
|
1231
|
+
'id': string;
|
|
1065
1232
|
/**
|
|
1066
1233
|
*
|
|
1067
1234
|
* @type {string}
|
|
1068
1235
|
* @memberof FineTune
|
|
1069
1236
|
*/
|
|
1070
|
-
'object'
|
|
1237
|
+
'object': string;
|
|
1071
1238
|
/**
|
|
1072
1239
|
*
|
|
1073
1240
|
* @type {number}
|
|
1074
1241
|
* @memberof FineTune
|
|
1075
1242
|
*/
|
|
1076
|
-
'created_at'
|
|
1243
|
+
'created_at': number;
|
|
1077
1244
|
/**
|
|
1078
1245
|
*
|
|
1079
1246
|
* @type {number}
|
|
1080
1247
|
* @memberof FineTune
|
|
1081
1248
|
*/
|
|
1082
|
-
'updated_at'
|
|
1249
|
+
'updated_at': number;
|
|
1083
1250
|
/**
|
|
1084
1251
|
*
|
|
1085
1252
|
* @type {string}
|
|
1086
1253
|
* @memberof FineTune
|
|
1087
1254
|
*/
|
|
1088
|
-
'model'
|
|
1255
|
+
'model': string;
|
|
1089
1256
|
/**
|
|
1090
1257
|
*
|
|
1091
1258
|
* @type {string}
|
|
1092
1259
|
* @memberof FineTune
|
|
1093
1260
|
*/
|
|
1094
|
-
'fine_tuned_model'
|
|
1261
|
+
'fine_tuned_model': string | null;
|
|
1095
1262
|
/**
|
|
1096
1263
|
*
|
|
1097
1264
|
* @type {string}
|
|
1098
1265
|
* @memberof FineTune
|
|
1099
1266
|
*/
|
|
1100
|
-
'organization_id'
|
|
1267
|
+
'organization_id': string;
|
|
1101
1268
|
/**
|
|
1102
1269
|
*
|
|
1103
1270
|
* @type {string}
|
|
1104
1271
|
* @memberof FineTune
|
|
1105
1272
|
*/
|
|
1106
|
-
'status'
|
|
1273
|
+
'status': string;
|
|
1107
1274
|
/**
|
|
1108
1275
|
*
|
|
1109
1276
|
* @type {object}
|
|
1110
1277
|
* @memberof FineTune
|
|
1111
1278
|
*/
|
|
1112
|
-
'hyperparams'
|
|
1279
|
+
'hyperparams': object;
|
|
1113
1280
|
/**
|
|
1114
1281
|
*
|
|
1115
1282
|
* @type {Array<OpenAIFile>}
|
|
1116
1283
|
* @memberof FineTune
|
|
1117
1284
|
*/
|
|
1118
|
-
'training_files'
|
|
1285
|
+
'training_files': Array<OpenAIFile>;
|
|
1119
1286
|
/**
|
|
1120
1287
|
*
|
|
1121
1288
|
* @type {Array<OpenAIFile>}
|
|
1122
1289
|
* @memberof FineTune
|
|
1123
1290
|
*/
|
|
1124
|
-
'validation_files'
|
|
1291
|
+
'validation_files': Array<OpenAIFile>;
|
|
1125
1292
|
/**
|
|
1126
1293
|
*
|
|
1127
1294
|
* @type {Array<OpenAIFile>}
|
|
1128
1295
|
* @memberof FineTune
|
|
1129
1296
|
*/
|
|
1130
|
-
'result_files'
|
|
1297
|
+
'result_files': Array<OpenAIFile>;
|
|
1131
1298
|
/**
|
|
1132
1299
|
*
|
|
1133
1300
|
* @type {Array<FineTuneEvent>}
|
|
@@ -1146,25 +1313,25 @@ export interface FineTuneEvent {
|
|
|
1146
1313
|
* @type {string}
|
|
1147
1314
|
* @memberof FineTuneEvent
|
|
1148
1315
|
*/
|
|
1149
|
-
'object'
|
|
1316
|
+
'object': string;
|
|
1150
1317
|
/**
|
|
1151
1318
|
*
|
|
1152
1319
|
* @type {number}
|
|
1153
1320
|
* @memberof FineTuneEvent
|
|
1154
1321
|
*/
|
|
1155
|
-
'created_at'
|
|
1322
|
+
'created_at': number;
|
|
1156
1323
|
/**
|
|
1157
1324
|
*
|
|
1158
1325
|
* @type {string}
|
|
1159
1326
|
* @memberof FineTuneEvent
|
|
1160
1327
|
*/
|
|
1161
|
-
'level'
|
|
1328
|
+
'level': string;
|
|
1162
1329
|
/**
|
|
1163
1330
|
*
|
|
1164
1331
|
* @type {string}
|
|
1165
1332
|
* @memberof FineTuneEvent
|
|
1166
1333
|
*/
|
|
1167
|
-
'message'
|
|
1334
|
+
'message': string;
|
|
1168
1335
|
}
|
|
1169
1336
|
/**
|
|
1170
1337
|
*
|
|
@@ -1177,13 +1344,13 @@ export interface ListEnginesResponse {
|
|
|
1177
1344
|
* @type {string}
|
|
1178
1345
|
* @memberof ListEnginesResponse
|
|
1179
1346
|
*/
|
|
1180
|
-
'object'
|
|
1347
|
+
'object': string;
|
|
1181
1348
|
/**
|
|
1182
1349
|
*
|
|
1183
1350
|
* @type {Array<Engine>}
|
|
1184
1351
|
* @memberof ListEnginesResponse
|
|
1185
1352
|
*/
|
|
1186
|
-
'data'
|
|
1353
|
+
'data': Array<Engine>;
|
|
1187
1354
|
}
|
|
1188
1355
|
/**
|
|
1189
1356
|
*
|
|
@@ -1196,13 +1363,13 @@ export interface ListFilesResponse {
|
|
|
1196
1363
|
* @type {string}
|
|
1197
1364
|
* @memberof ListFilesResponse
|
|
1198
1365
|
*/
|
|
1199
|
-
'object'
|
|
1366
|
+
'object': string;
|
|
1200
1367
|
/**
|
|
1201
1368
|
*
|
|
1202
1369
|
* @type {Array<OpenAIFile>}
|
|
1203
1370
|
* @memberof ListFilesResponse
|
|
1204
1371
|
*/
|
|
1205
|
-
'data'
|
|
1372
|
+
'data': Array<OpenAIFile>;
|
|
1206
1373
|
}
|
|
1207
1374
|
/**
|
|
1208
1375
|
*
|
|
@@ -1215,13 +1382,13 @@ export interface ListFineTuneEventsResponse {
|
|
|
1215
1382
|
* @type {string}
|
|
1216
1383
|
* @memberof ListFineTuneEventsResponse
|
|
1217
1384
|
*/
|
|
1218
|
-
'object'
|
|
1385
|
+
'object': string;
|
|
1219
1386
|
/**
|
|
1220
1387
|
*
|
|
1221
1388
|
* @type {Array<FineTuneEvent>}
|
|
1222
1389
|
* @memberof ListFineTuneEventsResponse
|
|
1223
1390
|
*/
|
|
1224
|
-
'data'
|
|
1391
|
+
'data': Array<FineTuneEvent>;
|
|
1225
1392
|
}
|
|
1226
1393
|
/**
|
|
1227
1394
|
*
|
|
@@ -1234,13 +1401,63 @@ export interface ListFineTunesResponse {
|
|
|
1234
1401
|
* @type {string}
|
|
1235
1402
|
* @memberof ListFineTunesResponse
|
|
1236
1403
|
*/
|
|
1237
|
-
'object'
|
|
1404
|
+
'object': string;
|
|
1238
1405
|
/**
|
|
1239
1406
|
*
|
|
1240
1407
|
* @type {Array<FineTune>}
|
|
1241
1408
|
* @memberof ListFineTunesResponse
|
|
1242
1409
|
*/
|
|
1243
|
-
'data'
|
|
1410
|
+
'data': Array<FineTune>;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
*
|
|
1414
|
+
* @export
|
|
1415
|
+
* @interface ListModelsResponse
|
|
1416
|
+
*/
|
|
1417
|
+
export interface ListModelsResponse {
|
|
1418
|
+
/**
|
|
1419
|
+
*
|
|
1420
|
+
* @type {string}
|
|
1421
|
+
* @memberof ListModelsResponse
|
|
1422
|
+
*/
|
|
1423
|
+
'object': string;
|
|
1424
|
+
/**
|
|
1425
|
+
*
|
|
1426
|
+
* @type {Array<Model>}
|
|
1427
|
+
* @memberof ListModelsResponse
|
|
1428
|
+
*/
|
|
1429
|
+
'data': Array<Model>;
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
*
|
|
1433
|
+
* @export
|
|
1434
|
+
* @interface Model
|
|
1435
|
+
*/
|
|
1436
|
+
export interface Model {
|
|
1437
|
+
/**
|
|
1438
|
+
*
|
|
1439
|
+
* @type {string}
|
|
1440
|
+
* @memberof Model
|
|
1441
|
+
*/
|
|
1442
|
+
'id': string;
|
|
1443
|
+
/**
|
|
1444
|
+
*
|
|
1445
|
+
* @type {string}
|
|
1446
|
+
* @memberof Model
|
|
1447
|
+
*/
|
|
1448
|
+
'object': string;
|
|
1449
|
+
/**
|
|
1450
|
+
*
|
|
1451
|
+
* @type {number}
|
|
1452
|
+
* @memberof Model
|
|
1453
|
+
*/
|
|
1454
|
+
'created': number;
|
|
1455
|
+
/**
|
|
1456
|
+
*
|
|
1457
|
+
* @type {string}
|
|
1458
|
+
* @memberof Model
|
|
1459
|
+
*/
|
|
1460
|
+
'owned_by': string;
|
|
1244
1461
|
}
|
|
1245
1462
|
/**
|
|
1246
1463
|
*
|
|
@@ -1253,37 +1470,37 @@ export interface OpenAIFile {
|
|
|
1253
1470
|
* @type {string}
|
|
1254
1471
|
* @memberof OpenAIFile
|
|
1255
1472
|
*/
|
|
1256
|
-
'id'
|
|
1473
|
+
'id': string;
|
|
1257
1474
|
/**
|
|
1258
1475
|
*
|
|
1259
1476
|
* @type {string}
|
|
1260
1477
|
* @memberof OpenAIFile
|
|
1261
1478
|
*/
|
|
1262
|
-
'object'
|
|
1479
|
+
'object': string;
|
|
1263
1480
|
/**
|
|
1264
1481
|
*
|
|
1265
1482
|
* @type {number}
|
|
1266
1483
|
* @memberof OpenAIFile
|
|
1267
1484
|
*/
|
|
1268
|
-
'bytes'
|
|
1485
|
+
'bytes': number;
|
|
1269
1486
|
/**
|
|
1270
1487
|
*
|
|
1271
1488
|
* @type {number}
|
|
1272
1489
|
* @memberof OpenAIFile
|
|
1273
1490
|
*/
|
|
1274
|
-
'created_at'
|
|
1491
|
+
'created_at': number;
|
|
1275
1492
|
/**
|
|
1276
1493
|
*
|
|
1277
1494
|
* @type {string}
|
|
1278
1495
|
* @memberof OpenAIFile
|
|
1279
1496
|
*/
|
|
1280
|
-
'filename'
|
|
1497
|
+
'filename': string;
|
|
1281
1498
|
/**
|
|
1282
1499
|
*
|
|
1283
1500
|
* @type {string}
|
|
1284
1501
|
* @memberof OpenAIFile
|
|
1285
1502
|
*/
|
|
1286
|
-
'purpose'
|
|
1503
|
+
'purpose': string;
|
|
1287
1504
|
/**
|
|
1288
1505
|
*
|
|
1289
1506
|
* @type {string}
|
|
@@ -1315,6 +1532,7 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1315
1532
|
* @summary Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).
|
|
1316
1533
|
* @param {CreateAnswerRequest} createAnswerRequest
|
|
1317
1534
|
* @param {*} [options] Override http request option.
|
|
1535
|
+
* @deprecated
|
|
1318
1536
|
* @throws {RequiredError}
|
|
1319
1537
|
*/
|
|
1320
1538
|
createAnswer: (createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
@@ -1323,53 +1541,43 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1323
1541
|
* @summary Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.
|
|
1324
1542
|
* @param {CreateClassificationRequest} createClassificationRequest
|
|
1325
1543
|
* @param {*} [options] Override http request option.
|
|
1544
|
+
* @deprecated
|
|
1326
1545
|
* @throws {RequiredError}
|
|
1327
1546
|
*/
|
|
1328
1547
|
createClassification: (createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1329
1548
|
/**
|
|
1330
1549
|
*
|
|
1331
|
-
* @summary Creates a
|
|
1332
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1550
|
+
* @summary Creates a completion for the provided prompt and parameters
|
|
1333
1551
|
* @param {CreateCompletionRequest} createCompletionRequest
|
|
1334
1552
|
* @param {*} [options] Override http request option.
|
|
1335
1553
|
* @throws {RequiredError}
|
|
1336
1554
|
*/
|
|
1337
|
-
createCompletion: (
|
|
1338
|
-
/**
|
|
1339
|
-
*
|
|
1340
|
-
* @summary Creates a completion using a fine-tuned model
|
|
1341
|
-
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
1342
|
-
* @param {*} [options] Override http request option.
|
|
1343
|
-
* @throws {RequiredError}
|
|
1344
|
-
*/
|
|
1345
|
-
createCompletionFromModel: (createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1555
|
+
createCompletion: (createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1346
1556
|
/**
|
|
1347
1557
|
*
|
|
1348
1558
|
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
1349
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1350
1559
|
* @param {CreateEditRequest} createEditRequest
|
|
1351
1560
|
* @param {*} [options] Override http request option.
|
|
1352
1561
|
* @throws {RequiredError}
|
|
1353
1562
|
*/
|
|
1354
|
-
createEdit: (
|
|
1563
|
+
createEdit: (createEditRequest: CreateEditRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1355
1564
|
/**
|
|
1356
1565
|
*
|
|
1357
1566
|
* @summary Creates an embedding vector representing the input text.
|
|
1358
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1359
1567
|
* @param {CreateEmbeddingRequest} createEmbeddingRequest
|
|
1360
1568
|
* @param {*} [options] Override http request option.
|
|
1361
1569
|
* @throws {RequiredError}
|
|
1362
1570
|
*/
|
|
1363
|
-
createEmbedding: (
|
|
1571
|
+
createEmbedding: (createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1364
1572
|
/**
|
|
1365
1573
|
*
|
|
1366
1574
|
* @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
|
1367
|
-
* @param {
|
|
1368
|
-
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"
|
|
1575
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1576
|
+
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1369
1577
|
* @param {*} [options] Override http request option.
|
|
1370
1578
|
* @throws {RequiredError}
|
|
1371
1579
|
*/
|
|
1372
|
-
createFile: (file:
|
|
1580
|
+
createFile: (file: File, purpose: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1373
1581
|
/**
|
|
1374
1582
|
*
|
|
1375
1583
|
* @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
|
@@ -1378,12 +1586,21 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1378
1586
|
* @throws {RequiredError}
|
|
1379
1587
|
*/
|
|
1380
1588
|
createFineTune: (createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1589
|
+
/**
|
|
1590
|
+
*
|
|
1591
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
1592
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
1593
|
+
* @param {*} [options] Override http request option.
|
|
1594
|
+
* @throws {RequiredError}
|
|
1595
|
+
*/
|
|
1596
|
+
createModeration: (createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1381
1597
|
/**
|
|
1382
1598
|
*
|
|
1383
1599
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1384
1600
|
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1385
1601
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1386
1602
|
* @param {*} [options] Override http request option.
|
|
1603
|
+
* @deprecated
|
|
1387
1604
|
* @throws {RequiredError}
|
|
1388
1605
|
*/
|
|
1389
1606
|
createSearch: (engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
@@ -1413,8 +1630,9 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1413
1630
|
downloadFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1414
1631
|
/**
|
|
1415
1632
|
*
|
|
1416
|
-
* @summary Lists the currently available
|
|
1633
|
+
* @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
|
|
1417
1634
|
* @param {*} [options] Override http request option.
|
|
1635
|
+
* @deprecated
|
|
1418
1636
|
* @throws {RequiredError}
|
|
1419
1637
|
*/
|
|
1420
1638
|
listEngines: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
@@ -1443,9 +1661,17 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1443
1661
|
listFineTunes: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1444
1662
|
/**
|
|
1445
1663
|
*
|
|
1446
|
-
* @summary
|
|
1664
|
+
* @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
1665
|
+
* @param {*} [options] Override http request option.
|
|
1666
|
+
* @throws {RequiredError}
|
|
1667
|
+
*/
|
|
1668
|
+
listModels: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1669
|
+
/**
|
|
1670
|
+
*
|
|
1671
|
+
* @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
|
|
1447
1672
|
* @param {string} engineId The ID of the engine to use for this request
|
|
1448
1673
|
* @param {*} [options] Override http request option.
|
|
1674
|
+
* @deprecated
|
|
1449
1675
|
* @throws {RequiredError}
|
|
1450
1676
|
*/
|
|
1451
1677
|
retrieveEngine: (engineId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
@@ -1465,6 +1691,14 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1465
1691
|
* @throws {RequiredError}
|
|
1466
1692
|
*/
|
|
1467
1693
|
retrieveFineTune: (fineTuneId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1694
|
+
/**
|
|
1695
|
+
*
|
|
1696
|
+
* @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
|
1697
|
+
* @param {string} model The ID of the model to use for this request
|
|
1698
|
+
* @param {*} [options] Override http request option.
|
|
1699
|
+
* @throws {RequiredError}
|
|
1700
|
+
*/
|
|
1701
|
+
retrieveModel: (model: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1468
1702
|
};
|
|
1469
1703
|
/**
|
|
1470
1704
|
* OpenAIApi - functional programming interface
|
|
@@ -1484,6 +1718,7 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1484
1718
|
* @summary Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).
|
|
1485
1719
|
* @param {CreateAnswerRequest} createAnswerRequest
|
|
1486
1720
|
* @param {*} [options] Override http request option.
|
|
1721
|
+
* @deprecated
|
|
1487
1722
|
* @throws {RequiredError}
|
|
1488
1723
|
*/
|
|
1489
1724
|
createAnswer(createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAnswerResponse>>;
|
|
@@ -1492,53 +1727,43 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1492
1727
|
* @summary Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.
|
|
1493
1728
|
* @param {CreateClassificationRequest} createClassificationRequest
|
|
1494
1729
|
* @param {*} [options] Override http request option.
|
|
1730
|
+
* @deprecated
|
|
1495
1731
|
* @throws {RequiredError}
|
|
1496
1732
|
*/
|
|
1497
1733
|
createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateClassificationResponse>>;
|
|
1498
1734
|
/**
|
|
1499
1735
|
*
|
|
1500
|
-
* @summary Creates a
|
|
1501
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1736
|
+
* @summary Creates a completion for the provided prompt and parameters
|
|
1502
1737
|
* @param {CreateCompletionRequest} createCompletionRequest
|
|
1503
1738
|
* @param {*} [options] Override http request option.
|
|
1504
1739
|
* @throws {RequiredError}
|
|
1505
1740
|
*/
|
|
1506
|
-
createCompletion(
|
|
1507
|
-
/**
|
|
1508
|
-
*
|
|
1509
|
-
* @summary Creates a completion using a fine-tuned model
|
|
1510
|
-
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
1511
|
-
* @param {*} [options] Override http request option.
|
|
1512
|
-
* @throws {RequiredError}
|
|
1513
|
-
*/
|
|
1514
|
-
createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
|
|
1741
|
+
createCompletion(createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
|
|
1515
1742
|
/**
|
|
1516
1743
|
*
|
|
1517
1744
|
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
1518
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1519
1745
|
* @param {CreateEditRequest} createEditRequest
|
|
1520
1746
|
* @param {*} [options] Override http request option.
|
|
1521
1747
|
* @throws {RequiredError}
|
|
1522
1748
|
*/
|
|
1523
|
-
createEdit(
|
|
1749
|
+
createEdit(createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEditResponse>>;
|
|
1524
1750
|
/**
|
|
1525
1751
|
*
|
|
1526
1752
|
* @summary Creates an embedding vector representing the input text.
|
|
1527
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1528
1753
|
* @param {CreateEmbeddingRequest} createEmbeddingRequest
|
|
1529
1754
|
* @param {*} [options] Override http request option.
|
|
1530
1755
|
* @throws {RequiredError}
|
|
1531
1756
|
*/
|
|
1532
|
-
createEmbedding(
|
|
1757
|
+
createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEmbeddingResponse>>;
|
|
1533
1758
|
/**
|
|
1534
1759
|
*
|
|
1535
1760
|
* @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
|
1536
|
-
* @param {
|
|
1537
|
-
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"
|
|
1761
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1762
|
+
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1538
1763
|
* @param {*} [options] Override http request option.
|
|
1539
1764
|
* @throws {RequiredError}
|
|
1540
1765
|
*/
|
|
1541
|
-
createFile(file:
|
|
1766
|
+
createFile(file: File, purpose: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenAIFile>>;
|
|
1542
1767
|
/**
|
|
1543
1768
|
*
|
|
1544
1769
|
* @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
|
@@ -1547,12 +1772,21 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1547
1772
|
* @throws {RequiredError}
|
|
1548
1773
|
*/
|
|
1549
1774
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
|
|
1775
|
+
/**
|
|
1776
|
+
*
|
|
1777
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
1778
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
1779
|
+
* @param {*} [options] Override http request option.
|
|
1780
|
+
* @throws {RequiredError}
|
|
1781
|
+
*/
|
|
1782
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateModerationResponse>>;
|
|
1550
1783
|
/**
|
|
1551
1784
|
*
|
|
1552
1785
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1553
1786
|
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1554
1787
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1555
1788
|
* @param {*} [options] Override http request option.
|
|
1789
|
+
* @deprecated
|
|
1556
1790
|
* @throws {RequiredError}
|
|
1557
1791
|
*/
|
|
1558
1792
|
createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateSearchResponse>>;
|
|
@@ -1582,8 +1816,9 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1582
1816
|
downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
|
|
1583
1817
|
/**
|
|
1584
1818
|
*
|
|
1585
|
-
* @summary Lists the currently available
|
|
1819
|
+
* @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
|
|
1586
1820
|
* @param {*} [options] Override http request option.
|
|
1821
|
+
* @deprecated
|
|
1587
1822
|
* @throws {RequiredError}
|
|
1588
1823
|
*/
|
|
1589
1824
|
listEngines(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEnginesResponse>>;
|
|
@@ -1612,9 +1847,17 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1612
1847
|
listFineTunes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFineTunesResponse>>;
|
|
1613
1848
|
/**
|
|
1614
1849
|
*
|
|
1615
|
-
* @summary
|
|
1850
|
+
* @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
1851
|
+
* @param {*} [options] Override http request option.
|
|
1852
|
+
* @throws {RequiredError}
|
|
1853
|
+
*/
|
|
1854
|
+
listModels(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListModelsResponse>>;
|
|
1855
|
+
/**
|
|
1856
|
+
*
|
|
1857
|
+
* @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
|
|
1616
1858
|
* @param {string} engineId The ID of the engine to use for this request
|
|
1617
1859
|
* @param {*} [options] Override http request option.
|
|
1860
|
+
* @deprecated
|
|
1618
1861
|
* @throws {RequiredError}
|
|
1619
1862
|
*/
|
|
1620
1863
|
retrieveEngine(engineId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Engine>>;
|
|
@@ -1634,6 +1877,14 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1634
1877
|
* @throws {RequiredError}
|
|
1635
1878
|
*/
|
|
1636
1879
|
retrieveFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
|
|
1880
|
+
/**
|
|
1881
|
+
*
|
|
1882
|
+
* @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
|
1883
|
+
* @param {string} model The ID of the model to use for this request
|
|
1884
|
+
* @param {*} [options] Override http request option.
|
|
1885
|
+
* @throws {RequiredError}
|
|
1886
|
+
*/
|
|
1887
|
+
retrieveModel(model: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Model>>;
|
|
1637
1888
|
};
|
|
1638
1889
|
/**
|
|
1639
1890
|
* OpenAIApi - factory interface
|
|
@@ -1653,6 +1904,7 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1653
1904
|
* @summary Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).
|
|
1654
1905
|
* @param {CreateAnswerRequest} createAnswerRequest
|
|
1655
1906
|
* @param {*} [options] Override http request option.
|
|
1907
|
+
* @deprecated
|
|
1656
1908
|
* @throws {RequiredError}
|
|
1657
1909
|
*/
|
|
1658
1910
|
createAnswer(createAnswerRequest: CreateAnswerRequest, options?: any): AxiosPromise<CreateAnswerResponse>;
|
|
@@ -1661,53 +1913,43 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1661
1913
|
* @summary Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.
|
|
1662
1914
|
* @param {CreateClassificationRequest} createClassificationRequest
|
|
1663
1915
|
* @param {*} [options] Override http request option.
|
|
1916
|
+
* @deprecated
|
|
1664
1917
|
* @throws {RequiredError}
|
|
1665
1918
|
*/
|
|
1666
1919
|
createClassification(createClassificationRequest: CreateClassificationRequest, options?: any): AxiosPromise<CreateClassificationResponse>;
|
|
1667
1920
|
/**
|
|
1668
1921
|
*
|
|
1669
|
-
* @summary Creates a
|
|
1670
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1922
|
+
* @summary Creates a completion for the provided prompt and parameters
|
|
1671
1923
|
* @param {CreateCompletionRequest} createCompletionRequest
|
|
1672
1924
|
* @param {*} [options] Override http request option.
|
|
1673
1925
|
* @throws {RequiredError}
|
|
1674
1926
|
*/
|
|
1675
|
-
createCompletion(
|
|
1676
|
-
/**
|
|
1677
|
-
*
|
|
1678
|
-
* @summary Creates a completion using a fine-tuned model
|
|
1679
|
-
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
1680
|
-
* @param {*} [options] Override http request option.
|
|
1681
|
-
* @throws {RequiredError}
|
|
1682
|
-
*/
|
|
1683
|
-
createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
|
|
1927
|
+
createCompletion(createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
|
|
1684
1928
|
/**
|
|
1685
1929
|
*
|
|
1686
1930
|
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
1687
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1688
1931
|
* @param {CreateEditRequest} createEditRequest
|
|
1689
1932
|
* @param {*} [options] Override http request option.
|
|
1690
1933
|
* @throws {RequiredError}
|
|
1691
1934
|
*/
|
|
1692
|
-
createEdit(
|
|
1935
|
+
createEdit(createEditRequest: CreateEditRequest, options?: any): AxiosPromise<CreateEditResponse>;
|
|
1693
1936
|
/**
|
|
1694
1937
|
*
|
|
1695
1938
|
* @summary Creates an embedding vector representing the input text.
|
|
1696
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1697
1939
|
* @param {CreateEmbeddingRequest} createEmbeddingRequest
|
|
1698
1940
|
* @param {*} [options] Override http request option.
|
|
1699
1941
|
* @throws {RequiredError}
|
|
1700
1942
|
*/
|
|
1701
|
-
createEmbedding(
|
|
1943
|
+
createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: any): AxiosPromise<CreateEmbeddingResponse>;
|
|
1702
1944
|
/**
|
|
1703
1945
|
*
|
|
1704
1946
|
* @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
|
1705
|
-
* @param {
|
|
1706
|
-
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"
|
|
1947
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1948
|
+
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1707
1949
|
* @param {*} [options] Override http request option.
|
|
1708
1950
|
* @throws {RequiredError}
|
|
1709
1951
|
*/
|
|
1710
|
-
createFile(file:
|
|
1952
|
+
createFile(file: File, purpose: string, options?: any): AxiosPromise<OpenAIFile>;
|
|
1711
1953
|
/**
|
|
1712
1954
|
*
|
|
1713
1955
|
* @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
|
@@ -1716,12 +1958,21 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1716
1958
|
* @throws {RequiredError}
|
|
1717
1959
|
*/
|
|
1718
1960
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: any): AxiosPromise<FineTune>;
|
|
1961
|
+
/**
|
|
1962
|
+
*
|
|
1963
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
1964
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
1965
|
+
* @param {*} [options] Override http request option.
|
|
1966
|
+
* @throws {RequiredError}
|
|
1967
|
+
*/
|
|
1968
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: any): AxiosPromise<CreateModerationResponse>;
|
|
1719
1969
|
/**
|
|
1720
1970
|
*
|
|
1721
1971
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1722
1972
|
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1723
1973
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1724
1974
|
* @param {*} [options] Override http request option.
|
|
1975
|
+
* @deprecated
|
|
1725
1976
|
* @throws {RequiredError}
|
|
1726
1977
|
*/
|
|
1727
1978
|
createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: any): AxiosPromise<CreateSearchResponse>;
|
|
@@ -1751,8 +2002,9 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1751
2002
|
downloadFile(fileId: string, options?: any): AxiosPromise<string>;
|
|
1752
2003
|
/**
|
|
1753
2004
|
*
|
|
1754
|
-
* @summary Lists the currently available
|
|
2005
|
+
* @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
|
|
1755
2006
|
* @param {*} [options] Override http request option.
|
|
2007
|
+
* @deprecated
|
|
1756
2008
|
* @throws {RequiredError}
|
|
1757
2009
|
*/
|
|
1758
2010
|
listEngines(options?: any): AxiosPromise<ListEnginesResponse>;
|
|
@@ -1781,9 +2033,17 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1781
2033
|
listFineTunes(options?: any): AxiosPromise<ListFineTunesResponse>;
|
|
1782
2034
|
/**
|
|
1783
2035
|
*
|
|
1784
|
-
* @summary
|
|
2036
|
+
* @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
2037
|
+
* @param {*} [options] Override http request option.
|
|
2038
|
+
* @throws {RequiredError}
|
|
2039
|
+
*/
|
|
2040
|
+
listModels(options?: any): AxiosPromise<ListModelsResponse>;
|
|
2041
|
+
/**
|
|
2042
|
+
*
|
|
2043
|
+
* @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
|
|
1785
2044
|
* @param {string} engineId The ID of the engine to use for this request
|
|
1786
2045
|
* @param {*} [options] Override http request option.
|
|
2046
|
+
* @deprecated
|
|
1787
2047
|
* @throws {RequiredError}
|
|
1788
2048
|
*/
|
|
1789
2049
|
retrieveEngine(engineId: string, options?: any): AxiosPromise<Engine>;
|
|
@@ -1803,6 +2063,14 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1803
2063
|
* @throws {RequiredError}
|
|
1804
2064
|
*/
|
|
1805
2065
|
retrieveFineTune(fineTuneId: string, options?: any): AxiosPromise<FineTune>;
|
|
2066
|
+
/**
|
|
2067
|
+
*
|
|
2068
|
+
* @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
|
2069
|
+
* @param {string} model The ID of the model to use for this request
|
|
2070
|
+
* @param {*} [options] Override http request option.
|
|
2071
|
+
* @throws {RequiredError}
|
|
2072
|
+
*/
|
|
2073
|
+
retrieveModel(model: string, options?: any): AxiosPromise<Model>;
|
|
1806
2074
|
};
|
|
1807
2075
|
/**
|
|
1808
2076
|
* OpenAIApi - object-oriented interface
|
|
@@ -1825,6 +2093,7 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1825
2093
|
* @summary Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).
|
|
1826
2094
|
* @param {CreateAnswerRequest} createAnswerRequest
|
|
1827
2095
|
* @param {*} [options] Override http request option.
|
|
2096
|
+
* @deprecated
|
|
1828
2097
|
* @throws {RequiredError}
|
|
1829
2098
|
* @memberof OpenAIApi
|
|
1830
2099
|
*/
|
|
@@ -1834,59 +2103,48 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1834
2103
|
* @summary Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.
|
|
1835
2104
|
* @param {CreateClassificationRequest} createClassificationRequest
|
|
1836
2105
|
* @param {*} [options] Override http request option.
|
|
2106
|
+
* @deprecated
|
|
1837
2107
|
* @throws {RequiredError}
|
|
1838
2108
|
* @memberof OpenAIApi
|
|
1839
2109
|
*/
|
|
1840
2110
|
createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateClassificationResponse, any>>;
|
|
1841
2111
|
/**
|
|
1842
2112
|
*
|
|
1843
|
-
* @summary Creates a
|
|
1844
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
2113
|
+
* @summary Creates a completion for the provided prompt and parameters
|
|
1845
2114
|
* @param {CreateCompletionRequest} createCompletionRequest
|
|
1846
2115
|
* @param {*} [options] Override http request option.
|
|
1847
2116
|
* @throws {RequiredError}
|
|
1848
2117
|
* @memberof OpenAIApi
|
|
1849
2118
|
*/
|
|
1850
|
-
createCompletion(
|
|
1851
|
-
/**
|
|
1852
|
-
*
|
|
1853
|
-
* @summary Creates a completion using a fine-tuned model
|
|
1854
|
-
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
1855
|
-
* @param {*} [options] Override http request option.
|
|
1856
|
-
* @throws {RequiredError}
|
|
1857
|
-
* @memberof OpenAIApi
|
|
1858
|
-
*/
|
|
1859
|
-
createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
|
|
2119
|
+
createCompletion(createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
|
|
1860
2120
|
/**
|
|
1861
2121
|
*
|
|
1862
2122
|
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
1863
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1864
2123
|
* @param {CreateEditRequest} createEditRequest
|
|
1865
2124
|
* @param {*} [options] Override http request option.
|
|
1866
2125
|
* @throws {RequiredError}
|
|
1867
2126
|
* @memberof OpenAIApi
|
|
1868
2127
|
*/
|
|
1869
|
-
createEdit(
|
|
2128
|
+
createEdit(createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEditResponse, any>>;
|
|
1870
2129
|
/**
|
|
1871
2130
|
*
|
|
1872
2131
|
* @summary Creates an embedding vector representing the input text.
|
|
1873
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1874
2132
|
* @param {CreateEmbeddingRequest} createEmbeddingRequest
|
|
1875
2133
|
* @param {*} [options] Override http request option.
|
|
1876
2134
|
* @throws {RequiredError}
|
|
1877
2135
|
* @memberof OpenAIApi
|
|
1878
2136
|
*/
|
|
1879
|
-
createEmbedding(
|
|
2137
|
+
createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEmbeddingResponse, any>>;
|
|
1880
2138
|
/**
|
|
1881
2139
|
*
|
|
1882
2140
|
* @summary Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
|
1883
|
-
* @param {
|
|
1884
|
-
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"
|
|
2141
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
2142
|
+
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1885
2143
|
* @param {*} [options] Override http request option.
|
|
1886
2144
|
* @throws {RequiredError}
|
|
1887
2145
|
* @memberof OpenAIApi
|
|
1888
2146
|
*/
|
|
1889
|
-
createFile(file:
|
|
2147
|
+
createFile(file: File, purpose: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OpenAIFile, any>>;
|
|
1890
2148
|
/**
|
|
1891
2149
|
*
|
|
1892
2150
|
* @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
|
@@ -1896,12 +2154,22 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1896
2154
|
* @memberof OpenAIApi
|
|
1897
2155
|
*/
|
|
1898
2156
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
|
|
2157
|
+
/**
|
|
2158
|
+
*
|
|
2159
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
2160
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
2161
|
+
* @param {*} [options] Override http request option.
|
|
2162
|
+
* @throws {RequiredError}
|
|
2163
|
+
* @memberof OpenAIApi
|
|
2164
|
+
*/
|
|
2165
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateModerationResponse, any>>;
|
|
1899
2166
|
/**
|
|
1900
2167
|
*
|
|
1901
2168
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1902
2169
|
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1903
2170
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1904
2171
|
* @param {*} [options] Override http request option.
|
|
2172
|
+
* @deprecated
|
|
1905
2173
|
* @throws {RequiredError}
|
|
1906
2174
|
* @memberof OpenAIApi
|
|
1907
2175
|
*/
|
|
@@ -1935,8 +2203,9 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1935
2203
|
downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
|
|
1936
2204
|
/**
|
|
1937
2205
|
*
|
|
1938
|
-
* @summary Lists the currently available
|
|
2206
|
+
* @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
|
|
1939
2207
|
* @param {*} [options] Override http request option.
|
|
2208
|
+
* @deprecated
|
|
1940
2209
|
* @throws {RequiredError}
|
|
1941
2210
|
* @memberof OpenAIApi
|
|
1942
2211
|
*/
|
|
@@ -1969,9 +2238,18 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1969
2238
|
listFineTunes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFineTunesResponse, any>>;
|
|
1970
2239
|
/**
|
|
1971
2240
|
*
|
|
1972
|
-
* @summary
|
|
2241
|
+
* @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
2242
|
+
* @param {*} [options] Override http request option.
|
|
2243
|
+
* @throws {RequiredError}
|
|
2244
|
+
* @memberof OpenAIApi
|
|
2245
|
+
*/
|
|
2246
|
+
listModels(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListModelsResponse, any>>;
|
|
2247
|
+
/**
|
|
2248
|
+
*
|
|
2249
|
+
* @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
|
|
1973
2250
|
* @param {string} engineId The ID of the engine to use for this request
|
|
1974
2251
|
* @param {*} [options] Override http request option.
|
|
2252
|
+
* @deprecated
|
|
1975
2253
|
* @throws {RequiredError}
|
|
1976
2254
|
* @memberof OpenAIApi
|
|
1977
2255
|
*/
|
|
@@ -1994,4 +2272,13 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1994
2272
|
* @memberof OpenAIApi
|
|
1995
2273
|
*/
|
|
1996
2274
|
retrieveFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
|
|
2275
|
+
/**
|
|
2276
|
+
*
|
|
2277
|
+
* @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
|
2278
|
+
* @param {string} model The ID of the model to use for this request
|
|
2279
|
+
* @param {*} [options] Override http request option.
|
|
2280
|
+
* @throws {RequiredError}
|
|
2281
|
+
* @memberof OpenAIApi
|
|
2282
|
+
*/
|
|
2283
|
+
retrieveModel(model: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Model, any>>;
|
|
1997
2284
|
}
|