openai 3.0.0 → 3.1.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/.github/ISSUE_TEMPLATE/bug_report.yml +56 -0
- package/.github/ISSUE_TEMPLATE/config.yml +7 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +20 -0
- package/.openapi-generator/VERSION +1 -1
- package/api.ts +777 -81
- package/base.ts +1 -1
- package/common.ts +23 -13
- package/configuration.ts +1 -1
- package/dist/api.d.ts +574 -81
- package/dist/api.js +353 -6
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +20 -14
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +5 -5
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* OpenAI API
|
|
3
3
|
* APIs for sampling from and fine-tuning language models
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
5
|
+
* The version of the OpenAPI document: 1.1.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -73,7 +73,7 @@ export interface CreateAnswerRequest {
|
|
|
73
73
|
*/
|
|
74
74
|
'temperature'?: number | null;
|
|
75
75
|
/**
|
|
76
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact
|
|
76
|
+
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs.
|
|
77
77
|
* @type {number}
|
|
78
78
|
* @memberof CreateAnswerRequest
|
|
79
79
|
*/
|
|
@@ -121,7 +121,7 @@ export interface CreateAnswerRequest {
|
|
|
121
121
|
*/
|
|
122
122
|
'expand'?: Array<any> | null;
|
|
123
123
|
/**
|
|
124
|
-
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
124
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
125
125
|
* @type {string}
|
|
126
126
|
* @memberof CreateAnswerRequest
|
|
127
127
|
*/
|
|
@@ -244,7 +244,7 @@ export interface CreateClassificationRequest {
|
|
|
244
244
|
*/
|
|
245
245
|
'temperature'?: number | null;
|
|
246
246
|
/**
|
|
247
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact
|
|
247
|
+
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs.
|
|
248
248
|
* @type {number}
|
|
249
249
|
* @memberof CreateClassificationRequest
|
|
250
250
|
*/
|
|
@@ -280,7 +280,7 @@ export interface CreateClassificationRequest {
|
|
|
280
280
|
*/
|
|
281
281
|
'expand'?: Array<any> | null;
|
|
282
282
|
/**
|
|
283
|
-
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
283
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
284
284
|
* @type {string}
|
|
285
285
|
* @memberof CreateClassificationRequest
|
|
286
286
|
*/
|
|
@@ -409,7 +409,7 @@ export interface CreateCompletionRequest {
|
|
|
409
409
|
*/
|
|
410
410
|
'stream'?: boolean | null;
|
|
411
411
|
/**
|
|
412
|
-
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact
|
|
412
|
+
* Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. The maximum value for `logprobs` is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case.
|
|
413
413
|
* @type {number}
|
|
414
414
|
* @memberof CreateCompletionRequest
|
|
415
415
|
*/
|
|
@@ -451,7 +451,7 @@ export interface CreateCompletionRequest {
|
|
|
451
451
|
*/
|
|
452
452
|
'logit_bias'?: object | null;
|
|
453
453
|
/**
|
|
454
|
-
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
454
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
455
455
|
* @type {string}
|
|
456
456
|
* @memberof CreateCompletionRequest
|
|
457
457
|
*/
|
|
@@ -480,31 +480,37 @@ export interface CreateCompletionResponse {
|
|
|
480
480
|
* @type {string}
|
|
481
481
|
* @memberof CreateCompletionResponse
|
|
482
482
|
*/
|
|
483
|
-
'id'
|
|
483
|
+
'id': string;
|
|
484
484
|
/**
|
|
485
485
|
*
|
|
486
486
|
* @type {string}
|
|
487
487
|
* @memberof CreateCompletionResponse
|
|
488
488
|
*/
|
|
489
|
-
'object'
|
|
489
|
+
'object': string;
|
|
490
490
|
/**
|
|
491
491
|
*
|
|
492
492
|
* @type {number}
|
|
493
493
|
* @memberof CreateCompletionResponse
|
|
494
494
|
*/
|
|
495
|
-
'created'
|
|
495
|
+
'created': number;
|
|
496
496
|
/**
|
|
497
497
|
*
|
|
498
498
|
* @type {string}
|
|
499
499
|
* @memberof CreateCompletionResponse
|
|
500
500
|
*/
|
|
501
|
-
'model'
|
|
501
|
+
'model': string;
|
|
502
502
|
/**
|
|
503
503
|
*
|
|
504
504
|
* @type {Array<CreateCompletionResponseChoicesInner>}
|
|
505
505
|
* @memberof CreateCompletionResponse
|
|
506
506
|
*/
|
|
507
|
-
'choices'
|
|
507
|
+
'choices': Array<CreateCompletionResponseChoicesInner>;
|
|
508
|
+
/**
|
|
509
|
+
*
|
|
510
|
+
* @type {CreateCompletionResponseUsage}
|
|
511
|
+
* @memberof CreateCompletionResponse
|
|
512
|
+
*/
|
|
513
|
+
'usage'?: CreateCompletionResponseUsage;
|
|
508
514
|
}
|
|
509
515
|
/**
|
|
510
516
|
*
|
|
@@ -568,6 +574,31 @@ export interface CreateCompletionResponseChoicesInnerLogprobs {
|
|
|
568
574
|
*/
|
|
569
575
|
'text_offset'?: Array<number>;
|
|
570
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
*
|
|
579
|
+
* @export
|
|
580
|
+
* @interface CreateCompletionResponseUsage
|
|
581
|
+
*/
|
|
582
|
+
export interface CreateCompletionResponseUsage {
|
|
583
|
+
/**
|
|
584
|
+
*
|
|
585
|
+
* @type {number}
|
|
586
|
+
* @memberof CreateCompletionResponseUsage
|
|
587
|
+
*/
|
|
588
|
+
'prompt_tokens': number;
|
|
589
|
+
/**
|
|
590
|
+
*
|
|
591
|
+
* @type {number}
|
|
592
|
+
* @memberof CreateCompletionResponseUsage
|
|
593
|
+
*/
|
|
594
|
+
'completion_tokens': number;
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @type {number}
|
|
598
|
+
* @memberof CreateCompletionResponseUsage
|
|
599
|
+
*/
|
|
600
|
+
'total_tokens': number;
|
|
601
|
+
}
|
|
571
602
|
/**
|
|
572
603
|
*
|
|
573
604
|
* @export
|
|
@@ -622,31 +653,37 @@ export interface CreateEditResponse {
|
|
|
622
653
|
* @type {string}
|
|
623
654
|
* @memberof CreateEditResponse
|
|
624
655
|
*/
|
|
625
|
-
'id'
|
|
656
|
+
'id': string;
|
|
626
657
|
/**
|
|
627
658
|
*
|
|
628
659
|
* @type {string}
|
|
629
660
|
* @memberof CreateEditResponse
|
|
630
661
|
*/
|
|
631
|
-
'object'
|
|
662
|
+
'object': string;
|
|
632
663
|
/**
|
|
633
664
|
*
|
|
634
665
|
* @type {number}
|
|
635
666
|
* @memberof CreateEditResponse
|
|
636
667
|
*/
|
|
637
|
-
'created'
|
|
668
|
+
'created': number;
|
|
638
669
|
/**
|
|
639
670
|
*
|
|
640
671
|
* @type {string}
|
|
641
672
|
* @memberof CreateEditResponse
|
|
642
673
|
*/
|
|
643
|
-
'model'
|
|
674
|
+
'model': string;
|
|
644
675
|
/**
|
|
645
676
|
*
|
|
646
677
|
* @type {Array<CreateCompletionResponseChoicesInner>}
|
|
647
678
|
* @memberof CreateEditResponse
|
|
648
679
|
*/
|
|
649
|
-
'choices'
|
|
680
|
+
'choices': Array<CreateCompletionResponseChoicesInner>;
|
|
681
|
+
/**
|
|
682
|
+
*
|
|
683
|
+
* @type {CreateCompletionResponseUsage}
|
|
684
|
+
* @memberof CreateEditResponse
|
|
685
|
+
*/
|
|
686
|
+
'usage': CreateCompletionResponseUsage;
|
|
650
687
|
}
|
|
651
688
|
/**
|
|
652
689
|
*
|
|
@@ -667,7 +704,7 @@ export interface CreateEmbeddingRequest {
|
|
|
667
704
|
*/
|
|
668
705
|
'input': CreateEmbeddingRequestInput;
|
|
669
706
|
/**
|
|
670
|
-
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
707
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
671
708
|
* @type {string}
|
|
672
709
|
* @memberof CreateEmbeddingRequest
|
|
673
710
|
*/
|
|
@@ -675,7 +712,7 @@ export interface CreateEmbeddingRequest {
|
|
|
675
712
|
}
|
|
676
713
|
/**
|
|
677
714
|
* @type CreateEmbeddingRequestInput
|
|
678
|
-
* Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 2048 tokens in length. Unless
|
|
715
|
+
* Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 2048 tokens in length. Unless you are embedding code, we suggest replacing newlines (`\\n`) in your input with a single space, as we have observed inferior results when newlines are present.
|
|
679
716
|
* @export
|
|
680
717
|
*/
|
|
681
718
|
export declare type CreateEmbeddingRequestInput = Array<any> | Array<number> | Array<string> | string;
|
|
@@ -690,19 +727,25 @@ export interface CreateEmbeddingResponse {
|
|
|
690
727
|
* @type {string}
|
|
691
728
|
* @memberof CreateEmbeddingResponse
|
|
692
729
|
*/
|
|
693
|
-
'object'
|
|
730
|
+
'object': string;
|
|
694
731
|
/**
|
|
695
732
|
*
|
|
696
733
|
* @type {string}
|
|
697
734
|
* @memberof CreateEmbeddingResponse
|
|
698
735
|
*/
|
|
699
|
-
'model'
|
|
736
|
+
'model': string;
|
|
700
737
|
/**
|
|
701
738
|
*
|
|
702
739
|
* @type {Array<CreateEmbeddingResponseDataInner>}
|
|
703
740
|
* @memberof CreateEmbeddingResponse
|
|
704
741
|
*/
|
|
705
|
-
'data'
|
|
742
|
+
'data': Array<CreateEmbeddingResponseDataInner>;
|
|
743
|
+
/**
|
|
744
|
+
*
|
|
745
|
+
* @type {CreateEmbeddingResponseUsage}
|
|
746
|
+
* @memberof CreateEmbeddingResponse
|
|
747
|
+
*/
|
|
748
|
+
'usage': CreateEmbeddingResponseUsage;
|
|
706
749
|
}
|
|
707
750
|
/**
|
|
708
751
|
*
|
|
@@ -715,19 +758,38 @@ export interface CreateEmbeddingResponseDataInner {
|
|
|
715
758
|
* @type {number}
|
|
716
759
|
* @memberof CreateEmbeddingResponseDataInner
|
|
717
760
|
*/
|
|
718
|
-
'index'
|
|
761
|
+
'index': number;
|
|
719
762
|
/**
|
|
720
763
|
*
|
|
721
764
|
* @type {string}
|
|
722
765
|
* @memberof CreateEmbeddingResponseDataInner
|
|
723
766
|
*/
|
|
724
|
-
'object'
|
|
767
|
+
'object': string;
|
|
725
768
|
/**
|
|
726
769
|
*
|
|
727
770
|
* @type {Array<number>}
|
|
728
771
|
* @memberof CreateEmbeddingResponseDataInner
|
|
729
772
|
*/
|
|
730
|
-
'embedding'
|
|
773
|
+
'embedding': Array<number>;
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
*
|
|
777
|
+
* @export
|
|
778
|
+
* @interface CreateEmbeddingResponseUsage
|
|
779
|
+
*/
|
|
780
|
+
export interface CreateEmbeddingResponseUsage {
|
|
781
|
+
/**
|
|
782
|
+
*
|
|
783
|
+
* @type {number}
|
|
784
|
+
* @memberof CreateEmbeddingResponseUsage
|
|
785
|
+
*/
|
|
786
|
+
'prompt_tokens': number;
|
|
787
|
+
/**
|
|
788
|
+
*
|
|
789
|
+
* @type {number}
|
|
790
|
+
* @memberof CreateEmbeddingResponseUsage
|
|
791
|
+
*/
|
|
792
|
+
'total_tokens': number;
|
|
731
793
|
}
|
|
732
794
|
/**
|
|
733
795
|
*
|
|
@@ -748,7 +810,7 @@ export interface CreateFineTuneRequest {
|
|
|
748
810
|
*/
|
|
749
811
|
'validation_file'?: string | null;
|
|
750
812
|
/**
|
|
751
|
-
* The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\",
|
|
813
|
+
* The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\", \"davinci\", or a fine-tuned model created after 2022-04-21. To learn more about these models, see the [Models](https://beta.openai.com/docs/models) documentation.
|
|
752
814
|
* @type {string}
|
|
753
815
|
* @memberof CreateFineTuneRequest
|
|
754
816
|
*/
|
|
@@ -808,6 +870,227 @@ export interface CreateFineTuneRequest {
|
|
|
808
870
|
*/
|
|
809
871
|
'suffix'?: string | null;
|
|
810
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
*
|
|
875
|
+
* @export
|
|
876
|
+
* @interface CreateImageRequest
|
|
877
|
+
*/
|
|
878
|
+
export interface CreateImageRequest {
|
|
879
|
+
/**
|
|
880
|
+
* A text description of the desired image(s). The maximum length is 1000 characters.
|
|
881
|
+
* @type {string}
|
|
882
|
+
* @memberof CreateImageRequest
|
|
883
|
+
*/
|
|
884
|
+
'prompt': string;
|
|
885
|
+
/**
|
|
886
|
+
* The number of images to generate. Must be between 1 and 10.
|
|
887
|
+
* @type {number}
|
|
888
|
+
* @memberof CreateImageRequest
|
|
889
|
+
*/
|
|
890
|
+
'n'?: number | null;
|
|
891
|
+
/**
|
|
892
|
+
* The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
893
|
+
* @type {string}
|
|
894
|
+
* @memberof CreateImageRequest
|
|
895
|
+
*/
|
|
896
|
+
'size'?: CreateImageRequestSizeEnum;
|
|
897
|
+
/**
|
|
898
|
+
* The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
899
|
+
* @type {string}
|
|
900
|
+
* @memberof CreateImageRequest
|
|
901
|
+
*/
|
|
902
|
+
'response_format'?: CreateImageRequestResponseFormatEnum;
|
|
903
|
+
/**
|
|
904
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
905
|
+
* @type {string}
|
|
906
|
+
* @memberof CreateImageRequest
|
|
907
|
+
*/
|
|
908
|
+
'user'?: string;
|
|
909
|
+
}
|
|
910
|
+
export declare const CreateImageRequestSizeEnum: {
|
|
911
|
+
readonly _256x256: "256x256";
|
|
912
|
+
readonly _512x512: "512x512";
|
|
913
|
+
readonly _1024x1024: "1024x1024";
|
|
914
|
+
};
|
|
915
|
+
export declare type CreateImageRequestSizeEnum = typeof CreateImageRequestSizeEnum[keyof typeof CreateImageRequestSizeEnum];
|
|
916
|
+
export declare const CreateImageRequestResponseFormatEnum: {
|
|
917
|
+
readonly Url: "url";
|
|
918
|
+
readonly B64Json: "b64_json";
|
|
919
|
+
};
|
|
920
|
+
export declare type CreateImageRequestResponseFormatEnum = typeof CreateImageRequestResponseFormatEnum[keyof typeof CreateImageRequestResponseFormatEnum];
|
|
921
|
+
/**
|
|
922
|
+
*
|
|
923
|
+
* @export
|
|
924
|
+
* @interface CreateModerationRequest
|
|
925
|
+
*/
|
|
926
|
+
export interface CreateModerationRequest {
|
|
927
|
+
/**
|
|
928
|
+
*
|
|
929
|
+
* @type {CreateModerationRequestInput}
|
|
930
|
+
* @memberof CreateModerationRequest
|
|
931
|
+
*/
|
|
932
|
+
'input': CreateModerationRequestInput;
|
|
933
|
+
/**
|
|
934
|
+
* Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.
|
|
935
|
+
* @type {string}
|
|
936
|
+
* @memberof CreateModerationRequest
|
|
937
|
+
*/
|
|
938
|
+
'model'?: string;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* @type CreateModerationRequestInput
|
|
942
|
+
* The input text to classify
|
|
943
|
+
* @export
|
|
944
|
+
*/
|
|
945
|
+
export declare type CreateModerationRequestInput = Array<string> | string;
|
|
946
|
+
/**
|
|
947
|
+
*
|
|
948
|
+
* @export
|
|
949
|
+
* @interface CreateModerationResponse
|
|
950
|
+
*/
|
|
951
|
+
export interface CreateModerationResponse {
|
|
952
|
+
/**
|
|
953
|
+
*
|
|
954
|
+
* @type {string}
|
|
955
|
+
* @memberof CreateModerationResponse
|
|
956
|
+
*/
|
|
957
|
+
'id': string;
|
|
958
|
+
/**
|
|
959
|
+
*
|
|
960
|
+
* @type {string}
|
|
961
|
+
* @memberof CreateModerationResponse
|
|
962
|
+
*/
|
|
963
|
+
'model': string;
|
|
964
|
+
/**
|
|
965
|
+
*
|
|
966
|
+
* @type {Array<CreateModerationResponseResultsInner>}
|
|
967
|
+
* @memberof CreateModerationResponse
|
|
968
|
+
*/
|
|
969
|
+
'results': Array<CreateModerationResponseResultsInner>;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
*
|
|
973
|
+
* @export
|
|
974
|
+
* @interface CreateModerationResponseResultsInner
|
|
975
|
+
*/
|
|
976
|
+
export interface CreateModerationResponseResultsInner {
|
|
977
|
+
/**
|
|
978
|
+
*
|
|
979
|
+
* @type {boolean}
|
|
980
|
+
* @memberof CreateModerationResponseResultsInner
|
|
981
|
+
*/
|
|
982
|
+
'flagged': boolean;
|
|
983
|
+
/**
|
|
984
|
+
*
|
|
985
|
+
* @type {CreateModerationResponseResultsInnerCategories}
|
|
986
|
+
* @memberof CreateModerationResponseResultsInner
|
|
987
|
+
*/
|
|
988
|
+
'categories': CreateModerationResponseResultsInnerCategories;
|
|
989
|
+
/**
|
|
990
|
+
*
|
|
991
|
+
* @type {CreateModerationResponseResultsInnerCategoryScores}
|
|
992
|
+
* @memberof CreateModerationResponseResultsInner
|
|
993
|
+
*/
|
|
994
|
+
'category_scores': CreateModerationResponseResultsInnerCategoryScores;
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
*
|
|
998
|
+
* @export
|
|
999
|
+
* @interface CreateModerationResponseResultsInnerCategories
|
|
1000
|
+
*/
|
|
1001
|
+
export interface CreateModerationResponseResultsInnerCategories {
|
|
1002
|
+
/**
|
|
1003
|
+
*
|
|
1004
|
+
* @type {boolean}
|
|
1005
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1006
|
+
*/
|
|
1007
|
+
'hate': boolean;
|
|
1008
|
+
/**
|
|
1009
|
+
*
|
|
1010
|
+
* @type {boolean}
|
|
1011
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1012
|
+
*/
|
|
1013
|
+
'hate/threatening': boolean;
|
|
1014
|
+
/**
|
|
1015
|
+
*
|
|
1016
|
+
* @type {boolean}
|
|
1017
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1018
|
+
*/
|
|
1019
|
+
'self-harm': boolean;
|
|
1020
|
+
/**
|
|
1021
|
+
*
|
|
1022
|
+
* @type {boolean}
|
|
1023
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1024
|
+
*/
|
|
1025
|
+
'sexual': boolean;
|
|
1026
|
+
/**
|
|
1027
|
+
*
|
|
1028
|
+
* @type {boolean}
|
|
1029
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1030
|
+
*/
|
|
1031
|
+
'sexual/minors': boolean;
|
|
1032
|
+
/**
|
|
1033
|
+
*
|
|
1034
|
+
* @type {boolean}
|
|
1035
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1036
|
+
*/
|
|
1037
|
+
'violence': boolean;
|
|
1038
|
+
/**
|
|
1039
|
+
*
|
|
1040
|
+
* @type {boolean}
|
|
1041
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1042
|
+
*/
|
|
1043
|
+
'violence/graphic': boolean;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
*
|
|
1047
|
+
* @export
|
|
1048
|
+
* @interface CreateModerationResponseResultsInnerCategoryScores
|
|
1049
|
+
*/
|
|
1050
|
+
export interface CreateModerationResponseResultsInnerCategoryScores {
|
|
1051
|
+
/**
|
|
1052
|
+
*
|
|
1053
|
+
* @type {number}
|
|
1054
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1055
|
+
*/
|
|
1056
|
+
'hate': number;
|
|
1057
|
+
/**
|
|
1058
|
+
*
|
|
1059
|
+
* @type {number}
|
|
1060
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1061
|
+
*/
|
|
1062
|
+
'hate/threatening': number;
|
|
1063
|
+
/**
|
|
1064
|
+
*
|
|
1065
|
+
* @type {number}
|
|
1066
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1067
|
+
*/
|
|
1068
|
+
'self-harm': number;
|
|
1069
|
+
/**
|
|
1070
|
+
*
|
|
1071
|
+
* @type {number}
|
|
1072
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1073
|
+
*/
|
|
1074
|
+
'sexual': number;
|
|
1075
|
+
/**
|
|
1076
|
+
*
|
|
1077
|
+
* @type {number}
|
|
1078
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1079
|
+
*/
|
|
1080
|
+
'sexual/minors': number;
|
|
1081
|
+
/**
|
|
1082
|
+
*
|
|
1083
|
+
* @type {number}
|
|
1084
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1085
|
+
*/
|
|
1086
|
+
'violence': number;
|
|
1087
|
+
/**
|
|
1088
|
+
*
|
|
1089
|
+
* @type {number}
|
|
1090
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1091
|
+
*/
|
|
1092
|
+
'violence/graphic': number;
|
|
1093
|
+
}
|
|
811
1094
|
/**
|
|
812
1095
|
*
|
|
813
1096
|
* @export
|
|
@@ -845,7 +1128,7 @@ export interface CreateSearchRequest {
|
|
|
845
1128
|
*/
|
|
846
1129
|
'return_metadata'?: boolean | null;
|
|
847
1130
|
/**
|
|
848
|
-
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
1131
|
+
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
849
1132
|
* @type {string}
|
|
850
1133
|
* @memberof CreateSearchRequest
|
|
851
1134
|
*/
|
|
@@ -912,19 +1195,19 @@ export interface DeleteFileResponse {
|
|
|
912
1195
|
* @type {string}
|
|
913
1196
|
* @memberof DeleteFileResponse
|
|
914
1197
|
*/
|
|
915
|
-
'id'
|
|
1198
|
+
'id': string;
|
|
916
1199
|
/**
|
|
917
1200
|
*
|
|
918
1201
|
* @type {string}
|
|
919
1202
|
* @memberof DeleteFileResponse
|
|
920
1203
|
*/
|
|
921
|
-
'object'
|
|
1204
|
+
'object': string;
|
|
922
1205
|
/**
|
|
923
1206
|
*
|
|
924
1207
|
* @type {boolean}
|
|
925
1208
|
* @memberof DeleteFileResponse
|
|
926
1209
|
*/
|
|
927
|
-
'deleted'
|
|
1210
|
+
'deleted': boolean;
|
|
928
1211
|
}
|
|
929
1212
|
/**
|
|
930
1213
|
*
|
|
@@ -937,19 +1220,19 @@ export interface DeleteModelResponse {
|
|
|
937
1220
|
* @type {string}
|
|
938
1221
|
* @memberof DeleteModelResponse
|
|
939
1222
|
*/
|
|
940
|
-
'id'
|
|
1223
|
+
'id': string;
|
|
941
1224
|
/**
|
|
942
1225
|
*
|
|
943
1226
|
* @type {string}
|
|
944
1227
|
* @memberof DeleteModelResponse
|
|
945
1228
|
*/
|
|
946
|
-
'object'
|
|
1229
|
+
'object': string;
|
|
947
1230
|
/**
|
|
948
1231
|
*
|
|
949
1232
|
* @type {boolean}
|
|
950
1233
|
* @memberof DeleteModelResponse
|
|
951
1234
|
*/
|
|
952
|
-
'deleted'
|
|
1235
|
+
'deleted': boolean;
|
|
953
1236
|
}
|
|
954
1237
|
/**
|
|
955
1238
|
*
|
|
@@ -962,25 +1245,25 @@ export interface Engine {
|
|
|
962
1245
|
* @type {string}
|
|
963
1246
|
* @memberof Engine
|
|
964
1247
|
*/
|
|
965
|
-
'id'
|
|
1248
|
+
'id': string;
|
|
966
1249
|
/**
|
|
967
1250
|
*
|
|
968
1251
|
* @type {string}
|
|
969
1252
|
* @memberof Engine
|
|
970
1253
|
*/
|
|
971
|
-
'object'
|
|
1254
|
+
'object': string;
|
|
972
1255
|
/**
|
|
973
1256
|
*
|
|
974
1257
|
* @type {number}
|
|
975
1258
|
* @memberof Engine
|
|
976
1259
|
*/
|
|
977
|
-
'created'
|
|
1260
|
+
'created': number | null;
|
|
978
1261
|
/**
|
|
979
1262
|
*
|
|
980
1263
|
* @type {boolean}
|
|
981
1264
|
* @memberof Engine
|
|
982
1265
|
*/
|
|
983
|
-
'ready'
|
|
1266
|
+
'ready': boolean;
|
|
984
1267
|
}
|
|
985
1268
|
/**
|
|
986
1269
|
*
|
|
@@ -993,73 +1276,73 @@ export interface FineTune {
|
|
|
993
1276
|
* @type {string}
|
|
994
1277
|
* @memberof FineTune
|
|
995
1278
|
*/
|
|
996
|
-
'id'
|
|
1279
|
+
'id': string;
|
|
997
1280
|
/**
|
|
998
1281
|
*
|
|
999
1282
|
* @type {string}
|
|
1000
1283
|
* @memberof FineTune
|
|
1001
1284
|
*/
|
|
1002
|
-
'object'
|
|
1285
|
+
'object': string;
|
|
1003
1286
|
/**
|
|
1004
1287
|
*
|
|
1005
1288
|
* @type {number}
|
|
1006
1289
|
* @memberof FineTune
|
|
1007
1290
|
*/
|
|
1008
|
-
'created_at'
|
|
1291
|
+
'created_at': number;
|
|
1009
1292
|
/**
|
|
1010
1293
|
*
|
|
1011
1294
|
* @type {number}
|
|
1012
1295
|
* @memberof FineTune
|
|
1013
1296
|
*/
|
|
1014
|
-
'updated_at'
|
|
1297
|
+
'updated_at': number;
|
|
1015
1298
|
/**
|
|
1016
1299
|
*
|
|
1017
1300
|
* @type {string}
|
|
1018
1301
|
* @memberof FineTune
|
|
1019
1302
|
*/
|
|
1020
|
-
'model'
|
|
1303
|
+
'model': string;
|
|
1021
1304
|
/**
|
|
1022
1305
|
*
|
|
1023
1306
|
* @type {string}
|
|
1024
1307
|
* @memberof FineTune
|
|
1025
1308
|
*/
|
|
1026
|
-
'fine_tuned_model'
|
|
1309
|
+
'fine_tuned_model': string | null;
|
|
1027
1310
|
/**
|
|
1028
1311
|
*
|
|
1029
1312
|
* @type {string}
|
|
1030
1313
|
* @memberof FineTune
|
|
1031
1314
|
*/
|
|
1032
|
-
'organization_id'
|
|
1315
|
+
'organization_id': string;
|
|
1033
1316
|
/**
|
|
1034
1317
|
*
|
|
1035
1318
|
* @type {string}
|
|
1036
1319
|
* @memberof FineTune
|
|
1037
1320
|
*/
|
|
1038
|
-
'status'
|
|
1321
|
+
'status': string;
|
|
1039
1322
|
/**
|
|
1040
1323
|
*
|
|
1041
1324
|
* @type {object}
|
|
1042
1325
|
* @memberof FineTune
|
|
1043
1326
|
*/
|
|
1044
|
-
'hyperparams'
|
|
1327
|
+
'hyperparams': object;
|
|
1045
1328
|
/**
|
|
1046
1329
|
*
|
|
1047
1330
|
* @type {Array<OpenAIFile>}
|
|
1048
1331
|
* @memberof FineTune
|
|
1049
1332
|
*/
|
|
1050
|
-
'training_files'
|
|
1333
|
+
'training_files': Array<OpenAIFile>;
|
|
1051
1334
|
/**
|
|
1052
1335
|
*
|
|
1053
1336
|
* @type {Array<OpenAIFile>}
|
|
1054
1337
|
* @memberof FineTune
|
|
1055
1338
|
*/
|
|
1056
|
-
'validation_files'
|
|
1339
|
+
'validation_files': Array<OpenAIFile>;
|
|
1057
1340
|
/**
|
|
1058
1341
|
*
|
|
1059
1342
|
* @type {Array<OpenAIFile>}
|
|
1060
1343
|
* @memberof FineTune
|
|
1061
1344
|
*/
|
|
1062
|
-
'result_files'
|
|
1345
|
+
'result_files': Array<OpenAIFile>;
|
|
1063
1346
|
/**
|
|
1064
1347
|
*
|
|
1065
1348
|
* @type {Array<FineTuneEvent>}
|
|
@@ -1078,25 +1361,63 @@ export interface FineTuneEvent {
|
|
|
1078
1361
|
* @type {string}
|
|
1079
1362
|
* @memberof FineTuneEvent
|
|
1080
1363
|
*/
|
|
1081
|
-
'object'
|
|
1364
|
+
'object': string;
|
|
1082
1365
|
/**
|
|
1083
1366
|
*
|
|
1084
1367
|
* @type {number}
|
|
1085
1368
|
* @memberof FineTuneEvent
|
|
1086
1369
|
*/
|
|
1087
|
-
'created_at'
|
|
1370
|
+
'created_at': number;
|
|
1088
1371
|
/**
|
|
1089
1372
|
*
|
|
1090
1373
|
* @type {string}
|
|
1091
1374
|
* @memberof FineTuneEvent
|
|
1092
1375
|
*/
|
|
1093
|
-
'level'
|
|
1376
|
+
'level': string;
|
|
1094
1377
|
/**
|
|
1095
1378
|
*
|
|
1096
1379
|
* @type {string}
|
|
1097
1380
|
* @memberof FineTuneEvent
|
|
1098
1381
|
*/
|
|
1099
|
-
'message'
|
|
1382
|
+
'message': string;
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
*
|
|
1386
|
+
* @export
|
|
1387
|
+
* @interface ImagesResponse
|
|
1388
|
+
*/
|
|
1389
|
+
export interface ImagesResponse {
|
|
1390
|
+
/**
|
|
1391
|
+
*
|
|
1392
|
+
* @type {number}
|
|
1393
|
+
* @memberof ImagesResponse
|
|
1394
|
+
*/
|
|
1395
|
+
'created': number;
|
|
1396
|
+
/**
|
|
1397
|
+
*
|
|
1398
|
+
* @type {Array<ImagesResponseDataInner>}
|
|
1399
|
+
* @memberof ImagesResponse
|
|
1400
|
+
*/
|
|
1401
|
+
'data': Array<ImagesResponseDataInner>;
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
*
|
|
1405
|
+
* @export
|
|
1406
|
+
* @interface ImagesResponseDataInner
|
|
1407
|
+
*/
|
|
1408
|
+
export interface ImagesResponseDataInner {
|
|
1409
|
+
/**
|
|
1410
|
+
*
|
|
1411
|
+
* @type {string}
|
|
1412
|
+
* @memberof ImagesResponseDataInner
|
|
1413
|
+
*/
|
|
1414
|
+
'url'?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
*
|
|
1417
|
+
* @type {string}
|
|
1418
|
+
* @memberof ImagesResponseDataInner
|
|
1419
|
+
*/
|
|
1420
|
+
'b64_json'?: string;
|
|
1100
1421
|
}
|
|
1101
1422
|
/**
|
|
1102
1423
|
*
|
|
@@ -1109,13 +1430,13 @@ export interface ListEnginesResponse {
|
|
|
1109
1430
|
* @type {string}
|
|
1110
1431
|
* @memberof ListEnginesResponse
|
|
1111
1432
|
*/
|
|
1112
|
-
'object'
|
|
1433
|
+
'object': string;
|
|
1113
1434
|
/**
|
|
1114
1435
|
*
|
|
1115
1436
|
* @type {Array<Engine>}
|
|
1116
1437
|
* @memberof ListEnginesResponse
|
|
1117
1438
|
*/
|
|
1118
|
-
'data'
|
|
1439
|
+
'data': Array<Engine>;
|
|
1119
1440
|
}
|
|
1120
1441
|
/**
|
|
1121
1442
|
*
|
|
@@ -1128,13 +1449,13 @@ export interface ListFilesResponse {
|
|
|
1128
1449
|
* @type {string}
|
|
1129
1450
|
* @memberof ListFilesResponse
|
|
1130
1451
|
*/
|
|
1131
|
-
'object'
|
|
1452
|
+
'object': string;
|
|
1132
1453
|
/**
|
|
1133
1454
|
*
|
|
1134
1455
|
* @type {Array<OpenAIFile>}
|
|
1135
1456
|
* @memberof ListFilesResponse
|
|
1136
1457
|
*/
|
|
1137
|
-
'data'
|
|
1458
|
+
'data': Array<OpenAIFile>;
|
|
1138
1459
|
}
|
|
1139
1460
|
/**
|
|
1140
1461
|
*
|
|
@@ -1147,13 +1468,13 @@ export interface ListFineTuneEventsResponse {
|
|
|
1147
1468
|
* @type {string}
|
|
1148
1469
|
* @memberof ListFineTuneEventsResponse
|
|
1149
1470
|
*/
|
|
1150
|
-
'object'
|
|
1471
|
+
'object': string;
|
|
1151
1472
|
/**
|
|
1152
1473
|
*
|
|
1153
1474
|
* @type {Array<FineTuneEvent>}
|
|
1154
1475
|
* @memberof ListFineTuneEventsResponse
|
|
1155
1476
|
*/
|
|
1156
|
-
'data'
|
|
1477
|
+
'data': Array<FineTuneEvent>;
|
|
1157
1478
|
}
|
|
1158
1479
|
/**
|
|
1159
1480
|
*
|
|
@@ -1166,13 +1487,13 @@ export interface ListFineTunesResponse {
|
|
|
1166
1487
|
* @type {string}
|
|
1167
1488
|
* @memberof ListFineTunesResponse
|
|
1168
1489
|
*/
|
|
1169
|
-
'object'
|
|
1490
|
+
'object': string;
|
|
1170
1491
|
/**
|
|
1171
1492
|
*
|
|
1172
1493
|
* @type {Array<FineTune>}
|
|
1173
1494
|
* @memberof ListFineTunesResponse
|
|
1174
1495
|
*/
|
|
1175
|
-
'data'
|
|
1496
|
+
'data': Array<FineTune>;
|
|
1176
1497
|
}
|
|
1177
1498
|
/**
|
|
1178
1499
|
*
|
|
@@ -1185,13 +1506,13 @@ export interface ListModelsResponse {
|
|
|
1185
1506
|
* @type {string}
|
|
1186
1507
|
* @memberof ListModelsResponse
|
|
1187
1508
|
*/
|
|
1188
|
-
'object'
|
|
1509
|
+
'object': string;
|
|
1189
1510
|
/**
|
|
1190
1511
|
*
|
|
1191
1512
|
* @type {Array<Model>}
|
|
1192
1513
|
* @memberof ListModelsResponse
|
|
1193
1514
|
*/
|
|
1194
|
-
'data'
|
|
1515
|
+
'data': Array<Model>;
|
|
1195
1516
|
}
|
|
1196
1517
|
/**
|
|
1197
1518
|
*
|
|
@@ -1204,25 +1525,25 @@ export interface Model {
|
|
|
1204
1525
|
* @type {string}
|
|
1205
1526
|
* @memberof Model
|
|
1206
1527
|
*/
|
|
1207
|
-
'id'
|
|
1528
|
+
'id': string;
|
|
1208
1529
|
/**
|
|
1209
1530
|
*
|
|
1210
1531
|
* @type {string}
|
|
1211
1532
|
* @memberof Model
|
|
1212
1533
|
*/
|
|
1213
|
-
'object'
|
|
1534
|
+
'object': string;
|
|
1214
1535
|
/**
|
|
1215
1536
|
*
|
|
1216
1537
|
* @type {number}
|
|
1217
1538
|
* @memberof Model
|
|
1218
1539
|
*/
|
|
1219
|
-
'created'
|
|
1540
|
+
'created': number;
|
|
1220
1541
|
/**
|
|
1221
1542
|
*
|
|
1222
1543
|
* @type {string}
|
|
1223
1544
|
* @memberof Model
|
|
1224
1545
|
*/
|
|
1225
|
-
'owned_by'
|
|
1546
|
+
'owned_by': string;
|
|
1226
1547
|
}
|
|
1227
1548
|
/**
|
|
1228
1549
|
*
|
|
@@ -1235,37 +1556,37 @@ export interface OpenAIFile {
|
|
|
1235
1556
|
* @type {string}
|
|
1236
1557
|
* @memberof OpenAIFile
|
|
1237
1558
|
*/
|
|
1238
|
-
'id'
|
|
1559
|
+
'id': string;
|
|
1239
1560
|
/**
|
|
1240
1561
|
*
|
|
1241
1562
|
* @type {string}
|
|
1242
1563
|
* @memberof OpenAIFile
|
|
1243
1564
|
*/
|
|
1244
|
-
'object'
|
|
1565
|
+
'object': string;
|
|
1245
1566
|
/**
|
|
1246
1567
|
*
|
|
1247
1568
|
* @type {number}
|
|
1248
1569
|
* @memberof OpenAIFile
|
|
1249
1570
|
*/
|
|
1250
|
-
'bytes'
|
|
1571
|
+
'bytes': number;
|
|
1251
1572
|
/**
|
|
1252
1573
|
*
|
|
1253
1574
|
* @type {number}
|
|
1254
1575
|
* @memberof OpenAIFile
|
|
1255
1576
|
*/
|
|
1256
|
-
'created_at'
|
|
1577
|
+
'created_at': number;
|
|
1257
1578
|
/**
|
|
1258
1579
|
*
|
|
1259
1580
|
* @type {string}
|
|
1260
1581
|
* @memberof OpenAIFile
|
|
1261
1582
|
*/
|
|
1262
|
-
'filename'
|
|
1583
|
+
'filename': string;
|
|
1263
1584
|
/**
|
|
1264
1585
|
*
|
|
1265
1586
|
* @type {string}
|
|
1266
1587
|
* @memberof OpenAIFile
|
|
1267
1588
|
*/
|
|
1268
|
-
'purpose'
|
|
1589
|
+
'purpose': string;
|
|
1269
1590
|
/**
|
|
1270
1591
|
*
|
|
1271
1592
|
* @type {string}
|
|
@@ -1337,12 +1658,12 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1337
1658
|
/**
|
|
1338
1659
|
*
|
|
1339
1660
|
* @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.
|
|
1340
|
-
* @param {
|
|
1661
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1341
1662
|
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1342
1663
|
* @param {*} [options] Override http request option.
|
|
1343
1664
|
* @throws {RequiredError}
|
|
1344
1665
|
*/
|
|
1345
|
-
createFile: (file:
|
|
1666
|
+
createFile: (file: File, purpose: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1346
1667
|
/**
|
|
1347
1668
|
*
|
|
1348
1669
|
* @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)
|
|
@@ -1351,6 +1672,48 @@ export declare const OpenAIApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1351
1672
|
* @throws {RequiredError}
|
|
1352
1673
|
*/
|
|
1353
1674
|
createFineTune: (createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1675
|
+
/**
|
|
1676
|
+
*
|
|
1677
|
+
* @summary Creates an image given a prompt.
|
|
1678
|
+
* @param {CreateImageRequest} createImageRequest
|
|
1679
|
+
* @param {*} [options] Override http request option.
|
|
1680
|
+
* @throws {RequiredError}
|
|
1681
|
+
*/
|
|
1682
|
+
createImage: (createImageRequest: CreateImageRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1683
|
+
/**
|
|
1684
|
+
*
|
|
1685
|
+
* @summary Creates an edited or extended image given an original image and a prompt.
|
|
1686
|
+
* @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square.
|
|
1687
|
+
* @param {File} mask An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
|
|
1688
|
+
* @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.
|
|
1689
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
1690
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
1691
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
1692
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
1693
|
+
* @param {*} [options] Override http request option.
|
|
1694
|
+
* @throws {RequiredError}
|
|
1695
|
+
*/
|
|
1696
|
+
createImageEdit: (image: File, mask: File, prompt: string, n?: number, size?: string, responseFormat?: string, user?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1697
|
+
/**
|
|
1698
|
+
*
|
|
1699
|
+
* @summary Creates a variation of a given image.
|
|
1700
|
+
* @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
|
|
1701
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
1702
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
1703
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
1704
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
1705
|
+
* @param {*} [options] Override http request option.
|
|
1706
|
+
* @throws {RequiredError}
|
|
1707
|
+
*/
|
|
1708
|
+
createImageVariation: (image: File, n?: number, size?: string, responseFormat?: string, user?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1709
|
+
/**
|
|
1710
|
+
*
|
|
1711
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
1712
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
1713
|
+
* @param {*} [options] Override http request option.
|
|
1714
|
+
* @throws {RequiredError}
|
|
1715
|
+
*/
|
|
1716
|
+
createModeration: (createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1354
1717
|
/**
|
|
1355
1718
|
*
|
|
1356
1719
|
* @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.
|
|
@@ -1515,12 +1878,12 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1515
1878
|
/**
|
|
1516
1879
|
*
|
|
1517
1880
|
* @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.
|
|
1518
|
-
* @param {
|
|
1881
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1519
1882
|
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1520
1883
|
* @param {*} [options] Override http request option.
|
|
1521
1884
|
* @throws {RequiredError}
|
|
1522
1885
|
*/
|
|
1523
|
-
createFile(file:
|
|
1886
|
+
createFile(file: File, purpose: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenAIFile>>;
|
|
1524
1887
|
/**
|
|
1525
1888
|
*
|
|
1526
1889
|
* @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)
|
|
@@ -1529,6 +1892,48 @@ export declare const OpenAIApiFp: (configuration?: Configuration) => {
|
|
|
1529
1892
|
* @throws {RequiredError}
|
|
1530
1893
|
*/
|
|
1531
1894
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FineTune>>;
|
|
1895
|
+
/**
|
|
1896
|
+
*
|
|
1897
|
+
* @summary Creates an image given a prompt.
|
|
1898
|
+
* @param {CreateImageRequest} createImageRequest
|
|
1899
|
+
* @param {*} [options] Override http request option.
|
|
1900
|
+
* @throws {RequiredError}
|
|
1901
|
+
*/
|
|
1902
|
+
createImage(createImageRequest: CreateImageRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImagesResponse>>;
|
|
1903
|
+
/**
|
|
1904
|
+
*
|
|
1905
|
+
* @summary Creates an edited or extended image given an original image and a prompt.
|
|
1906
|
+
* @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square.
|
|
1907
|
+
* @param {File} mask An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
|
|
1908
|
+
* @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.
|
|
1909
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
1910
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
1911
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
1912
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
1913
|
+
* @param {*} [options] Override http request option.
|
|
1914
|
+
* @throws {RequiredError}
|
|
1915
|
+
*/
|
|
1916
|
+
createImageEdit(image: File, mask: File, prompt: string, n?: number, size?: string, responseFormat?: string, user?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImagesResponse>>;
|
|
1917
|
+
/**
|
|
1918
|
+
*
|
|
1919
|
+
* @summary Creates a variation of a given image.
|
|
1920
|
+
* @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
|
|
1921
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
1922
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
1923
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
1924
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
1925
|
+
* @param {*} [options] Override http request option.
|
|
1926
|
+
* @throws {RequiredError}
|
|
1927
|
+
*/
|
|
1928
|
+
createImageVariation(image: File, n?: number, size?: string, responseFormat?: string, user?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImagesResponse>>;
|
|
1929
|
+
/**
|
|
1930
|
+
*
|
|
1931
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
1932
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
1933
|
+
* @param {*} [options] Override http request option.
|
|
1934
|
+
* @throws {RequiredError}
|
|
1935
|
+
*/
|
|
1936
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateModerationResponse>>;
|
|
1532
1937
|
/**
|
|
1533
1938
|
*
|
|
1534
1939
|
* @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.
|
|
@@ -1693,12 +2098,12 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1693
2098
|
/**
|
|
1694
2099
|
*
|
|
1695
2100
|
* @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.
|
|
1696
|
-
* @param {
|
|
2101
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1697
2102
|
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1698
2103
|
* @param {*} [options] Override http request option.
|
|
1699
2104
|
* @throws {RequiredError}
|
|
1700
2105
|
*/
|
|
1701
|
-
createFile(file:
|
|
2106
|
+
createFile(file: File, purpose: string, options?: any): AxiosPromise<OpenAIFile>;
|
|
1702
2107
|
/**
|
|
1703
2108
|
*
|
|
1704
2109
|
* @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)
|
|
@@ -1707,6 +2112,48 @@ export declare const OpenAIApiFactory: (configuration?: Configuration, basePath?
|
|
|
1707
2112
|
* @throws {RequiredError}
|
|
1708
2113
|
*/
|
|
1709
2114
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: any): AxiosPromise<FineTune>;
|
|
2115
|
+
/**
|
|
2116
|
+
*
|
|
2117
|
+
* @summary Creates an image given a prompt.
|
|
2118
|
+
* @param {CreateImageRequest} createImageRequest
|
|
2119
|
+
* @param {*} [options] Override http request option.
|
|
2120
|
+
* @throws {RequiredError}
|
|
2121
|
+
*/
|
|
2122
|
+
createImage(createImageRequest: CreateImageRequest, options?: any): AxiosPromise<ImagesResponse>;
|
|
2123
|
+
/**
|
|
2124
|
+
*
|
|
2125
|
+
* @summary Creates an edited or extended image given an original image and a prompt.
|
|
2126
|
+
* @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square.
|
|
2127
|
+
* @param {File} mask An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
|
|
2128
|
+
* @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.
|
|
2129
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
2130
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
2131
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
2132
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
2133
|
+
* @param {*} [options] Override http request option.
|
|
2134
|
+
* @throws {RequiredError}
|
|
2135
|
+
*/
|
|
2136
|
+
createImageEdit(image: File, mask: File, prompt: string, n?: number, size?: string, responseFormat?: string, user?: string, options?: any): AxiosPromise<ImagesResponse>;
|
|
2137
|
+
/**
|
|
2138
|
+
*
|
|
2139
|
+
* @summary Creates a variation of a given image.
|
|
2140
|
+
* @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
|
|
2141
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
2142
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
2143
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
2144
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
2145
|
+
* @param {*} [options] Override http request option.
|
|
2146
|
+
* @throws {RequiredError}
|
|
2147
|
+
*/
|
|
2148
|
+
createImageVariation(image: File, n?: number, size?: string, responseFormat?: string, user?: string, options?: any): AxiosPromise<ImagesResponse>;
|
|
2149
|
+
/**
|
|
2150
|
+
*
|
|
2151
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
2152
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
2153
|
+
* @param {*} [options] Override http request option.
|
|
2154
|
+
* @throws {RequiredError}
|
|
2155
|
+
*/
|
|
2156
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: any): AxiosPromise<CreateModerationResponse>;
|
|
1710
2157
|
/**
|
|
1711
2158
|
*
|
|
1712
2159
|
* @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.
|
|
@@ -1879,13 +2326,13 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1879
2326
|
/**
|
|
1880
2327
|
*
|
|
1881
2328
|
* @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.
|
|
1882
|
-
* @param {
|
|
2329
|
+
* @param {File} file Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
|
1883
2330
|
* @param {string} purpose The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
|
1884
2331
|
* @param {*} [options] Override http request option.
|
|
1885
2332
|
* @throws {RequiredError}
|
|
1886
2333
|
* @memberof OpenAIApi
|
|
1887
2334
|
*/
|
|
1888
|
-
createFile(file:
|
|
2335
|
+
createFile(file: File, purpose: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OpenAIFile, any>>;
|
|
1889
2336
|
/**
|
|
1890
2337
|
*
|
|
1891
2338
|
* @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)
|
|
@@ -1895,6 +2342,52 @@ export declare class OpenAIApi extends BaseAPI {
|
|
|
1895
2342
|
* @memberof OpenAIApi
|
|
1896
2343
|
*/
|
|
1897
2344
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<FineTune, any>>;
|
|
2345
|
+
/**
|
|
2346
|
+
*
|
|
2347
|
+
* @summary Creates an image given a prompt.
|
|
2348
|
+
* @param {CreateImageRequest} createImageRequest
|
|
2349
|
+
* @param {*} [options] Override http request option.
|
|
2350
|
+
* @throws {RequiredError}
|
|
2351
|
+
* @memberof OpenAIApi
|
|
2352
|
+
*/
|
|
2353
|
+
createImage(createImageRequest: CreateImageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ImagesResponse, any>>;
|
|
2354
|
+
/**
|
|
2355
|
+
*
|
|
2356
|
+
* @summary Creates an edited or extended image given an original image and a prompt.
|
|
2357
|
+
* @param {File} image The image to edit. Must be a valid PNG file, less than 4MB, and square.
|
|
2358
|
+
* @param {File} mask An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
|
|
2359
|
+
* @param {string} prompt A text description of the desired image(s). The maximum length is 1000 characters.
|
|
2360
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
2361
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
2362
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
2363
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
2364
|
+
* @param {*} [options] Override http request option.
|
|
2365
|
+
* @throws {RequiredError}
|
|
2366
|
+
* @memberof OpenAIApi
|
|
2367
|
+
*/
|
|
2368
|
+
createImageEdit(image: File, mask: File, prompt: string, n?: number, size?: string, responseFormat?: string, user?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ImagesResponse, any>>;
|
|
2369
|
+
/**
|
|
2370
|
+
*
|
|
2371
|
+
* @summary Creates a variation of a given image.
|
|
2372
|
+
* @param {File} image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
|
|
2373
|
+
* @param {number} [n] The number of images to generate. Must be between 1 and 10.
|
|
2374
|
+
* @param {string} [size] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
2375
|
+
* @param {string} [responseFormat] The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
|
2376
|
+
* @param {string} [user] A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](/docs/usage-policies/end-user-ids).
|
|
2377
|
+
* @param {*} [options] Override http request option.
|
|
2378
|
+
* @throws {RequiredError}
|
|
2379
|
+
* @memberof OpenAIApi
|
|
2380
|
+
*/
|
|
2381
|
+
createImageVariation(image: File, n?: number, size?: string, responseFormat?: string, user?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ImagesResponse, any>>;
|
|
2382
|
+
/**
|
|
2383
|
+
*
|
|
2384
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
2385
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
2386
|
+
* @param {*} [options] Override http request option.
|
|
2387
|
+
* @throws {RequiredError}
|
|
2388
|
+
* @memberof OpenAIApi
|
|
2389
|
+
*/
|
|
2390
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateModerationResponse, any>>;
|
|
1898
2391
|
/**
|
|
1899
2392
|
*
|
|
1900
2393
|
* @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.
|