openai 1.0.0 → 2.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 ADDED
@@ -0,0 +1,1643 @@
1
+ /**
2
+ * OpenAI API
3
+ * APIs for sampling from and fine-tuning language models
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Configuration } from './configuration';
13
+ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
+ import { RequestArgs, BaseAPI } from './base';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface CreateAnswerRequest
19
+ */
20
+ export interface CreateAnswerRequest {
21
+ /**
22
+ * ID of the engine to use for completion.
23
+ * @type {string}
24
+ * @memberof CreateAnswerRequest
25
+ */
26
+ 'model'?: string;
27
+ /**
28
+ * Question to get answered.
29
+ * @type {string}
30
+ * @memberof CreateAnswerRequest
31
+ */
32
+ 'question'?: string;
33
+ /**
34
+ * List of (question, answer) pairs that will help steer the model towards the tone and answer format you\'d like. We recommend adding 2 to 3 examples.
35
+ * @type {Array<any>}
36
+ * @memberof CreateAnswerRequest
37
+ */
38
+ 'examples'?: Array<any>;
39
+ /**
40
+ * A text snippet containing the contextual information used to generate the answers for the `examples` you provide.
41
+ * @type {string}
42
+ * @memberof CreateAnswerRequest
43
+ */
44
+ 'examples_context'?: string;
45
+ /**
46
+ * List of documents from which the answer for the input `question` should be derived. If this is an empty list, the question will be answered based on the question-answer examples. You should specify either `documents` or a `file`, but not both.
47
+ * @type {Array<string>}
48
+ * @memberof CreateAnswerRequest
49
+ */
50
+ 'documents'?: Array<string> | null;
51
+ /**
52
+ * The ID of an uploaded file that contains documents to search over. See [upload file](/docs/api-reference/files/upload) for how to upload a file of the desired format and purpose. You should specify either `documents` or a `file`, but not both.
53
+ * @type {string}
54
+ * @memberof CreateAnswerRequest
55
+ */
56
+ 'file'?: string | null;
57
+ /**
58
+ * ID of the engine to use for [Search](/docs/api-reference/searches/create).
59
+ * @type {string}
60
+ * @memberof CreateAnswerRequest
61
+ */
62
+ 'search_model'?: string | null;
63
+ /**
64
+ * The maximum number of documents to be ranked by [Search](/docs/api-reference/searches/create) when using `file`. Setting it to a higher value leads to improved accuracy but with increased latency and cost.
65
+ * @type {number}
66
+ * @memberof CreateAnswerRequest
67
+ */
68
+ 'max_rerank'?: number | null;
69
+ /**
70
+ * What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values mean the model will take more risks and value 0 (argmax sampling) works better for scenarios with a well-defined answer.
71
+ * @type {number}
72
+ * @memberof CreateAnswerRequest
73
+ */
74
+ 'temperature'?: number | null;
75
+ /**
76
+ * Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact support@openai.com and describe your use case. When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs.
77
+ * @type {number}
78
+ * @memberof CreateAnswerRequest
79
+ */
80
+ 'logprobs'?: number | null;
81
+ /**
82
+ * The maximum number of tokens allowed for the generated answer
83
+ * @type {number}
84
+ * @memberof CreateAnswerRequest
85
+ */
86
+ 'max_tokens'?: number | null;
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>}
90
+ * @memberof CreateAnswerRequest
91
+ */
92
+ 'stop'?: string | Array<string> | null;
93
+ /**
94
+ * How many answers to generate for each question.
95
+ * @type {number}
96
+ * @memberof CreateAnswerRequest
97
+ */
98
+ 'n'?: number | null;
99
+ /**
100
+ * 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.
101
+ * @type {object}
102
+ * @memberof CreateAnswerRequest
103
+ */
104
+ 'logit_bias'?: object | null;
105
+ /**
106
+ * A special boolean flag for showing metadata. If set to `true`, each document entry in the returned JSON will contain a \"metadata\" field. This flag only takes effect when `file` is set.
107
+ * @type {boolean}
108
+ * @memberof CreateAnswerRequest
109
+ */
110
+ 'return_metadata'?: boolean | null;
111
+ /**
112
+ * If set to `true`, the returned JSON will include a \"prompt\" field containing the final prompt that was used to request a completion. This is mainly useful for debugging purposes.
113
+ * @type {boolean}
114
+ * @memberof CreateAnswerRequest
115
+ */
116
+ 'return_prompt'?: boolean | null;
117
+ /**
118
+ * If an object name is in the list, we provide the full information of the object; otherwise, we only provide the object ID. Currently we support `completion` and `file` objects for expansion.
119
+ * @type {Array<any>}
120
+ * @memberof CreateAnswerRequest
121
+ */
122
+ 'expand'?: Array<any> | null;
123
+ }
124
+ /**
125
+ *
126
+ * @export
127
+ * @interface CreateAnswerResponse
128
+ */
129
+ export interface CreateAnswerResponse {
130
+ /**
131
+ *
132
+ * @type {string}
133
+ * @memberof CreateAnswerResponse
134
+ */
135
+ 'object'?: string;
136
+ /**
137
+ *
138
+ * @type {string}
139
+ * @memberof CreateAnswerResponse
140
+ */
141
+ 'model'?: string;
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof CreateAnswerResponse
146
+ */
147
+ 'search_model'?: string;
148
+ /**
149
+ *
150
+ * @type {string}
151
+ * @memberof CreateAnswerResponse
152
+ */
153
+ 'completion'?: string;
154
+ /**
155
+ *
156
+ * @type {Array<string>}
157
+ * @memberof CreateAnswerResponse
158
+ */
159
+ 'answers'?: Array<string>;
160
+ /**
161
+ *
162
+ * @type {Array<CreateAnswerResponseSelectedDocuments>}
163
+ * @memberof CreateAnswerResponse
164
+ */
165
+ 'selected_documents'?: Array<CreateAnswerResponseSelectedDocuments>;
166
+ }
167
+ /**
168
+ *
169
+ * @export
170
+ * @interface CreateAnswerResponseSelectedDocuments
171
+ */
172
+ export interface CreateAnswerResponseSelectedDocuments {
173
+ /**
174
+ *
175
+ * @type {number}
176
+ * @memberof CreateAnswerResponseSelectedDocuments
177
+ */
178
+ 'document'?: number;
179
+ /**
180
+ *
181
+ * @type {string}
182
+ * @memberof CreateAnswerResponseSelectedDocuments
183
+ */
184
+ 'text'?: string;
185
+ }
186
+ /**
187
+ *
188
+ * @export
189
+ * @interface CreateClassificationRequest
190
+ */
191
+ export interface CreateClassificationRequest {
192
+ /**
193
+ * ID of the engine to use for completion.
194
+ * @type {string}
195
+ * @memberof CreateClassificationRequest
196
+ */
197
+ 'model'?: string;
198
+ /**
199
+ * Query to be classified.
200
+ * @type {string}
201
+ * @memberof CreateClassificationRequest
202
+ */
203
+ 'query'?: string;
204
+ /**
205
+ * A list of examples with labels, in the following format: `[[\"The movie is so interesting.\", \"Positive\"], [\"It is quite boring.\", \"Negative\"], ...]` All the label strings will be normalized to be capitalized. You should specify either `examples` or `file`, but not both.
206
+ * @type {Array<any>}
207
+ * @memberof CreateClassificationRequest
208
+ */
209
+ 'examples'?: Array<any> | null;
210
+ /**
211
+ * The ID of the uploaded file that contains training examples. See [upload file](/docs/api-reference/files/upload) for how to upload a file of the desired format and purpose. You should specify either `examples` or `file`, but not both.
212
+ * @type {string}
213
+ * @memberof CreateClassificationRequest
214
+ */
215
+ 'file'?: string | null;
216
+ /**
217
+ * The set of categories being classified. If not specified, candidate labels will be automatically collected from the examples you provide. All the label strings will be normalized to be capitalized.
218
+ * @type {Array<string>}
219
+ * @memberof CreateClassificationRequest
220
+ */
221
+ 'labels'?: Array<string> | null;
222
+ /**
223
+ * ID of the engine to use for [Search](/docs/api-reference/searches/create).
224
+ * @type {string}
225
+ * @memberof CreateClassificationRequest
226
+ */
227
+ 'search_model'?: string | null;
228
+ /**
229
+ * What sampling `temperature` to use. Higher values mean the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.
230
+ * @type {number}
231
+ * @memberof CreateClassificationRequest
232
+ */
233
+ 'temperature'?: number | null;
234
+ /**
235
+ * 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. When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs.
236
+ * @type {number}
237
+ * @memberof CreateClassificationRequest
238
+ */
239
+ 'logprobs'?: number | null;
240
+ /**
241
+ * The maximum number of examples to be ranked by [Search](/docs/api-reference/searches/create) when using `file`. Setting it to a higher value leads to improved accuracy but with increased latency and cost.
242
+ * @type {number}
243
+ * @memberof CreateClassificationRequest
244
+ */
245
+ 'max_examples'?: number | null;
246
+ /**
247
+ * 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.
248
+ * @type {object}
249
+ * @memberof CreateClassificationRequest
250
+ */
251
+ 'logit_bias'?: object | null;
252
+ /**
253
+ * If set to `true`, the returned JSON will include a \"prompt\" field containing the final prompt that was used to request a completion. This is mainly useful for debugging purposes.
254
+ * @type {boolean}
255
+ * @memberof CreateClassificationRequest
256
+ */
257
+ 'return_prompt'?: boolean | null;
258
+ /**
259
+ * A special boolean flag for showing metadata. If set to `true`, each document entry in the returned JSON will contain a \"metadata\" field. This flag only takes effect when `file` is set.
260
+ * @type {boolean}
261
+ * @memberof CreateClassificationRequest
262
+ */
263
+ 'return_metadata'?: boolean | null;
264
+ /**
265
+ * If an object name is in the list, we provide the full information of the object; otherwise, we only provide the object ID. Currently we support `completion` and `file` objects for expansion.
266
+ * @type {Array<any>}
267
+ * @memberof CreateClassificationRequest
268
+ */
269
+ 'expand'?: Array<any> | null;
270
+ }
271
+ /**
272
+ *
273
+ * @export
274
+ * @interface CreateClassificationResponse
275
+ */
276
+ export interface CreateClassificationResponse {
277
+ /**
278
+ *
279
+ * @type {string}
280
+ * @memberof CreateClassificationResponse
281
+ */
282
+ 'object'?: string;
283
+ /**
284
+ *
285
+ * @type {string}
286
+ * @memberof CreateClassificationResponse
287
+ */
288
+ 'model'?: string;
289
+ /**
290
+ *
291
+ * @type {string}
292
+ * @memberof CreateClassificationResponse
293
+ */
294
+ 'search_model'?: string;
295
+ /**
296
+ *
297
+ * @type {string}
298
+ * @memberof CreateClassificationResponse
299
+ */
300
+ 'completion'?: string;
301
+ /**
302
+ *
303
+ * @type {string}
304
+ * @memberof CreateClassificationResponse
305
+ */
306
+ 'label'?: string;
307
+ /**
308
+ *
309
+ * @type {Array<CreateClassificationResponseSelectedExamples>}
310
+ * @memberof CreateClassificationResponse
311
+ */
312
+ 'selected_examples'?: Array<CreateClassificationResponseSelectedExamples>;
313
+ }
314
+ /**
315
+ *
316
+ * @export
317
+ * @interface CreateClassificationResponseSelectedExamples
318
+ */
319
+ export interface CreateClassificationResponseSelectedExamples {
320
+ /**
321
+ *
322
+ * @type {number}
323
+ * @memberof CreateClassificationResponseSelectedExamples
324
+ */
325
+ 'document'?: number;
326
+ /**
327
+ *
328
+ * @type {string}
329
+ * @memberof CreateClassificationResponseSelectedExamples
330
+ */
331
+ 'text'?: string;
332
+ /**
333
+ *
334
+ * @type {string}
335
+ * @memberof CreateClassificationResponseSelectedExamples
336
+ */
337
+ 'label'?: string;
338
+ }
339
+ /**
340
+ *
341
+ * @export
342
+ * @interface CreateCompletionRequest
343
+ */
344
+ export interface CreateCompletionRequest {
345
+ /**
346
+ * The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
347
+ * @type {string | Array<string> | Array<number> | Array<any>}
348
+ * @memberof CreateCompletionRequest
349
+ */
350
+ 'prompt'?: string | Array<string> | Array<number> | Array<any> | null;
351
+ /**
352
+ * The maximum number of [tokens](/tokenizer) to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model\'s context length. Most models have a context length of 2048 tokens (except `davinci-codex`, which supports 4096).
353
+ * @type {number}
354
+ * @memberof CreateCompletionRequest
355
+ */
356
+ 'max_tokens'?: number | null;
357
+ /**
358
+ * What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or `top_p` but not both.
359
+ * @type {number}
360
+ * @memberof CreateCompletionRequest
361
+ */
362
+ 'temperature'?: number | null;
363
+ /**
364
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
365
+ * @type {number}
366
+ * @memberof CreateCompletionRequest
367
+ */
368
+ 'top_p'?: number | null;
369
+ /**
370
+ * How many completions to generate for each prompt. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
371
+ * @type {number}
372
+ * @memberof CreateCompletionRequest
373
+ */
374
+ 'n'?: number | null;
375
+ /**
376
+ * Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message.
377
+ * @type {boolean}
378
+ * @memberof CreateCompletionRequest
379
+ */
380
+ 'stream'?: boolean | null;
381
+ /**
382
+ * Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact support@openai.com and describe your use case.
383
+ * @type {number}
384
+ * @memberof CreateCompletionRequest
385
+ */
386
+ 'logprobs'?: number | null;
387
+ /**
388
+ * Echo back the prompt in addition to the completion
389
+ * @type {boolean}
390
+ * @memberof CreateCompletionRequest
391
+ */
392
+ 'echo'?: boolean | null;
393
+ /**
394
+ * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
395
+ * @type {string | Array<string>}
396
+ * @memberof CreateCompletionRequest
397
+ */
398
+ 'stop'?: string | Array<string> | null;
399
+ /**
400
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model\'s likelihood to talk about new topics. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
401
+ * @type {number}
402
+ * @memberof CreateCompletionRequest
403
+ */
404
+ 'presence_penalty'?: number | null;
405
+ /**
406
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model\'s likelihood to repeat the same line verbatim. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
407
+ * @type {number}
408
+ * @memberof CreateCompletionRequest
409
+ */
410
+ 'frequency_penalty'?: number | null;
411
+ /**
412
+ * Generates `best_of` completions server-side and returns the \"best\" (the one with the lowest log probability per token). Results cannot be streamed. When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
413
+ * @type {number}
414
+ * @memberof CreateCompletionRequest
415
+ */
416
+ 'best_of'?: number | null;
417
+ /**
418
+ * Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.
419
+ * @type {object}
420
+ * @memberof CreateCompletionRequest
421
+ */
422
+ 'logit_bias'?: object | null;
423
+ }
424
+ /**
425
+ *
426
+ * @export
427
+ * @interface CreateCompletionResponse
428
+ */
429
+ export interface CreateCompletionResponse {
430
+ /**
431
+ *
432
+ * @type {string}
433
+ * @memberof CreateCompletionResponse
434
+ */
435
+ 'id'?: string;
436
+ /**
437
+ *
438
+ * @type {string}
439
+ * @memberof CreateCompletionResponse
440
+ */
441
+ 'object'?: string;
442
+ /**
443
+ *
444
+ * @type {number}
445
+ * @memberof CreateCompletionResponse
446
+ */
447
+ 'created'?: number;
448
+ /**
449
+ *
450
+ * @type {string}
451
+ * @memberof CreateCompletionResponse
452
+ */
453
+ 'model'?: string;
454
+ /**
455
+ *
456
+ * @type {Array<CreateCompletionResponseChoices>}
457
+ * @memberof CreateCompletionResponse
458
+ */
459
+ 'choices'?: Array<CreateCompletionResponseChoices>;
460
+ }
461
+ /**
462
+ *
463
+ * @export
464
+ * @interface CreateCompletionResponseChoices
465
+ */
466
+ export interface CreateCompletionResponseChoices {
467
+ /**
468
+ *
469
+ * @type {string}
470
+ * @memberof CreateCompletionResponseChoices
471
+ */
472
+ 'text'?: string;
473
+ /**
474
+ *
475
+ * @type {number}
476
+ * @memberof CreateCompletionResponseChoices
477
+ */
478
+ 'index'?: number;
479
+ /**
480
+ *
481
+ * @type {CreateCompletionResponseLogprobs}
482
+ * @memberof CreateCompletionResponseChoices
483
+ */
484
+ 'logprobs'?: CreateCompletionResponseLogprobs | null;
485
+ /**
486
+ *
487
+ * @type {string}
488
+ * @memberof CreateCompletionResponseChoices
489
+ */
490
+ 'finish_reason'?: string;
491
+ }
492
+ /**
493
+ *
494
+ * @export
495
+ * @interface CreateCompletionResponseLogprobs
496
+ */
497
+ export interface CreateCompletionResponseLogprobs {
498
+ /**
499
+ *
500
+ * @type {Array<string>}
501
+ * @memberof CreateCompletionResponseLogprobs
502
+ */
503
+ 'tokens'?: Array<string>;
504
+ /**
505
+ *
506
+ * @type {Array<number>}
507
+ * @memberof CreateCompletionResponseLogprobs
508
+ */
509
+ 'token_logprobs'?: Array<number>;
510
+ /**
511
+ *
512
+ * @type {Array<object>}
513
+ * @memberof CreateCompletionResponseLogprobs
514
+ */
515
+ 'top_logprobs'?: Array<object>;
516
+ /**
517
+ *
518
+ * @type {Array<number>}
519
+ * @memberof CreateCompletionResponseLogprobs
520
+ */
521
+ 'text_offset'?: Array<number>;
522
+ }
523
+ /**
524
+ *
525
+ * @export
526
+ * @interface CreateEmbeddingRequest
527
+ */
528
+ export interface CreateEmbeddingRequest {
529
+ /**
530
+ * Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 2048 tokens in length. We suggest replacing newlines (`\\n`) in your input with a single space, as we have observed inferior results when newlines are present.
531
+ * @type {string | Array<string> | Array<number> | Array<any>}
532
+ * @memberof CreateEmbeddingRequest
533
+ */
534
+ 'input'?: string | Array<string> | Array<number> | Array<any>;
535
+ }
536
+ /**
537
+ *
538
+ * @export
539
+ * @interface CreateEmbeddingResponse
540
+ */
541
+ export interface CreateEmbeddingResponse {
542
+ /**
543
+ *
544
+ * @type {string}
545
+ * @memberof CreateEmbeddingResponse
546
+ */
547
+ 'object'?: string;
548
+ /**
549
+ *
550
+ * @type {string}
551
+ * @memberof CreateEmbeddingResponse
552
+ */
553
+ 'model'?: string;
554
+ /**
555
+ *
556
+ * @type {Array<CreateEmbeddingResponseData>}
557
+ * @memberof CreateEmbeddingResponse
558
+ */
559
+ 'data'?: Array<CreateEmbeddingResponseData>;
560
+ }
561
+ /**
562
+ *
563
+ * @export
564
+ * @interface CreateEmbeddingResponseData
565
+ */
566
+ export interface CreateEmbeddingResponseData {
567
+ /**
568
+ *
569
+ * @type {number}
570
+ * @memberof CreateEmbeddingResponseData
571
+ */
572
+ 'index'?: number;
573
+ /**
574
+ *
575
+ * @type {string}
576
+ * @memberof CreateEmbeddingResponseData
577
+ */
578
+ 'object'?: string;
579
+ /**
580
+ *
581
+ * @type {Array<number>}
582
+ * @memberof CreateEmbeddingResponseData
583
+ */
584
+ 'embedding'?: Array<number>;
585
+ }
586
+ /**
587
+ *
588
+ * @export
589
+ * @interface CreateFineTuneRequest
590
+ */
591
+ export interface CreateFineTuneRequest {
592
+ /**
593
+ * The ID of an uploaded file that contains training data. See [upload file](/docs/api-reference/files/upload) for how to upload a file. Your dataset must be formatted as a JSONL file, where each training 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.
594
+ * @type {string}
595
+ * @memberof CreateFineTuneRequest
596
+ */
597
+ 'training_file'?: string;
598
+ /**
599
+ * 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.
600
+ * @type {string}
601
+ * @memberof CreateFineTuneRequest
602
+ */
603
+ 'validation_file'?: string | null;
604
+ /**
605
+ * 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.
606
+ * @type {string}
607
+ * @memberof CreateFineTuneRequest
608
+ */
609
+ 'model'?: string | null;
610
+ /**
611
+ * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
612
+ * @type {number}
613
+ * @memberof CreateFineTuneRequest
614
+ */
615
+ 'n_epochs'?: number | null;
616
+ /**
617
+ * The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. By default, the batch size will be dynamically configured to be ~0.2% of the number of examples in the training set, capped at 256 - in general, we\'ve found that larger batch sizes tend to work better for larger datasets.
618
+ * @type {number}
619
+ * @memberof CreateFineTuneRequest
620
+ */
621
+ 'batch_size'?: number | null;
622
+ /**
623
+ * The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pretraining multiplied by this value. By default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final `batch_size` (larger learning rates tend to perform better with larger batch sizes). We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.
624
+ * @type {number}
625
+ * @memberof CreateFineTuneRequest
626
+ */
627
+ 'learning_rate_multiplier'?: number | null;
628
+ /**
629
+ * The weight to use for loss on the prompt tokens. This controls how much the model tries to learn to generate the prompt (as compared to the completion which always has a weight of 1.0), and can add a stabilizing effect to training when completions are short. If prompts are extremely long (relative to completions), it may make sense to reduce this weight so as to avoid over-prioritizing learning the prompt.
630
+ * @type {number}
631
+ * @memberof CreateFineTuneRequest
632
+ */
633
+ 'prompt_loss_weight'?: number | null;
634
+ /**
635
+ * If set, we calculate classification-specific metrics such as accuracy and F-1 score using the validation set at the end of every epoch. These metrics can be viewed in the [results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). In order to compute classification metrics, you must provide a `validation_file`. Additionally, you must specify `classification_n_classes` for multiclass classification or `classification_positive_class` for binary classification.
636
+ * @type {boolean}
637
+ * @memberof CreateFineTuneRequest
638
+ */
639
+ 'compute_classification_metrics'?: boolean | null;
640
+ /**
641
+ * The number of classes in a classification task. This parameter is required for multiclass classification.
642
+ * @type {number}
643
+ * @memberof CreateFineTuneRequest
644
+ */
645
+ 'classification_n_classes'?: number | null;
646
+ /**
647
+ * The positive class in binary classification. This parameter is needed to generate precision, recall, and F1 metrics when doing binary classification.
648
+ * @type {string}
649
+ * @memberof CreateFineTuneRequest
650
+ */
651
+ 'classification_positive_class'?: string | null;
652
+ /**
653
+ * If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score is a generalization of F-1 score. This is only used for binary classification. With a beta of 1 (i.e. the F-1 score), precision and recall are given the same weight. A larger beta score puts more weight on recall and less on precision. A smaller beta score puts more weight on precision and less on recall.
654
+ * @type {Array<number>}
655
+ * @memberof CreateFineTuneRequest
656
+ */
657
+ 'classification_betas'?: Array<number> | null;
658
+ }
659
+ /**
660
+ *
661
+ * @export
662
+ * @interface CreateSearchRequest
663
+ */
664
+ export interface CreateSearchRequest {
665
+ /**
666
+ * 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.
667
+ * @type {Array<string>}
668
+ * @memberof CreateSearchRequest
669
+ */
670
+ 'documents'?: Array<string> | null;
671
+ /**
672
+ * The ID of an uploaded file that contains documents to search over. You should specify either `documents` or a `file`, but not both.
673
+ * @type {string}
674
+ * @memberof CreateSearchRequest
675
+ */
676
+ 'file'?: string | null;
677
+ /**
678
+ * Query to search against the documents.
679
+ * @type {string}
680
+ * @memberof CreateSearchRequest
681
+ */
682
+ 'query'?: string;
683
+ /**
684
+ * The maximum number of documents to be re-ranked and returned by search. This flag only takes effect when `file` is set.
685
+ * @type {number}
686
+ * @memberof CreateSearchRequest
687
+ */
688
+ 'max_rerank'?: number | null;
689
+ /**
690
+ * A special boolean flag for showing metadata. If set to `true`, each document entry in the returned JSON will contain a \"metadata\" field. This flag only takes effect when `file` is set.
691
+ * @type {boolean}
692
+ * @memberof CreateSearchRequest
693
+ */
694
+ 'return_metadata'?: boolean | null;
695
+ }
696
+ /**
697
+ *
698
+ * @export
699
+ * @interface CreateSearchResponse
700
+ */
701
+ export interface CreateSearchResponse {
702
+ /**
703
+ *
704
+ * @type {string}
705
+ * @memberof CreateSearchResponse
706
+ */
707
+ 'object'?: string;
708
+ /**
709
+ *
710
+ * @type {string}
711
+ * @memberof CreateSearchResponse
712
+ */
713
+ 'model'?: string;
714
+ /**
715
+ *
716
+ * @type {Array<CreateSearchResponseData>}
717
+ * @memberof CreateSearchResponse
718
+ */
719
+ 'data'?: Array<CreateSearchResponseData>;
720
+ }
721
+ /**
722
+ *
723
+ * @export
724
+ * @interface CreateSearchResponseData
725
+ */
726
+ export interface CreateSearchResponseData {
727
+ /**
728
+ *
729
+ * @type {string}
730
+ * @memberof CreateSearchResponseData
731
+ */
732
+ 'object'?: string;
733
+ /**
734
+ *
735
+ * @type {number}
736
+ * @memberof CreateSearchResponseData
737
+ */
738
+ 'document'?: number;
739
+ /**
740
+ *
741
+ * @type {number}
742
+ * @memberof CreateSearchResponseData
743
+ */
744
+ 'score'?: number;
745
+ }
746
+ /**
747
+ *
748
+ * @export
749
+ * @interface DeleteFileResponse
750
+ */
751
+ export interface DeleteFileResponse {
752
+ /**
753
+ *
754
+ * @type {string}
755
+ * @memberof DeleteFileResponse
756
+ */
757
+ 'id'?: string;
758
+ /**
759
+ *
760
+ * @type {string}
761
+ * @memberof DeleteFileResponse
762
+ */
763
+ 'object'?: string;
764
+ /**
765
+ *
766
+ * @type {boolean}
767
+ * @memberof DeleteFileResponse
768
+ */
769
+ 'deleted'?: boolean;
770
+ }
771
+ /**
772
+ *
773
+ * @export
774
+ * @interface Engine
775
+ */
776
+ export interface Engine {
777
+ /**
778
+ *
779
+ * @type {string}
780
+ * @memberof Engine
781
+ */
782
+ 'id'?: string;
783
+ /**
784
+ *
785
+ * @type {string}
786
+ * @memberof Engine
787
+ */
788
+ 'object'?: string;
789
+ /**
790
+ *
791
+ * @type {number}
792
+ * @memberof Engine
793
+ */
794
+ 'created'?: number;
795
+ /**
796
+ *
797
+ * @type {boolean}
798
+ * @memberof Engine
799
+ */
800
+ 'ready'?: boolean;
801
+ }
802
+ /**
803
+ *
804
+ * @export
805
+ * @interface FineTune
806
+ */
807
+ export interface FineTune {
808
+ /**
809
+ *
810
+ * @type {string}
811
+ * @memberof FineTune
812
+ */
813
+ 'id'?: string;
814
+ /**
815
+ *
816
+ * @type {string}
817
+ * @memberof FineTune
818
+ */
819
+ 'object'?: string;
820
+ /**
821
+ *
822
+ * @type {number}
823
+ * @memberof FineTune
824
+ */
825
+ 'created_at'?: number;
826
+ /**
827
+ *
828
+ * @type {number}
829
+ * @memberof FineTune
830
+ */
831
+ 'updated_at'?: number;
832
+ /**
833
+ *
834
+ * @type {string}
835
+ * @memberof FineTune
836
+ */
837
+ 'model'?: string;
838
+ /**
839
+ *
840
+ * @type {string}
841
+ * @memberof FineTune
842
+ */
843
+ 'fine_tuned_model'?: string | null;
844
+ /**
845
+ *
846
+ * @type {string}
847
+ * @memberof FineTune
848
+ */
849
+ 'organization_id'?: string;
850
+ /**
851
+ *
852
+ * @type {string}
853
+ * @memberof FineTune
854
+ */
855
+ 'status'?: string;
856
+ /**
857
+ *
858
+ * @type {object}
859
+ * @memberof FineTune
860
+ */
861
+ 'hyperparams'?: object;
862
+ /**
863
+ *
864
+ * @type {Array<OpenAIFile>}
865
+ * @memberof FineTune
866
+ */
867
+ 'training_files'?: Array<OpenAIFile>;
868
+ /**
869
+ *
870
+ * @type {Array<OpenAIFile>}
871
+ * @memberof FineTune
872
+ */
873
+ 'validation_files'?: Array<OpenAIFile>;
874
+ /**
875
+ *
876
+ * @type {Array<OpenAIFile>}
877
+ * @memberof FineTune
878
+ */
879
+ 'result_files'?: Array<OpenAIFile>;
880
+ /**
881
+ *
882
+ * @type {Array<FineTuneEvent>}
883
+ * @memberof FineTune
884
+ */
885
+ 'events'?: Array<FineTuneEvent>;
886
+ }
887
+ /**
888
+ *
889
+ * @export
890
+ * @interface FineTuneEvent
891
+ */
892
+ export interface FineTuneEvent {
893
+ /**
894
+ *
895
+ * @type {string}
896
+ * @memberof FineTuneEvent
897
+ */
898
+ 'object'?: string;
899
+ /**
900
+ *
901
+ * @type {number}
902
+ * @memberof FineTuneEvent
903
+ */
904
+ 'created_at'?: number;
905
+ /**
906
+ *
907
+ * @type {string}
908
+ * @memberof FineTuneEvent
909
+ */
910
+ 'level'?: string;
911
+ /**
912
+ *
913
+ * @type {string}
914
+ * @memberof FineTuneEvent
915
+ */
916
+ 'message'?: string;
917
+ }
918
+ /**
919
+ *
920
+ * @export
921
+ * @interface ListEnginesResponse
922
+ */
923
+ export interface ListEnginesResponse {
924
+ /**
925
+ *
926
+ * @type {string}
927
+ * @memberof ListEnginesResponse
928
+ */
929
+ 'object'?: string;
930
+ /**
931
+ *
932
+ * @type {Array<Engine>}
933
+ * @memberof ListEnginesResponse
934
+ */
935
+ 'data'?: Array<Engine>;
936
+ }
937
+ /**
938
+ *
939
+ * @export
940
+ * @interface ListFilesResponse
941
+ */
942
+ export interface ListFilesResponse {
943
+ /**
944
+ *
945
+ * @type {string}
946
+ * @memberof ListFilesResponse
947
+ */
948
+ 'object'?: string;
949
+ /**
950
+ *
951
+ * @type {Array<OpenAIFile>}
952
+ * @memberof ListFilesResponse
953
+ */
954
+ 'data'?: Array<OpenAIFile>;
955
+ }
956
+ /**
957
+ *
958
+ * @export
959
+ * @interface ListFineTuneEventsResponse
960
+ */
961
+ export interface ListFineTuneEventsResponse {
962
+ /**
963
+ *
964
+ * @type {string}
965
+ * @memberof ListFineTuneEventsResponse
966
+ */
967
+ 'object'?: string;
968
+ /**
969
+ *
970
+ * @type {Array<FineTuneEvent>}
971
+ * @memberof ListFineTuneEventsResponse
972
+ */
973
+ 'data'?: Array<FineTuneEvent>;
974
+ }
975
+ /**
976
+ *
977
+ * @export
978
+ * @interface ListFineTunesResponse
979
+ */
980
+ export interface ListFineTunesResponse {
981
+ /**
982
+ *
983
+ * @type {string}
984
+ * @memberof ListFineTunesResponse
985
+ */
986
+ 'object'?: string;
987
+ /**
988
+ *
989
+ * @type {Array<FineTune>}
990
+ * @memberof ListFineTunesResponse
991
+ */
992
+ 'data'?: Array<FineTune>;
993
+ }
994
+ /**
995
+ *
996
+ * @export
997
+ * @interface OpenAIFile
998
+ */
999
+ export interface OpenAIFile {
1000
+ /**
1001
+ *
1002
+ * @type {string}
1003
+ * @memberof OpenAIFile
1004
+ */
1005
+ 'id'?: string;
1006
+ /**
1007
+ *
1008
+ * @type {string}
1009
+ * @memberof OpenAIFile
1010
+ */
1011
+ 'object'?: string;
1012
+ /**
1013
+ *
1014
+ * @type {number}
1015
+ * @memberof OpenAIFile
1016
+ */
1017
+ 'bytes'?: number;
1018
+ /**
1019
+ *
1020
+ * @type {number}
1021
+ * @memberof OpenAIFile
1022
+ */
1023
+ 'created_at'?: number;
1024
+ /**
1025
+ *
1026
+ * @type {string}
1027
+ * @memberof OpenAIFile
1028
+ */
1029
+ 'filename'?: string;
1030
+ /**
1031
+ *
1032
+ * @type {string}
1033
+ * @memberof OpenAIFile
1034
+ */
1035
+ 'purpose'?: string;
1036
+ /**
1037
+ *
1038
+ * @type {string}
1039
+ * @memberof OpenAIFile
1040
+ */
1041
+ 'status'?: string;
1042
+ /**
1043
+ *
1044
+ * @type {object}
1045
+ * @memberof OpenAIFile
1046
+ */
1047
+ 'status_details'?: object | null;
1048
+ }
1049
+ /**
1050
+ * OpenAIApi - axios parameter creator
1051
+ * @export
1052
+ */
1053
+ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration) => {
1054
+ /**
1055
+ *
1056
+ * @summary Immediately cancel a fine-tune job.
1057
+ * @param {string} fineTuneId The ID of the fine-tune job to cancel
1058
+ * @param {*} [options] Override http request option.
1059
+ * @throws {RequiredError}
1060
+ */
1061
+ cancelFineTune: (fineTuneId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1062
+ /**
1063
+ *
1064
+ * @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).
1065
+ * @param {CreateAnswerRequest} createAnswerRequest
1066
+ * @param {*} [options] Override http request option.
1067
+ * @throws {RequiredError}
1068
+ */
1069
+ createAnswer: (createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1070
+ /**
1071
+ *
1072
+ * @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.
1073
+ * @param {CreateClassificationRequest} createClassificationRequest
1074
+ * @param {*} [options] Override http request option.
1075
+ * @throws {RequiredError}
1076
+ */
1077
+ createClassification: (createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1078
+ /**
1079
+ *
1080
+ * @summary Creates a new completion for the provided prompt and parameters
1081
+ * @param {string} engineId The ID of the engine to use for this request
1082
+ * @param {CreateCompletionRequest} createCompletionRequest
1083
+ * @param {*} [options] Override http request option.
1084
+ * @throws {RequiredError}
1085
+ */
1086
+ createCompletion: (engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1087
+ /**
1088
+ *
1089
+ * @summary Creates an embedding vector representing the input text.
1090
+ * @param {string} engineId The ID of the engine to use for this request
1091
+ * @param {CreateEmbeddingRequest} createEmbeddingRequest
1092
+ * @param {*} [options] Override http request option.
1093
+ * @throws {RequiredError}
1094
+ */
1095
+ createEmbedding: (engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1096
+ /**
1097
+ *
1098
+ * @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.
1099
+ * @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).
1100
+ * @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.
1101
+ * @param {*} [options] Override http request option.
1102
+ * @throws {RequiredError}
1103
+ */
1104
+ createFile: (file: any, purpose: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1105
+ /**
1106
+ *
1107
+ * @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1108
+ * @param {CreateFineTuneRequest} createFineTuneRequest
1109
+ * @param {*} [options] Override http request option.
1110
+ * @throws {RequiredError}
1111
+ */
1112
+ createFineTune: (createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1113
+ /**
1114
+ *
1115
+ * @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.
1116
+ * @param {string} engineId The ID of the engine to use for this request
1117
+ * @param {CreateSearchRequest} createSearchRequest
1118
+ * @param {*} [options] Override http request option.
1119
+ * @throws {RequiredError}
1120
+ */
1121
+ createSearch: (engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1122
+ /**
1123
+ *
1124
+ * @summary Delete a file.
1125
+ * @param {string} fileId The ID of the file to use for this request
1126
+ * @param {*} [options] Override http request option.
1127
+ * @throws {RequiredError}
1128
+ */
1129
+ deleteFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1130
+ /**
1131
+ *
1132
+ * @summary Returns the contents of the specified file
1133
+ * @param {string} fileId The ID of the file to use for this request
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ */
1137
+ downloadFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1138
+ /**
1139
+ *
1140
+ * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1141
+ * @param {*} [options] Override http request option.
1142
+ * @throws {RequiredError}
1143
+ */
1144
+ listEngines: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
1145
+ /**
1146
+ *
1147
+ * @summary Returns a list of files that belong to the user\'s organization.
1148
+ * @param {*} [options] Override http request option.
1149
+ * @throws {RequiredError}
1150
+ */
1151
+ listFiles: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
1152
+ /**
1153
+ *
1154
+ * @summary Get fine-grained status updates for a fine-tune job.
1155
+ * @param {string} fineTuneId The ID of the fine-tune job to get events for.
1156
+ * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events 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. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.
1157
+ * @param {*} [options] Override http request option.
1158
+ * @throws {RequiredError}
1159
+ */
1160
+ listFineTuneEvents: (fineTuneId: string, stream?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1161
+ /**
1162
+ *
1163
+ * @summary List your organization\'s fine-tuning jobs
1164
+ * @param {*} [options] Override http request option.
1165
+ * @throws {RequiredError}
1166
+ */
1167
+ listFineTunes: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
1168
+ /**
1169
+ *
1170
+ * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1171
+ * @param {string} engineId The ID of the engine to use for this request
1172
+ * @param {*} [options] Override http request option.
1173
+ * @throws {RequiredError}
1174
+ */
1175
+ retrieveEngine: (engineId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1176
+ /**
1177
+ *
1178
+ * @summary Returns information about a specific file.
1179
+ * @param {string} fileId The ID of the file to use for this request
1180
+ * @param {*} [options] Override http request option.
1181
+ * @throws {RequiredError}
1182
+ */
1183
+ retrieveFile: (fileId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1184
+ /**
1185
+ *
1186
+ * @summary Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1187
+ * @param {string} fineTuneId The ID of the fine-tune job
1188
+ * @param {*} [options] Override http request option.
1189
+ * @throws {RequiredError}
1190
+ */
1191
+ retrieveFineTune: (fineTuneId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1192
+ };
1193
+ /**
1194
+ * OpenAIApi - functional programming interface
1195
+ * @export
1196
+ */
1197
+ export declare const OpenAIApiFp: (configuration?: Configuration) => {
1198
+ /**
1199
+ *
1200
+ * @summary Immediately cancel a fine-tune job.
1201
+ * @param {string} fineTuneId The ID of the fine-tune job to cancel
1202
+ * @param {*} [options] Override http request option.
1203
+ * @throws {RequiredError}
1204
+ */
1205
+ cancelFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
1206
+ /**
1207
+ *
1208
+ * @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).
1209
+ * @param {CreateAnswerRequest} createAnswerRequest
1210
+ * @param {*} [options] Override http request option.
1211
+ * @throws {RequiredError}
1212
+ */
1213
+ createAnswer(createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAnswerResponse>>;
1214
+ /**
1215
+ *
1216
+ * @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.
1217
+ * @param {CreateClassificationRequest} createClassificationRequest
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ */
1221
+ createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateClassificationResponse>>;
1222
+ /**
1223
+ *
1224
+ * @summary Creates a new completion for the provided prompt and parameters
1225
+ * @param {string} engineId The ID of the engine to use for this request
1226
+ * @param {CreateCompletionRequest} createCompletionRequest
1227
+ * @param {*} [options] Override http request option.
1228
+ * @throws {RequiredError}
1229
+ */
1230
+ createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCompletionResponse>>;
1231
+ /**
1232
+ *
1233
+ * @summary Creates an embedding vector representing the input text.
1234
+ * @param {string} engineId The ID of the engine to use for this request
1235
+ * @param {CreateEmbeddingRequest} createEmbeddingRequest
1236
+ * @param {*} [options] Override http request option.
1237
+ * @throws {RequiredError}
1238
+ */
1239
+ createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEmbeddingResponse>>;
1240
+ /**
1241
+ *
1242
+ * @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.
1243
+ * @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).
1244
+ * @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.
1245
+ * @param {*} [options] Override http request option.
1246
+ * @throws {RequiredError}
1247
+ */
1248
+ createFile(file: any, purpose: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenAIFile>>;
1249
+ /**
1250
+ *
1251
+ * @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1252
+ * @param {CreateFineTuneRequest} createFineTuneRequest
1253
+ * @param {*} [options] Override http request option.
1254
+ * @throws {RequiredError}
1255
+ */
1256
+ createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
1257
+ /**
1258
+ *
1259
+ * @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.
1260
+ * @param {string} engineId The ID of the engine to use for this request
1261
+ * @param {CreateSearchRequest} createSearchRequest
1262
+ * @param {*} [options] Override http request option.
1263
+ * @throws {RequiredError}
1264
+ */
1265
+ createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateSearchResponse>>;
1266
+ /**
1267
+ *
1268
+ * @summary Delete a file.
1269
+ * @param {string} fileId The ID of the file to use for this request
1270
+ * @param {*} [options] Override http request option.
1271
+ * @throws {RequiredError}
1272
+ */
1273
+ deleteFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteFileResponse>>;
1274
+ /**
1275
+ *
1276
+ * @summary Returns the contents of the specified file
1277
+ * @param {string} fileId The ID of the file to use for this request
1278
+ * @param {*} [options] Override http request option.
1279
+ * @throws {RequiredError}
1280
+ */
1281
+ downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
1282
+ /**
1283
+ *
1284
+ * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1285
+ * @param {*} [options] Override http request option.
1286
+ * @throws {RequiredError}
1287
+ */
1288
+ listEngines(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEnginesResponse>>;
1289
+ /**
1290
+ *
1291
+ * @summary Returns a list of files that belong to the user\'s organization.
1292
+ * @param {*} [options] Override http request option.
1293
+ * @throws {RequiredError}
1294
+ */
1295
+ listFiles(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFilesResponse>>;
1296
+ /**
1297
+ *
1298
+ * @summary Get fine-grained status updates for a fine-tune job.
1299
+ * @param {string} fineTuneId The ID of the fine-tune job to get events for.
1300
+ * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events 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. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.
1301
+ * @param {*} [options] Override http request option.
1302
+ * @throws {RequiredError}
1303
+ */
1304
+ listFineTuneEvents(fineTuneId: string, stream?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFineTuneEventsResponse>>;
1305
+ /**
1306
+ *
1307
+ * @summary List your organization\'s fine-tuning jobs
1308
+ * @param {*} [options] Override http request option.
1309
+ * @throws {RequiredError}
1310
+ */
1311
+ listFineTunes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFineTunesResponse>>;
1312
+ /**
1313
+ *
1314
+ * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1315
+ * @param {string} engineId The ID of the engine to use for this request
1316
+ * @param {*} [options] Override http request option.
1317
+ * @throws {RequiredError}
1318
+ */
1319
+ retrieveEngine(engineId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Engine>>;
1320
+ /**
1321
+ *
1322
+ * @summary Returns information about a specific file.
1323
+ * @param {string} fileId The ID of the file to use for this request
1324
+ * @param {*} [options] Override http request option.
1325
+ * @throws {RequiredError}
1326
+ */
1327
+ retrieveFile(fileId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenAIFile>>;
1328
+ /**
1329
+ *
1330
+ * @summary Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1331
+ * @param {string} fineTuneId The ID of the fine-tune job
1332
+ * @param {*} [options] Override http request option.
1333
+ * @throws {RequiredError}
1334
+ */
1335
+ retrieveFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
1336
+ };
1337
+ /**
1338
+ * OpenAIApi - factory interface
1339
+ * @export
1340
+ */
1341
+ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
1342
+ /**
1343
+ *
1344
+ * @summary Immediately cancel a fine-tune job.
1345
+ * @param {string} fineTuneId The ID of the fine-tune job to cancel
1346
+ * @param {*} [options] Override http request option.
1347
+ * @throws {RequiredError}
1348
+ */
1349
+ cancelFineTune(fineTuneId: string, options?: any): AxiosPromise<FineTune>;
1350
+ /**
1351
+ *
1352
+ * @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).
1353
+ * @param {CreateAnswerRequest} createAnswerRequest
1354
+ * @param {*} [options] Override http request option.
1355
+ * @throws {RequiredError}
1356
+ */
1357
+ createAnswer(createAnswerRequest: CreateAnswerRequest, options?: any): AxiosPromise<CreateAnswerResponse>;
1358
+ /**
1359
+ *
1360
+ * @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.
1361
+ * @param {CreateClassificationRequest} createClassificationRequest
1362
+ * @param {*} [options] Override http request option.
1363
+ * @throws {RequiredError}
1364
+ */
1365
+ createClassification(createClassificationRequest: CreateClassificationRequest, options?: any): AxiosPromise<CreateClassificationResponse>;
1366
+ /**
1367
+ *
1368
+ * @summary Creates a new completion for the provided prompt and parameters
1369
+ * @param {string} engineId The ID of the engine to use for this request
1370
+ * @param {CreateCompletionRequest} createCompletionRequest
1371
+ * @param {*} [options] Override http request option.
1372
+ * @throws {RequiredError}
1373
+ */
1374
+ createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: any): AxiosPromise<CreateCompletionResponse>;
1375
+ /**
1376
+ *
1377
+ * @summary Creates an embedding vector representing the input text.
1378
+ * @param {string} engineId The ID of the engine to use for this request
1379
+ * @param {CreateEmbeddingRequest} createEmbeddingRequest
1380
+ * @param {*} [options] Override http request option.
1381
+ * @throws {RequiredError}
1382
+ */
1383
+ createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: any): AxiosPromise<CreateEmbeddingResponse>;
1384
+ /**
1385
+ *
1386
+ * @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.
1387
+ * @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).
1388
+ * @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.
1389
+ * @param {*} [options] Override http request option.
1390
+ * @throws {RequiredError}
1391
+ */
1392
+ createFile(file: any, purpose: string, options?: any): AxiosPromise<OpenAIFile>;
1393
+ /**
1394
+ *
1395
+ * @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1396
+ * @param {CreateFineTuneRequest} createFineTuneRequest
1397
+ * @param {*} [options] Override http request option.
1398
+ * @throws {RequiredError}
1399
+ */
1400
+ createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: any): AxiosPromise<FineTune>;
1401
+ /**
1402
+ *
1403
+ * @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.
1404
+ * @param {string} engineId The ID of the engine to use for this request
1405
+ * @param {CreateSearchRequest} createSearchRequest
1406
+ * @param {*} [options] Override http request option.
1407
+ * @throws {RequiredError}
1408
+ */
1409
+ createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: any): AxiosPromise<CreateSearchResponse>;
1410
+ /**
1411
+ *
1412
+ * @summary Delete a file.
1413
+ * @param {string} fileId The ID of the file to use for this request
1414
+ * @param {*} [options] Override http request option.
1415
+ * @throws {RequiredError}
1416
+ */
1417
+ deleteFile(fileId: string, options?: any): AxiosPromise<DeleteFileResponse>;
1418
+ /**
1419
+ *
1420
+ * @summary Returns the contents of the specified file
1421
+ * @param {string} fileId The ID of the file to use for this request
1422
+ * @param {*} [options] Override http request option.
1423
+ * @throws {RequiredError}
1424
+ */
1425
+ downloadFile(fileId: string, options?: any): AxiosPromise<string>;
1426
+ /**
1427
+ *
1428
+ * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1429
+ * @param {*} [options] Override http request option.
1430
+ * @throws {RequiredError}
1431
+ */
1432
+ listEngines(options?: any): AxiosPromise<ListEnginesResponse>;
1433
+ /**
1434
+ *
1435
+ * @summary Returns a list of files that belong to the user\'s organization.
1436
+ * @param {*} [options] Override http request option.
1437
+ * @throws {RequiredError}
1438
+ */
1439
+ listFiles(options?: any): AxiosPromise<ListFilesResponse>;
1440
+ /**
1441
+ *
1442
+ * @summary Get fine-grained status updates for a fine-tune job.
1443
+ * @param {string} fineTuneId The ID of the fine-tune job to get events for.
1444
+ * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events 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. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.
1445
+ * @param {*} [options] Override http request option.
1446
+ * @throws {RequiredError}
1447
+ */
1448
+ listFineTuneEvents(fineTuneId: string, stream?: boolean, options?: any): AxiosPromise<ListFineTuneEventsResponse>;
1449
+ /**
1450
+ *
1451
+ * @summary List your organization\'s fine-tuning jobs
1452
+ * @param {*} [options] Override http request option.
1453
+ * @throws {RequiredError}
1454
+ */
1455
+ listFineTunes(options?: any): AxiosPromise<ListFineTunesResponse>;
1456
+ /**
1457
+ *
1458
+ * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1459
+ * @param {string} engineId The ID of the engine to use for this request
1460
+ * @param {*} [options] Override http request option.
1461
+ * @throws {RequiredError}
1462
+ */
1463
+ retrieveEngine(engineId: string, options?: any): AxiosPromise<Engine>;
1464
+ /**
1465
+ *
1466
+ * @summary Returns information about a specific file.
1467
+ * @param {string} fileId The ID of the file to use for this request
1468
+ * @param {*} [options] Override http request option.
1469
+ * @throws {RequiredError}
1470
+ */
1471
+ retrieveFile(fileId: string, options?: any): AxiosPromise<OpenAIFile>;
1472
+ /**
1473
+ *
1474
+ * @summary Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1475
+ * @param {string} fineTuneId The ID of the fine-tune job
1476
+ * @param {*} [options] Override http request option.
1477
+ * @throws {RequiredError}
1478
+ */
1479
+ retrieveFineTune(fineTuneId: string, options?: any): AxiosPromise<FineTune>;
1480
+ };
1481
+ /**
1482
+ * OpenAIApi - object-oriented interface
1483
+ * @export
1484
+ * @class OpenAIApi
1485
+ * @extends {BaseAPI}
1486
+ */
1487
+ export declare class OpenAIApi extends BaseAPI {
1488
+ /**
1489
+ *
1490
+ * @summary Immediately cancel a fine-tune job.
1491
+ * @param {string} fineTuneId The ID of the fine-tune job to cancel
1492
+ * @param {*} [options] Override http request option.
1493
+ * @throws {RequiredError}
1494
+ * @memberof OpenAIApi
1495
+ */
1496
+ cancelFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
1497
+ /**
1498
+ *
1499
+ * @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).
1500
+ * @param {CreateAnswerRequest} createAnswerRequest
1501
+ * @param {*} [options] Override http request option.
1502
+ * @throws {RequiredError}
1503
+ * @memberof OpenAIApi
1504
+ */
1505
+ createAnswer(createAnswerRequest: CreateAnswerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateAnswerResponse, any>>;
1506
+ /**
1507
+ *
1508
+ * @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.
1509
+ * @param {CreateClassificationRequest} createClassificationRequest
1510
+ * @param {*} [options] Override http request option.
1511
+ * @throws {RequiredError}
1512
+ * @memberof OpenAIApi
1513
+ */
1514
+ createClassification(createClassificationRequest: CreateClassificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateClassificationResponse, any>>;
1515
+ /**
1516
+ *
1517
+ * @summary Creates a new completion for the provided prompt and parameters
1518
+ * @param {string} engineId The ID of the engine to use for this request
1519
+ * @param {CreateCompletionRequest} createCompletionRequest
1520
+ * @param {*} [options] Override http request option.
1521
+ * @throws {RequiredError}
1522
+ * @memberof OpenAIApi
1523
+ */
1524
+ createCompletion(engineId: string, createCompletionRequest: CreateCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCompletionResponse, any>>;
1525
+ /**
1526
+ *
1527
+ * @summary Creates an embedding vector representing the input text.
1528
+ * @param {string} engineId The ID of the engine to use for this request
1529
+ * @param {CreateEmbeddingRequest} createEmbeddingRequest
1530
+ * @param {*} [options] Override http request option.
1531
+ * @throws {RequiredError}
1532
+ * @memberof OpenAIApi
1533
+ */
1534
+ createEmbedding(engineId: string, createEmbeddingRequest: CreateEmbeddingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateEmbeddingResponse, any>>;
1535
+ /**
1536
+ *
1537
+ * @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.
1538
+ * @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).
1539
+ * @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.
1540
+ * @param {*} [options] Override http request option.
1541
+ * @throws {RequiredError}
1542
+ * @memberof OpenAIApi
1543
+ */
1544
+ createFile(file: any, purpose: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OpenAIFile, any>>;
1545
+ /**
1546
+ *
1547
+ * @summary Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1548
+ * @param {CreateFineTuneRequest} createFineTuneRequest
1549
+ * @param {*} [options] Override http request option.
1550
+ * @throws {RequiredError}
1551
+ * @memberof OpenAIApi
1552
+ */
1553
+ createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
1554
+ /**
1555
+ *
1556
+ * @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.
1557
+ * @param {string} engineId The ID of the engine to use for this request
1558
+ * @param {CreateSearchRequest} createSearchRequest
1559
+ * @param {*} [options] Override http request option.
1560
+ * @throws {RequiredError}
1561
+ * @memberof OpenAIApi
1562
+ */
1563
+ createSearch(engineId: string, createSearchRequest: CreateSearchRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateSearchResponse, any>>;
1564
+ /**
1565
+ *
1566
+ * @summary Delete a file.
1567
+ * @param {string} fileId The ID of the file to use for this request
1568
+ * @param {*} [options] Override http request option.
1569
+ * @throws {RequiredError}
1570
+ * @memberof OpenAIApi
1571
+ */
1572
+ deleteFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteFileResponse, any>>;
1573
+ /**
1574
+ *
1575
+ * @summary Returns the contents of the specified file
1576
+ * @param {string} fileId The ID of the file to use for this request
1577
+ * @param {*} [options] Override http request option.
1578
+ * @throws {RequiredError}
1579
+ * @memberof OpenAIApi
1580
+ */
1581
+ downloadFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
1582
+ /**
1583
+ *
1584
+ * @summary Lists the currently available engines, and provides basic information about each one such as the owner and availability.
1585
+ * @param {*} [options] Override http request option.
1586
+ * @throws {RequiredError}
1587
+ * @memberof OpenAIApi
1588
+ */
1589
+ listEngines(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEnginesResponse, any>>;
1590
+ /**
1591
+ *
1592
+ * @summary Returns a list of files that belong to the user\'s organization.
1593
+ * @param {*} [options] Override http request option.
1594
+ * @throws {RequiredError}
1595
+ * @memberof OpenAIApi
1596
+ */
1597
+ listFiles(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFilesResponse, any>>;
1598
+ /**
1599
+ *
1600
+ * @summary Get fine-grained status updates for a fine-tune job.
1601
+ * @param {string} fineTuneId The ID of the fine-tune job to get events for.
1602
+ * @param {boolean} [stream] Whether to stream events for the fine-tune job. If set to true, events 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. The stream will terminate with a &#x60;data: [DONE]&#x60; message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.
1603
+ * @param {*} [options] Override http request option.
1604
+ * @throws {RequiredError}
1605
+ * @memberof OpenAIApi
1606
+ */
1607
+ listFineTuneEvents(fineTuneId: string, stream?: boolean, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFineTuneEventsResponse, any>>;
1608
+ /**
1609
+ *
1610
+ * @summary List your organization\'s fine-tuning jobs
1611
+ * @param {*} [options] Override http request option.
1612
+ * @throws {RequiredError}
1613
+ * @memberof OpenAIApi
1614
+ */
1615
+ listFineTunes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFineTunesResponse, any>>;
1616
+ /**
1617
+ *
1618
+ * @summary Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
1619
+ * @param {string} engineId The ID of the engine to use for this request
1620
+ * @param {*} [options] Override http request option.
1621
+ * @throws {RequiredError}
1622
+ * @memberof OpenAIApi
1623
+ */
1624
+ retrieveEngine(engineId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Engine, any>>;
1625
+ /**
1626
+ *
1627
+ * @summary Returns information about a specific file.
1628
+ * @param {string} fileId The ID of the file to use for this request
1629
+ * @param {*} [options] Override http request option.
1630
+ * @throws {RequiredError}
1631
+ * @memberof OpenAIApi
1632
+ */
1633
+ retrieveFile(fileId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OpenAIFile, any>>;
1634
+ /**
1635
+ *
1636
+ * @summary Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
1637
+ * @param {string} fineTuneId The ID of the fine-tune job
1638
+ * @param {*} [options] Override http request option.
1639
+ * @throws {RequiredError}
1640
+ * @memberof OpenAIApi
1641
+ */
1642
+ retrieveFineTune(fineTuneId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
1643
+ }