openai 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/VERSION +1 -1
- package/api.ts +381 -76
- package/base.ts +1 -1
- package/common.ts +23 -13
- package/configuration.ts +1 -1
- package/dist/api.d.ts +344 -76
- package/dist/api.js +69 -5
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +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 +1 -1
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* OpenAI API
|
|
5
5
|
* APIs for sampling from and fine-tuning language models
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.
|
|
7
|
+
* The version of the OpenAPI document: 1.0.6
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -82,7 +82,7 @@ export interface CreateAnswerRequest {
|
|
|
82
82
|
*/
|
|
83
83
|
'temperature'?: number | null;
|
|
84
84
|
/**
|
|
85
|
-
* 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
|
|
85
|
+
* 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.
|
|
86
86
|
* @type {number}
|
|
87
87
|
* @memberof CreateAnswerRequest
|
|
88
88
|
*/
|
|
@@ -254,7 +254,7 @@ export interface CreateClassificationRequest {
|
|
|
254
254
|
*/
|
|
255
255
|
'temperature'?: number | null;
|
|
256
256
|
/**
|
|
257
|
-
* 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
|
|
257
|
+
* 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.
|
|
258
258
|
* @type {number}
|
|
259
259
|
* @memberof CreateClassificationRequest
|
|
260
260
|
*/
|
|
@@ -419,7 +419,7 @@ export interface CreateCompletionRequest {
|
|
|
419
419
|
*/
|
|
420
420
|
'stream'?: boolean | null;
|
|
421
421
|
/**
|
|
422
|
-
* 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
|
|
422
|
+
* 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.
|
|
423
423
|
* @type {number}
|
|
424
424
|
* @memberof CreateCompletionRequest
|
|
425
425
|
*/
|
|
@@ -492,31 +492,37 @@ export interface CreateCompletionResponse {
|
|
|
492
492
|
* @type {string}
|
|
493
493
|
* @memberof CreateCompletionResponse
|
|
494
494
|
*/
|
|
495
|
-
'id'
|
|
495
|
+
'id': string;
|
|
496
496
|
/**
|
|
497
497
|
*
|
|
498
498
|
* @type {string}
|
|
499
499
|
* @memberof CreateCompletionResponse
|
|
500
500
|
*/
|
|
501
|
-
'object'
|
|
501
|
+
'object': string;
|
|
502
502
|
/**
|
|
503
503
|
*
|
|
504
504
|
* @type {number}
|
|
505
505
|
* @memberof CreateCompletionResponse
|
|
506
506
|
*/
|
|
507
|
-
'created'
|
|
507
|
+
'created': number;
|
|
508
508
|
/**
|
|
509
509
|
*
|
|
510
510
|
* @type {string}
|
|
511
511
|
* @memberof CreateCompletionResponse
|
|
512
512
|
*/
|
|
513
|
-
'model'
|
|
513
|
+
'model': string;
|
|
514
514
|
/**
|
|
515
515
|
*
|
|
516
516
|
* @type {Array<CreateCompletionResponseChoicesInner>}
|
|
517
517
|
* @memberof CreateCompletionResponse
|
|
518
518
|
*/
|
|
519
|
-
'choices'
|
|
519
|
+
'choices': Array<CreateCompletionResponseChoicesInner>;
|
|
520
|
+
/**
|
|
521
|
+
*
|
|
522
|
+
* @type {CreateCompletionResponseUsage}
|
|
523
|
+
* @memberof CreateCompletionResponse
|
|
524
|
+
*/
|
|
525
|
+
'usage'?: CreateCompletionResponseUsage;
|
|
520
526
|
}
|
|
521
527
|
/**
|
|
522
528
|
*
|
|
@@ -580,6 +586,31 @@ export interface CreateCompletionResponseChoicesInnerLogprobs {
|
|
|
580
586
|
*/
|
|
581
587
|
'text_offset'?: Array<number>;
|
|
582
588
|
}
|
|
589
|
+
/**
|
|
590
|
+
*
|
|
591
|
+
* @export
|
|
592
|
+
* @interface CreateCompletionResponseUsage
|
|
593
|
+
*/
|
|
594
|
+
export interface CreateCompletionResponseUsage {
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @type {number}
|
|
598
|
+
* @memberof CreateCompletionResponseUsage
|
|
599
|
+
*/
|
|
600
|
+
'prompt_tokens': number;
|
|
601
|
+
/**
|
|
602
|
+
*
|
|
603
|
+
* @type {number}
|
|
604
|
+
* @memberof CreateCompletionResponseUsage
|
|
605
|
+
*/
|
|
606
|
+
'completion_tokens': number;
|
|
607
|
+
/**
|
|
608
|
+
*
|
|
609
|
+
* @type {number}
|
|
610
|
+
* @memberof CreateCompletionResponseUsage
|
|
611
|
+
*/
|
|
612
|
+
'total_tokens': number;
|
|
613
|
+
}
|
|
583
614
|
/**
|
|
584
615
|
*
|
|
585
616
|
* @export
|
|
@@ -634,31 +665,37 @@ export interface CreateEditResponse {
|
|
|
634
665
|
* @type {string}
|
|
635
666
|
* @memberof CreateEditResponse
|
|
636
667
|
*/
|
|
637
|
-
'id'
|
|
668
|
+
'id': string;
|
|
638
669
|
/**
|
|
639
670
|
*
|
|
640
671
|
* @type {string}
|
|
641
672
|
* @memberof CreateEditResponse
|
|
642
673
|
*/
|
|
643
|
-
'object'
|
|
674
|
+
'object': string;
|
|
644
675
|
/**
|
|
645
676
|
*
|
|
646
677
|
* @type {number}
|
|
647
678
|
* @memberof CreateEditResponse
|
|
648
679
|
*/
|
|
649
|
-
'created'
|
|
680
|
+
'created': number;
|
|
650
681
|
/**
|
|
651
682
|
*
|
|
652
683
|
* @type {string}
|
|
653
684
|
* @memberof CreateEditResponse
|
|
654
685
|
*/
|
|
655
|
-
'model'
|
|
686
|
+
'model': string;
|
|
656
687
|
/**
|
|
657
688
|
*
|
|
658
689
|
* @type {Array<CreateCompletionResponseChoicesInner>}
|
|
659
690
|
* @memberof CreateEditResponse
|
|
660
691
|
*/
|
|
661
|
-
'choices'
|
|
692
|
+
'choices': Array<CreateCompletionResponseChoicesInner>;
|
|
693
|
+
/**
|
|
694
|
+
*
|
|
695
|
+
* @type {CreateCompletionResponseUsage}
|
|
696
|
+
* @memberof CreateEditResponse
|
|
697
|
+
*/
|
|
698
|
+
'usage': CreateCompletionResponseUsage;
|
|
662
699
|
}
|
|
663
700
|
/**
|
|
664
701
|
*
|
|
@@ -687,7 +724,7 @@ export interface CreateEmbeddingRequest {
|
|
|
687
724
|
}
|
|
688
725
|
/**
|
|
689
726
|
* @type CreateEmbeddingRequestInput
|
|
690
|
-
* 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
|
|
727
|
+
* 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.
|
|
691
728
|
* @export
|
|
692
729
|
*/
|
|
693
730
|
export type CreateEmbeddingRequestInput = Array<any> | Array<number> | Array<string> | string;
|
|
@@ -703,19 +740,25 @@ export interface CreateEmbeddingResponse {
|
|
|
703
740
|
* @type {string}
|
|
704
741
|
* @memberof CreateEmbeddingResponse
|
|
705
742
|
*/
|
|
706
|
-
'object'
|
|
743
|
+
'object': string;
|
|
707
744
|
/**
|
|
708
745
|
*
|
|
709
746
|
* @type {string}
|
|
710
747
|
* @memberof CreateEmbeddingResponse
|
|
711
748
|
*/
|
|
712
|
-
'model'
|
|
749
|
+
'model': string;
|
|
713
750
|
/**
|
|
714
751
|
*
|
|
715
752
|
* @type {Array<CreateEmbeddingResponseDataInner>}
|
|
716
753
|
* @memberof CreateEmbeddingResponse
|
|
717
754
|
*/
|
|
718
|
-
'data'
|
|
755
|
+
'data': Array<CreateEmbeddingResponseDataInner>;
|
|
756
|
+
/**
|
|
757
|
+
*
|
|
758
|
+
* @type {CreateEmbeddingResponseUsage}
|
|
759
|
+
* @memberof CreateEmbeddingResponse
|
|
760
|
+
*/
|
|
761
|
+
'usage': CreateEmbeddingResponseUsage;
|
|
719
762
|
}
|
|
720
763
|
/**
|
|
721
764
|
*
|
|
@@ -728,19 +771,38 @@ export interface CreateEmbeddingResponseDataInner {
|
|
|
728
771
|
* @type {number}
|
|
729
772
|
* @memberof CreateEmbeddingResponseDataInner
|
|
730
773
|
*/
|
|
731
|
-
'index'
|
|
774
|
+
'index': number;
|
|
732
775
|
/**
|
|
733
776
|
*
|
|
734
777
|
* @type {string}
|
|
735
778
|
* @memberof CreateEmbeddingResponseDataInner
|
|
736
779
|
*/
|
|
737
|
-
'object'
|
|
780
|
+
'object': string;
|
|
738
781
|
/**
|
|
739
782
|
*
|
|
740
783
|
* @type {Array<number>}
|
|
741
784
|
* @memberof CreateEmbeddingResponseDataInner
|
|
742
785
|
*/
|
|
743
|
-
'embedding'
|
|
786
|
+
'embedding': Array<number>;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
*
|
|
790
|
+
* @export
|
|
791
|
+
* @interface CreateEmbeddingResponseUsage
|
|
792
|
+
*/
|
|
793
|
+
export interface CreateEmbeddingResponseUsage {
|
|
794
|
+
/**
|
|
795
|
+
*
|
|
796
|
+
* @type {number}
|
|
797
|
+
* @memberof CreateEmbeddingResponseUsage
|
|
798
|
+
*/
|
|
799
|
+
'prompt_tokens': number;
|
|
800
|
+
/**
|
|
801
|
+
*
|
|
802
|
+
* @type {number}
|
|
803
|
+
* @memberof CreateEmbeddingResponseUsage
|
|
804
|
+
*/
|
|
805
|
+
'total_tokens': number;
|
|
744
806
|
}
|
|
745
807
|
/**
|
|
746
808
|
*
|
|
@@ -761,7 +823,7 @@ export interface CreateFineTuneRequest {
|
|
|
761
823
|
*/
|
|
762
824
|
'validation_file'?: string | null;
|
|
763
825
|
/**
|
|
764
|
-
* The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\",
|
|
826
|
+
* 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.
|
|
765
827
|
* @type {string}
|
|
766
828
|
* @memberof CreateFineTuneRequest
|
|
767
829
|
*/
|
|
@@ -821,6 +883,180 @@ export interface CreateFineTuneRequest {
|
|
|
821
883
|
*/
|
|
822
884
|
'suffix'?: string | null;
|
|
823
885
|
}
|
|
886
|
+
/**
|
|
887
|
+
*
|
|
888
|
+
* @export
|
|
889
|
+
* @interface CreateModerationRequest
|
|
890
|
+
*/
|
|
891
|
+
export interface CreateModerationRequest {
|
|
892
|
+
/**
|
|
893
|
+
*
|
|
894
|
+
* @type {CreateModerationRequestInput}
|
|
895
|
+
* @memberof CreateModerationRequest
|
|
896
|
+
*/
|
|
897
|
+
'input': CreateModerationRequestInput;
|
|
898
|
+
/**
|
|
899
|
+
* 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`.
|
|
900
|
+
* @type {string}
|
|
901
|
+
* @memberof CreateModerationRequest
|
|
902
|
+
*/
|
|
903
|
+
'model'?: string;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* @type CreateModerationRequestInput
|
|
907
|
+
* The input text to classify
|
|
908
|
+
* @export
|
|
909
|
+
*/
|
|
910
|
+
export type CreateModerationRequestInput = Array<string> | string;
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
*
|
|
914
|
+
* @export
|
|
915
|
+
* @interface CreateModerationResponse
|
|
916
|
+
*/
|
|
917
|
+
export interface CreateModerationResponse {
|
|
918
|
+
/**
|
|
919
|
+
*
|
|
920
|
+
* @type {string}
|
|
921
|
+
* @memberof CreateModerationResponse
|
|
922
|
+
*/
|
|
923
|
+
'id': string;
|
|
924
|
+
/**
|
|
925
|
+
*
|
|
926
|
+
* @type {string}
|
|
927
|
+
* @memberof CreateModerationResponse
|
|
928
|
+
*/
|
|
929
|
+
'model': string;
|
|
930
|
+
/**
|
|
931
|
+
*
|
|
932
|
+
* @type {Array<CreateModerationResponseResultsInner>}
|
|
933
|
+
* @memberof CreateModerationResponse
|
|
934
|
+
*/
|
|
935
|
+
'results': Array<CreateModerationResponseResultsInner>;
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
*
|
|
939
|
+
* @export
|
|
940
|
+
* @interface CreateModerationResponseResultsInner
|
|
941
|
+
*/
|
|
942
|
+
export interface CreateModerationResponseResultsInner {
|
|
943
|
+
/**
|
|
944
|
+
*
|
|
945
|
+
* @type {boolean}
|
|
946
|
+
* @memberof CreateModerationResponseResultsInner
|
|
947
|
+
*/
|
|
948
|
+
'flagged': boolean;
|
|
949
|
+
/**
|
|
950
|
+
*
|
|
951
|
+
* @type {CreateModerationResponseResultsInnerCategories}
|
|
952
|
+
* @memberof CreateModerationResponseResultsInner
|
|
953
|
+
*/
|
|
954
|
+
'categories': CreateModerationResponseResultsInnerCategories;
|
|
955
|
+
/**
|
|
956
|
+
*
|
|
957
|
+
* @type {CreateModerationResponseResultsInnerCategoryScores}
|
|
958
|
+
* @memberof CreateModerationResponseResultsInner
|
|
959
|
+
*/
|
|
960
|
+
'category_scores': CreateModerationResponseResultsInnerCategoryScores;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
*
|
|
964
|
+
* @export
|
|
965
|
+
* @interface CreateModerationResponseResultsInnerCategories
|
|
966
|
+
*/
|
|
967
|
+
export interface CreateModerationResponseResultsInnerCategories {
|
|
968
|
+
/**
|
|
969
|
+
*
|
|
970
|
+
* @type {boolean}
|
|
971
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
972
|
+
*/
|
|
973
|
+
'hate': boolean;
|
|
974
|
+
/**
|
|
975
|
+
*
|
|
976
|
+
* @type {boolean}
|
|
977
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
978
|
+
*/
|
|
979
|
+
'hate/threatening': boolean;
|
|
980
|
+
/**
|
|
981
|
+
*
|
|
982
|
+
* @type {boolean}
|
|
983
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
984
|
+
*/
|
|
985
|
+
'self-harm': boolean;
|
|
986
|
+
/**
|
|
987
|
+
*
|
|
988
|
+
* @type {boolean}
|
|
989
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
990
|
+
*/
|
|
991
|
+
'sexual': boolean;
|
|
992
|
+
/**
|
|
993
|
+
*
|
|
994
|
+
* @type {boolean}
|
|
995
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
996
|
+
*/
|
|
997
|
+
'sexual/minors': boolean;
|
|
998
|
+
/**
|
|
999
|
+
*
|
|
1000
|
+
* @type {boolean}
|
|
1001
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1002
|
+
*/
|
|
1003
|
+
'violence': boolean;
|
|
1004
|
+
/**
|
|
1005
|
+
*
|
|
1006
|
+
* @type {boolean}
|
|
1007
|
+
* @memberof CreateModerationResponseResultsInnerCategories
|
|
1008
|
+
*/
|
|
1009
|
+
'violence/graphic': boolean;
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
*
|
|
1013
|
+
* @export
|
|
1014
|
+
* @interface CreateModerationResponseResultsInnerCategoryScores
|
|
1015
|
+
*/
|
|
1016
|
+
export interface CreateModerationResponseResultsInnerCategoryScores {
|
|
1017
|
+
/**
|
|
1018
|
+
*
|
|
1019
|
+
* @type {number}
|
|
1020
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1021
|
+
*/
|
|
1022
|
+
'hate': number;
|
|
1023
|
+
/**
|
|
1024
|
+
*
|
|
1025
|
+
* @type {number}
|
|
1026
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1027
|
+
*/
|
|
1028
|
+
'hate/threatening': number;
|
|
1029
|
+
/**
|
|
1030
|
+
*
|
|
1031
|
+
* @type {number}
|
|
1032
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1033
|
+
*/
|
|
1034
|
+
'self-harm': number;
|
|
1035
|
+
/**
|
|
1036
|
+
*
|
|
1037
|
+
* @type {number}
|
|
1038
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1039
|
+
*/
|
|
1040
|
+
'sexual': number;
|
|
1041
|
+
/**
|
|
1042
|
+
*
|
|
1043
|
+
* @type {number}
|
|
1044
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1045
|
+
*/
|
|
1046
|
+
'sexual/minors': number;
|
|
1047
|
+
/**
|
|
1048
|
+
*
|
|
1049
|
+
* @type {number}
|
|
1050
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1051
|
+
*/
|
|
1052
|
+
'violence': number;
|
|
1053
|
+
/**
|
|
1054
|
+
*
|
|
1055
|
+
* @type {number}
|
|
1056
|
+
* @memberof CreateModerationResponseResultsInnerCategoryScores
|
|
1057
|
+
*/
|
|
1058
|
+
'violence/graphic': number;
|
|
1059
|
+
}
|
|
824
1060
|
/**
|
|
825
1061
|
*
|
|
826
1062
|
* @export
|
|
@@ -925,19 +1161,19 @@ export interface DeleteFileResponse {
|
|
|
925
1161
|
* @type {string}
|
|
926
1162
|
* @memberof DeleteFileResponse
|
|
927
1163
|
*/
|
|
928
|
-
'id'
|
|
1164
|
+
'id': string;
|
|
929
1165
|
/**
|
|
930
1166
|
*
|
|
931
1167
|
* @type {string}
|
|
932
1168
|
* @memberof DeleteFileResponse
|
|
933
1169
|
*/
|
|
934
|
-
'object'
|
|
1170
|
+
'object': string;
|
|
935
1171
|
/**
|
|
936
1172
|
*
|
|
937
1173
|
* @type {boolean}
|
|
938
1174
|
* @memberof DeleteFileResponse
|
|
939
1175
|
*/
|
|
940
|
-
'deleted'
|
|
1176
|
+
'deleted': boolean;
|
|
941
1177
|
}
|
|
942
1178
|
/**
|
|
943
1179
|
*
|
|
@@ -950,19 +1186,19 @@ export interface DeleteModelResponse {
|
|
|
950
1186
|
* @type {string}
|
|
951
1187
|
* @memberof DeleteModelResponse
|
|
952
1188
|
*/
|
|
953
|
-
'id'
|
|
1189
|
+
'id': string;
|
|
954
1190
|
/**
|
|
955
1191
|
*
|
|
956
1192
|
* @type {string}
|
|
957
1193
|
* @memberof DeleteModelResponse
|
|
958
1194
|
*/
|
|
959
|
-
'object'
|
|
1195
|
+
'object': string;
|
|
960
1196
|
/**
|
|
961
1197
|
*
|
|
962
1198
|
* @type {boolean}
|
|
963
1199
|
* @memberof DeleteModelResponse
|
|
964
1200
|
*/
|
|
965
|
-
'deleted'
|
|
1201
|
+
'deleted': boolean;
|
|
966
1202
|
}
|
|
967
1203
|
/**
|
|
968
1204
|
*
|
|
@@ -975,25 +1211,25 @@ export interface Engine {
|
|
|
975
1211
|
* @type {string}
|
|
976
1212
|
* @memberof Engine
|
|
977
1213
|
*/
|
|
978
|
-
'id'
|
|
1214
|
+
'id': string;
|
|
979
1215
|
/**
|
|
980
1216
|
*
|
|
981
1217
|
* @type {string}
|
|
982
1218
|
* @memberof Engine
|
|
983
1219
|
*/
|
|
984
|
-
'object'
|
|
1220
|
+
'object': string;
|
|
985
1221
|
/**
|
|
986
1222
|
*
|
|
987
1223
|
* @type {number}
|
|
988
1224
|
* @memberof Engine
|
|
989
1225
|
*/
|
|
990
|
-
'created'
|
|
1226
|
+
'created': number | null;
|
|
991
1227
|
/**
|
|
992
1228
|
*
|
|
993
1229
|
* @type {boolean}
|
|
994
1230
|
* @memberof Engine
|
|
995
1231
|
*/
|
|
996
|
-
'ready'
|
|
1232
|
+
'ready': boolean;
|
|
997
1233
|
}
|
|
998
1234
|
/**
|
|
999
1235
|
*
|
|
@@ -1006,73 +1242,73 @@ export interface FineTune {
|
|
|
1006
1242
|
* @type {string}
|
|
1007
1243
|
* @memberof FineTune
|
|
1008
1244
|
*/
|
|
1009
|
-
'id'
|
|
1245
|
+
'id': string;
|
|
1010
1246
|
/**
|
|
1011
1247
|
*
|
|
1012
1248
|
* @type {string}
|
|
1013
1249
|
* @memberof FineTune
|
|
1014
1250
|
*/
|
|
1015
|
-
'object'
|
|
1251
|
+
'object': string;
|
|
1016
1252
|
/**
|
|
1017
1253
|
*
|
|
1018
1254
|
* @type {number}
|
|
1019
1255
|
* @memberof FineTune
|
|
1020
1256
|
*/
|
|
1021
|
-
'created_at'
|
|
1257
|
+
'created_at': number;
|
|
1022
1258
|
/**
|
|
1023
1259
|
*
|
|
1024
1260
|
* @type {number}
|
|
1025
1261
|
* @memberof FineTune
|
|
1026
1262
|
*/
|
|
1027
|
-
'updated_at'
|
|
1263
|
+
'updated_at': number;
|
|
1028
1264
|
/**
|
|
1029
1265
|
*
|
|
1030
1266
|
* @type {string}
|
|
1031
1267
|
* @memberof FineTune
|
|
1032
1268
|
*/
|
|
1033
|
-
'model'
|
|
1269
|
+
'model': string;
|
|
1034
1270
|
/**
|
|
1035
1271
|
*
|
|
1036
1272
|
* @type {string}
|
|
1037
1273
|
* @memberof FineTune
|
|
1038
1274
|
*/
|
|
1039
|
-
'fine_tuned_model'
|
|
1275
|
+
'fine_tuned_model': string | null;
|
|
1040
1276
|
/**
|
|
1041
1277
|
*
|
|
1042
1278
|
* @type {string}
|
|
1043
1279
|
* @memberof FineTune
|
|
1044
1280
|
*/
|
|
1045
|
-
'organization_id'
|
|
1281
|
+
'organization_id': string;
|
|
1046
1282
|
/**
|
|
1047
1283
|
*
|
|
1048
1284
|
* @type {string}
|
|
1049
1285
|
* @memberof FineTune
|
|
1050
1286
|
*/
|
|
1051
|
-
'status'
|
|
1287
|
+
'status': string;
|
|
1052
1288
|
/**
|
|
1053
1289
|
*
|
|
1054
1290
|
* @type {object}
|
|
1055
1291
|
* @memberof FineTune
|
|
1056
1292
|
*/
|
|
1057
|
-
'hyperparams'
|
|
1293
|
+
'hyperparams': object;
|
|
1058
1294
|
/**
|
|
1059
1295
|
*
|
|
1060
1296
|
* @type {Array<OpenAIFile>}
|
|
1061
1297
|
* @memberof FineTune
|
|
1062
1298
|
*/
|
|
1063
|
-
'training_files'
|
|
1299
|
+
'training_files': Array<OpenAIFile>;
|
|
1064
1300
|
/**
|
|
1065
1301
|
*
|
|
1066
1302
|
* @type {Array<OpenAIFile>}
|
|
1067
1303
|
* @memberof FineTune
|
|
1068
1304
|
*/
|
|
1069
|
-
'validation_files'
|
|
1305
|
+
'validation_files': Array<OpenAIFile>;
|
|
1070
1306
|
/**
|
|
1071
1307
|
*
|
|
1072
1308
|
* @type {Array<OpenAIFile>}
|
|
1073
1309
|
* @memberof FineTune
|
|
1074
1310
|
*/
|
|
1075
|
-
'result_files'
|
|
1311
|
+
'result_files': Array<OpenAIFile>;
|
|
1076
1312
|
/**
|
|
1077
1313
|
*
|
|
1078
1314
|
* @type {Array<FineTuneEvent>}
|
|
@@ -1091,25 +1327,25 @@ export interface FineTuneEvent {
|
|
|
1091
1327
|
* @type {string}
|
|
1092
1328
|
* @memberof FineTuneEvent
|
|
1093
1329
|
*/
|
|
1094
|
-
'object'
|
|
1330
|
+
'object': string;
|
|
1095
1331
|
/**
|
|
1096
1332
|
*
|
|
1097
1333
|
* @type {number}
|
|
1098
1334
|
* @memberof FineTuneEvent
|
|
1099
1335
|
*/
|
|
1100
|
-
'created_at'
|
|
1336
|
+
'created_at': number;
|
|
1101
1337
|
/**
|
|
1102
1338
|
*
|
|
1103
1339
|
* @type {string}
|
|
1104
1340
|
* @memberof FineTuneEvent
|
|
1105
1341
|
*/
|
|
1106
|
-
'level'
|
|
1342
|
+
'level': string;
|
|
1107
1343
|
/**
|
|
1108
1344
|
*
|
|
1109
1345
|
* @type {string}
|
|
1110
1346
|
* @memberof FineTuneEvent
|
|
1111
1347
|
*/
|
|
1112
|
-
'message'
|
|
1348
|
+
'message': string;
|
|
1113
1349
|
}
|
|
1114
1350
|
/**
|
|
1115
1351
|
*
|
|
@@ -1122,13 +1358,13 @@ export interface ListEnginesResponse {
|
|
|
1122
1358
|
* @type {string}
|
|
1123
1359
|
* @memberof ListEnginesResponse
|
|
1124
1360
|
*/
|
|
1125
|
-
'object'
|
|
1361
|
+
'object': string;
|
|
1126
1362
|
/**
|
|
1127
1363
|
*
|
|
1128
1364
|
* @type {Array<Engine>}
|
|
1129
1365
|
* @memberof ListEnginesResponse
|
|
1130
1366
|
*/
|
|
1131
|
-
'data'
|
|
1367
|
+
'data': Array<Engine>;
|
|
1132
1368
|
}
|
|
1133
1369
|
/**
|
|
1134
1370
|
*
|
|
@@ -1141,13 +1377,13 @@ export interface ListFilesResponse {
|
|
|
1141
1377
|
* @type {string}
|
|
1142
1378
|
* @memberof ListFilesResponse
|
|
1143
1379
|
*/
|
|
1144
|
-
'object'
|
|
1380
|
+
'object': string;
|
|
1145
1381
|
/**
|
|
1146
1382
|
*
|
|
1147
1383
|
* @type {Array<OpenAIFile>}
|
|
1148
1384
|
* @memberof ListFilesResponse
|
|
1149
1385
|
*/
|
|
1150
|
-
'data'
|
|
1386
|
+
'data': Array<OpenAIFile>;
|
|
1151
1387
|
}
|
|
1152
1388
|
/**
|
|
1153
1389
|
*
|
|
@@ -1160,13 +1396,13 @@ export interface ListFineTuneEventsResponse {
|
|
|
1160
1396
|
* @type {string}
|
|
1161
1397
|
* @memberof ListFineTuneEventsResponse
|
|
1162
1398
|
*/
|
|
1163
|
-
'object'
|
|
1399
|
+
'object': string;
|
|
1164
1400
|
/**
|
|
1165
1401
|
*
|
|
1166
1402
|
* @type {Array<FineTuneEvent>}
|
|
1167
1403
|
* @memberof ListFineTuneEventsResponse
|
|
1168
1404
|
*/
|
|
1169
|
-
'data'
|
|
1405
|
+
'data': Array<FineTuneEvent>;
|
|
1170
1406
|
}
|
|
1171
1407
|
/**
|
|
1172
1408
|
*
|
|
@@ -1179,13 +1415,13 @@ export interface ListFineTunesResponse {
|
|
|
1179
1415
|
* @type {string}
|
|
1180
1416
|
* @memberof ListFineTunesResponse
|
|
1181
1417
|
*/
|
|
1182
|
-
'object'
|
|
1418
|
+
'object': string;
|
|
1183
1419
|
/**
|
|
1184
1420
|
*
|
|
1185
1421
|
* @type {Array<FineTune>}
|
|
1186
1422
|
* @memberof ListFineTunesResponse
|
|
1187
1423
|
*/
|
|
1188
|
-
'data'
|
|
1424
|
+
'data': Array<FineTune>;
|
|
1189
1425
|
}
|
|
1190
1426
|
/**
|
|
1191
1427
|
*
|
|
@@ -1198,13 +1434,13 @@ export interface ListModelsResponse {
|
|
|
1198
1434
|
* @type {string}
|
|
1199
1435
|
* @memberof ListModelsResponse
|
|
1200
1436
|
*/
|
|
1201
|
-
'object'
|
|
1437
|
+
'object': string;
|
|
1202
1438
|
/**
|
|
1203
1439
|
*
|
|
1204
1440
|
* @type {Array<Model>}
|
|
1205
1441
|
* @memberof ListModelsResponse
|
|
1206
1442
|
*/
|
|
1207
|
-
'data'
|
|
1443
|
+
'data': Array<Model>;
|
|
1208
1444
|
}
|
|
1209
1445
|
/**
|
|
1210
1446
|
*
|
|
@@ -1217,25 +1453,25 @@ export interface Model {
|
|
|
1217
1453
|
* @type {string}
|
|
1218
1454
|
* @memberof Model
|
|
1219
1455
|
*/
|
|
1220
|
-
'id'
|
|
1456
|
+
'id': string;
|
|
1221
1457
|
/**
|
|
1222
1458
|
*
|
|
1223
1459
|
* @type {string}
|
|
1224
1460
|
* @memberof Model
|
|
1225
1461
|
*/
|
|
1226
|
-
'object'
|
|
1462
|
+
'object': string;
|
|
1227
1463
|
/**
|
|
1228
1464
|
*
|
|
1229
1465
|
* @type {number}
|
|
1230
1466
|
* @memberof Model
|
|
1231
1467
|
*/
|
|
1232
|
-
'created'
|
|
1468
|
+
'created': number;
|
|
1233
1469
|
/**
|
|
1234
1470
|
*
|
|
1235
1471
|
* @type {string}
|
|
1236
1472
|
* @memberof Model
|
|
1237
1473
|
*/
|
|
1238
|
-
'owned_by'
|
|
1474
|
+
'owned_by': string;
|
|
1239
1475
|
}
|
|
1240
1476
|
/**
|
|
1241
1477
|
*
|
|
@@ -1248,37 +1484,37 @@ export interface OpenAIFile {
|
|
|
1248
1484
|
* @type {string}
|
|
1249
1485
|
* @memberof OpenAIFile
|
|
1250
1486
|
*/
|
|
1251
|
-
'id'
|
|
1487
|
+
'id': string;
|
|
1252
1488
|
/**
|
|
1253
1489
|
*
|
|
1254
1490
|
* @type {string}
|
|
1255
1491
|
* @memberof OpenAIFile
|
|
1256
1492
|
*/
|
|
1257
|
-
'object'
|
|
1493
|
+
'object': string;
|
|
1258
1494
|
/**
|
|
1259
1495
|
*
|
|
1260
1496
|
* @type {number}
|
|
1261
1497
|
* @memberof OpenAIFile
|
|
1262
1498
|
*/
|
|
1263
|
-
'bytes'
|
|
1499
|
+
'bytes': number;
|
|
1264
1500
|
/**
|
|
1265
1501
|
*
|
|
1266
1502
|
* @type {number}
|
|
1267
1503
|
* @memberof OpenAIFile
|
|
1268
1504
|
*/
|
|
1269
|
-
'created_at'
|
|
1505
|
+
'created_at': number;
|
|
1270
1506
|
/**
|
|
1271
1507
|
*
|
|
1272
1508
|
* @type {string}
|
|
1273
1509
|
* @memberof OpenAIFile
|
|
1274
1510
|
*/
|
|
1275
|
-
'filename'
|
|
1511
|
+
'filename': string;
|
|
1276
1512
|
/**
|
|
1277
1513
|
*
|
|
1278
1514
|
* @type {string}
|
|
1279
1515
|
* @memberof OpenAIFile
|
|
1280
1516
|
*/
|
|
1281
|
-
'purpose'
|
|
1517
|
+
'purpose': string;
|
|
1282
1518
|
/**
|
|
1283
1519
|
*
|
|
1284
1520
|
* @type {string}
|
|
@@ -1518,12 +1754,12 @@ export const OpenAIApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1518
1754
|
/**
|
|
1519
1755
|
*
|
|
1520
1756
|
* @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.
|
|
1521
|
-
* @param {
|
|
1757
|
+
* @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).
|
|
1522
1758
|
* @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.
|
|
1523
1759
|
* @param {*} [options] Override http request option.
|
|
1524
1760
|
* @throws {RequiredError}
|
|
1525
1761
|
*/
|
|
1526
|
-
createFile: async (file:
|
|
1762
|
+
createFile: async (file: File, purpose: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1527
1763
|
// verify required parameter 'file' is not null or undefined
|
|
1528
1764
|
assertParamExists('createFile', 'file', file)
|
|
1529
1765
|
// verify required parameter 'purpose' is not null or undefined
|
|
@@ -1599,6 +1835,42 @@ export const OpenAIApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1599
1835
|
options: localVarRequestOptions,
|
|
1600
1836
|
};
|
|
1601
1837
|
},
|
|
1838
|
+
/**
|
|
1839
|
+
*
|
|
1840
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
1841
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
1842
|
+
* @param {*} [options] Override http request option.
|
|
1843
|
+
* @throws {RequiredError}
|
|
1844
|
+
*/
|
|
1845
|
+
createModeration: async (createModerationRequest: CreateModerationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1846
|
+
// verify required parameter 'createModerationRequest' is not null or undefined
|
|
1847
|
+
assertParamExists('createModeration', 'createModerationRequest', createModerationRequest)
|
|
1848
|
+
const localVarPath = `/moderations`;
|
|
1849
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1850
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1851
|
+
let baseOptions;
|
|
1852
|
+
if (configuration) {
|
|
1853
|
+
baseOptions = configuration.baseOptions;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1857
|
+
const localVarHeaderParameter = {} as any;
|
|
1858
|
+
const localVarQueryParameter = {} as any;
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1863
|
+
|
|
1864
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1865
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1866
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1867
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createModerationRequest, localVarRequestOptions, configuration)
|
|
1868
|
+
|
|
1869
|
+
return {
|
|
1870
|
+
url: toPathString(localVarUrlObj),
|
|
1871
|
+
options: localVarRequestOptions,
|
|
1872
|
+
};
|
|
1873
|
+
},
|
|
1602
1874
|
/**
|
|
1603
1875
|
*
|
|
1604
1876
|
* @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.
|
|
@@ -2120,12 +2392,12 @@ export const OpenAIApiFp = function(configuration?: Configuration) {
|
|
|
2120
2392
|
/**
|
|
2121
2393
|
*
|
|
2122
2394
|
* @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.
|
|
2123
|
-
* @param {
|
|
2395
|
+
* @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).
|
|
2124
2396
|
* @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.
|
|
2125
2397
|
* @param {*} [options] Override http request option.
|
|
2126
2398
|
* @throws {RequiredError}
|
|
2127
2399
|
*/
|
|
2128
|
-
async createFile(file:
|
|
2400
|
+
async createFile(file: File, purpose: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenAIFile>> {
|
|
2129
2401
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createFile(file, purpose, options);
|
|
2130
2402
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2131
2403
|
},
|
|
@@ -2140,6 +2412,17 @@ export const OpenAIApiFp = function(configuration?: Configuration) {
|
|
|
2140
2412
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createFineTune(createFineTuneRequest, options);
|
|
2141
2413
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2142
2414
|
},
|
|
2415
|
+
/**
|
|
2416
|
+
*
|
|
2417
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
2418
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
2419
|
+
* @param {*} [options] Override http request option.
|
|
2420
|
+
* @throws {RequiredError}
|
|
2421
|
+
*/
|
|
2422
|
+
async createModeration(createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateModerationResponse>> {
|
|
2423
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createModeration(createModerationRequest, options);
|
|
2424
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2425
|
+
},
|
|
2143
2426
|
/**
|
|
2144
2427
|
*
|
|
2145
2428
|
* @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.
|
|
@@ -2359,12 +2642,12 @@ export const OpenAIApiFactory = function (configuration?: Configuration, basePat
|
|
|
2359
2642
|
/**
|
|
2360
2643
|
*
|
|
2361
2644
|
* @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.
|
|
2362
|
-
* @param {
|
|
2645
|
+
* @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).
|
|
2363
2646
|
* @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.
|
|
2364
2647
|
* @param {*} [options] Override http request option.
|
|
2365
2648
|
* @throws {RequiredError}
|
|
2366
2649
|
*/
|
|
2367
|
-
createFile(file:
|
|
2650
|
+
createFile(file: File, purpose: string, options?: any): AxiosPromise<OpenAIFile> {
|
|
2368
2651
|
return localVarFp.createFile(file, purpose, options).then((request) => request(axios, basePath));
|
|
2369
2652
|
},
|
|
2370
2653
|
/**
|
|
@@ -2377,6 +2660,16 @@ export const OpenAIApiFactory = function (configuration?: Configuration, basePat
|
|
|
2377
2660
|
createFineTune(createFineTuneRequest: CreateFineTuneRequest, options?: any): AxiosPromise<FineTune> {
|
|
2378
2661
|
return localVarFp.createFineTune(createFineTuneRequest, options).then((request) => request(axios, basePath));
|
|
2379
2662
|
},
|
|
2663
|
+
/**
|
|
2664
|
+
*
|
|
2665
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
2666
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
2667
|
+
* @param {*} [options] Override http request option.
|
|
2668
|
+
* @throws {RequiredError}
|
|
2669
|
+
*/
|
|
2670
|
+
createModeration(createModerationRequest: CreateModerationRequest, options?: any): AxiosPromise<CreateModerationResponse> {
|
|
2671
|
+
return localVarFp.createModeration(createModerationRequest, options).then((request) => request(axios, basePath));
|
|
2672
|
+
},
|
|
2380
2673
|
/**
|
|
2381
2674
|
*
|
|
2382
2675
|
* @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.
|
|
@@ -2595,13 +2888,13 @@ export class OpenAIApi extends BaseAPI {
|
|
|
2595
2888
|
/**
|
|
2596
2889
|
*
|
|
2597
2890
|
* @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.
|
|
2598
|
-
* @param {
|
|
2891
|
+
* @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).
|
|
2599
2892
|
* @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.
|
|
2600
2893
|
* @param {*} [options] Override http request option.
|
|
2601
2894
|
* @throws {RequiredError}
|
|
2602
2895
|
* @memberof OpenAIApi
|
|
2603
2896
|
*/
|
|
2604
|
-
public createFile(file:
|
|
2897
|
+
public createFile(file: File, purpose: string, options?: AxiosRequestConfig) {
|
|
2605
2898
|
return OpenAIApiFp(this.configuration).createFile(file, purpose, options).then((request) => request(this.axios, this.basePath));
|
|
2606
2899
|
}
|
|
2607
2900
|
|
|
@@ -2617,6 +2910,18 @@ export class OpenAIApi extends BaseAPI {
|
|
|
2617
2910
|
return OpenAIApiFp(this.configuration).createFineTune(createFineTuneRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2618
2911
|
}
|
|
2619
2912
|
|
|
2913
|
+
/**
|
|
2914
|
+
*
|
|
2915
|
+
* @summary Classifies if text violates OpenAI\'s Content Policy
|
|
2916
|
+
* @param {CreateModerationRequest} createModerationRequest
|
|
2917
|
+
* @param {*} [options] Override http request option.
|
|
2918
|
+
* @throws {RequiredError}
|
|
2919
|
+
* @memberof OpenAIApi
|
|
2920
|
+
*/
|
|
2921
|
+
public createModeration(createModerationRequest: CreateModerationRequest, options?: AxiosRequestConfig) {
|
|
2922
|
+
return OpenAIApiFp(this.configuration).createModeration(createModerationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2620
2925
|
/**
|
|
2621
2926
|
*
|
|
2622
2927
|
* @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.
|