openai 2.0.1 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/VERSION +1 -1
- package/README.md +4 -5
- package/api.ts +488 -25
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +379 -25
- package/dist/api.js +203 -5
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +2 -2
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* OpenAI API
|
|
5
5
|
* APIs for sampling from and fine-tuning language models
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.
|
|
7
|
+
* The version of the OpenAPI document: 1.0.4
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -28,29 +28,29 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
28
28
|
*/
|
|
29
29
|
export interface CreateAnswerRequest {
|
|
30
30
|
/**
|
|
31
|
-
* ID of the engine to use for completion.
|
|
31
|
+
* ID of the engine to use for completion. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof CreateAnswerRequest
|
|
34
34
|
*/
|
|
35
|
-
'model'
|
|
35
|
+
'model': string;
|
|
36
36
|
/**
|
|
37
37
|
* Question to get answered.
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof CreateAnswerRequest
|
|
40
40
|
*/
|
|
41
|
-
'question'
|
|
41
|
+
'question': string;
|
|
42
42
|
/**
|
|
43
43
|
* 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.
|
|
44
44
|
* @type {Array<any>}
|
|
45
45
|
* @memberof CreateAnswerRequest
|
|
46
46
|
*/
|
|
47
|
-
'examples'
|
|
47
|
+
'examples': Array<any>;
|
|
48
48
|
/**
|
|
49
49
|
* A text snippet containing the contextual information used to generate the answers for the `examples` you provide.
|
|
50
50
|
* @type {string}
|
|
51
51
|
* @memberof CreateAnswerRequest
|
|
52
52
|
*/
|
|
53
|
-
'examples_context'
|
|
53
|
+
'examples_context': string;
|
|
54
54
|
/**
|
|
55
55
|
* 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.
|
|
56
56
|
* @type {Array<string>}
|
|
@@ -64,7 +64,7 @@ export interface CreateAnswerRequest {
|
|
|
64
64
|
*/
|
|
65
65
|
'file'?: string | null;
|
|
66
66
|
/**
|
|
67
|
-
* ID of the engine to use for [Search](/docs/api-reference/searches/create).
|
|
67
|
+
* ID of the engine to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
68
68
|
* @type {string}
|
|
69
69
|
* @memberof CreateAnswerRequest
|
|
70
70
|
*/
|
|
@@ -129,6 +129,12 @@ export interface CreateAnswerRequest {
|
|
|
129
129
|
* @memberof CreateAnswerRequest
|
|
130
130
|
*/
|
|
131
131
|
'expand'?: Array<any> | null;
|
|
132
|
+
/**
|
|
133
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof CreateAnswerRequest
|
|
136
|
+
*/
|
|
137
|
+
'user'?: string;
|
|
132
138
|
}
|
|
133
139
|
/**
|
|
134
140
|
*
|
|
@@ -199,17 +205,17 @@ export interface CreateAnswerResponseSelectedDocuments {
|
|
|
199
205
|
*/
|
|
200
206
|
export interface CreateClassificationRequest {
|
|
201
207
|
/**
|
|
202
|
-
* ID of the engine to use for completion.
|
|
208
|
+
* ID of the engine to use for completion. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
203
209
|
* @type {string}
|
|
204
210
|
* @memberof CreateClassificationRequest
|
|
205
211
|
*/
|
|
206
|
-
'model'
|
|
212
|
+
'model': string;
|
|
207
213
|
/**
|
|
208
214
|
* Query to be classified.
|
|
209
215
|
* @type {string}
|
|
210
216
|
* @memberof CreateClassificationRequest
|
|
211
217
|
*/
|
|
212
|
-
'query'
|
|
218
|
+
'query': string;
|
|
213
219
|
/**
|
|
214
220
|
* 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.
|
|
215
221
|
* @type {Array<any>}
|
|
@@ -229,7 +235,7 @@ export interface CreateClassificationRequest {
|
|
|
229
235
|
*/
|
|
230
236
|
'labels'?: Array<string> | null;
|
|
231
237
|
/**
|
|
232
|
-
* ID of the engine to use for [Search](/docs/api-reference/searches/create).
|
|
238
|
+
* ID of the engine to use for [Search](/docs/api-reference/searches/create). You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
233
239
|
* @type {string}
|
|
234
240
|
* @memberof CreateClassificationRequest
|
|
235
241
|
*/
|
|
@@ -276,6 +282,12 @@ export interface CreateClassificationRequest {
|
|
|
276
282
|
* @memberof CreateClassificationRequest
|
|
277
283
|
*/
|
|
278
284
|
'expand'?: Array<any> | null;
|
|
285
|
+
/**
|
|
286
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
287
|
+
* @type {string}
|
|
288
|
+
* @memberof CreateClassificationRequest
|
|
289
|
+
*/
|
|
290
|
+
'user'?: string;
|
|
279
291
|
}
|
|
280
292
|
/**
|
|
281
293
|
*
|
|
@@ -345,6 +357,122 @@ export interface CreateClassificationResponseSelectedExamples {
|
|
|
345
357
|
*/
|
|
346
358
|
'label'?: string;
|
|
347
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
*
|
|
362
|
+
* @export
|
|
363
|
+
* @interface CreateCompletionFromModelRequest
|
|
364
|
+
*/
|
|
365
|
+
export interface CreateCompletionFromModelRequest {
|
|
366
|
+
/**
|
|
367
|
+
* 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.
|
|
368
|
+
* @type {string | Array<string> | Array<number> | Array<any>}
|
|
369
|
+
* @memberof CreateCompletionFromModelRequest
|
|
370
|
+
*/
|
|
371
|
+
'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
|
|
372
|
+
/**
|
|
373
|
+
* The suffix that comes after a completion of inserted text, encoded as a string or array of strings.
|
|
374
|
+
* @type {string | Array<string>}
|
|
375
|
+
* @memberof CreateCompletionFromModelRequest
|
|
376
|
+
*/
|
|
377
|
+
'suffix'?: string | Array<string> | null;
|
|
378
|
+
/**
|
|
379
|
+
* 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).
|
|
380
|
+
* @type {number}
|
|
381
|
+
* @memberof CreateCompletionFromModelRequest
|
|
382
|
+
*/
|
|
383
|
+
'max_tokens'?: number | null;
|
|
384
|
+
/**
|
|
385
|
+
* 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.
|
|
386
|
+
* @type {number}
|
|
387
|
+
* @memberof CreateCompletionFromModelRequest
|
|
388
|
+
*/
|
|
389
|
+
'temperature'?: number | null;
|
|
390
|
+
/**
|
|
391
|
+
* 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.
|
|
392
|
+
* @type {number}
|
|
393
|
+
* @memberof CreateCompletionFromModelRequest
|
|
394
|
+
*/
|
|
395
|
+
'top_p'?: number | null;
|
|
396
|
+
/**
|
|
397
|
+
* 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`.
|
|
398
|
+
* @type {number}
|
|
399
|
+
* @memberof CreateCompletionFromModelRequest
|
|
400
|
+
*/
|
|
401
|
+
'n'?: number | null;
|
|
402
|
+
/**
|
|
403
|
+
* 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.
|
|
404
|
+
* @type {boolean}
|
|
405
|
+
* @memberof CreateCompletionFromModelRequest
|
|
406
|
+
*/
|
|
407
|
+
'stream'?: boolean | null;
|
|
408
|
+
/**
|
|
409
|
+
* 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.
|
|
410
|
+
* @type {number}
|
|
411
|
+
* @memberof CreateCompletionFromModelRequest
|
|
412
|
+
*/
|
|
413
|
+
'logprobs'?: number | null;
|
|
414
|
+
/**
|
|
415
|
+
* Echo back the prompt in addition to the completion
|
|
416
|
+
* @type {boolean}
|
|
417
|
+
* @memberof CreateCompletionFromModelRequest
|
|
418
|
+
*/
|
|
419
|
+
'echo'?: boolean | null;
|
|
420
|
+
/**
|
|
421
|
+
* Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
|
|
422
|
+
* @type {string | Array<string>}
|
|
423
|
+
* @memberof CreateCompletionFromModelRequest
|
|
424
|
+
*/
|
|
425
|
+
'stop'?: string | Array<string> | null;
|
|
426
|
+
/**
|
|
427
|
+
* 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)
|
|
428
|
+
* @type {number}
|
|
429
|
+
* @memberof CreateCompletionFromModelRequest
|
|
430
|
+
*/
|
|
431
|
+
'presence_penalty'?: number | null;
|
|
432
|
+
/**
|
|
433
|
+
* 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)
|
|
434
|
+
* @type {number}
|
|
435
|
+
* @memberof CreateCompletionFromModelRequest
|
|
436
|
+
*/
|
|
437
|
+
'frequency_penalty'?: number | null;
|
|
438
|
+
/**
|
|
439
|
+
* 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`.
|
|
440
|
+
* @type {number}
|
|
441
|
+
* @memberof CreateCompletionFromModelRequest
|
|
442
|
+
*/
|
|
443
|
+
'best_of'?: number | null;
|
|
444
|
+
/**
|
|
445
|
+
* 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.
|
|
446
|
+
* @type {object}
|
|
447
|
+
* @memberof CreateCompletionFromModelRequest
|
|
448
|
+
*/
|
|
449
|
+
'logit_bias'?: object | null;
|
|
450
|
+
/**
|
|
451
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
452
|
+
* @type {string}
|
|
453
|
+
* @memberof CreateCompletionFromModelRequest
|
|
454
|
+
*/
|
|
455
|
+
'user'?: string;
|
|
456
|
+
/**
|
|
457
|
+
* ID of the model to use for completion.
|
|
458
|
+
* @type {string}
|
|
459
|
+
* @memberof CreateCompletionFromModelRequest
|
|
460
|
+
*/
|
|
461
|
+
'model'?: string;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* @export
|
|
466
|
+
* @interface CreateCompletionFromModelRequestAllOf
|
|
467
|
+
*/
|
|
468
|
+
export interface CreateCompletionFromModelRequestAllOf {
|
|
469
|
+
/**
|
|
470
|
+
* ID of the model to use for completion.
|
|
471
|
+
* @type {string}
|
|
472
|
+
* @memberof CreateCompletionFromModelRequestAllOf
|
|
473
|
+
*/
|
|
474
|
+
'model'?: string;
|
|
475
|
+
}
|
|
348
476
|
/**
|
|
349
477
|
*
|
|
350
478
|
* @export
|
|
@@ -358,7 +486,13 @@ export interface CreateCompletionRequest {
|
|
|
358
486
|
*/
|
|
359
487
|
'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
|
|
360
488
|
/**
|
|
361
|
-
* The
|
|
489
|
+
* The suffix that comes after a completion of inserted text, encoded as a string or array of strings.
|
|
490
|
+
* @type {string | Array<string>}
|
|
491
|
+
* @memberof CreateCompletionRequest
|
|
492
|
+
*/
|
|
493
|
+
'suffix'?: string | Array<string> | null;
|
|
494
|
+
/**
|
|
495
|
+
* 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).
|
|
362
496
|
* @type {number}
|
|
363
497
|
* @memberof CreateCompletionRequest
|
|
364
498
|
*/
|
|
@@ -429,6 +563,12 @@ export interface CreateCompletionRequest {
|
|
|
429
563
|
* @memberof CreateCompletionRequest
|
|
430
564
|
*/
|
|
431
565
|
'logit_bias'?: object | null;
|
|
566
|
+
/**
|
|
567
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
568
|
+
* @type {string}
|
|
569
|
+
* @memberof CreateCompletionRequest
|
|
570
|
+
*/
|
|
571
|
+
'user'?: string;
|
|
432
572
|
}
|
|
433
573
|
/**
|
|
434
574
|
*
|
|
@@ -529,6 +669,74 @@ export interface CreateCompletionResponseLogprobs {
|
|
|
529
669
|
*/
|
|
530
670
|
'text_offset'?: Array<number>;
|
|
531
671
|
}
|
|
672
|
+
/**
|
|
673
|
+
*
|
|
674
|
+
* @export
|
|
675
|
+
* @interface CreateEditRequest
|
|
676
|
+
*/
|
|
677
|
+
export interface CreateEditRequest {
|
|
678
|
+
/**
|
|
679
|
+
* The input text to use as a starting point for the edit.
|
|
680
|
+
* @type {string}
|
|
681
|
+
* @memberof CreateEditRequest
|
|
682
|
+
*/
|
|
683
|
+
'input'?: string | null;
|
|
684
|
+
/**
|
|
685
|
+
* The instruction that tells the model how to edit the prompt.
|
|
686
|
+
* @type {string}
|
|
687
|
+
* @memberof CreateEditRequest
|
|
688
|
+
*/
|
|
689
|
+
'instruction': string;
|
|
690
|
+
/**
|
|
691
|
+
* 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.
|
|
692
|
+
* @type {number}
|
|
693
|
+
* @memberof CreateEditRequest
|
|
694
|
+
*/
|
|
695
|
+
'temperature'?: number | null;
|
|
696
|
+
/**
|
|
697
|
+
* 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.
|
|
698
|
+
* @type {number}
|
|
699
|
+
* @memberof CreateEditRequest
|
|
700
|
+
*/
|
|
701
|
+
'top_p'?: number | null;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
*
|
|
705
|
+
* @export
|
|
706
|
+
* @interface CreateEditResponse
|
|
707
|
+
*/
|
|
708
|
+
export interface CreateEditResponse {
|
|
709
|
+
/**
|
|
710
|
+
*
|
|
711
|
+
* @type {string}
|
|
712
|
+
* @memberof CreateEditResponse
|
|
713
|
+
*/
|
|
714
|
+
'id'?: string;
|
|
715
|
+
/**
|
|
716
|
+
*
|
|
717
|
+
* @type {string}
|
|
718
|
+
* @memberof CreateEditResponse
|
|
719
|
+
*/
|
|
720
|
+
'object'?: string;
|
|
721
|
+
/**
|
|
722
|
+
*
|
|
723
|
+
* @type {number}
|
|
724
|
+
* @memberof CreateEditResponse
|
|
725
|
+
*/
|
|
726
|
+
'created'?: number;
|
|
727
|
+
/**
|
|
728
|
+
*
|
|
729
|
+
* @type {string}
|
|
730
|
+
* @memberof CreateEditResponse
|
|
731
|
+
*/
|
|
732
|
+
'model'?: string;
|
|
733
|
+
/**
|
|
734
|
+
*
|
|
735
|
+
* @type {Array<CreateCompletionResponseChoices>}
|
|
736
|
+
* @memberof CreateEditResponse
|
|
737
|
+
*/
|
|
738
|
+
'choices'?: Array<CreateCompletionResponseChoices>;
|
|
739
|
+
}
|
|
532
740
|
/**
|
|
533
741
|
*
|
|
534
742
|
* @export
|
|
@@ -536,11 +744,17 @@ export interface CreateCompletionResponseLogprobs {
|
|
|
536
744
|
*/
|
|
537
745
|
export interface CreateEmbeddingRequest {
|
|
538
746
|
/**
|
|
539
|
-
* 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.
|
|
747
|
+
* 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.
|
|
540
748
|
* @type {string | Array<string> | Array<number> | Array<any>}
|
|
541
749
|
* @memberof CreateEmbeddingRequest
|
|
542
750
|
*/
|
|
543
|
-
'input'
|
|
751
|
+
'input': string | Array<string> | Array<number> | Array<any>;
|
|
752
|
+
/**
|
|
753
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
754
|
+
* @type {string}
|
|
755
|
+
* @memberof CreateEmbeddingRequest
|
|
756
|
+
*/
|
|
757
|
+
'user'?: string;
|
|
544
758
|
}
|
|
545
759
|
/**
|
|
546
760
|
*
|
|
@@ -603,7 +817,7 @@ export interface CreateFineTuneRequest {
|
|
|
603
817
|
* @type {string}
|
|
604
818
|
* @memberof CreateFineTuneRequest
|
|
605
819
|
*/
|
|
606
|
-
'training_file'
|
|
820
|
+
'training_file': string;
|
|
607
821
|
/**
|
|
608
822
|
* 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.
|
|
609
823
|
* @type {string}
|
|
@@ -664,6 +878,12 @@ export interface CreateFineTuneRequest {
|
|
|
664
878
|
* @memberof CreateFineTuneRequest
|
|
665
879
|
*/
|
|
666
880
|
'classification_betas'?: Array<number> | null;
|
|
881
|
+
/**
|
|
882
|
+
* 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`.
|
|
883
|
+
* @type {string}
|
|
884
|
+
* @memberof CreateFineTuneRequest
|
|
885
|
+
*/
|
|
886
|
+
'suffix'?: string | null;
|
|
667
887
|
}
|
|
668
888
|
/**
|
|
669
889
|
*
|
|
@@ -671,6 +891,12 @@ export interface CreateFineTuneRequest {
|
|
|
671
891
|
* @interface CreateSearchRequest
|
|
672
892
|
*/
|
|
673
893
|
export interface CreateSearchRequest {
|
|
894
|
+
/**
|
|
895
|
+
* Query to search against the documents.
|
|
896
|
+
* @type {string}
|
|
897
|
+
* @memberof CreateSearchRequest
|
|
898
|
+
*/
|
|
899
|
+
'query': string;
|
|
674
900
|
/**
|
|
675
901
|
* 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.
|
|
676
902
|
* @type {Array<string>}
|
|
@@ -683,12 +909,6 @@ export interface CreateSearchRequest {
|
|
|
683
909
|
* @memberof CreateSearchRequest
|
|
684
910
|
*/
|
|
685
911
|
'file'?: string | null;
|
|
686
|
-
/**
|
|
687
|
-
* Query to search against the documents.
|
|
688
|
-
* @type {string}
|
|
689
|
-
* @memberof CreateSearchRequest
|
|
690
|
-
*/
|
|
691
|
-
'query'?: string;
|
|
692
912
|
/**
|
|
693
913
|
* The maximum number of documents to be re-ranked and returned by search. This flag only takes effect when `file` is set.
|
|
694
914
|
* @type {number}
|
|
@@ -701,6 +921,12 @@ export interface CreateSearchRequest {
|
|
|
701
921
|
* @memberof CreateSearchRequest
|
|
702
922
|
*/
|
|
703
923
|
'return_metadata'?: boolean | null;
|
|
924
|
+
/**
|
|
925
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
926
|
+
* @type {string}
|
|
927
|
+
* @memberof CreateSearchRequest
|
|
928
|
+
*/
|
|
929
|
+
'user'?: string;
|
|
704
930
|
}
|
|
705
931
|
/**
|
|
706
932
|
*
|
|
@@ -777,6 +1003,31 @@ export interface DeleteFileResponse {
|
|
|
777
1003
|
*/
|
|
778
1004
|
'deleted'?: boolean;
|
|
779
1005
|
}
|
|
1006
|
+
/**
|
|
1007
|
+
*
|
|
1008
|
+
* @export
|
|
1009
|
+
* @interface DeleteModelResponse
|
|
1010
|
+
*/
|
|
1011
|
+
export interface DeleteModelResponse {
|
|
1012
|
+
/**
|
|
1013
|
+
*
|
|
1014
|
+
* @type {string}
|
|
1015
|
+
* @memberof DeleteModelResponse
|
|
1016
|
+
*/
|
|
1017
|
+
'id'?: string;
|
|
1018
|
+
/**
|
|
1019
|
+
*
|
|
1020
|
+
* @type {string}
|
|
1021
|
+
* @memberof DeleteModelResponse
|
|
1022
|
+
*/
|
|
1023
|
+
'object'?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
*
|
|
1026
|
+
* @type {boolean}
|
|
1027
|
+
* @memberof DeleteModelResponse
|
|
1028
|
+
*/
|
|
1029
|
+
'deleted'?: boolean;
|
|
1030
|
+
}
|
|
780
1031
|
/**
|
|
781
1032
|
*
|
|
782
1033
|
* @export
|
|
@@ -1208,6 +1459,82 @@ export const OpenAIApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1208
1459
|
options: localVarRequestOptions,
|
|
1209
1460
|
};
|
|
1210
1461
|
},
|
|
1462
|
+
/**
|
|
1463
|
+
*
|
|
1464
|
+
* @summary Creates a completion using a fine-tuned model
|
|
1465
|
+
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
1466
|
+
* @param {*} [options] Override http request option.
|
|
1467
|
+
* @throws {RequiredError}
|
|
1468
|
+
*/
|
|
1469
|
+
createCompletionFromModel: async (createCompletionFromModelRequest: CreateCompletionFromModelRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1470
|
+
// verify required parameter 'createCompletionFromModelRequest' is not null or undefined
|
|
1471
|
+
assertParamExists('createCompletionFromModel', 'createCompletionFromModelRequest', createCompletionFromModelRequest)
|
|
1472
|
+
const localVarPath = `/completions`;
|
|
1473
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1474
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1475
|
+
let baseOptions;
|
|
1476
|
+
if (configuration) {
|
|
1477
|
+
baseOptions = configuration.baseOptions;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1481
|
+
const localVarHeaderParameter = {} as any;
|
|
1482
|
+
const localVarQueryParameter = {} as any;
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1487
|
+
|
|
1488
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1489
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1490
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1491
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createCompletionFromModelRequest, localVarRequestOptions, configuration)
|
|
1492
|
+
|
|
1493
|
+
return {
|
|
1494
|
+
url: toPathString(localVarUrlObj),
|
|
1495
|
+
options: localVarRequestOptions,
|
|
1496
|
+
};
|
|
1497
|
+
},
|
|
1498
|
+
/**
|
|
1499
|
+
*
|
|
1500
|
+
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
1501
|
+
* @param {string} engineId The ID of the engine to use for this request
|
|
1502
|
+
* @param {CreateEditRequest} createEditRequest
|
|
1503
|
+
* @param {*} [options] Override http request option.
|
|
1504
|
+
* @throws {RequiredError}
|
|
1505
|
+
*/
|
|
1506
|
+
createEdit: async (engineId: string, createEditRequest: CreateEditRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1507
|
+
// verify required parameter 'engineId' is not null or undefined
|
|
1508
|
+
assertParamExists('createEdit', 'engineId', engineId)
|
|
1509
|
+
// verify required parameter 'createEditRequest' is not null or undefined
|
|
1510
|
+
assertParamExists('createEdit', 'createEditRequest', createEditRequest)
|
|
1511
|
+
const localVarPath = `/engines/{engine_id}/edits`
|
|
1512
|
+
.replace(`{${"engine_id"}}`, encodeURIComponent(String(engineId)));
|
|
1513
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1514
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1515
|
+
let baseOptions;
|
|
1516
|
+
if (configuration) {
|
|
1517
|
+
baseOptions = configuration.baseOptions;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1521
|
+
const localVarHeaderParameter = {} as any;
|
|
1522
|
+
const localVarQueryParameter = {} as any;
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1527
|
+
|
|
1528
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1529
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1530
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1531
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createEditRequest, localVarRequestOptions, configuration)
|
|
1532
|
+
|
|
1533
|
+
return {
|
|
1534
|
+
url: toPathString(localVarUrlObj),
|
|
1535
|
+
options: localVarRequestOptions,
|
|
1536
|
+
};
|
|
1537
|
+
},
|
|
1211
1538
|
/**
|
|
1212
1539
|
*
|
|
1213
1540
|
* @summary Creates an embedding vector representing the input text.
|
|
@@ -1335,7 +1662,7 @@ export const OpenAIApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1335
1662
|
/**
|
|
1336
1663
|
*
|
|
1337
1664
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1338
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
1665
|
+
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1339
1666
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1340
1667
|
* @param {*} [options] Override http request option.
|
|
1341
1668
|
* @throws {RequiredError}
|
|
@@ -1397,6 +1724,40 @@ export const OpenAIApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1397
1724
|
|
|
1398
1725
|
|
|
1399
1726
|
|
|
1727
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1728
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1729
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1730
|
+
|
|
1731
|
+
return {
|
|
1732
|
+
url: toPathString(localVarUrlObj),
|
|
1733
|
+
options: localVarRequestOptions,
|
|
1734
|
+
};
|
|
1735
|
+
},
|
|
1736
|
+
/**
|
|
1737
|
+
*
|
|
1738
|
+
* @summary Delete a fine-tuned model. You must have the Owner role in your organization.
|
|
1739
|
+
* @param {string} model The model to delete
|
|
1740
|
+
* @param {*} [options] Override http request option.
|
|
1741
|
+
* @throws {RequiredError}
|
|
1742
|
+
*/
|
|
1743
|
+
deleteModel: async (model: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1744
|
+
// verify required parameter 'model' is not null or undefined
|
|
1745
|
+
assertParamExists('deleteModel', 'model', model)
|
|
1746
|
+
const localVarPath = `/models/{model}`
|
|
1747
|
+
.replace(`{${"model"}}`, encodeURIComponent(String(model)));
|
|
1748
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1749
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1750
|
+
let baseOptions;
|
|
1751
|
+
if (configuration) {
|
|
1752
|
+
baseOptions = configuration.baseOptions;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
1756
|
+
const localVarHeaderParameter = {} as any;
|
|
1757
|
+
const localVarQueryParameter = {} as any;
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1400
1761
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1401
1762
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1402
1763
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -1726,6 +2087,29 @@ export const OpenAIApiFp = function(configuration?: Configuration) {
|
|
|
1726
2087
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createCompletion(engineId, createCompletionRequest, options);
|
|
1727
2088
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1728
2089
|
},
|
|
2090
|
+
/**
|
|
2091
|
+
*
|
|
2092
|
+
* @summary Creates a completion using a fine-tuned model
|
|
2093
|
+
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
2094
|
+
* @param {*} [options] Override http request option.
|
|
2095
|
+
* @throws {RequiredError}
|
|
2096
|
+
*/
|
|
2097
|
+
async createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>> {
|
|
2098
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCompletionFromModel(createCompletionFromModelRequest, options);
|
|
2099
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2100
|
+
},
|
|
2101
|
+
/**
|
|
2102
|
+
*
|
|
2103
|
+
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
2104
|
+
* @param {string} engineId The ID of the engine to use for this request
|
|
2105
|
+
* @param {CreateEditRequest} createEditRequest
|
|
2106
|
+
* @param {*} [options] Override http request option.
|
|
2107
|
+
* @throws {RequiredError}
|
|
2108
|
+
*/
|
|
2109
|
+
async createEdit(engineId: string, createEditRequest: CreateEditRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEditResponse>> {
|
|
2110
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createEdit(engineId, createEditRequest, options);
|
|
2111
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2112
|
+
},
|
|
1729
2113
|
/**
|
|
1730
2114
|
*
|
|
1731
2115
|
* @summary Creates an embedding vector representing the input text.
|
|
@@ -1764,7 +2148,7 @@ export const OpenAIApiFp = function(configuration?: Configuration) {
|
|
|
1764
2148
|
/**
|
|
1765
2149
|
*
|
|
1766
2150
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1767
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
2151
|
+
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1768
2152
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1769
2153
|
* @param {*} [options] Override http request option.
|
|
1770
2154
|
* @throws {RequiredError}
|
|
@@ -1784,6 +2168,17 @@ export const OpenAIApiFp = function(configuration?: Configuration) {
|
|
|
1784
2168
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFile(fileId, options);
|
|
1785
2169
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1786
2170
|
},
|
|
2171
|
+
/**
|
|
2172
|
+
*
|
|
2173
|
+
* @summary Delete a fine-tuned model. You must have the Owner role in your organization.
|
|
2174
|
+
* @param {string} model The model to delete
|
|
2175
|
+
* @param {*} [options] Override http request option.
|
|
2176
|
+
* @throws {RequiredError}
|
|
2177
|
+
*/
|
|
2178
|
+
async deleteModel(model: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteModelResponse>> {
|
|
2179
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteModel(model, options);
|
|
2180
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2181
|
+
},
|
|
1787
2182
|
/**
|
|
1788
2183
|
*
|
|
1789
2184
|
* @summary Returns the contents of the specified file
|
|
@@ -1921,6 +2316,27 @@ export const OpenAIApiFactory = function (configuration?: Configuration, basePat
|
|
|
1921
2316
|
createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse> {
|
|
1922
2317
|
return localVarFp.createCompletion(engineId, createCompletionRequest, options).then((request) => request(axios, basePath));
|
|
1923
2318
|
},
|
|
2319
|
+
/**
|
|
2320
|
+
*
|
|
2321
|
+
* @summary Creates a completion using a fine-tuned model
|
|
2322
|
+
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
2323
|
+
* @param {*} [options] Override http request option.
|
|
2324
|
+
* @throws {RequiredError}
|
|
2325
|
+
*/
|
|
2326
|
+
createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: any): AxiosPromise<CreateCompletionResponse> {
|
|
2327
|
+
return localVarFp.createCompletionFromModel(createCompletionFromModelRequest, options).then((request) => request(axios, basePath));
|
|
2328
|
+
},
|
|
2329
|
+
/**
|
|
2330
|
+
*
|
|
2331
|
+
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
2332
|
+
* @param {string} engineId The ID of the engine to use for this request
|
|
2333
|
+
* @param {CreateEditRequest} createEditRequest
|
|
2334
|
+
* @param {*} [options] Override http request option.
|
|
2335
|
+
* @throws {RequiredError}
|
|
2336
|
+
*/
|
|
2337
|
+
createEdit(engineId: string, createEditRequest: CreateEditRequest, options?: any): AxiosPromise<CreateEditResponse> {
|
|
2338
|
+
return localVarFp.createEdit(engineId, createEditRequest, options).then((request) => request(axios, basePath));
|
|
2339
|
+
},
|
|
1924
2340
|
/**
|
|
1925
2341
|
*
|
|
1926
2342
|
* @summary Creates an embedding vector representing the input text.
|
|
@@ -1956,7 +2372,7 @@ export const OpenAIApiFactory = function (configuration?: Configuration, basePat
|
|
|
1956
2372
|
/**
|
|
1957
2373
|
*
|
|
1958
2374
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
1959
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
2375
|
+
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
1960
2376
|
* @param {CreateSearchRequest} createSearchRequest
|
|
1961
2377
|
* @param {*} [options] Override http request option.
|
|
1962
2378
|
* @throws {RequiredError}
|
|
@@ -1974,6 +2390,16 @@ export const OpenAIApiFactory = function (configuration?: Configuration, basePat
|
|
|
1974
2390
|
deleteFile(fileId: string, options?: any): AxiosPromise<DeleteFileResponse> {
|
|
1975
2391
|
return localVarFp.deleteFile(fileId, options).then((request) => request(axios, basePath));
|
|
1976
2392
|
},
|
|
2393
|
+
/**
|
|
2394
|
+
*
|
|
2395
|
+
* @summary Delete a fine-tuned model. You must have the Owner role in your organization.
|
|
2396
|
+
* @param {string} model The model to delete
|
|
2397
|
+
* @param {*} [options] Override http request option.
|
|
2398
|
+
* @throws {RequiredError}
|
|
2399
|
+
*/
|
|
2400
|
+
deleteModel(model: string, options?: any): AxiosPromise<DeleteModelResponse> {
|
|
2401
|
+
return localVarFp.deleteModel(model, options).then((request) => request(axios, basePath));
|
|
2402
|
+
},
|
|
1977
2403
|
/**
|
|
1978
2404
|
*
|
|
1979
2405
|
* @summary Returns the contents of the specified file
|
|
@@ -2111,6 +2537,31 @@ export class OpenAIApi extends BaseAPI {
|
|
|
2111
2537
|
return OpenAIApiFp(this.configuration).createCompletion(engineId, createCompletionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2112
2538
|
}
|
|
2113
2539
|
|
|
2540
|
+
/**
|
|
2541
|
+
*
|
|
2542
|
+
* @summary Creates a completion using a fine-tuned model
|
|
2543
|
+
* @param {CreateCompletionFromModelRequest} createCompletionFromModelRequest
|
|
2544
|
+
* @param {*} [options] Override http request option.
|
|
2545
|
+
* @throws {RequiredError}
|
|
2546
|
+
* @memberof OpenAIApi
|
|
2547
|
+
*/
|
|
2548
|
+
public createCompletionFromModel(createCompletionFromModelRequest: CreateCompletionFromModelRequest, options?: AxiosRequestConfig) {
|
|
2549
|
+
return OpenAIApiFp(this.configuration).createCompletionFromModel(createCompletionFromModelRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
/**
|
|
2553
|
+
*
|
|
2554
|
+
* @summary Creates a new edit for the provided input, instruction, and parameters
|
|
2555
|
+
* @param {string} engineId The ID of the engine to use for this request
|
|
2556
|
+
* @param {CreateEditRequest} createEditRequest
|
|
2557
|
+
* @param {*} [options] Override http request option.
|
|
2558
|
+
* @throws {RequiredError}
|
|
2559
|
+
* @memberof OpenAIApi
|
|
2560
|
+
*/
|
|
2561
|
+
public createEdit(engineId: string, createEditRequest: CreateEditRequest, options?: AxiosRequestConfig) {
|
|
2562
|
+
return OpenAIApiFp(this.configuration).createEdit(engineId, createEditRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2114
2565
|
/**
|
|
2115
2566
|
*
|
|
2116
2567
|
* @summary Creates an embedding vector representing the input text.
|
|
@@ -2152,7 +2603,7 @@ export class OpenAIApi extends BaseAPI {
|
|
|
2152
2603
|
/**
|
|
2153
2604
|
*
|
|
2154
2605
|
* @summary The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
|
|
2155
|
-
* @param {string} engineId The ID of the engine to use for this request
|
|
2606
|
+
* @param {string} engineId The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
|
|
2156
2607
|
* @param {CreateSearchRequest} createSearchRequest
|
|
2157
2608
|
* @param {*} [options] Override http request option.
|
|
2158
2609
|
* @throws {RequiredError}
|
|
@@ -2174,6 +2625,18 @@ export class OpenAIApi extends BaseAPI {
|
|
|
2174
2625
|
return OpenAIApiFp(this.configuration).deleteFile(fileId, options).then((request) => request(this.axios, this.basePath));
|
|
2175
2626
|
}
|
|
2176
2627
|
|
|
2628
|
+
/**
|
|
2629
|
+
*
|
|
2630
|
+
* @summary Delete a fine-tuned model. You must have the Owner role in your organization.
|
|
2631
|
+
* @param {string} model The model to delete
|
|
2632
|
+
* @param {*} [options] Override http request option.
|
|
2633
|
+
* @throws {RequiredError}
|
|
2634
|
+
* @memberof OpenAIApi
|
|
2635
|
+
*/
|
|
2636
|
+
public deleteModel(model: string, options?: AxiosRequestConfig) {
|
|
2637
|
+
return OpenAIApiFp(this.configuration).deleteModel(model, options).then((request) => request(this.axios, this.basePath));
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2177
2640
|
/**
|
|
2178
2641
|
*
|
|
2179
2642
|
* @summary Returns the contents of the specified file
|