openai 2.0.5 → 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.4
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,7 +19,7 @@ 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
  */
@@ -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}
@@ -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<CreateAnswerResponseSelectedDocuments>}
174
+ * @type {Array<CreateAnswerResponseSelectedDocumentsInner>}
169
175
  * @memberof CreateAnswerResponse
170
176
  */
171
- 'selected_documents'?: Array<CreateAnswerResponseSelectedDocuments>;
177
+ 'selected_documents'?: Array<CreateAnswerResponseSelectedDocumentsInner>;
172
178
  }
173
179
  /**
174
180
  *
175
181
  * @export
176
- * @interface CreateAnswerResponseSelectedDocuments
182
+ * @interface CreateAnswerResponseSelectedDocumentsInner
177
183
  */
178
- export interface CreateAnswerResponseSelectedDocuments {
184
+ export interface CreateAnswerResponseSelectedDocumentsInner {
179
185
  /**
180
186
  *
181
187
  * @type {number}
182
- * @memberof CreateAnswerResponseSelectedDocuments
188
+ * @memberof CreateAnswerResponseSelectedDocumentsInner
183
189
  */
184
190
  'document'?: number;
185
191
  /**
186
192
  *
187
193
  * @type {string}
188
- * @memberof CreateAnswerResponseSelectedDocuments
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 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.
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 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`.
230
236
  * @type {string}
231
237
  * @memberof CreateClassificationRequest
232
238
  */
@@ -318,170 +324,60 @@ export interface CreateClassificationResponse {
318
324
  'label'?: string;
319
325
  /**
320
326
  *
321
- * @type {Array<CreateClassificationResponseSelectedExamples>}
327
+ * @type {Array<CreateClassificationResponseSelectedExamplesInner>}
322
328
  * @memberof CreateClassificationResponse
323
329
  */
324
- 'selected_examples'?: Array<CreateClassificationResponseSelectedExamples>;
330
+ 'selected_examples'?: Array<CreateClassificationResponseSelectedExamplesInner>;
325
331
  }
326
332
  /**
327
333
  *
328
334
  * @export
329
- * @interface CreateClassificationResponseSelectedExamples
335
+ * @interface CreateClassificationResponseSelectedExamplesInner
330
336
  */
331
- export interface CreateClassificationResponseSelectedExamples {
337
+ export interface CreateClassificationResponseSelectedExamplesInner {
332
338
  /**
333
339
  *
334
340
  * @type {number}
335
- * @memberof CreateClassificationResponseSelectedExamples
341
+ * @memberof CreateClassificationResponseSelectedExamplesInner
336
342
  */
337
343
  'document'?: number;
338
344
  /**
339
345
  *
340
346
  * @type {string}
341
- * @memberof CreateClassificationResponseSelectedExamples
347
+ * @memberof CreateClassificationResponseSelectedExamplesInner
342
348
  */
343
349
  'text'?: string;
344
350
  /**
345
351
  *
346
352
  * @type {string}
347
- * @memberof CreateClassificationResponseSelectedExamples
353
+ * @memberof CreateClassificationResponseSelectedExamplesInner
348
354
  */
349
355
  'label'?: string;
350
356
  }
351
357
  /**
352
358
  *
353
359
  * @export
354
- * @interface CreateCompletionFromModelRequest
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 CreateCompletionFromModelRequestAllOf {
362
+ export interface CreateCompletionRequest {
460
363
  /**
461
- * 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.
462
365
  * @type {string}
463
- * @memberof CreateCompletionFromModelRequestAllOf
366
+ * @memberof CreateCompletionRequest
464
367
  */
465
- 'model'?: string;
466
- }
467
- /**
468
- *
469
- * @export
470
- * @interface CreateCompletionRequest
471
- */
472
- export interface CreateCompletionRequest {
368
+ 'model': string;
473
369
  /**
474
- * 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.
475
- * @type {string | Array<string> | Array<number> | Array<any>}
370
+ *
371
+ * @type {CreateCompletionRequestPrompt}
476
372
  * @memberof CreateCompletionRequest
477
373
  */
478
- 'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
374
+ 'prompt'?: CreateCompletionRequestPrompt | null;
479
375
  /**
480
- * The suffix that comes after a completion of inserted text, encoded as a string or array of strings.
481
- * @type {string | Array<string>}
376
+ * The suffix that comes after a completion of inserted text.
377
+ * @type {string}
482
378
  * @memberof CreateCompletionRequest
483
379
  */
484
- 'suffix'?: string | Array<string> | null;
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}
@@ -525,11 +421,11 @@ export interface CreateCompletionRequest {
525
421
  */
526
422
  'echo'?: boolean | null;
527
423
  /**
528
- * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
529
- * @type {string | Array<string>}
424
+ *
425
+ * @type {CreateCompletionRequestStop}
530
426
  * @memberof CreateCompletionRequest
531
427
  */
532
- 'stop'?: string | Array<string> | null;
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 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`.
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
@@ -593,70 +501,70 @@ export interface CreateCompletionResponse {
593
501
  'model'?: string;
594
502
  /**
595
503
  *
596
- * @type {Array<CreateCompletionResponseChoices>}
504
+ * @type {Array<CreateCompletionResponseChoicesInner>}
597
505
  * @memberof CreateCompletionResponse
598
506
  */
599
- 'choices'?: Array<CreateCompletionResponseChoices>;
507
+ 'choices'?: Array<CreateCompletionResponseChoicesInner>;
600
508
  }
601
509
  /**
602
510
  *
603
511
  * @export
604
- * @interface CreateCompletionResponseChoices
512
+ * @interface CreateCompletionResponseChoicesInner
605
513
  */
606
- export interface CreateCompletionResponseChoices {
514
+ export interface CreateCompletionResponseChoicesInner {
607
515
  /**
608
516
  *
609
517
  * @type {string}
610
- * @memberof CreateCompletionResponseChoices
518
+ * @memberof CreateCompletionResponseChoicesInner
611
519
  */
612
520
  'text'?: string;
613
521
  /**
614
522
  *
615
523
  * @type {number}
616
- * @memberof CreateCompletionResponseChoices
524
+ * @memberof CreateCompletionResponseChoicesInner
617
525
  */
618
526
  'index'?: number;
619
527
  /**
620
528
  *
621
- * @type {CreateCompletionResponseLogprobs}
622
- * @memberof CreateCompletionResponseChoices
529
+ * @type {CreateCompletionResponseChoicesInnerLogprobs}
530
+ * @memberof CreateCompletionResponseChoicesInner
623
531
  */
624
- 'logprobs'?: CreateCompletionResponseLogprobs | null;
532
+ 'logprobs'?: CreateCompletionResponseChoicesInnerLogprobs | null;
625
533
  /**
626
534
  *
627
535
  * @type {string}
628
- * @memberof CreateCompletionResponseChoices
536
+ * @memberof CreateCompletionResponseChoicesInner
629
537
  */
630
538
  'finish_reason'?: string;
631
539
  }
632
540
  /**
633
541
  *
634
542
  * @export
635
- * @interface CreateCompletionResponseLogprobs
543
+ * @interface CreateCompletionResponseChoicesInnerLogprobs
636
544
  */
637
- export interface CreateCompletionResponseLogprobs {
545
+ export interface CreateCompletionResponseChoicesInnerLogprobs {
638
546
  /**
639
547
  *
640
548
  * @type {Array<string>}
641
- * @memberof CreateCompletionResponseLogprobs
549
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
642
550
  */
643
551
  'tokens'?: Array<string>;
644
552
  /**
645
553
  *
646
554
  * @type {Array<number>}
647
- * @memberof CreateCompletionResponseLogprobs
555
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
648
556
  */
649
557
  'token_logprobs'?: Array<number>;
650
558
  /**
651
559
  *
652
560
  * @type {Array<object>}
653
- * @memberof CreateCompletionResponseLogprobs
561
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
654
562
  */
655
563
  'top_logprobs'?: Array<object>;
656
564
  /**
657
565
  *
658
566
  * @type {Array<number>}
659
- * @memberof CreateCompletionResponseLogprobs
567
+ * @memberof CreateCompletionResponseChoicesInnerLogprobs
660
568
  */
661
569
  'text_offset'?: Array<number>;
662
570
  }
@@ -666,6 +574,12 @@ export interface CreateCompletionResponseLogprobs {
666
574
  * @interface CreateEditRequest
667
575
  */
668
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;
669
583
  /**
670
584
  * The input text to use as a starting point for the edit.
671
585
  * @type {string}
@@ -678,6 +592,12 @@ export interface CreateEditRequest {
678
592
  * @memberof CreateEditRequest
679
593
  */
680
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;
681
601
  /**
682
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.
683
603
  * @type {number}
@@ -723,10 +643,10 @@ export interface CreateEditResponse {
723
643
  'model'?: string;
724
644
  /**
725
645
  *
726
- * @type {Array<CreateCompletionResponseChoices>}
646
+ * @type {Array<CreateCompletionResponseChoicesInner>}
727
647
  * @memberof CreateEditResponse
728
648
  */
729
- 'choices'?: Array<CreateCompletionResponseChoices>;
649
+ 'choices'?: Array<CreateCompletionResponseChoicesInner>;
730
650
  }
731
651
  /**
732
652
  *
@@ -735,11 +655,17 @@ export interface CreateEditResponse {
735
655
  */
736
656
  export interface CreateEmbeddingRequest {
737
657
  /**
738
- * 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.
739
- * @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}
740
666
  * @memberof CreateEmbeddingRequest
741
667
  */
742
- 'input': string | Array<string> | Array<number> | Array<any>;
668
+ 'input': CreateEmbeddingRequestInput;
743
669
  /**
744
670
  * A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
745
671
  * @type {string}
@@ -747,6 +673,12 @@ export interface CreateEmbeddingRequest {
747
673
  */
748
674
  'user'?: string;
749
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;
750
682
  /**
751
683
  *
752
684
  * @export
@@ -767,33 +699,33 @@ export interface CreateEmbeddingResponse {
767
699
  'model'?: string;
768
700
  /**
769
701
  *
770
- * @type {Array<CreateEmbeddingResponseData>}
702
+ * @type {Array<CreateEmbeddingResponseDataInner>}
771
703
  * @memberof CreateEmbeddingResponse
772
704
  */
773
- 'data'?: Array<CreateEmbeddingResponseData>;
705
+ 'data'?: Array<CreateEmbeddingResponseDataInner>;
774
706
  }
775
707
  /**
776
708
  *
777
709
  * @export
778
- * @interface CreateEmbeddingResponseData
710
+ * @interface CreateEmbeddingResponseDataInner
779
711
  */
780
- export interface CreateEmbeddingResponseData {
712
+ export interface CreateEmbeddingResponseDataInner {
781
713
  /**
782
714
  *
783
715
  * @type {number}
784
- * @memberof CreateEmbeddingResponseData
716
+ * @memberof CreateEmbeddingResponseDataInner
785
717
  */
786
718
  'index'?: number;
787
719
  /**
788
720
  *
789
721
  * @type {string}
790
- * @memberof CreateEmbeddingResponseData
722
+ * @memberof CreateEmbeddingResponseDataInner
791
723
  */
792
724
  'object'?: string;
793
725
  /**
794
726
  *
795
727
  * @type {Array<number>}
796
- * @memberof CreateEmbeddingResponseData
728
+ * @memberof CreateEmbeddingResponseDataInner
797
729
  */
798
730
  'embedding'?: Array<number>;
799
731
  }
@@ -816,7 +748,7 @@ export interface CreateFineTuneRequest {
816
748
  */
817
749
  'validation_file'?: string | null;
818
750
  /**
819
- * 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.
820
752
  * @type {string}
821
753
  * @memberof CreateFineTuneRequest
822
754
  */
@@ -939,33 +871,33 @@ export interface CreateSearchResponse {
939
871
  'model'?: string;
940
872
  /**
941
873
  *
942
- * @type {Array<CreateSearchResponseData>}
874
+ * @type {Array<CreateSearchResponseDataInner>}
943
875
  * @memberof CreateSearchResponse
944
876
  */
945
- 'data'?: Array<CreateSearchResponseData>;
877
+ 'data'?: Array<CreateSearchResponseDataInner>;
946
878
  }
947
879
  /**
948
880
  *
949
881
  * @export
950
- * @interface CreateSearchResponseData
882
+ * @interface CreateSearchResponseDataInner
951
883
  */
952
- export interface CreateSearchResponseData {
884
+ export interface CreateSearchResponseDataInner {
953
885
  /**
954
886
  *
955
887
  * @type {string}
956
- * @memberof CreateSearchResponseData
888
+ * @memberof CreateSearchResponseDataInner
957
889
  */
958
890
  'object'?: string;
959
891
  /**
960
892
  *
961
893
  * @type {number}
962
- * @memberof CreateSearchResponseData
894
+ * @memberof CreateSearchResponseDataInner
963
895
  */
964
896
  'document'?: number;
965
897
  /**
966
898
  *
967
899
  * @type {number}
968
- * @memberof CreateSearchResponseData
900
+ * @memberof CreateSearchResponseDataInner
969
901
  */
970
902
  'score'?: number;
971
903
  }
@@ -1242,6 +1174,56 @@ export interface ListFineTunesResponse {
1242
1174
  */
1243
1175
  'data'?: Array<FineTune>;
1244
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
+ }
1245
1227
  /**
1246
1228
  *
1247
1229
  * @export
@@ -1315,6 +1297,7 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1315
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).
1316
1298
  * @param {CreateAnswerRequest} createAnswerRequest
1317
1299
  * @param {*} [options] Override http request option.
1300
+ * @deprecated
1318
1301
  * @throws {RequiredError}
1319
1302
  */
1320
1303
  createAnswer: (createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1323,49 +1306,39 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1323
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.
1324
1307
  * @param {CreateClassificationRequest} createClassificationRequest
1325
1308
  * @param {*} [options] Override http request option.
1309
+ * @deprecated
1326
1310
  * @throws {RequiredError}
1327
1311
  */
1328
1312
  createClassification: (createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1329
1313
  /**
1330
1314
  *
1331
- * @summary Creates a new completion for the provided prompt and parameters
1332
- * @param {string} engineId The ID of the engine to use for this request
1315
+ * @summary Creates a completion for the provided prompt and parameters
1333
1316
  * @param {CreateCompletionRequest} createCompletionRequest
1334
1317
  * @param {*} [options] Override http request option.
1335
1318
  * @throws {RequiredError}
1336
1319
  */
1337
- createCompletion: (engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
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>;
1320
+ createCompletion: (createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1346
1321
  /**
1347
1322
  *
1348
1323
  * @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
1324
  * @param {CreateEditRequest} createEditRequest
1351
1325
  * @param {*} [options] Override http request option.
1352
1326
  * @throws {RequiredError}
1353
1327
  */
1354
- createEdit: (engineId: string, createEditRequest: CreateEditRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1328
+ createEdit: (createEditRequest: CreateEditRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1355
1329
  /**
1356
1330
  *
1357
1331
  * @summary Creates an embedding vector representing the input text.
1358
- * @param {string} engineId The ID of the engine to use for this request
1359
1332
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1360
1333
  * @param {*} [options] Override http request option.
1361
1334
  * @throws {RequiredError}
1362
1335
  */
1363
- createEmbedding: (engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1336
+ createEmbedding: (createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1364
1337
  /**
1365
1338
  *
1366
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.
1367
- * @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).
1368
- * @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.
1369
1342
  * @param {*} [options] Override http request option.
1370
1343
  * @throws {RequiredError}
1371
1344
  */
@@ -1384,6 +1357,7 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1384
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;.
1385
1358
  * @param {CreateSearchRequest} createSearchRequest
1386
1359
  * @param {*} [options] Override http request option.
1360
+ * @deprecated
1387
1361
  * @throws {RequiredError}
1388
1362
  */
1389
1363
  createSearch: (engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1413,8 +1387,9 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1413
1387
  downloadFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1414
1388
  /**
1415
1389
  *
1416
- * @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.
1417
1391
  * @param {*} [options] Override http request option.
1392
+ * @deprecated
1418
1393
  * @throws {RequiredError}
1419
1394
  */
1420
1395
  listEngines: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1443,9 +1418,17 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1443
1418
  listFineTunes: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
1444
1419
  /**
1445
1420
  *
1446
- * @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.
1447
1429
  * @param {string} engineId The ID of the engine to use for this request
1448
1430
  * @param {*} [options] Override http request option.
1431
+ * @deprecated
1449
1432
  * @throws {RequiredError}
1450
1433
  */
1451
1434
  retrieveEngine: (engineId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
@@ -1465,6 +1448,14 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
1465
1448
  * @throws {RequiredError}
1466
1449
  */
1467
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>;
1468
1459
  };
1469
1460
  /**
1470
1461
  * OpenAIApi - functional programming interface
@@ -1484,6 +1475,7 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1484
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).
1485
1476
  * @param {CreateAnswerRequest} createAnswerRequest
1486
1477
  * @param {*} [options] Override http request option.
1478
+ * @deprecated
1487
1479
  * @throws {RequiredError}
1488
1480
  */
1489
1481
  createAnswer(createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAnswerResponse>>;
@@ -1492,49 +1484,39 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1492
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.
1493
1485
  * @param {CreateClassificationRequest} createClassificationRequest
1494
1486
  * @param {*} [options] Override http request option.
1487
+ * @deprecated
1495
1488
  * @throws {RequiredError}
1496
1489
  */
1497
1490
  createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateClassificationResponse>>;
1498
1491
  /**
1499
1492
  *
1500
- * @summary Creates a new completion for the provided prompt and parameters
1501
- * @param {string} engineId The ID of the engine to use for this request
1493
+ * @summary Creates a completion for the provided prompt and parameters
1502
1494
  * @param {CreateCompletionRequest} createCompletionRequest
1503
1495
  * @param {*} [options] Override http request option.
1504
1496
  * @throws {RequiredError}
1505
1497
  */
1506
- createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
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>>;
1498
+ createCompletion(createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
1515
1499
  /**
1516
1500
  *
1517
1501
  * @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
1502
  * @param {CreateEditRequest} createEditRequest
1520
1503
  * @param {*} [options] Override http request option.
1521
1504
  * @throws {RequiredError}
1522
1505
  */
1523
- createEdit(engineId: string, createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEditResponse>>;
1506
+ createEdit(createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEditResponse>>;
1524
1507
  /**
1525
1508
  *
1526
1509
  * @summary Creates an embedding vector representing the input text.
1527
- * @param {string} engineId The ID of the engine to use for this request
1528
1510
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1529
1511
  * @param {*} [options] Override http request option.
1530
1512
  * @throws {RequiredError}
1531
1513
  */
1532
- 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>>;
1533
1515
  /**
1534
1516
  *
1535
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.
1536
- * @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).
1537
- * @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.
1538
1520
  * @param {*} [options] Override http request option.
1539
1521
  * @throws {RequiredError}
1540
1522
  */
@@ -1553,6 +1535,7 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1553
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;.
1554
1536
  * @param {CreateSearchRequest} createSearchRequest
1555
1537
  * @param {*} [options] Override http request option.
1538
+ * @deprecated
1556
1539
  * @throws {RequiredError}
1557
1540
  */
1558
1541
  createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateSearchResponse>>;
@@ -1582,8 +1565,9 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1582
1565
  downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
1583
1566
  /**
1584
1567
  *
1585
- * @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.
1586
1569
  * @param {*} [options] Override http request option.
1570
+ * @deprecated
1587
1571
  * @throws {RequiredError}
1588
1572
  */
1589
1573
  listEngines(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEnginesResponse>>;
@@ -1612,9 +1596,17 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1612
1596
  listFineTunes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFineTunesResponse>>;
1613
1597
  /**
1614
1598
  *
1615
- * @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.
1616
1607
  * @param {string} engineId The ID of the engine to use for this request
1617
1608
  * @param {*} [options] Override http request option.
1609
+ * @deprecated
1618
1610
  * @throws {RequiredError}
1619
1611
  */
1620
1612
  retrieveEngine(engineId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Engine>>;
@@ -1634,6 +1626,14 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1634
1626
  * @throws {RequiredError}
1635
1627
  */
1636
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>>;
1637
1637
  };
1638
1638
  /**
1639
1639
  * OpenAIApi - factory interface
@@ -1653,6 +1653,7 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1653
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).
1654
1654
  * @param {CreateAnswerRequest} createAnswerRequest
1655
1655
  * @param {*} [options] Override http request option.
1656
+ * @deprecated
1656
1657
  * @throws {RequiredError}
1657
1658
  */
1658
1659
  createAnswer(createAnswerRequest: CreateAnswerRequest, options?: any): AxiosPromise<CreateAnswerResponse>;
@@ -1661,49 +1662,39 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1661
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.
1662
1663
  * @param {CreateClassificationRequest} createClassificationRequest
1663
1664
  * @param {*} [options] Override http request option.
1665
+ * @deprecated
1664
1666
  * @throws {RequiredError}
1665
1667
  */
1666
1668
  createClassification(createClassificationRequest: CreateClassificationRequest, options?: any): AxiosPromise<CreateClassificationResponse>;
1667
1669
  /**
1668
1670
  *
1669
- * @summary Creates a new completion for the provided prompt and parameters
1670
- * @param {string} engineId The ID of the engine to use for this request
1671
+ * @summary Creates a completion for the provided prompt and parameters
1671
1672
  * @param {CreateCompletionRequest} createCompletionRequest
1672
1673
  * @param {*} [options] Override http request option.
1673
1674
  * @throws {RequiredError}
1674
1675
  */
1675
- createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
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>;
1676
+ createCompletion(createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
1684
1677
  /**
1685
1678
  *
1686
1679
  * @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
1680
  * @param {CreateEditRequest} createEditRequest
1689
1681
  * @param {*} [options] Override http request option.
1690
1682
  * @throws {RequiredError}
1691
1683
  */
1692
- createEdit(engineId: string, createEditRequest: CreateEditRequest, options?: any): AxiosPromise<CreateEditResponse>;
1684
+ createEdit(createEditRequest: CreateEditRequest, options?: any): AxiosPromise<CreateEditResponse>;
1693
1685
  /**
1694
1686
  *
1695
1687
  * @summary Creates an embedding vector representing the input text.
1696
- * @param {string} engineId The ID of the engine to use for this request
1697
1688
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1698
1689
  * @param {*} [options] Override http request option.
1699
1690
  * @throws {RequiredError}
1700
1691
  */
1701
- createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: any): AxiosPromise<CreateEmbeddingResponse>;
1692
+ createEmbedding(createEmbeddingRequest: CreateEmbeddingRequest, options?: any): AxiosPromise<CreateEmbeddingResponse>;
1702
1693
  /**
1703
1694
  *
1704
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.
1705
- * @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).
1706
- * @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.
1707
1698
  * @param {*} [options] Override http request option.
1708
1699
  * @throws {RequiredError}
1709
1700
  */
@@ -1722,6 +1713,7 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1722
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;.
1723
1714
  * @param {CreateSearchRequest} createSearchRequest
1724
1715
  * @param {*} [options] Override http request option.
1716
+ * @deprecated
1725
1717
  * @throws {RequiredError}
1726
1718
  */
1727
1719
  createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: any): AxiosPromise<CreateSearchResponse>;
@@ -1751,8 +1743,9 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1751
1743
  downloadFile(fileId: string, options?: any): AxiosPromise<string>;
1752
1744
  /**
1753
1745
  *
1754
- * @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.
1755
1747
  * @param {*} [options] Override http request option.
1748
+ * @deprecated
1756
1749
  * @throws {RequiredError}
1757
1750
  */
1758
1751
  listEngines(options?: any): AxiosPromise<ListEnginesResponse>;
@@ -1781,9 +1774,17 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1781
1774
  listFineTunes(options?: any): AxiosPromise<ListFineTunesResponse>;
1782
1775
  /**
1783
1776
  *
1784
- * @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.
1785
1785
  * @param {string} engineId The ID of the engine to use for this request
1786
1786
  * @param {*} [options] Override http request option.
1787
+ * @deprecated
1787
1788
  * @throws {RequiredError}
1788
1789
  */
1789
1790
  retrieveEngine(engineId: string, options?: any): AxiosPromise<Engine>;
@@ -1803,6 +1804,14 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
1803
1804
  * @throws {RequiredError}
1804
1805
  */
1805
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>;
1806
1815
  };
1807
1816
  /**
1808
1817
  * OpenAIApi - object-oriented interface
@@ -1825,6 +1834,7 @@ export declare class OpenAIApi extends BaseAPI {
1825
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).
1826
1835
  * @param {CreateAnswerRequest} createAnswerRequest
1827
1836
  * @param {*} [options] Override http request option.
1837
+ * @deprecated
1828
1838
  * @throws {RequiredError}
1829
1839
  * @memberof OpenAIApi
1830
1840
  */
@@ -1834,54 +1844,43 @@ export declare class OpenAIApi extends BaseAPI {
1834
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.
1835
1845
  * @param {CreateClassificationRequest} createClassificationRequest
1836
1846
  * @param {*} [options] Override http request option.
1847
+ * @deprecated
1837
1848
  * @throws {RequiredError}
1838
1849
  * @memberof OpenAIApi
1839
1850
  */
1840
1851
  createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateClassificationResponse, any>>;
1841
1852
  /**
1842
1853
  *
1843
- * @summary Creates a new completion for the provided prompt and parameters
1844
- * @param {string} engineId The ID of the engine to use for this request
1854
+ * @summary Creates a completion for the provided prompt and parameters
1845
1855
  * @param {CreateCompletionRequest} createCompletionRequest
1846
1856
  * @param {*} [options] Override http request option.
1847
1857
  * @throws {RequiredError}
1848
1858
  * @memberof OpenAIApi
1849
1859
  */
1850
- createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
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>>;
1860
+ createCompletion(createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
1860
1861
  /**
1861
1862
  *
1862
1863
  * @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
1864
  * @param {CreateEditRequest} createEditRequest
1865
1865
  * @param {*} [options] Override http request option.
1866
1866
  * @throws {RequiredError}
1867
1867
  * @memberof OpenAIApi
1868
1868
  */
1869
- createEdit(engineId: string, createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEditResponse, any>>;
1869
+ createEdit(createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEditResponse, any>>;
1870
1870
  /**
1871
1871
  *
1872
1872
  * @summary Creates an embedding vector representing the input text.
1873
- * @param {string} engineId The ID of the engine to use for this request
1874
1873
  * @param {CreateEmbeddingRequest} createEmbeddingRequest
1875
1874
  * @param {*} [options] Override http request option.
1876
1875
  * @throws {RequiredError}
1877
1876
  * @memberof OpenAIApi
1878
1877
  */
1879
- 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>>;
1880
1879
  /**
1881
1880
  *
1882
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.
1883
- * @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).
1884
- * @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.
1885
1884
  * @param {*} [options] Override http request option.
1886
1885
  * @throws {RequiredError}
1887
1886
  * @memberof OpenAIApi
@@ -1902,6 +1901,7 @@ export declare class OpenAIApi extends BaseAPI {
1902
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;.
1903
1902
  * @param {CreateSearchRequest} createSearchRequest
1904
1903
  * @param {*} [options] Override http request option.
1904
+ * @deprecated
1905
1905
  * @throws {RequiredError}
1906
1906
  * @memberof OpenAIApi
1907
1907
  */
@@ -1935,8 +1935,9 @@ export declare class OpenAIApi extends BaseAPI {
1935
1935
  downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
1936
1936
  /**
1937
1937
  *
1938
- * @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.
1939
1939
  * @param {*} [options] Override http request option.
1940
+ * @deprecated
1940
1941
  * @throws {RequiredError}
1941
1942
  * @memberof OpenAIApi
1942
1943
  */
@@ -1969,9 +1970,18 @@ export declare class OpenAIApi extends BaseAPI {
1969
1970
  listFineTunes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFineTunesResponse, any>>;
1970
1971
  /**
1971
1972
  *
1972
- * @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.
1973
1982
  * @param {string} engineId The ID of the engine to use for this request
1974
1983
  * @param {*} [options] Override http request option.
1984
+ * @deprecated
1975
1985
  * @throws {RequiredError}
1976
1986
  * @memberof OpenAIApi
1977
1987
  */
@@ -1994,4 +2004,13 @@ export declare class OpenAIApi extends BaseAPI {
1994
2004
  * @memberof OpenAIApi
1995
2005
  */
1996
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>>;
1997
2016
  }