openai 2.0.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.0
5
+ * The version of the OpenAPI document: 1.0.5
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,29 +19,29 @@ import { RequestArgs, BaseAPI } from './base';
19
19
  */
20
20
  export interface CreateAnswerRequest {
21
21
  /**
22
- * ID of the engine to use for completion. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
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
  */
26
- 'model'?: string;
26
+ 'model': string;
27
27
  /**
28
28
  * Question to get answered.
29
29
  * @type {string}
30
30
  * @memberof CreateAnswerRequest
31
31
  */
32
- 'question'?: string;
32
+ 'question': string;
33
33
  /**
34
34
  * List of (question, answer) pairs that will help steer the model towards the tone and answer format you\'d like. We recommend adding 2 to 3 examples.
35
35
  * @type {Array<any>}
36
36
  * @memberof CreateAnswerRequest
37
37
  */
38
- 'examples'?: Array<any>;
38
+ 'examples': Array<any>;
39
39
  /**
40
40
  * A text snippet containing the contextual information used to generate the answers for the `examples` you provide.
41
41
  * @type {string}
42
42
  * @memberof CreateAnswerRequest
43
43
  */
44
- 'examples_context'?: string;
44
+ 'examples_context': string;
45
45
  /**
46
46
  * List of documents from which the answer for the input `question` should be derived. If this is an empty list, the question will be answered based on the question-answer examples. You should specify either `documents` or a `file`, but not both.
47
47
  * @type {Array<string>}
@@ -55,7 +55,7 @@ export interface CreateAnswerRequest {
55
55
  */
56
56
  'file'?: string | null;
57
57
  /**
58
- * ID of the engine to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
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
  */
@@ -85,11 +85,11 @@ export interface CreateAnswerRequest {
85
85
  */
86
86
  'max_tokens'?: number | null;
87
87
  /**
88
- * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
89
- * @type {string | Array<string>}
88
+ *
89
+ * @type {CreateAnswerRequestStop}
90
90
  * @memberof CreateAnswerRequest
91
91
  */
92
- 'stop'?: string | Array<string> | null;
92
+ 'stop'?: CreateAnswerRequestStop | null;
93
93
  /**
94
94
  * How many answers to generate for each question.
95
95
  * @type {number}
@@ -120,7 +120,19 @@ export interface CreateAnswerRequest {
120
120
  * @memberof CreateAnswerRequest
121
121
  */
122
122
  'expand'?: Array<any> | null;
123
+ /**
124
+ * A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
125
+ * @type {string}
126
+ * @memberof CreateAnswerRequest
127
+ */
128
+ 'user'?: string;
123
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;
124
136
  /**
125
137
  *
126
138
  * @export
@@ -159,27 +171,27 @@ export interface CreateAnswerResponse {
159
171
  'answers'?: Array<string>;
160
172
  /**
161
173
  *
162
- * @type {Array<CreateAnswerResponseSelectedDocuments>}
174
+ * @type {Array<CreateAnswerResponseSelectedDocumentsInner>}
163
175
  * @memberof CreateAnswerResponse
164
176
  */
165
- 'selected_documents'?: Array<CreateAnswerResponseSelectedDocuments>;
177
+ 'selected_documents'?: Array<CreateAnswerResponseSelectedDocumentsInner>;
166
178
  }
167
179
  /**
168
180
  *
169
181
  * @export
170
- * @interface CreateAnswerResponseSelectedDocuments
182
+ * @interface CreateAnswerResponseSelectedDocumentsInner
171
183
  */
172
- export interface CreateAnswerResponseSelectedDocuments {
184
+ export interface CreateAnswerResponseSelectedDocumentsInner {
173
185
  /**
174
186
  *
175
187
  * @type {number}
176
- * @memberof CreateAnswerResponseSelectedDocuments
188
+ * @memberof CreateAnswerResponseSelectedDocumentsInner
177
189
  */
178
190
  'document'?: number;
179
191
  /**
180
192
  *
181
193
  * @type {string}
182
- * @memberof CreateAnswerResponseSelectedDocuments
194
+ * @memberof CreateAnswerResponseSelectedDocumentsInner
183
195
  */
184
196
  'text'?: string;
185
197
  }
@@ -190,17 +202,17 @@ export interface CreateAnswerResponseSelectedDocuments {
190
202
  */
191
203
  export interface CreateClassificationRequest {
192
204
  /**
193
- * ID of the engine to use for completion. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
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.
194
206
  * @type {string}
195
207
  * @memberof CreateClassificationRequest
196
208
  */
197
- 'model'?: string;
209
+ 'model': string;
198
210
  /**
199
211
  * Query to be classified.
200
212
  * @type {string}
201
213
  * @memberof CreateClassificationRequest
202
214
  */
203
- 'query'?: string;
215
+ 'query': string;
204
216
  /**
205
217
  * A list of examples with labels, in the following format: `[[\"The movie is so interesting.\", \"Positive\"], [\"It is quite boring.\", \"Negative\"], ...]` All the label strings will be normalized to be capitalized. You should specify either `examples` or `file`, but not both.
206
218
  * @type {Array<any>}
@@ -220,7 +232,7 @@ export interface CreateClassificationRequest {
220
232
  */
221
233
  'labels'?: Array<string> | null;
222
234
  /**
223
- * ID of the engine to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
235
+ * ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
224
236
  * @type {string}
225
237
  * @memberof CreateClassificationRequest
226
238
  */
@@ -267,6 +279,12 @@ export interface CreateClassificationRequest {
267
279
  * @memberof CreateClassificationRequest
268
280
  */
269
281
  'expand'?: Array<any> | null;
282
+ /**
283
+ * A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
284
+ * @type {string}
285
+ * @memberof CreateClassificationRequest
286
+ */
287
+ 'user'?: string;
270
288
  }
271
289
  /**
272
290
  *
@@ -306,154 +324,62 @@ export interface CreateClassificationResponse {
306
324
  'label'?: string;
307
325
  /**
308
326
  *
309
- * @type {Array<CreateClassificationResponseSelectedExamples>}
327
+ * @type {Array<CreateClassificationResponseSelectedExamplesInner>}
310
328
  * @memberof CreateClassificationResponse
311
329
  */
312
- 'selected_examples'?: Array<CreateClassificationResponseSelectedExamples>;
330
+ 'selected_examples'?: Array<CreateClassificationResponseSelectedExamplesInner>;
313
331
  }
314
332
  /**
315
333
  *
316
334
  * @export
317
- * @interface CreateClassificationResponseSelectedExamples
335
+ * @interface CreateClassificationResponseSelectedExamplesInner
318
336
  */
319
- export interface CreateClassificationResponseSelectedExamples {
337
+ export interface CreateClassificationResponseSelectedExamplesInner {
320
338
  /**
321
339
  *
322
340
  * @type {number}
323
- * @memberof CreateClassificationResponseSelectedExamples
341
+ * @memberof CreateClassificationResponseSelectedExamplesInner
324
342
  */
325
343
  'document'?: number;
326
344
  /**
327
345
  *
328
346
  * @type {string}
329
- * @memberof CreateClassificationResponseSelectedExamples
347
+ * @memberof CreateClassificationResponseSelectedExamplesInner
330
348
  */
331
349
  'text'?: string;
332
350
  /**
333
351
  *
334
352
  * @type {string}
335
- * @memberof CreateClassificationResponseSelectedExamples
353
+ * @memberof CreateClassificationResponseSelectedExamplesInner
336
354
  */
337
355
  'label'?: string;
338
356
  }
339
357
  /**
340
358
  *
341
359
  * @export
342
- * @interface CreateCompletionFromModelRequest
360
+ * @interface CreateCompletionRequest
343
361
  */
344
- export interface CreateCompletionFromModelRequest {
345
- /**
346
- * 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.
347
- * @type {string | Array<string> | Array<number> | Array<any>}
348
- * @memberof CreateCompletionFromModelRequest
349
- */
350
- 'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
351
- /**
352
- * 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 `code-davinci-001`, which supports 4096).
353
- * @type {number}
354
- * @memberof CreateCompletionFromModelRequest
355
- */
356
- 'max_tokens'?: number | null;
357
- /**
358
- * 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.
359
- * @type {number}
360
- * @memberof CreateCompletionFromModelRequest
361
- */
362
- 'temperature'?: number | null;
363
- /**
364
- * 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.
365
- * @type {number}
366
- * @memberof CreateCompletionFromModelRequest
367
- */
368
- 'top_p'?: number | null;
369
- /**
370
- * 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`.
371
- * @type {number}
372
- * @memberof CreateCompletionFromModelRequest
373
- */
374
- 'n'?: number | null;
375
- /**
376
- * 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.
377
- * @type {boolean}
378
- * @memberof CreateCompletionFromModelRequest
379
- */
380
- 'stream'?: boolean | null;
381
- /**
382
- * 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.
383
- * @type {number}
384
- * @memberof CreateCompletionFromModelRequest
385
- */
386
- 'logprobs'?: number | null;
387
- /**
388
- * Echo back the prompt in addition to the completion
389
- * @type {boolean}
390
- * @memberof CreateCompletionFromModelRequest
391
- */
392
- 'echo'?: boolean | null;
393
- /**
394
- * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
395
- * @type {string | Array<string>}
396
- * @memberof CreateCompletionFromModelRequest
397
- */
398
- 'stop'?: string | Array<string> | null;
399
- /**
400
- * 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)
401
- * @type {number}
402
- * @memberof CreateCompletionFromModelRequest
403
- */
404
- 'presence_penalty'?: number | null;
405
- /**
406
- * 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)
407
- * @type {number}
408
- * @memberof CreateCompletionFromModelRequest
409
- */
410
- 'frequency_penalty'?: number | null;
411
- /**
412
- * 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`.
413
- * @type {number}
414
- * @memberof CreateCompletionFromModelRequest
415
- */
416
- 'best_of'?: number | null;
417
- /**
418
- * 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.
419
- * @type {object}
420
- * @memberof CreateCompletionFromModelRequest
421
- */
422
- 'logit_bias'?: object | null;
362
+ export interface CreateCompletionRequest {
423
363
  /**
424
- * ID of the model to use for completion.
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.
425
365
  * @type {string}
426
- * @memberof CreateCompletionFromModelRequest
366
+ * @memberof CreateCompletionRequest
427
367
  */
428
- 'model'?: string;
429
- }
430
- /**
431
- *
432
- * @export
433
- * @interface CreateCompletionFromModelRequestAllOf
434
- */
435
- export interface CreateCompletionFromModelRequestAllOf {
368
+ 'model': string;
436
369
  /**
437
- * ID of the model to use for completion.
438
- * @type {string}
439
- * @memberof CreateCompletionFromModelRequestAllOf
370
+ *
371
+ * @type {CreateCompletionRequestPrompt}
372
+ * @memberof CreateCompletionRequest
440
373
  */
441
- 'model'?: string;
442
- }
443
- /**
444
- *
445
- * @export
446
- * @interface CreateCompletionRequest
447
- */
448
- export interface CreateCompletionRequest {
374
+ 'prompt'?: CreateCompletionRequestPrompt | null;
449
375
  /**
450
- * 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.
451
- * @type {string | Array<string> | Array<number> | Array<any>}
376
+ * The suffix that comes after a completion of inserted text.
377
+ * @type {string}
452
378
  * @memberof CreateCompletionRequest
453
379
  */
454
- 'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
380
+ 'suffix'?: string | null;
455
381
  /**
456
- * 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 `code-davinci-001`, which supports 4096).
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).
457
383
  * @type {number}
458
384
  * @memberof CreateCompletionRequest
459
385
  */
@@ -495,11 +421,11 @@ export interface CreateCompletionRequest {
495
421
  */
496
422
  'echo'?: boolean | null;
497
423
  /**
498
- * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
499
- * @type {string | Array<string>}
424
+ *
425
+ * @type {CreateCompletionRequestStop}
500
426
  * @memberof CreateCompletionRequest
501
427
  */
502
- 'stop'?: string | Array<string> | null;
428
+ 'stop'?: CreateCompletionRequestStop | null;
503
429
  /**
504
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)
505
431
  * @type {number}
@@ -513,7 +439,7 @@ export interface CreateCompletionRequest {
513
439
  */
514
440
  'frequency_penalty'?: number | null;
515
441
  /**
516
- * 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`.
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`.
517
443
  * @type {number}
518
444
  * @memberof CreateCompletionRequest
519
445
  */
@@ -524,7 +450,25 @@ export interface CreateCompletionRequest {
524
450
  * @memberof CreateCompletionRequest
525
451
  */
526
452
  'logit_bias'?: object | null;
453
+ /**
454
+ * A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
455
+ * @type {string}
456
+ * @memberof CreateCompletionRequest
457
+ */
458
+ 'user'?: string;
527
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;
528
472
  /**
529
473
  *
530
474
  * @export
@@ -557,73 +501,153 @@ export interface CreateCompletionResponse {
557
501
  'model'?: string;
558
502
  /**
559
503
  *
560
- * @type {Array<CreateCompletionResponseChoices>}
504
+ * @type {Array<CreateCompletionResponseChoicesInner>}
561
505
  * @memberof CreateCompletionResponse
562
506
  */
563
- 'choices'?: Array<CreateCompletionResponseChoices>;
507
+ 'choices'?: Array<CreateCompletionResponseChoicesInner>;
564
508
  }
565
509
  /**
566
510
  *
567
511
  * @export
568
- * @interface CreateCompletionResponseChoices
512
+ * @interface CreateCompletionResponseChoicesInner
569
513
  */
570
- export interface CreateCompletionResponseChoices {
514
+ export interface CreateCompletionResponseChoicesInner {
571
515
  /**
572
516
  *
573
517
  * @type {string}
574
- * @memberof CreateCompletionResponseChoices
518
+ * @memberof CreateCompletionResponseChoicesInner
575
519
  */
576
520
  'text'?: string;
577
521
  /**
578
522
  *
579
523
  * @type {number}
580
- * @memberof CreateCompletionResponseChoices
524
+ * @memberof CreateCompletionResponseChoicesInner
581
525
  */
582
526
  'index'?: number;
583
527
  /**
584
528
  *
585
- * @type {CreateCompletionResponseLogprobs}
586
- * @memberof CreateCompletionResponseChoices
529
+ * @type {CreateCompletionResponseChoicesInnerLogprobs}
530
+ * @memberof CreateCompletionResponseChoicesInner
587
531
  */
588
- 'logprobs'?: CreateCompletionResponseLogprobs | null;
532
+ 'logprobs'?: CreateCompletionResponseChoicesInnerLogprobs | null;
589
533
  /**
590
534
  *
591
535
  * @type {string}
592
- * @memberof CreateCompletionResponseChoices
536
+ * @memberof CreateCompletionResponseChoicesInner
593
537
  */
594
538
  'finish_reason'?: string;
595
539
  }
596
540
  /**
597
541
  *
598
542
  * @export
599
- * @interface CreateCompletionResponseLogprobs
543
+ * @interface CreateCompletionResponseChoicesInnerLogprobs
600
544
  */
601
- export interface CreateCompletionResponseLogprobs {
545
+ export interface CreateCompletionResponseChoicesInnerLogprobs {
602
546
  /**
603
547
  *
604
548
  * @type {Array<string>}
605
- * @memberof CreateCompletionResponseLogprobs
549
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
606
550
  */
607
551
  'tokens'?: Array<string>;
608
552
  /**
609
553
  *
610
554
  * @type {Array<number>}
611
- * @memberof CreateCompletionResponseLogprobs
555
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
612
556
  */
613
557
  'token_logprobs'?: Array<number>;
614
558
  /**
615
559
  *
616
560
  * @type {Array<object>}
617
- * @memberof CreateCompletionResponseLogprobs
561
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
618
562
  */
619
563
  'top_logprobs'?: Array<object>;
620
564
  /**
621
565
  *
622
566
  * @type {Array<number>}
623
- * @memberof CreateCompletionResponseLogprobs
567
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
624
568
  */
625
569
  'text_offset'?: Array<number>;
626
570
  }
571
+ /**
572
+ *
573
+ * @export
574
+ * @interface CreateEditRequest
575
+ */
576
+ export interface CreateEditRequest {
577
+ /**
578
+ * 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.
579
+ * @type {string}
580
+ * @memberof CreateEditRequest
581
+ */
582
+ 'model': string;
583
+ /**
584
+ * The input text to use as a starting point for the edit.
585
+ * @type {string}
586
+ * @memberof CreateEditRequest
587
+ */
588
+ 'input'?: string | null;
589
+ /**
590
+ * The instruction that tells the model how to edit the prompt.
591
+ * @type {string}
592
+ * @memberof CreateEditRequest
593
+ */
594
+ 'instruction': string;
595
+ /**
596
+ * How many edits to generate for the input and instruction.
597
+ * @type {number}
598
+ * @memberof CreateEditRequest
599
+ */
600
+ 'n'?: number | null;
601
+ /**
602
+ * 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.
603
+ * @type {number}
604
+ * @memberof CreateEditRequest
605
+ */
606
+ 'temperature'?: number | null;
607
+ /**
608
+ * 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.
609
+ * @type {number}
610
+ * @memberof CreateEditRequest
611
+ */
612
+ 'top_p'?: number | null;
613
+ }
614
+ /**
615
+ *
616
+ * @export
617
+ * @interface CreateEditResponse
618
+ */
619
+ export interface CreateEditResponse {
620
+ /**
621
+ *
622
+ * @type {string}
623
+ * @memberof CreateEditResponse
624
+ */
625
+ 'id'?: string;
626
+ /**
627
+ *
628
+ * @type {string}
629
+ * @memberof CreateEditResponse
630
+ */
631
+ 'object'?: string;
632
+ /**
633
+ *
634
+ * @type {number}
635
+ * @memberof CreateEditResponse
636
+ */
637
+ 'created'?: number;
638
+ /**
639
+ *
640
+ * @type {string}
641
+ * @memberof CreateEditResponse
642
+ */
643
+ 'model'?: string;
644
+ /**
645
+ *
646
+ * @type {Array<CreateCompletionResponseChoicesInner>}
647
+ * @memberof CreateEditResponse
648
+ */
649
+ 'choices'?: Array<CreateCompletionResponseChoicesInner>;
650
+ }
627
651
  /**
628
652
  *
629
653
  * @export
@@ -631,12 +655,30 @@ export interface CreateCompletionResponseLogprobs {
631
655
  */
632
656
  export interface CreateEmbeddingRequest {
633
657
  /**
634
- * 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. We suggest replacing newlines (`\\n`) in your input with a single space, as we have observed inferior results when newlines are present.
635
- * @type {string | Array<string> | Array<number> | Array<any>}
658
+ * 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.
659
+ * @type {string}
660
+ * @memberof CreateEmbeddingRequest
661
+ */
662
+ 'model': string;
663
+ /**
664
+ *
665
+ * @type {CreateEmbeddingRequestInput}
636
666
  * @memberof CreateEmbeddingRequest
637
667
  */
638
- 'input'?: string | Array<string> | Array<number> | Array<any>;
668
+ 'input': CreateEmbeddingRequestInput;
669
+ /**
670
+ * A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
671
+ * @type {string}
672
+ * @memberof CreateEmbeddingRequest
673
+ */
674
+ 'user'?: string;
639
675
  }
676
+ /**
677
+ * @type CreateEmbeddingRequestInput
678
+ * 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 your 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.
679
+ * @export
680
+ */
681
+ export declare type CreateEmbeddingRequestInput = Array<any> | Array<number> | Array<string> | string;
640
682
  /**
641
683
  *
642
684
  * @export
@@ -657,33 +699,33 @@ export interface CreateEmbeddingResponse {
657
699
  'model'?: string;
658
700
  /**
659
701
  *
660
- * @type {Array<CreateEmbeddingResponseData>}
702
+ * @type {Array<CreateEmbeddingResponseDataInner>}
661
703
  * @memberof CreateEmbeddingResponse
662
704
  */
663
- 'data'?: Array<CreateEmbeddingResponseData>;
705
+ 'data'?: Array<CreateEmbeddingResponseDataInner>;
664
706
  }
665
707
  /**
666
708
  *
667
709
  * @export
668
- * @interface CreateEmbeddingResponseData
710
+ * @interface CreateEmbeddingResponseDataInner
669
711
  */
670
- export interface CreateEmbeddingResponseData {
712
+ export interface CreateEmbeddingResponseDataInner {
671
713
  /**
672
714
  *
673
715
  * @type {number}
674
- * @memberof CreateEmbeddingResponseData
716
+ * @memberof CreateEmbeddingResponseDataInner
675
717
  */
676
718
  'index'?: number;
677
719
  /**
678
720
  *
679
721
  * @type {string}
680
- * @memberof CreateEmbeddingResponseData
722
+ * @memberof CreateEmbeddingResponseDataInner
681
723
  */
682
724
  'object'?: string;
683
725
  /**
684
726
  *
685
727
  * @type {Array<number>}
686
- * @memberof CreateEmbeddingResponseData
728
+ * @memberof CreateEmbeddingResponseDataInner
687
729
  */
688
730
  'embedding'?: Array<number>;
689
731
  }
@@ -698,7 +740,7 @@ export interface CreateFineTuneRequest {
698
740
  * @type {string}
699
741
  * @memberof CreateFineTuneRequest
700
742
  */
701
- 'training_file'?: string;
743
+ 'training_file': string;
702
744
  /**
703
745
  * The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the [fine-tuning results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). Your train and validation data should be mutually exclusive. Your dataset must be formatted as a JSONL file, where each validation example is a JSON object with the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the purpose `fine-tune`. See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details.
704
746
  * @type {string}
@@ -706,7 +748,7 @@ export interface CreateFineTuneRequest {
706
748
  */
707
749
  'validation_file'?: string | null;
708
750
  /**
709
- * The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\", or \"davinci\". To learn more about these models, see the [Engines](https://beta.openai.com/docs/engines) documentation.
751
+ * The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\", or \"davinci\". To learn more about these models, see the [Models](https://beta.openai.com/docs/models) documentation.
710
752
  * @type {string}
711
753
  * @memberof CreateFineTuneRequest
712
754
  */
@@ -759,6 +801,12 @@ export interface CreateFineTuneRequest {
759
801
  * @memberof CreateFineTuneRequest
760
802
  */
761
803
  'classification_betas'?: Array<number> | null;
804
+ /**
805
+ * A string of up to 40 characters that will be added to your fine-tuned model name. For example, a `suffix` of \"custom-model-name\" would produce a model name like `ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`.
806
+ * @type {string}
807
+ * @memberof CreateFineTuneRequest
808
+ */
809
+ 'suffix'?: string | null;
762
810
  }
763
811
  /**
764
812
  *
@@ -766,6 +814,12 @@ export interface CreateFineTuneRequest {
766
814
  * @interface CreateSearchRequest
767
815
  */
768
816
  export interface CreateSearchRequest {
817
+ /**
818
+ * Query to search against the documents.
819
+ * @type {string}
820
+ * @memberof CreateSearchRequest
821
+ */
822
+ 'query': string;
769
823
  /**
770
824
  * Up to 200 documents to search over, provided as a list of strings. The maximum document length (in tokens) is 2034 minus the number of tokens in the query. You should specify either `documents` or a `file`, but not both.
771
825
  * @type {Array<string>}
@@ -778,12 +832,6 @@ export interface CreateSearchRequest {
778
832
  * @memberof CreateSearchRequest
779
833
  */
780
834
  'file'?: string | null;
781
- /**
782
- * Query to search against the documents.
783
- * @type {string}
784
- * @memberof CreateSearchRequest
785
- */
786
- 'query'?: string;
787
835
  /**
788
836
  * The maximum number of documents to be re-ranked and returned by search. This flag only takes effect when `file` is set.
789
837
  * @type {number}
@@ -796,6 +844,12 @@ export interface CreateSearchRequest {
796
844
  * @memberof CreateSearchRequest
797
845
  */
798
846
  'return_metadata'?: boolean | null;
847
+ /**
848
+ * A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
849
+ * @type {string}
850
+ * @memberof CreateSearchRequest
851
+ */
852
+ 'user'?: string;
799
853
  }
800
854
  /**
801
855
  *
@@ -817,33 +871,33 @@ export interface CreateSearchResponse {
817
871
  'model'?: string;
818
872
  /**
819
873
  *
820
- * @type {Array<CreateSearchResponseData>}
874
+ * @type {Array<CreateSearchResponseDataInner>}
821
875
  * @memberof CreateSearchResponse
822
876
  */
823
- 'data'?: Array<CreateSearchResponseData>;
877
+ 'data'?: Array<CreateSearchResponseDataInner>;
824
878
  }
825
879
  /**
826
880
  *
827
881
  * @export
828
- * @interface CreateSearchResponseData
882
+ * @interface CreateSearchResponseDataInner
829
883
  */
830
- export interface CreateSearchResponseData {
884
+ export interface CreateSearchResponseDataInner {
831
885
  /**
832
886
  *
833
887
  * @type {string}
834
- * @memberof CreateSearchResponseData
888
+ * @memberof CreateSearchResponseDataInner
835
889
  */
836
890
  'object'?: string;
837
891
  /**
838
892
  *
839
893
  * @type {number}
840
- * @memberof CreateSearchResponseData
894
+ * @memberof CreateSearchResponseDataInner
841
895
  */
842
896
  'document'?: number;
843
897
  /**
844
898
  *
845
899
  * @type {number}
846
- * @memberof CreateSearchResponseData
900
+ * @memberof CreateSearchResponseDataInner
847
901
  */
848
902
  'score'?: number;
849
903
  }
@@ -872,6 +926,31 @@ export interface DeleteFileResponse {
872
926
  */
873
927
  'deleted'?: boolean;
874
928
  }
929
+ /**
930
+ *
931
+ * @export
932
+ * @interface DeleteModelResponse
933
+ */
934
+ export interface DeleteModelResponse {
935
+ /**
936
+ *
937
+ * @type {string}
938
+ * @memberof DeleteModelResponse
939
+ */
940
+ 'id'?: string;
941
+ /**
942
+ *
943
+ * @type {string}
944
+ * @memberof DeleteModelResponse
945
+ */
946
+ 'object'?: string;
947
+ /**
948
+ *
949
+ * @type {boolean}
950
+ * @memberof DeleteModelResponse
951
+ */
952
+ 'deleted'?: boolean;
953
+ }
875
954
  /**
876
955
  *
877
956
  * @export
@@ -1095,6 +1174,56 @@ export interface ListFineTunesResponse {
1095
1174
  */
1096
1175
  'data'?: Array<FineTune>;
1097
1176
  }
1177
+ /**
1178
+ *
1179
+ * @export
1180
+ * @interface ListModelsResponse
1181
+ */
1182
+ export interface ListModelsResponse {
1183
+ /**
1184
+ *
1185
+ * @type {string}
1186
+ * @memberof ListModelsResponse
1187
+ */
1188
+ 'object'?: string;
1189
+ /**
1190
+ *
1191
+ * @type {Array<Model>}
1192
+ * @memberof ListModelsResponse
1193
+ */
1194
+ 'data'?: Array<Model>;
1195
+ }
1196
+ /**
1197
+ *
1198
+ * @export
1199
+ * @interface Model
1200
+ */
1201
+ export interface Model {
1202
+ /**
1203
+ *
1204
+ * @type {string}
1205
+ * @memberof Model
1206
+ */
1207
+ 'id'?: string;
1208
+ /**
1209
+ *
1210
+ * @type {string}
1211
+ * @memberof Model
1212
+ */
1213
+ 'object'?: string;
1214
+ /**
1215
+ *
1216
+ * @type {number}
1217
+ * @memberof Model
1218
+ */
1219
+ 'created'?: number;
1220
+ /**
1221
+ *
1222
+ * @type {string}
1223
+ * @memberof Model
1224
+ */
1225
+ 'owned_by'?: string;
1226
+ }
1098
1227
  /**
1099
1228
  *
1100
1229
  * @export
@@ -1168,6 +1297,7 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1168
1297
  * @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).
1169
1298
  * @param {CreateAnswerRequest} createAnswerRequest
1170
1299
  * @param {*} [options] Override http request option.
1300
+ * @deprecated
1171
1301
  * @throws {RequiredError}
1172
1302
  */
1173
1303
  createAnswer: (createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1176,40 +1306,39 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1176
1306
  * @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.
1177
1307
  * @param {CreateClassificationRequest} createClassificationRequest
1178
1308
  * @param {*} [options] Override http request option.
1309
+ * @deprecated
1179
1310
  * @throws {RequiredError}
1180
1311
  */
1181
1312
  createClassification: (createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1182
1313
  /**
1183
1314
  *
1184
- * @summary Creates a new completion for the provided prompt and parameters
1185
- * @param {string} engineId The ID of the engine to use for this request
1315
+ * @summary Creates a completion for the provided prompt and parameters
1186
1316
  * @param {CreateCompletionRequest} createCompletionRequest
1187
1317
  * @param {*} [options] Override http request option.
1188
1318
  * @throws {RequiredError}
1189
1319
  */
1190
- createCompletion: (engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1320
+ createCompletion: (createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1191
1321
  /**
1192
1322
  *
1193
- * @summary Creates a completion using a fine-tuned model
1194
- * @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
1323
+ * @summary Creates a new edit for the provided input, instruction, and parameters
1324
+ * @param {CreateEditRequest} createEditRequest
1195
1325
  * @param {*} [options] Override http request option.
1196
1326
  * @throws {RequiredError}
1197
1327
  */
1198
- createCompletionFromModel: (createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1328
+ createEdit: (createEditRequest: CreateEditRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1199
1329
  /**
1200
1330
  *
1201
1331
  * @summary Creates an embedding vector representing the input text.
1202
- * @param {string} engineId The ID of the engine to use for this request
1203
1332
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1204
1333
  * @param {*} [options] Override http request option.
1205
1334
  * @throws {RequiredError}
1206
1335
  */
1207
- createEmbedding: (engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1336
+ createEmbedding: (createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1208
1337
  /**
1209
1338
  *
1210
1339
  * @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.
1211
- * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;search\\\&quot; or \\\&quot;answers\\\&quot;, each line is a JSON record with a \\\&quot;text\\\&quot; field and an optional \\\&quot;metadata\\\&quot; field. Only \\\&quot;text\\\&quot; field will be used for search. Specially, when the &#x60;purpose&#x60; is \\\&quot;answers\\\&quot;, \\\&quot;\\\\n\\\&quot; is used as a delimiter to chunk contents in the \\\&quot;text\\\&quot; field into multiple documents for finer-grained matching. If the &#x60;purpose&#x60; is set to \\\&quot;classifications\\\&quot;, each line is a JSON record representing a single training example with \\\&quot;text\\\&quot; and \\\&quot;label\\\&quot; fields along with an optional \\\&quot;metadata\\\&quot; field. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1212
- * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;search\\\&quot; for [Search](/docs/api-reference/searches), \\\&quot;answers\\\&quot; for [Answers](/docs/api-reference/answers), \\\&quot;classifications\\\&quot; for [Classifications](/docs/api-reference/classifications) and \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1340
+ * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1341
+ * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1213
1342
  * @param {*} [options] Override http request option.
1214
1343
  * @throws {RequiredError}
1215
1344
  */
@@ -1228,6 +1357,7 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1228
1357
  * @param {string} engineId The ID of the engine to use for this request. You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.
1229
1358
  * @param {CreateSearchRequest} createSearchRequest
1230
1359
  * @param {*} [options] Override http request option.
1360
+ * @deprecated
1231
1361
  * @throws {RequiredError}
1232
1362
  */
1233
1363
  createSearch: (engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1239,6 +1369,14 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1239
1369
  * @throws {RequiredError}
1240
1370
  */
1241
1371
  deleteFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1372
+ /**
1373
+ *
1374
+ * @summary Delete a fine-tuned model. You must have the Owner role in your organization.
1375
+ * @param {string} model The model to delete
1376
+ * @param {*} [options] Override http request option.
1377
+ * @throws {RequiredError}
1378
+ */
1379
+ deleteModel: (model: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1242
1380
  /**
1243
1381
  *
1244
1382
  * @summary Returns the contents of the specified file
@@ -1249,8 +1387,9 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1249
1387
  downloadFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1250
1388
  /**
1251
1389
  *
1252
- * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1390
+ * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
1253
1391
  * @param {*} [options] Override http request option.
1392
+ * @deprecated
1254
1393
  * @throws {RequiredError}
1255
1394
  */
1256
1395
  listEngines: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1279,9 +1418,17 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1279
1418
  listFineTunes: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
1280
1419
  /**
1281
1420
  *
1282
- * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1421
+ * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
1422
+ * @param {*} [options] Override http request option.
1423
+ * @throws {RequiredError}
1424
+ */
1425
+ listModels: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
1426
+ /**
1427
+ *
1428
+ * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
1283
1429
  * @param {string} engineId The ID of the engine to use for this request
1284
1430
  * @param {*} [options] Override http request option.
1431
+ * @deprecated
1285
1432
  * @throws {RequiredError}
1286
1433
  */
1287
1434
  retrieveEngine: (engineId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1301,6 +1448,14 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1301
1448
  * @throws {RequiredError}
1302
1449
  */
1303
1450
  retrieveFineTune: (fineTuneId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1451
+ /**
1452
+ *
1453
+ * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
1454
+ * @param {string} model The ID of the model to use for this request
1455
+ * @param {*} [options] Override http request option.
1456
+ * @throws {RequiredError}
1457
+ */
1458
+ retrieveModel: (model: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1304
1459
  };
1305
1460
  /**
1306
1461
  * OpenAIApi - functional programming interface
@@ -1320,6 +1475,7 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1320
1475
  * @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).
1321
1476
  * @param {CreateAnswerRequest} createAnswerRequest
1322
1477
  * @param {*} [options] Override http request option.
1478
+ * @deprecated
1323
1479
  * @throws {RequiredError}
1324
1480
  */
1325
1481
  createAnswer(createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAnswerResponse>>;
@@ -1328,40 +1484,39 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1328
1484
  * @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.
1329
1485
  * @param {CreateClassificationRequest} createClassificationRequest
1330
1486
  * @param {*} [options] Override http request option.
1487
+ * @deprecated
1331
1488
  * @throws {RequiredError}
1332
1489
  */
1333
1490
  createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateClassificationResponse>>;
1334
1491
  /**
1335
1492
  *
1336
- * @summary Creates a new completion for the provided prompt and parameters
1337
- * @param {string} engineId The ID of the engine to use for this request
1493
+ * @summary Creates a completion for the provided prompt and parameters
1338
1494
  * @param {CreateCompletionRequest} createCompletionRequest
1339
1495
  * @param {*} [options] Override http request option.
1340
1496
  * @throws {RequiredError}
1341
1497
  */
1342
- createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
1498
+ createCompletion(createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
1343
1499
  /**
1344
1500
  *
1345
- * @summary Creates a completion using a fine-tuned model
1346
- * @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
1501
+ * @summary Creates a new edit for the provided input, instruction, and parameters
1502
+ * @param {CreateEditRequest} createEditRequest
1347
1503
  * @param {*} [options] Override http request option.
1348
1504
  * @throws {RequiredError}
1349
1505
  */
1350
- createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
1506
+ createEdit(createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEditResponse>>;
1351
1507
  /**
1352
1508
  *
1353
1509
  * @summary Creates an embedding vector representing the input text.
1354
- * @param {string} engineId The ID of the engine to use for this request
1355
1510
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1356
1511
  * @param {*} [options] Override http request option.
1357
1512
  * @throws {RequiredError}
1358
1513
  */
1359
- createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEmbeddingResponse>>;
1514
+ createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEmbeddingResponse>>;
1360
1515
  /**
1361
1516
  *
1362
1517
  * @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.
1363
- * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;search\\\&quot; or \\\&quot;answers\\\&quot;, each line is a JSON record with a \\\&quot;text\\\&quot; field and an optional \\\&quot;metadata\\\&quot; field. Only \\\&quot;text\\\&quot; field will be used for search. Specially, when the &#x60;purpose&#x60; is \\\&quot;answers\\\&quot;, \\\&quot;\\\\n\\\&quot; is used as a delimiter to chunk contents in the \\\&quot;text\\\&quot; field into multiple documents for finer-grained matching. If the &#x60;purpose&#x60; is set to \\\&quot;classifications\\\&quot;, each line is a JSON record representing a single training example with \\\&quot;text\\\&quot; and \\\&quot;label\\\&quot; fields along with an optional \\\&quot;metadata\\\&quot; field. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1364
- * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;search\\\&quot; for [Search](/docs/api-reference/searches), \\\&quot;answers\\\&quot; for [Answers](/docs/api-reference/answers), \\\&quot;classifications\\\&quot; for [Classifications](/docs/api-reference/classifications) and \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1518
+ * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1519
+ * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1365
1520
  * @param {*} [options] Override http request option.
1366
1521
  * @throws {RequiredError}
1367
1522
  */
@@ -1380,6 +1535,7 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1380
1535
  * @param {string} engineId The ID of the engine to use for this request. You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.
1381
1536
  * @param {CreateSearchRequest} createSearchRequest
1382
1537
  * @param {*} [options] Override http request option.
1538
+ * @deprecated
1383
1539
  * @throws {RequiredError}
1384
1540
  */
1385
1541
  createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateSearchResponse>>;
@@ -1391,6 +1547,14 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1391
1547
  * @throws {RequiredError}
1392
1548
  */
1393
1549
  deleteFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteFileResponse>>;
1550
+ /**
1551
+ *
1552
+ * @summary Delete a fine-tuned model. You must have the Owner role in your organization.
1553
+ * @param {string} model The model to delete
1554
+ * @param {*} [options] Override http request option.
1555
+ * @throws {RequiredError}
1556
+ */
1557
+ deleteModel(model: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteModelResponse>>;
1394
1558
  /**
1395
1559
  *
1396
1560
  * @summary Returns the contents of the specified file
@@ -1401,8 +1565,9 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1401
1565
  downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
1402
1566
  /**
1403
1567
  *
1404
- * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1568
+ * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
1405
1569
  * @param {*} [options] Override http request option.
1570
+ * @deprecated
1406
1571
  * @throws {RequiredError}
1407
1572
  */
1408
1573
  listEngines(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEnginesResponse>>;
@@ -1431,9 +1596,17 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1431
1596
  listFineTunes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFineTunesResponse>>;
1432
1597
  /**
1433
1598
  *
1434
- * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1599
+ * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
1600
+ * @param {*} [options] Override http request option.
1601
+ * @throws {RequiredError}
1602
+ */
1603
+ listModels(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListModelsResponse>>;
1604
+ /**
1605
+ *
1606
+ * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
1435
1607
  * @param {string} engineId The ID of the engine to use for this request
1436
1608
  * @param {*} [options] Override http request option.
1609
+ * @deprecated
1437
1610
  * @throws {RequiredError}
1438
1611
  */
1439
1612
  retrieveEngine(engineId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Engine>>;
@@ -1453,6 +1626,14 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1453
1626
  * @throws {RequiredError}
1454
1627
  */
1455
1628
  retrieveFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
1629
+ /**
1630
+ *
1631
+ * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
1632
+ * @param {string} model The ID of the model to use for this request
1633
+ * @param {*} [options] Override http request option.
1634
+ * @throws {RequiredError}
1635
+ */
1636
+ retrieveModel(model: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Model>>;
1456
1637
  };
1457
1638
  /**
1458
1639
  * OpenAIApi - factory interface
@@ -1472,6 +1653,7 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1472
1653
  * @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).
1473
1654
  * @param {CreateAnswerRequest} createAnswerRequest
1474
1655
  * @param {*} [options] Override http request option.
1656
+ * @deprecated
1475
1657
  * @throws {RequiredError}
1476
1658
  */
1477
1659
  createAnswer(createAnswerRequest: CreateAnswerRequest, options?: any): AxiosPromise<CreateAnswerResponse>;
@@ -1480,40 +1662,39 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1480
1662
  * @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.
1481
1663
  * @param {CreateClassificationRequest} createClassificationRequest
1482
1664
  * @param {*} [options] Override http request option.
1665
+ * @deprecated
1483
1666
  * @throws {RequiredError}
1484
1667
  */
1485
1668
  createClassification(createClassificationRequest: CreateClassificationRequest, options?: any): AxiosPromise<CreateClassificationResponse>;
1486
1669
  /**
1487
1670
  *
1488
- * @summary Creates a new completion for the provided prompt and parameters
1489
- * @param {string} engineId The ID of the engine to use for this request
1671
+ * @summary Creates a completion for the provided prompt and parameters
1490
1672
  * @param {CreateCompletionRequest} createCompletionRequest
1491
1673
  * @param {*} [options] Override http request option.
1492
1674
  * @throws {RequiredError}
1493
1675
  */
1494
- createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
1676
+ createCompletion(createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
1495
1677
  /**
1496
1678
  *
1497
- * @summary Creates a completion using a fine-tuned model
1498
- * @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
1679
+ * @summary Creates a new edit for the provided input, instruction, and parameters
1680
+ * @param {CreateEditRequest} createEditRequest
1499
1681
  * @param {*} [options] Override http request option.
1500
1682
  * @throws {RequiredError}
1501
1683
  */
1502
- createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
1684
+ createEdit(createEditRequest: CreateEditRequest, options?: any): AxiosPromise<CreateEditResponse>;
1503
1685
  /**
1504
1686
  *
1505
1687
  * @summary Creates an embedding vector representing the input text.
1506
- * @param {string} engineId The ID of the engine to use for this request
1507
1688
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1508
1689
  * @param {*} [options] Override http request option.
1509
1690
  * @throws {RequiredError}
1510
1691
  */
1511
- createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: any): AxiosPromise<CreateEmbeddingResponse>;
1692
+ createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: any): AxiosPromise<CreateEmbeddingResponse>;
1512
1693
  /**
1513
1694
  *
1514
1695
  * @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.
1515
- * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;search\\\&quot; or \\\&quot;answers\\\&quot;, each line is a JSON record with a \\\&quot;text\\\&quot; field and an optional \\\&quot;metadata\\\&quot; field. Only \\\&quot;text\\\&quot; field will be used for search. Specially, when the &#x60;purpose&#x60; is \\\&quot;answers\\\&quot;, \\\&quot;\\\\n\\\&quot; is used as a delimiter to chunk contents in the \\\&quot;text\\\&quot; field into multiple documents for finer-grained matching. If the &#x60;purpose&#x60; is set to \\\&quot;classifications\\\&quot;, each line is a JSON record representing a single training example with \\\&quot;text\\\&quot; and \\\&quot;label\\\&quot; fields along with an optional \\\&quot;metadata\\\&quot; field. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1516
- * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;search\\\&quot; for [Search](/docs/api-reference/searches), \\\&quot;answers\\\&quot; for [Answers](/docs/api-reference/answers), \\\&quot;classifications\\\&quot; for [Classifications](/docs/api-reference/classifications) and \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1696
+ * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1697
+ * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1517
1698
  * @param {*} [options] Override http request option.
1518
1699
  * @throws {RequiredError}
1519
1700
  */
@@ -1532,6 +1713,7 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1532
1713
  * @param {string} engineId The ID of the engine to use for this request. You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.
1533
1714
  * @param {CreateSearchRequest} createSearchRequest
1534
1715
  * @param {*} [options] Override http request option.
1716
+ * @deprecated
1535
1717
  * @throws {RequiredError}
1536
1718
  */
1537
1719
  createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: any): AxiosPromise<CreateSearchResponse>;
@@ -1543,6 +1725,14 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1543
1725
  * @throws {RequiredError}
1544
1726
  */
1545
1727
  deleteFile(fileId: string, options?: any): AxiosPromise<DeleteFileResponse>;
1728
+ /**
1729
+ *
1730
+ * @summary Delete a fine-tuned model. You must have the Owner role in your organization.
1731
+ * @param {string} model The model to delete
1732
+ * @param {*} [options] Override http request option.
1733
+ * @throws {RequiredError}
1734
+ */
1735
+ deleteModel(model: string, options?: any): AxiosPromise<DeleteModelResponse>;
1546
1736
  /**
1547
1737
  *
1548
1738
  * @summary Returns the contents of the specified file
@@ -1553,8 +1743,9 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1553
1743
  downloadFile(fileId: string, options?: any): AxiosPromise<string>;
1554
1744
  /**
1555
1745
  *
1556
- * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1746
+ * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
1557
1747
  * @param {*} [options] Override http request option.
1748
+ * @deprecated
1558
1749
  * @throws {RequiredError}
1559
1750
  */
1560
1751
  listEngines(options?: any): AxiosPromise<ListEnginesResponse>;
@@ -1583,9 +1774,17 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1583
1774
  listFineTunes(options?: any): AxiosPromise<ListFineTunesResponse>;
1584
1775
  /**
1585
1776
  *
1586
- * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1777
+ * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
1778
+ * @param {*} [options] Override http request option.
1779
+ * @throws {RequiredError}
1780
+ */
1781
+ listModels(options?: any): AxiosPromise<ListModelsResponse>;
1782
+ /**
1783
+ *
1784
+ * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
1587
1785
  * @param {string} engineId The ID of the engine to use for this request
1588
1786
  * @param {*} [options] Override http request option.
1787
+ * @deprecated
1589
1788
  * @throws {RequiredError}
1590
1789
  */
1591
1790
  retrieveEngine(engineId: string, options?: any): AxiosPromise<Engine>;
@@ -1605,6 +1804,14 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1605
1804
  * @throws {RequiredError}
1606
1805
  */
1607
1806
  retrieveFineTune(fineTuneId: string, options?: any): AxiosPromise<FineTune>;
1807
+ /**
1808
+ *
1809
+ * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
1810
+ * @param {string} model The ID of the model to use for this request
1811
+ * @param {*} [options] Override http request option.
1812
+ * @throws {RequiredError}
1813
+ */
1814
+ retrieveModel(model: string, options?: any): AxiosPromise<Model>;
1608
1815
  };
1609
1816
  /**
1610
1817
  * OpenAIApi - object-oriented interface
@@ -1627,6 +1834,7 @@ export declare class OpenAIApi extends BaseAPI {
1627
1834
  * @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).
1628
1835
  * @param {CreateAnswerRequest} createAnswerRequest
1629
1836
  * @param {*} [options] Override http request option.
1837
+ * @deprecated
1630
1838
  * @throws {RequiredError}
1631
1839
  * @memberof OpenAIApi
1632
1840
  */
@@ -1636,44 +1844,43 @@ export declare class OpenAIApi extends BaseAPI {
1636
1844
  * @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.
1637
1845
  * @param {CreateClassificationRequest} createClassificationRequest
1638
1846
  * @param {*} [options] Override http request option.
1847
+ * @deprecated
1639
1848
  * @throws {RequiredError}
1640
1849
  * @memberof OpenAIApi
1641
1850
  */
1642
1851
  createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateClassificationResponse, any>>;
1643
1852
  /**
1644
1853
  *
1645
- * @summary Creates a new completion for the provided prompt and parameters
1646
- * @param {string} engineId The ID of the engine to use for this request
1854
+ * @summary Creates a completion for the provided prompt and parameters
1647
1855
  * @param {CreateCompletionRequest} createCompletionRequest
1648
1856
  * @param {*} [options] Override http request option.
1649
1857
  * @throws {RequiredError}
1650
1858
  * @memberof OpenAIApi
1651
1859
  */
1652
- createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
1860
+ createCompletion(createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
1653
1861
  /**
1654
1862
  *
1655
- * @summary Creates a completion using a fine-tuned model
1656
- * @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
1863
+ * @summary Creates a new edit for the provided input, instruction, and parameters
1864
+ * @param {CreateEditRequest} createEditRequest
1657
1865
  * @param {*} [options] Override http request option.
1658
1866
  * @throws {RequiredError}
1659
1867
  * @memberof OpenAIApi
1660
1868
  */
1661
- createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
1869
+ createEdit(createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEditResponse, any>>;
1662
1870
  /**
1663
1871
  *
1664
1872
  * @summary Creates an embedding vector representing the input text.
1665
- * @param {string} engineId The ID of the engine to use for this request
1666
1873
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1667
1874
  * @param {*} [options] Override http request option.
1668
1875
  * @throws {RequiredError}
1669
1876
  * @memberof OpenAIApi
1670
1877
  */
1671
- createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEmbeddingResponse, any>>;
1878
+ createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEmbeddingResponse, any>>;
1672
1879
  /**
1673
1880
  *
1674
1881
  * @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.
1675
- * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;search\\\&quot; or \\\&quot;answers\\\&quot;, each line is a JSON record with a \\\&quot;text\\\&quot; field and an optional \\\&quot;metadata\\\&quot; field. Only \\\&quot;text\\\&quot; field will be used for search. Specially, when the &#x60;purpose&#x60; is \\\&quot;answers\\\&quot;, \\\&quot;\\\\n\\\&quot; is used as a delimiter to chunk contents in the \\\&quot;text\\\&quot; field into multiple documents for finer-grained matching. If the &#x60;purpose&#x60; is set to \\\&quot;classifications\\\&quot;, each line is a JSON record representing a single training example with \\\&quot;text\\\&quot; and \\\&quot;label\\\&quot; fields along with an optional \\\&quot;metadata\\\&quot; field. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1676
- * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;search\\\&quot; for [Search](/docs/api-reference/searches), \\\&quot;answers\\\&quot; for [Answers](/docs/api-reference/answers), \\\&quot;classifications\\\&quot; for [Classifications](/docs/api-reference/classifications) and \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1882
+ * @param {any} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the &#x60;purpose&#x60; is set to \\\&quot;fine-tune\\\&quot;, each line is a JSON record with \\\&quot;prompt\\\&quot; and \\\&quot;completion\\\&quot; fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
1883
+ * @param {string} purpose The intended purpose of the uploaded documents. Use \\\&quot;fine-tune\\\&quot; for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
1677
1884
  * @param {*} [options] Override http request option.
1678
1885
  * @throws {RequiredError}
1679
1886
  * @memberof OpenAIApi
@@ -1694,6 +1901,7 @@ export declare class OpenAIApi extends BaseAPI {
1694
1901
  * @param {string} engineId The ID of the engine to use for this request. You can select one of &#x60;ada&#x60;, &#x60;babbage&#x60;, &#x60;curie&#x60;, or &#x60;davinci&#x60;.
1695
1902
  * @param {CreateSearchRequest} createSearchRequest
1696
1903
  * @param {*} [options] Override http request option.
1904
+ * @deprecated
1697
1905
  * @throws {RequiredError}
1698
1906
  * @memberof OpenAIApi
1699
1907
  */
@@ -1707,6 +1915,15 @@ export declare class OpenAIApi extends BaseAPI {
1707
1915
  * @memberof OpenAIApi
1708
1916
  */
1709
1917
  deleteFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteFileResponse, any>>;
1918
+ /**
1919
+ *
1920
+ * @summary Delete a fine-tuned model. You must have the Owner role in your organization.
1921
+ * @param {string} model The model to delete
1922
+ * @param {*} [options] Override http request option.
1923
+ * @throws {RequiredError}
1924
+ * @memberof OpenAIApi
1925
+ */
1926
+ deleteModel(model: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteModelResponse, any>>;
1710
1927
  /**
1711
1928
  *
1712
1929
  * @summary Returns the contents of the specified file
@@ -1718,8 +1935,9 @@ export declare class OpenAIApi extends BaseAPI {
1718
1935
  downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
1719
1936
  /**
1720
1937
  *
1721
- * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1938
+ * @summary Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
1722
1939
  * @param {*} [options] Override http request option.
1940
+ * @deprecated
1723
1941
  * @throws {RequiredError}
1724
1942
  * @memberof OpenAIApi
1725
1943
  */
@@ -1752,9 +1970,18 @@ export declare class OpenAIApi extends BaseAPI {
1752
1970
  listFineTunes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFineTunesResponse, any>>;
1753
1971
  /**
1754
1972
  *
1755
- * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1973
+ * @summary Lists the currently available models, and provides basic information about each one such as the owner and availability.
1974
+ * @param {*} [options] Override http request option.
1975
+ * @throws {RequiredError}
1976
+ * @memberof OpenAIApi
1977
+ */
1978
+ listModels(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListModelsResponse, any>>;
1979
+ /**
1980
+ *
1981
+ * @summary Retrieves a model instance, providing basic information about it such as the owner and availability.
1756
1982
  * @param {string} engineId The ID of the engine to use for this request
1757
1983
  * @param {*} [options] Override http request option.
1984
+ * @deprecated
1758
1985
  * @throws {RequiredError}
1759
1986
  * @memberof OpenAIApi
1760
1987
  */
@@ -1777,4 +2004,13 @@ export declare class OpenAIApi extends BaseAPI {
1777
2004
  * @memberof OpenAIApi
1778
2005
  */
1779
2006
  retrieveFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
2007
+ /**
2008
+ *
2009
+ * @summary Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
2010
+ * @param {string} model The ID of the model to use for this request
2011
+ * @param {*} [options] Override http request option.
2012
+ * @throws {RequiredError}
2013
+ * @memberof OpenAIApi
2014
+ */
2015
+ retrieveModel(model: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Model, any>>;
1780
2016
  }