@effect/ai-openai 0.13.0 → 0.13.2
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/README.md +4 -0
- package/dist/cjs/Generated.js +170 -227
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/cjs/OpenAiConfig.js.map +1 -1
- package/dist/dts/Generated.d.ts +262 -334
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/dts/OpenAiCompletions.d.ts +1 -1
- package/dist/dts/OpenAiCompletions.d.ts.map +1 -1
- package/dist/dts/OpenAiConfig.d.ts +12 -1
- package/dist/dts/OpenAiConfig.d.ts.map +1 -1
- package/dist/dts/OpenAiEmbeddings.d.ts +1 -1
- package/dist/dts/OpenAiEmbeddings.d.ts.map +1 -1
- package/dist/esm/Generated.js +136 -157
- package/dist/esm/Generated.js.map +1 -1
- package/dist/esm/OpenAiConfig.js.map +1 -1
- package/package.json +5 -5
- package/src/Generated.ts +161 -237
- package/src/OpenAiCompletions.ts +1 -1
- package/src/OpenAiConfig.ts +15 -1
- package/src/OpenAiEmbeddings.ts +1 -1
package/src/Generated.ts
CHANGED
|
@@ -66,6 +66,8 @@ export class AssistantToolsFunction extends S.Struct({
|
|
|
66
66
|
|
|
67
67
|
export class Metadata extends S.Record({ key: S.String, value: S.Unknown }) {}
|
|
68
68
|
|
|
69
|
+
export class AssistantsApiResponseFormatOptionEnum extends S.Literal("auto") {}
|
|
70
|
+
|
|
69
71
|
export class ResponseFormatTextType extends S.Literal("text") {}
|
|
70
72
|
|
|
71
73
|
export class ResponseFormatText extends S.Struct({
|
|
@@ -92,9 +94,12 @@ export class ResponseFormatJsonSchema extends S.Struct({
|
|
|
92
94
|
})
|
|
93
95
|
}) {}
|
|
94
96
|
|
|
95
|
-
export class AssistantsApiResponseFormatOption
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
export class AssistantsApiResponseFormatOption extends S.Union(
|
|
98
|
+
AssistantsApiResponseFormatOptionEnum,
|
|
99
|
+
ResponseFormatText,
|
|
100
|
+
ResponseFormatJsonObject,
|
|
101
|
+
ResponseFormatJsonSchema
|
|
102
|
+
) {}
|
|
98
103
|
|
|
99
104
|
export class AssistantObject extends S.Struct({
|
|
100
105
|
"id": S.String,
|
|
@@ -146,7 +151,11 @@ export class ListAssistantsResponse extends S.Class<ListAssistantsResponse>("Lis
|
|
|
146
151
|
"has_more": S.Boolean
|
|
147
152
|
}) {}
|
|
148
153
|
|
|
149
|
-
export class
|
|
154
|
+
export class AssistantSupportedModels extends S.Literal(
|
|
155
|
+
"o3-mini",
|
|
156
|
+
"o3-mini-2025-01-31",
|
|
157
|
+
"o1",
|
|
158
|
+
"o1-2024-12-17",
|
|
150
159
|
"gpt-4o",
|
|
151
160
|
"gpt-4o-2024-11-20",
|
|
152
161
|
"gpt-4o-2024-08-06",
|
|
@@ -173,15 +182,14 @@ export class CreateAssistantRequestModel extends S.Literal(
|
|
|
173
182
|
"gpt-3.5-turbo-16k-0613"
|
|
174
183
|
) {}
|
|
175
184
|
|
|
176
|
-
export class
|
|
177
|
-
extends S.Literal("static")
|
|
178
|
-
{}
|
|
185
|
+
export class ReasoningEffort extends S.Literal("low", "medium", "high") {}
|
|
179
186
|
|
|
180
187
|
export class CreateAssistantRequest extends S.Class<CreateAssistantRequest>("CreateAssistantRequest")({
|
|
181
|
-
"model": S.Union(S.String,
|
|
188
|
+
"model": S.Union(S.String, AssistantSupportedModels),
|
|
182
189
|
"name": S.optionalWith(S.String.pipe(S.maxLength(256)), { nullable: true }),
|
|
183
190
|
"description": S.optionalWith(S.String.pipe(S.maxLength(512)), { nullable: true }),
|
|
184
191
|
"instructions": S.optionalWith(S.String.pipe(S.maxLength(256000)), { nullable: true }),
|
|
192
|
+
"reasoning_effort": S.optionalWith(ReasoningEffort, { nullable: true, default: () => "medium" as const }),
|
|
185
193
|
"tools": S.optionalWith(
|
|
186
194
|
S.Array(S.Union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction)).pipe(S.maxItems(128)),
|
|
187
195
|
{
|
|
@@ -230,7 +238,8 @@ export class CreateAssistantRequest extends S.Class<CreateAssistantRequest>("Cre
|
|
|
230
238
|
}) {}
|
|
231
239
|
|
|
232
240
|
export class ModifyAssistantRequest extends S.Class<ModifyAssistantRequest>("ModifyAssistantRequest")({
|
|
233
|
-
"model": S.optionalWith(S.String, { nullable: true }),
|
|
241
|
+
"model": S.optionalWith(S.Union(S.String, AssistantSupportedModels), { nullable: true }),
|
|
242
|
+
"reasoning_effort": S.optionalWith(ReasoningEffort, { nullable: true, default: () => "medium" as const }),
|
|
234
243
|
"name": S.optionalWith(S.String.pipe(S.maxLength(256)), { nullable: true }),
|
|
235
244
|
"description": S.optionalWith(S.String.pipe(S.maxLength(512)), { nullable: true }),
|
|
236
245
|
"instructions": S.optionalWith(S.String.pipe(S.maxLength(256000)), { nullable: true }),
|
|
@@ -281,7 +290,7 @@ export class DeleteAssistantResponse extends S.Class<DeleteAssistantResponse>("D
|
|
|
281
290
|
"object": DeleteAssistantResponseObject
|
|
282
291
|
}) {}
|
|
283
292
|
|
|
284
|
-
export class
|
|
293
|
+
export class CreateSpeechRequestModelEnum extends S.Literal("tts-1", "tts-1-hd") {}
|
|
285
294
|
|
|
286
295
|
export class CreateSpeechRequestVoice
|
|
287
296
|
extends S.Literal("alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer")
|
|
@@ -290,7 +299,7 @@ export class CreateSpeechRequestVoice
|
|
|
290
299
|
export class CreateSpeechRequestResponseFormat extends S.Literal("mp3", "opus", "aac", "flac", "wav", "pcm") {}
|
|
291
300
|
|
|
292
301
|
export class CreateSpeechRequest extends S.Class<CreateSpeechRequest>("CreateSpeechRequest")({
|
|
293
|
-
"model": S.Union(S.String,
|
|
302
|
+
"model": S.Union(S.String, CreateSpeechRequestModelEnum),
|
|
294
303
|
"input": S.String.pipe(S.maxLength(4096)),
|
|
295
304
|
"voice": CreateSpeechRequestVoice,
|
|
296
305
|
"response_format": S.optionalWith(CreateSpeechRequestResponseFormat, {
|
|
@@ -580,7 +589,7 @@ export class ChatCompletionRequestMessage extends S.Union(
|
|
|
580
589
|
ChatCompletionRequestFunctionMessage
|
|
581
590
|
) {}
|
|
582
591
|
|
|
583
|
-
export class
|
|
592
|
+
export class CreateChatCompletionRequestModelEnum extends S.Literal(
|
|
584
593
|
"o3-mini",
|
|
585
594
|
"o3-mini-2025-01-31",
|
|
586
595
|
"o1",
|
|
@@ -622,8 +631,6 @@ export class CreateChatCompletionRequestModel extends S.Literal(
|
|
|
622
631
|
"gpt-3.5-turbo-16k-0613"
|
|
623
632
|
) {}
|
|
624
633
|
|
|
625
|
-
export class CreateChatCompletionRequestReasoningEffort extends S.Literal("low", "medium", "high") {}
|
|
626
|
-
|
|
627
634
|
export class ChatCompletionModalities extends S.Array(S.Literal("text", "audio")) {}
|
|
628
635
|
|
|
629
636
|
export class PredictionContentType extends S.Literal("content") {}
|
|
@@ -652,6 +659,8 @@ export class ChatCompletionTool extends S.Struct({
|
|
|
652
659
|
"function": FunctionObject
|
|
653
660
|
}) {}
|
|
654
661
|
|
|
662
|
+
export class ChatCompletionToolChoiceOptionEnum extends S.Literal("none", "auto", "required") {}
|
|
663
|
+
|
|
655
664
|
export class ChatCompletionNamedToolChoiceType extends S.Literal("function") {}
|
|
656
665
|
|
|
657
666
|
export class ChatCompletionNamedToolChoice extends S.Struct({
|
|
@@ -662,12 +671,12 @@ export class ChatCompletionNamedToolChoice extends S.Struct({
|
|
|
662
671
|
}) {}
|
|
663
672
|
|
|
664
673
|
export class ChatCompletionToolChoiceOption
|
|
665
|
-
extends S.Union(
|
|
674
|
+
extends S.Union(ChatCompletionToolChoiceOptionEnum, ChatCompletionNamedToolChoice)
|
|
666
675
|
{}
|
|
667
676
|
|
|
668
677
|
export class ParallelToolCalls extends S.Boolean {}
|
|
669
678
|
|
|
670
|
-
export class
|
|
679
|
+
export class CreateChatCompletionRequestFunctionCallEnum extends S.Literal("none", "auto") {}
|
|
671
680
|
|
|
672
681
|
export class ChatCompletionFunctionCallOption extends S.Struct({
|
|
673
682
|
"name": S.String
|
|
@@ -681,18 +690,15 @@ export class ChatCompletionFunctions extends S.Struct({
|
|
|
681
690
|
|
|
682
691
|
export class CreateChatCompletionRequest extends S.Class<CreateChatCompletionRequest>("CreateChatCompletionRequest")({
|
|
683
692
|
"messages": S.NonEmptyArray(ChatCompletionRequestMessage),
|
|
684
|
-
"model": S.Union(S.String,
|
|
693
|
+
"model": S.Union(S.String, CreateChatCompletionRequestModelEnum),
|
|
685
694
|
"store": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
686
|
-
"reasoning_effort": S.optionalWith(
|
|
687
|
-
nullable: true,
|
|
688
|
-
default: () => "medium" as const
|
|
689
|
-
}),
|
|
695
|
+
"reasoning_effort": S.optionalWith(ReasoningEffort, { nullable: true, default: () => "medium" as const }),
|
|
690
696
|
"metadata": S.optionalWith(Metadata, { nullable: true }),
|
|
691
697
|
"frequency_penalty": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(-2), S.lessThanOrEqualTo(2)), {
|
|
692
698
|
nullable: true,
|
|
693
699
|
default: () => 0 as const
|
|
694
700
|
}),
|
|
695
|
-
"logit_bias": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), {
|
|
701
|
+
"logit_bias": S.optionalWith(S.NullOr(S.Record({ key: S.String, value: S.Unknown })), { default: () => null }),
|
|
696
702
|
"logprobs": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
697
703
|
"top_logprobs": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(20)), { nullable: true }),
|
|
698
704
|
"max_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -722,9 +728,11 @@ export class CreateChatCompletionRequest extends S.Class<CreateChatCompletionReq
|
|
|
722
728
|
nullable: true,
|
|
723
729
|
default: () => "auto" as const
|
|
724
730
|
}),
|
|
725
|
-
"stop": S.optionalWith(S.Union(S.String, S.Array(S.String).pipe(S.minItems(1), S.maxItems(4))), {
|
|
731
|
+
"stop": S.optionalWith(S.NullOr(S.Union(S.String, S.Array(S.String).pipe(S.minItems(1), S.maxItems(4)))), {
|
|
732
|
+
default: () => null
|
|
733
|
+
}),
|
|
726
734
|
"stream": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
727
|
-
"stream_options": S.optionalWith(ChatCompletionStreamOptions, {
|
|
735
|
+
"stream_options": S.optionalWith(S.NullOr(ChatCompletionStreamOptions), { default: () => null }),
|
|
728
736
|
"temperature": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(2)), {
|
|
729
737
|
nullable: true,
|
|
730
738
|
default: () => 1 as const
|
|
@@ -737,16 +745,13 @@ export class CreateChatCompletionRequest extends S.Class<CreateChatCompletionReq
|
|
|
737
745
|
"tool_choice": S.optionalWith(ChatCompletionToolChoiceOption, { nullable: true }),
|
|
738
746
|
"parallel_tool_calls": S.optionalWith(ParallelToolCalls, { nullable: true, default: () => true as const }),
|
|
739
747
|
"user": S.optionalWith(S.String, { nullable: true }),
|
|
740
|
-
"function_call": S.optionalWith(
|
|
741
|
-
|
|
742
|
-
|
|
748
|
+
"function_call": S.optionalWith(
|
|
749
|
+
S.Union(CreateChatCompletionRequestFunctionCallEnum, ChatCompletionFunctionCallOption),
|
|
750
|
+
{ nullable: true }
|
|
751
|
+
),
|
|
743
752
|
"functions": S.optionalWith(S.Array(ChatCompletionFunctions).pipe(S.minItems(1), S.maxItems(128)), { nullable: true })
|
|
744
753
|
}) {}
|
|
745
754
|
|
|
746
|
-
export class CreateChatCompletionResponseChoicesFinishReason
|
|
747
|
-
extends S.Literal("stop", "length", "tool_calls", "content_filter", "function_call")
|
|
748
|
-
{}
|
|
749
|
-
|
|
750
755
|
export class ChatCompletionResponseMessageRole extends S.Literal("assistant") {}
|
|
751
756
|
|
|
752
757
|
export class ChatCompletionResponseMessage extends S.Struct({
|
|
@@ -813,7 +818,7 @@ export class CreateChatCompletionResponse
|
|
|
813
818
|
extends S.Class<CreateChatCompletionResponse>("CreateChatCompletionResponse")({
|
|
814
819
|
"id": S.String,
|
|
815
820
|
"choices": S.Array(S.Struct({
|
|
816
|
-
"finish_reason":
|
|
821
|
+
"finish_reason": S.Literal("stop", "length", "tool_calls", "content_filter", "function_call"),
|
|
817
822
|
"index": S.Int,
|
|
818
823
|
"message": ChatCompletionResponseMessage,
|
|
819
824
|
"logprobs": S.NullOr(S.Struct({
|
|
@@ -830,10 +835,12 @@ export class CreateChatCompletionResponse
|
|
|
830
835
|
})
|
|
831
836
|
{}
|
|
832
837
|
|
|
833
|
-
export class
|
|
838
|
+
export class CreateCompletionRequestModelEnum
|
|
839
|
+
extends S.Literal("gpt-3.5-turbo-instruct", "davinci-002", "babbage-002")
|
|
840
|
+
{}
|
|
834
841
|
|
|
835
842
|
export class CreateCompletionRequest extends S.Class<CreateCompletionRequest>("CreateCompletionRequest")({
|
|
836
|
-
"model": S.Union(S.String,
|
|
843
|
+
"model": S.Union(S.String, CreateCompletionRequestModelEnum),
|
|
837
844
|
"prompt": S.NullOr(
|
|
838
845
|
S.Union(S.String, S.Array(S.String), S.NonEmptyArray(S.Int), S.NonEmptyArray(S.NonEmptyArray(S.Int)))
|
|
839
846
|
).pipe(S.propertySignature, S.withConstructorDefault(() => "<|endoftext|>" as const)),
|
|
@@ -846,8 +853,10 @@ export class CreateCompletionRequest extends S.Class<CreateCompletionRequest>("C
|
|
|
846
853
|
nullable: true,
|
|
847
854
|
default: () => 0 as const
|
|
848
855
|
}),
|
|
849
|
-
"logit_bias": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), {
|
|
850
|
-
"logprobs": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(5)), {
|
|
856
|
+
"logit_bias": S.optionalWith(S.NullOr(S.Record({ key: S.String, value: S.Unknown })), { default: () => null }),
|
|
857
|
+
"logprobs": S.optionalWith(S.NullOr(S.Int.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(5))), {
|
|
858
|
+
default: () => null
|
|
859
|
+
}),
|
|
851
860
|
"max_tokens": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(0)), { nullable: true, default: () => 16 as const }),
|
|
852
861
|
"n": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(128)), {
|
|
853
862
|
nullable: true,
|
|
@@ -858,10 +867,12 @@ export class CreateCompletionRequest extends S.Class<CreateCompletionRequest>("C
|
|
|
858
867
|
default: () => 0 as const
|
|
859
868
|
}),
|
|
860
869
|
"seed": S.optionalWith(S.Int, { nullable: true }),
|
|
861
|
-
"stop": S.optionalWith(S.Union(S.String, S.Array(S.String).pipe(S.minItems(1), S.maxItems(4))), {
|
|
870
|
+
"stop": S.optionalWith(S.NullOr(S.Union(S.String, S.Array(S.String).pipe(S.minItems(1), S.maxItems(4)))), {
|
|
871
|
+
default: () => null
|
|
872
|
+
}),
|
|
862
873
|
"stream": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
863
|
-
"stream_options": S.optionalWith(ChatCompletionStreamOptions, {
|
|
864
|
-
"suffix": S.optionalWith(S.String, {
|
|
874
|
+
"stream_options": S.optionalWith(S.NullOr(ChatCompletionStreamOptions), { default: () => null }),
|
|
875
|
+
"suffix": S.optionalWith(S.NullOr(S.String), { default: () => null }),
|
|
865
876
|
"temperature": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(2)), {
|
|
866
877
|
nullable: true,
|
|
867
878
|
default: () => 1 as const
|
|
@@ -873,14 +884,12 @@ export class CreateCompletionRequest extends S.Class<CreateCompletionRequest>("C
|
|
|
873
884
|
"user": S.optionalWith(S.String, { nullable: true })
|
|
874
885
|
}) {}
|
|
875
886
|
|
|
876
|
-
export class CreateCompletionResponseChoicesFinishReason extends S.Literal("stop", "length", "content_filter") {}
|
|
877
|
-
|
|
878
887
|
export class CreateCompletionResponseObject extends S.Literal("text_completion") {}
|
|
879
888
|
|
|
880
889
|
export class CreateCompletionResponse extends S.Class<CreateCompletionResponse>("CreateCompletionResponse")({
|
|
881
890
|
"id": S.String,
|
|
882
891
|
"choices": S.Array(S.Struct({
|
|
883
|
-
"finish_reason":
|
|
892
|
+
"finish_reason": S.Literal("stop", "length", "content_filter"),
|
|
884
893
|
"index": S.Int,
|
|
885
894
|
"logprobs": S.NullOr(S.Struct({
|
|
886
895
|
"text_offset": S.optionalWith(S.Array(S.Int), { nullable: true }),
|
|
@@ -897,7 +906,7 @@ export class CreateCompletionResponse extends S.Class<CreateCompletionResponse>(
|
|
|
897
906
|
"usage": S.optionalWith(CompletionUsage, { nullable: true })
|
|
898
907
|
}) {}
|
|
899
908
|
|
|
900
|
-
export class
|
|
909
|
+
export class CreateEmbeddingRequestModelEnum
|
|
901
910
|
extends S.Literal("text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large")
|
|
902
911
|
{}
|
|
903
912
|
|
|
@@ -910,7 +919,7 @@ export class CreateEmbeddingRequest extends S.Class<CreateEmbeddingRequest>("Cre
|
|
|
910
919
|
S.Array(S.Int).pipe(S.minItems(1), S.maxItems(2048)),
|
|
911
920
|
S.Array(S.NonEmptyArray(S.Int)).pipe(S.minItems(1), S.maxItems(2048))
|
|
912
921
|
),
|
|
913
|
-
"model": S.Union(S.String,
|
|
922
|
+
"model": S.Union(S.String, CreateEmbeddingRequestModelEnum),
|
|
914
923
|
"encoding_format": S.optionalWith(CreateEmbeddingRequestEncodingFormat, {
|
|
915
924
|
nullable: true,
|
|
916
925
|
default: () => "float" as const
|
|
@@ -996,11 +1005,11 @@ export class ListPaginatedFineTuningJobsParams extends S.Struct({
|
|
|
996
1005
|
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const })
|
|
997
1006
|
}) {}
|
|
998
1007
|
|
|
999
|
-
export class
|
|
1008
|
+
export class FineTuningJobHyperparametersBatchSizeEnum extends S.Literal("auto") {}
|
|
1000
1009
|
|
|
1001
|
-
export class
|
|
1010
|
+
export class FineTuningJobHyperparametersLearningRateMultiplierEnum extends S.Literal("auto") {}
|
|
1002
1011
|
|
|
1003
|
-
export class
|
|
1012
|
+
export class FineTuningJobHyperparametersNEpochsEnum extends S.Literal("auto") {}
|
|
1004
1013
|
|
|
1005
1014
|
export class FineTuningJobObject extends S.Literal("fine_tuning.job") {}
|
|
1006
1015
|
|
|
@@ -1022,24 +1031,24 @@ export class FineTuningIntegration extends S.Struct({
|
|
|
1022
1031
|
|
|
1023
1032
|
export class FineTuneMethodType extends S.Literal("supervised", "dpo") {}
|
|
1024
1033
|
|
|
1025
|
-
export class
|
|
1034
|
+
export class FineTuneSupervisedMethodHyperparametersBatchSizeEnum extends S.Literal("auto") {}
|
|
1026
1035
|
|
|
1027
|
-
export class
|
|
1036
|
+
export class FineTuneSupervisedMethodHyperparametersLearningRateMultiplierEnum extends S.Literal("auto") {}
|
|
1028
1037
|
|
|
1029
|
-
export class
|
|
1038
|
+
export class FineTuneSupervisedMethodHyperparametersNEpochsEnum extends S.Literal("auto") {}
|
|
1030
1039
|
|
|
1031
1040
|
export class FineTuneSupervisedMethod extends S.Struct({
|
|
1032
1041
|
"hyperparameters": S.optionalWith(
|
|
1033
1042
|
S.Struct({
|
|
1034
1043
|
"batch_size": S.optionalWith(
|
|
1035
1044
|
S.Union(
|
|
1036
|
-
|
|
1045
|
+
FineTuneSupervisedMethodHyperparametersBatchSizeEnum,
|
|
1037
1046
|
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(256))
|
|
1038
1047
|
),
|
|
1039
1048
|
{ nullable: true, default: () => "auto" as const }
|
|
1040
1049
|
),
|
|
1041
1050
|
"learning_rate_multiplier": S.optionalWith(
|
|
1042
|
-
S.Union(
|
|
1051
|
+
S.Union(FineTuneSupervisedMethodHyperparametersLearningRateMultiplierEnum, S.Number.pipe(S.greaterThan(0))),
|
|
1043
1052
|
{
|
|
1044
1053
|
nullable: true,
|
|
1045
1054
|
default: () => "auto" as const
|
|
@@ -1047,7 +1056,7 @@ export class FineTuneSupervisedMethod extends S.Struct({
|
|
|
1047
1056
|
),
|
|
1048
1057
|
"n_epochs": S.optionalWith(
|
|
1049
1058
|
S.Union(
|
|
1050
|
-
|
|
1059
|
+
FineTuneSupervisedMethodHyperparametersNEpochsEnum,
|
|
1051
1060
|
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(50))
|
|
1052
1061
|
),
|
|
1053
1062
|
{ nullable: true, default: () => "auto" as const }
|
|
@@ -1057,19 +1066,19 @@ export class FineTuneSupervisedMethod extends S.Struct({
|
|
|
1057
1066
|
)
|
|
1058
1067
|
}) {}
|
|
1059
1068
|
|
|
1060
|
-
export class
|
|
1069
|
+
export class FineTuneDPOMethodHyperparametersBetaEnum extends S.Literal("auto") {}
|
|
1061
1070
|
|
|
1062
|
-
export class
|
|
1071
|
+
export class FineTuneDPOMethodHyperparametersBatchSizeEnum extends S.Literal("auto") {}
|
|
1063
1072
|
|
|
1064
|
-
export class
|
|
1073
|
+
export class FineTuneDPOMethodHyperparametersLearningRateMultiplierEnum extends S.Literal("auto") {}
|
|
1065
1074
|
|
|
1066
|
-
export class
|
|
1075
|
+
export class FineTuneDPOMethodHyperparametersNEpochsEnum extends S.Literal("auto") {}
|
|
1067
1076
|
|
|
1068
1077
|
export class FineTuneDPOMethod extends S.Struct({
|
|
1069
1078
|
"hyperparameters": S.optionalWith(
|
|
1070
1079
|
S.Struct({
|
|
1071
1080
|
"beta": S.optionalWith(
|
|
1072
|
-
S.Union(
|
|
1081
|
+
S.Union(FineTuneDPOMethodHyperparametersBetaEnum, S.Number.pipe(S.greaterThan(0), S.lessThanOrEqualTo(2))),
|
|
1073
1082
|
{
|
|
1074
1083
|
nullable: true,
|
|
1075
1084
|
default: () => "auto" as const
|
|
@@ -1077,13 +1086,13 @@ export class FineTuneDPOMethod extends S.Struct({
|
|
|
1077
1086
|
),
|
|
1078
1087
|
"batch_size": S.optionalWith(
|
|
1079
1088
|
S.Union(
|
|
1080
|
-
|
|
1089
|
+
FineTuneDPOMethodHyperparametersBatchSizeEnum,
|
|
1081
1090
|
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(256))
|
|
1082
1091
|
),
|
|
1083
1092
|
{ nullable: true, default: () => "auto" as const }
|
|
1084
1093
|
),
|
|
1085
1094
|
"learning_rate_multiplier": S.optionalWith(
|
|
1086
|
-
S.Union(
|
|
1095
|
+
S.Union(FineTuneDPOMethodHyperparametersLearningRateMultiplierEnum, S.Number.pipe(S.greaterThan(0))),
|
|
1087
1096
|
{
|
|
1088
1097
|
nullable: true,
|
|
1089
1098
|
default: () => "auto" as const
|
|
@@ -1091,7 +1100,7 @@ export class FineTuneDPOMethod extends S.Struct({
|
|
|
1091
1100
|
),
|
|
1092
1101
|
"n_epochs": S.optionalWith(
|
|
1093
1102
|
S.Union(
|
|
1094
|
-
|
|
1103
|
+
FineTuneDPOMethodHyperparametersNEpochsEnum,
|
|
1095
1104
|
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(50))
|
|
1096
1105
|
),
|
|
1097
1106
|
{ nullable: true, default: () => "auto" as const }
|
|
@@ -1119,21 +1128,21 @@ export class FineTuningJob extends S.Struct({
|
|
|
1119
1128
|
"finished_at": S.NullOr(S.Int),
|
|
1120
1129
|
"hyperparameters": S.Struct({
|
|
1121
1130
|
"batch_size": S.optionalWith(
|
|
1122
|
-
S.Union(
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
}
|
|
1131
|
+
S.Union(
|
|
1132
|
+
FineTuningJobHyperparametersBatchSizeEnum,
|
|
1133
|
+
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(256))
|
|
1134
|
+
),
|
|
1135
|
+
{ nullable: true, default: () => "auto" as const }
|
|
1127
1136
|
),
|
|
1128
1137
|
"learning_rate_multiplier": S.optionalWith(
|
|
1129
|
-
S.Union(
|
|
1138
|
+
S.Union(FineTuningJobHyperparametersLearningRateMultiplierEnum, S.Number.pipe(S.greaterThan(0))),
|
|
1130
1139
|
{
|
|
1131
1140
|
nullable: true,
|
|
1132
1141
|
default: () => "auto" as const
|
|
1133
1142
|
}
|
|
1134
1143
|
),
|
|
1135
1144
|
"n_epochs": S.optionalWith(
|
|
1136
|
-
S.Union(
|
|
1145
|
+
S.Union(FineTuningJobHyperparametersNEpochsEnum, S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(50))),
|
|
1137
1146
|
{
|
|
1138
1147
|
nullable: true,
|
|
1139
1148
|
default: () => "auto" as const
|
|
@@ -1164,32 +1173,30 @@ export class ListPaginatedFineTuningJobsResponse
|
|
|
1164
1173
|
})
|
|
1165
1174
|
{}
|
|
1166
1175
|
|
|
1167
|
-
export class
|
|
1176
|
+
export class CreateFineTuningJobRequestModelEnum
|
|
1168
1177
|
extends S.Literal("babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini")
|
|
1169
1178
|
{}
|
|
1170
1179
|
|
|
1171
|
-
export class
|
|
1180
|
+
export class CreateFineTuningJobRequestHyperparametersBatchSizeEnum extends S.Literal("auto") {}
|
|
1172
1181
|
|
|
1173
|
-
export class
|
|
1182
|
+
export class CreateFineTuningJobRequestHyperparametersLearningRateMultiplierEnum extends S.Literal("auto") {}
|
|
1174
1183
|
|
|
1175
|
-
export class
|
|
1176
|
-
|
|
1177
|
-
export class CreateFineTuningJobRequestIntegrationsType extends S.Literal("wandb") {}
|
|
1184
|
+
export class CreateFineTuningJobRequestHyperparametersNEpochsEnum extends S.Literal("auto") {}
|
|
1178
1185
|
|
|
1179
1186
|
export class CreateFineTuningJobRequest extends S.Class<CreateFineTuningJobRequest>("CreateFineTuningJobRequest")({
|
|
1180
|
-
"model": S.Union(S.String,
|
|
1187
|
+
"model": S.Union(S.String, CreateFineTuningJobRequestModelEnum),
|
|
1181
1188
|
"training_file": S.String,
|
|
1182
1189
|
"hyperparameters": S.optionalWith(
|
|
1183
1190
|
S.Struct({
|
|
1184
1191
|
"batch_size": S.optionalWith(
|
|
1185
1192
|
S.Union(
|
|
1186
|
-
|
|
1193
|
+
CreateFineTuningJobRequestHyperparametersBatchSizeEnum,
|
|
1187
1194
|
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(256))
|
|
1188
1195
|
),
|
|
1189
1196
|
{ nullable: true, default: () => "auto" as const }
|
|
1190
1197
|
),
|
|
1191
1198
|
"learning_rate_multiplier": S.optionalWith(
|
|
1192
|
-
S.Union(
|
|
1199
|
+
S.Union(CreateFineTuningJobRequestHyperparametersLearningRateMultiplierEnum, S.Number.pipe(S.greaterThan(0))),
|
|
1193
1200
|
{
|
|
1194
1201
|
nullable: true,
|
|
1195
1202
|
default: () => "auto" as const
|
|
@@ -1197,7 +1204,7 @@ export class CreateFineTuningJobRequest extends S.Class<CreateFineTuningJobReque
|
|
|
1197
1204
|
),
|
|
1198
1205
|
"n_epochs": S.optionalWith(
|
|
1199
1206
|
S.Union(
|
|
1200
|
-
|
|
1207
|
+
CreateFineTuningJobRequestHyperparametersNEpochsEnum,
|
|
1201
1208
|
S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(50))
|
|
1202
1209
|
),
|
|
1203
1210
|
{ nullable: true, default: () => "auto" as const }
|
|
@@ -1205,11 +1212,11 @@ export class CreateFineTuningJobRequest extends S.Class<CreateFineTuningJobReque
|
|
|
1205
1212
|
}),
|
|
1206
1213
|
{ nullable: true }
|
|
1207
1214
|
),
|
|
1208
|
-
"suffix": S.optionalWith(S.String.pipe(S.minLength(1), S.maxLength(64)), {
|
|
1215
|
+
"suffix": S.optionalWith(S.NullOr(S.String.pipe(S.minLength(1), S.maxLength(64))), { default: () => null }),
|
|
1209
1216
|
"validation_file": S.optionalWith(S.String, { nullable: true }),
|
|
1210
1217
|
"integrations": S.optionalWith(
|
|
1211
1218
|
S.Array(S.Struct({
|
|
1212
|
-
"type":
|
|
1219
|
+
"type": S.Literal("wandb"),
|
|
1213
1220
|
"wandb": S.Struct({
|
|
1214
1221
|
"project": S.String,
|
|
1215
1222
|
"name": S.optionalWith(S.String, { nullable: true }),
|
|
@@ -1286,7 +1293,8 @@ export class ListFineTuningJobEventsResponseObject extends S.Literal("list") {}
|
|
|
1286
1293
|
export class ListFineTuningJobEventsResponse
|
|
1287
1294
|
extends S.Class<ListFineTuningJobEventsResponse>("ListFineTuningJobEventsResponse")({
|
|
1288
1295
|
"data": S.Array(FineTuningJobEvent),
|
|
1289
|
-
"object": ListFineTuningJobEventsResponseObject
|
|
1296
|
+
"object": ListFineTuningJobEventsResponseObject,
|
|
1297
|
+
"has_more": S.Boolean
|
|
1290
1298
|
})
|
|
1291
1299
|
{}
|
|
1292
1300
|
|
|
@@ -1301,7 +1309,7 @@ export class ImagesResponse extends S.Class<ImagesResponse>("ImagesResponse")({
|
|
|
1301
1309
|
"data": S.Array(Image)
|
|
1302
1310
|
}) {}
|
|
1303
1311
|
|
|
1304
|
-
export class
|
|
1312
|
+
export class CreateImageRequestModelEnum extends S.Literal("dall-e-2", "dall-e-3") {}
|
|
1305
1313
|
|
|
1306
1314
|
export class CreateImageRequestQuality extends S.Literal("standard", "hd") {}
|
|
1307
1315
|
|
|
@@ -1313,7 +1321,7 @@ export class CreateImageRequestStyle extends S.Literal("vivid", "natural") {}
|
|
|
1313
1321
|
|
|
1314
1322
|
export class CreateImageRequest extends S.Class<CreateImageRequest>("CreateImageRequest")({
|
|
1315
1323
|
"prompt": S.String,
|
|
1316
|
-
"model": S.optionalWith(S.Union(S.String,
|
|
1324
|
+
"model": S.optionalWith(S.Union(S.String, CreateImageRequestModelEnum), {
|
|
1317
1325
|
nullable: true,
|
|
1318
1326
|
default: () => "dall-e-2" as const
|
|
1319
1327
|
}),
|
|
@@ -1353,9 +1361,7 @@ export class DeleteModelResponse extends S.Class<DeleteModelResponse>("DeleteMod
|
|
|
1353
1361
|
"object": S.String
|
|
1354
1362
|
}) {}
|
|
1355
1363
|
|
|
1356
|
-
export class
|
|
1357
|
-
|
|
1358
|
-
export class CreateModerationRequestModel extends S.Literal(
|
|
1364
|
+
export class CreateModerationRequestModelEnum extends S.Literal(
|
|
1359
1365
|
"omni-moderation-latest",
|
|
1360
1366
|
"omni-moderation-2024-09-26",
|
|
1361
1367
|
"text-moderation-latest",
|
|
@@ -1368,55 +1374,23 @@ export class CreateModerationRequest extends S.Class<CreateModerationRequest>("C
|
|
|
1368
1374
|
S.Array(S.String),
|
|
1369
1375
|
S.Array(S.Union(
|
|
1370
1376
|
S.Struct({
|
|
1371
|
-
"type":
|
|
1377
|
+
"type": S.Literal("image_url"),
|
|
1372
1378
|
"image_url": S.Struct({
|
|
1373
1379
|
"url": S.String
|
|
1374
1380
|
})
|
|
1375
1381
|
}),
|
|
1376
1382
|
S.Struct({
|
|
1377
|
-
"type":
|
|
1383
|
+
"type": S.Literal("text"),
|
|
1378
1384
|
"text": S.String
|
|
1379
1385
|
})
|
|
1380
1386
|
))
|
|
1381
1387
|
),
|
|
1382
|
-
"model": S.optionalWith(S.Union(S.String,
|
|
1388
|
+
"model": S.optionalWith(S.Union(S.String, CreateModerationRequestModelEnum), {
|
|
1383
1389
|
nullable: true,
|
|
1384
1390
|
default: () => "omni-moderation-latest" as const
|
|
1385
1391
|
})
|
|
1386
1392
|
}) {}
|
|
1387
1393
|
|
|
1388
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesHate extends S.Literal("text") {}
|
|
1389
|
-
|
|
1390
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening extends S.Literal("text") {}
|
|
1391
|
-
|
|
1392
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesHarassment extends S.Literal("text") {}
|
|
1393
|
-
|
|
1394
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening extends S.Literal("text") {}
|
|
1395
|
-
|
|
1396
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesIllicit extends S.Literal("text") {}
|
|
1397
|
-
|
|
1398
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent extends S.Literal("text") {}
|
|
1399
|
-
|
|
1400
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm extends S.Literal("text", "image") {}
|
|
1401
|
-
|
|
1402
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent
|
|
1403
|
-
extends S.Literal("text", "image")
|
|
1404
|
-
{}
|
|
1405
|
-
|
|
1406
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions
|
|
1407
|
-
extends S.Literal("text", "image")
|
|
1408
|
-
{}
|
|
1409
|
-
|
|
1410
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesSexual extends S.Literal("text", "image") {}
|
|
1411
|
-
|
|
1412
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors extends S.Literal("text") {}
|
|
1413
|
-
|
|
1414
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesViolence extends S.Literal("text", "image") {}
|
|
1415
|
-
|
|
1416
|
-
export class CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic
|
|
1417
|
-
extends S.Literal("text", "image")
|
|
1418
|
-
{}
|
|
1419
|
-
|
|
1420
1394
|
export class CreateModerationResponse extends S.Class<CreateModerationResponse>("CreateModerationResponse")({
|
|
1421
1395
|
"id": S.String,
|
|
1422
1396
|
"model": S.String,
|
|
@@ -1427,8 +1401,8 @@ export class CreateModerationResponse extends S.Class<CreateModerationResponse>(
|
|
|
1427
1401
|
"hate/threatening": S.Boolean,
|
|
1428
1402
|
"harassment": S.Boolean,
|
|
1429
1403
|
"harassment/threatening": S.Boolean,
|
|
1430
|
-
"illicit": S.Boolean,
|
|
1431
|
-
"illicit/violent": S.Boolean,
|
|
1404
|
+
"illicit": S.NullOr(S.Boolean),
|
|
1405
|
+
"illicit/violent": S.NullOr(S.Boolean),
|
|
1432
1406
|
"self-harm": S.Boolean,
|
|
1433
1407
|
"self-harm/intent": S.Boolean,
|
|
1434
1408
|
"self-harm/instructions": S.Boolean,
|
|
@@ -1453,19 +1427,19 @@ export class CreateModerationResponse extends S.Class<CreateModerationResponse>(
|
|
|
1453
1427
|
"violence/graphic": S.Number
|
|
1454
1428
|
}),
|
|
1455
1429
|
"category_applied_input_types": S.Struct({
|
|
1456
|
-
"hate": S.Array(
|
|
1457
|
-
"hate/threatening": S.Array(
|
|
1458
|
-
"harassment": S.Array(
|
|
1459
|
-
"harassment/threatening": S.Array(
|
|
1460
|
-
"illicit": S.Array(
|
|
1461
|
-
"illicit/violent": S.Array(
|
|
1462
|
-
"self-harm": S.Array(
|
|
1463
|
-
"self-harm/intent": S.Array(
|
|
1464
|
-
"self-harm/instructions": S.Array(
|
|
1465
|
-
"sexual": S.Array(
|
|
1466
|
-
"sexual/minors": S.Array(
|
|
1467
|
-
"violence": S.Array(
|
|
1468
|
-
"violence/graphic": S.Array(
|
|
1430
|
+
"hate": S.Array(S.Literal("text")),
|
|
1431
|
+
"hate/threatening": S.Array(S.Literal("text")),
|
|
1432
|
+
"harassment": S.Array(S.Literal("text")),
|
|
1433
|
+
"harassment/threatening": S.Array(S.Literal("text")),
|
|
1434
|
+
"illicit": S.Array(S.Literal("text")),
|
|
1435
|
+
"illicit/violent": S.Array(S.Literal("text")),
|
|
1436
|
+
"self-harm": S.Array(S.Literal("text", "image")),
|
|
1437
|
+
"self-harm/intent": S.Array(S.Literal("text", "image")),
|
|
1438
|
+
"self-harm/instructions": S.Array(S.Literal("text", "image")),
|
|
1439
|
+
"sexual": S.Array(S.Literal("text", "image")),
|
|
1440
|
+
"sexual/minors": S.Array(S.Literal("text")),
|
|
1441
|
+
"violence": S.Array(S.Literal("text", "image")),
|
|
1442
|
+
"violence/graphic": S.Array(S.Literal("text", "image"))
|
|
1469
1443
|
})
|
|
1470
1444
|
}))
|
|
1471
1445
|
}) {}
|
|
@@ -1816,14 +1790,12 @@ export class ListAuditLogsResponse extends S.Class<ListAuditLogsResponse>("ListA
|
|
|
1816
1790
|
|
|
1817
1791
|
export class UsageCostsParamsBucketWidth extends S.Literal("1d") {}
|
|
1818
1792
|
|
|
1819
|
-
export class UsageCostsParamsGroupBy extends S.Literal("project_id", "line_item") {}
|
|
1820
|
-
|
|
1821
1793
|
export class UsageCostsParams extends S.Struct({
|
|
1822
1794
|
"start_time": S.Int,
|
|
1823
1795
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
1824
1796
|
"bucket_width": S.optionalWith(UsageCostsParamsBucketWidth, { nullable: true, default: () => "1d" as const }),
|
|
1825
1797
|
"project_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
1826
|
-
"group_by": S.optionalWith(S.Array(
|
|
1798
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "line_item")), { nullable: true }),
|
|
1827
1799
|
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 7 as const }),
|
|
1828
1800
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
1829
1801
|
}) {}
|
|
@@ -1925,7 +1897,7 @@ export class UsageCodeInterpreterSessionsResultObject
|
|
|
1925
1897
|
|
|
1926
1898
|
export class UsageCodeInterpreterSessionsResult extends S.Struct({
|
|
1927
1899
|
"object": UsageCodeInterpreterSessionsResultObject,
|
|
1928
|
-
"
|
|
1900
|
+
"num_sessions": S.optionalWith(S.Int, { nullable: true }),
|
|
1929
1901
|
"project_id": S.optionalWith(S.String, { nullable: true })
|
|
1930
1902
|
}) {}
|
|
1931
1903
|
|
|
@@ -1983,8 +1955,6 @@ export class InviteRole extends S.Literal("owner", "reader") {}
|
|
|
1983
1955
|
|
|
1984
1956
|
export class InviteStatus extends S.Literal("accepted", "expired", "pending") {}
|
|
1985
1957
|
|
|
1986
|
-
export class InviteProjectsRole extends S.Literal("member", "owner") {}
|
|
1987
|
-
|
|
1988
1958
|
export class Invite extends S.Struct({
|
|
1989
1959
|
"object": InviteObject,
|
|
1990
1960
|
"id": S.String,
|
|
@@ -1997,7 +1967,7 @@ export class Invite extends S.Struct({
|
|
|
1997
1967
|
"projects": S.optionalWith(
|
|
1998
1968
|
S.Array(S.Struct({
|
|
1999
1969
|
"id": S.optionalWith(S.String, { nullable: true }),
|
|
2000
|
-
"role": S.optionalWith(
|
|
1970
|
+
"role": S.optionalWith(S.Literal("member", "owner"), { nullable: true })
|
|
2001
1971
|
})),
|
|
2002
1972
|
{ nullable: true }
|
|
2003
1973
|
)
|
|
@@ -2013,15 +1983,13 @@ export class InviteListResponse extends S.Class<InviteListResponse>("InviteListR
|
|
|
2013
1983
|
|
|
2014
1984
|
export class InviteRequestRole extends S.Literal("reader", "owner") {}
|
|
2015
1985
|
|
|
2016
|
-
export class InviteRequestProjectsRole extends S.Literal("member", "owner") {}
|
|
2017
|
-
|
|
2018
1986
|
export class InviteRequest extends S.Class<InviteRequest>("InviteRequest")({
|
|
2019
1987
|
"email": S.String,
|
|
2020
1988
|
"role": InviteRequestRole,
|
|
2021
1989
|
"projects": S.optionalWith(
|
|
2022
1990
|
S.Array(S.Struct({
|
|
2023
1991
|
"id": S.String,
|
|
2024
|
-
"role":
|
|
1992
|
+
"role": S.Literal("member", "owner")
|
|
2025
1993
|
})),
|
|
2026
1994
|
{ nullable: true }
|
|
2027
1995
|
)
|
|
@@ -2287,8 +2255,6 @@ export class ProjectUserDeleteResponse extends S.Class<ProjectUserDeleteResponse
|
|
|
2287
2255
|
|
|
2288
2256
|
export class UsageAudioSpeechesParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2289
2257
|
|
|
2290
|
-
export class UsageAudioSpeechesParamsGroupBy extends S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2291
|
-
|
|
2292
2258
|
export class UsageAudioSpeechesParams extends S.Struct({
|
|
2293
2259
|
"start_time": S.Int,
|
|
2294
2260
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -2297,15 +2263,13 @@ export class UsageAudioSpeechesParams extends S.Struct({
|
|
|
2297
2263
|
"user_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2298
2264
|
"api_key_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2299
2265
|
"models": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2300
|
-
"group_by": S.optionalWith(S.Array(
|
|
2266
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "user_id", "api_key_id", "model")), { nullable: true }),
|
|
2301
2267
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2302
2268
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2303
2269
|
}) {}
|
|
2304
2270
|
|
|
2305
2271
|
export class UsageAudioTranscriptionsParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2306
2272
|
|
|
2307
|
-
export class UsageAudioTranscriptionsParamsGroupBy extends S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2308
|
-
|
|
2309
2273
|
export class UsageAudioTranscriptionsParams extends S.Struct({
|
|
2310
2274
|
"start_time": S.Int,
|
|
2311
2275
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -2317,15 +2281,13 @@ export class UsageAudioTranscriptionsParams extends S.Struct({
|
|
|
2317
2281
|
"user_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2318
2282
|
"api_key_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2319
2283
|
"models": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2320
|
-
"group_by": S.optionalWith(S.Array(
|
|
2284
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "user_id", "api_key_id", "model")), { nullable: true }),
|
|
2321
2285
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2322
2286
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2323
2287
|
}) {}
|
|
2324
2288
|
|
|
2325
2289
|
export class UsageCodeInterpreterSessionsParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2326
2290
|
|
|
2327
|
-
export class UsageCodeInterpreterSessionsParamsGroupBy extends S.Literal("project_id") {}
|
|
2328
|
-
|
|
2329
2291
|
export class UsageCodeInterpreterSessionsParams extends S.Struct({
|
|
2330
2292
|
"start_time": S.Int,
|
|
2331
2293
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -2334,15 +2296,13 @@ export class UsageCodeInterpreterSessionsParams extends S.Struct({
|
|
|
2334
2296
|
default: () => "1d" as const
|
|
2335
2297
|
}),
|
|
2336
2298
|
"project_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2337
|
-
"group_by": S.optionalWith(S.Array(
|
|
2299
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id")), { nullable: true }),
|
|
2338
2300
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2339
2301
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2340
2302
|
}) {}
|
|
2341
2303
|
|
|
2342
2304
|
export class UsageCompletionsParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2343
2305
|
|
|
2344
|
-
export class UsageCompletionsParamsGroupBy extends S.Literal("project_id", "user_id", "api_key_id", "model", "batch") {}
|
|
2345
|
-
|
|
2346
2306
|
export class UsageCompletionsParams extends S.Struct({
|
|
2347
2307
|
"start_time": S.Int,
|
|
2348
2308
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -2352,15 +2312,15 @@ export class UsageCompletionsParams extends S.Struct({
|
|
|
2352
2312
|
"api_key_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2353
2313
|
"models": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2354
2314
|
"batch": S.optionalWith(S.Boolean, { nullable: true }),
|
|
2355
|
-
"group_by": S.optionalWith(S.Array(
|
|
2315
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "user_id", "api_key_id", "model", "batch")), {
|
|
2316
|
+
nullable: true
|
|
2317
|
+
}),
|
|
2356
2318
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2357
2319
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2358
2320
|
}) {}
|
|
2359
2321
|
|
|
2360
2322
|
export class UsageEmbeddingsParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2361
2323
|
|
|
2362
|
-
export class UsageEmbeddingsParamsGroupBy extends S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2363
|
-
|
|
2364
2324
|
export class UsageEmbeddingsParams extends S.Struct({
|
|
2365
2325
|
"start_time": S.Int,
|
|
2366
2326
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -2369,40 +2329,36 @@ export class UsageEmbeddingsParams extends S.Struct({
|
|
|
2369
2329
|
"user_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2370
2330
|
"api_key_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2371
2331
|
"models": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2372
|
-
"group_by": S.optionalWith(S.Array(
|
|
2332
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "user_id", "api_key_id", "model")), { nullable: true }),
|
|
2373
2333
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2374
2334
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2375
2335
|
}) {}
|
|
2376
2336
|
|
|
2377
2337
|
export class UsageImagesParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2378
2338
|
|
|
2379
|
-
export class UsageImagesParamsSources extends S.Literal("image.generation", "image.edit", "image.variation") {}
|
|
2380
|
-
|
|
2381
|
-
export class UsageImagesParamsSizes extends S.Literal("256x256", "512x512", "1024x1024", "1792x1792", "1024x1792") {}
|
|
2382
|
-
|
|
2383
|
-
export class UsageImagesParamsGroupBy
|
|
2384
|
-
extends S.Literal("project_id", "user_id", "api_key_id", "model", "size", "source")
|
|
2385
|
-
{}
|
|
2386
|
-
|
|
2387
2339
|
export class UsageImagesParams extends S.Struct({
|
|
2388
2340
|
"start_time": S.Int,
|
|
2389
2341
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
2390
2342
|
"bucket_width": S.optionalWith(UsageImagesParamsBucketWidth, { nullable: true, default: () => "1d" as const }),
|
|
2391
|
-
"sources": S.optionalWith(S.Array(
|
|
2392
|
-
|
|
2343
|
+
"sources": S.optionalWith(S.Array(S.Literal("image.generation", "image.edit", "image.variation")), {
|
|
2344
|
+
nullable: true
|
|
2345
|
+
}),
|
|
2346
|
+
"sizes": S.optionalWith(S.Array(S.Literal("256x256", "512x512", "1024x1024", "1792x1792", "1024x1792")), {
|
|
2347
|
+
nullable: true
|
|
2348
|
+
}),
|
|
2393
2349
|
"project_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2394
2350
|
"user_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2395
2351
|
"api_key_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2396
2352
|
"models": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2397
|
-
"group_by": S.optionalWith(S.Array(
|
|
2353
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "user_id", "api_key_id", "model", "size", "source")), {
|
|
2354
|
+
nullable: true
|
|
2355
|
+
}),
|
|
2398
2356
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2399
2357
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2400
2358
|
}) {}
|
|
2401
2359
|
|
|
2402
2360
|
export class UsageModerationsParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2403
2361
|
|
|
2404
|
-
export class UsageModerationsParamsGroupBy extends S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2405
|
-
|
|
2406
2362
|
export class UsageModerationsParams extends S.Struct({
|
|
2407
2363
|
"start_time": S.Int,
|
|
2408
2364
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
@@ -2411,21 +2367,19 @@ export class UsageModerationsParams extends S.Struct({
|
|
|
2411
2367
|
"user_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2412
2368
|
"api_key_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2413
2369
|
"models": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2414
|
-
"group_by": S.optionalWith(S.Array(
|
|
2370
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id", "user_id", "api_key_id", "model")), { nullable: true }),
|
|
2415
2371
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2416
2372
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2417
2373
|
}) {}
|
|
2418
2374
|
|
|
2419
2375
|
export class UsageVectorStoresParamsBucketWidth extends S.Literal("1m", "1h", "1d") {}
|
|
2420
2376
|
|
|
2421
|
-
export class UsageVectorStoresParamsGroupBy extends S.Literal("project_id") {}
|
|
2422
|
-
|
|
2423
2377
|
export class UsageVectorStoresParams extends S.Struct({
|
|
2424
2378
|
"start_time": S.Int,
|
|
2425
2379
|
"end_time": S.optionalWith(S.Int, { nullable: true }),
|
|
2426
2380
|
"bucket_width": S.optionalWith(UsageVectorStoresParamsBucketWidth, { nullable: true, default: () => "1d" as const }),
|
|
2427
2381
|
"project_ids": S.optionalWith(S.Array(S.String), { nullable: true }),
|
|
2428
|
-
"group_by": S.optionalWith(S.Array(
|
|
2382
|
+
"group_by": S.optionalWith(S.Array(S.Literal("project_id")), { nullable: true }),
|
|
2429
2383
|
"limit": S.optionalWith(S.Int, { nullable: true }),
|
|
2430
2384
|
"page": S.optionalWith(S.String, { nullable: true })
|
|
2431
2385
|
}) {}
|
|
@@ -2489,9 +2443,7 @@ export class RealtimeSessionCreateRequestInputAudioFormat extends S.Literal("pcm
|
|
|
2489
2443
|
|
|
2490
2444
|
export class RealtimeSessionCreateRequestOutputAudioFormat extends S.Literal("pcm16", "g711_ulaw", "g711_alaw") {}
|
|
2491
2445
|
|
|
2492
|
-
export class
|
|
2493
|
-
|
|
2494
|
-
export class RealtimeSessionCreateRequestMaxResponseOutputTokens extends S.Literal("inf") {}
|
|
2446
|
+
export class RealtimeSessionCreateRequestMaxResponseOutputTokensEnum extends S.Literal("inf") {}
|
|
2495
2447
|
|
|
2496
2448
|
export class RealtimeSessionCreateRequest
|
|
2497
2449
|
extends S.Class<RealtimeSessionCreateRequest>("RealtimeSessionCreateRequest")({
|
|
@@ -2520,7 +2472,7 @@ export class RealtimeSessionCreateRequest
|
|
|
2520
2472
|
),
|
|
2521
2473
|
"tools": S.optionalWith(
|
|
2522
2474
|
S.Array(S.Struct({
|
|
2523
|
-
"type": S.optionalWith(
|
|
2475
|
+
"type": S.optionalWith(S.Literal("function"), { nullable: true }),
|
|
2524
2476
|
"name": S.optionalWith(S.String, { nullable: true }),
|
|
2525
2477
|
"description": S.optionalWith(S.String, { nullable: true }),
|
|
2526
2478
|
"parameters": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), { nullable: true })
|
|
@@ -2529,9 +2481,10 @@ export class RealtimeSessionCreateRequest
|
|
|
2529
2481
|
),
|
|
2530
2482
|
"tool_choice": S.optionalWith(S.String, { nullable: true }),
|
|
2531
2483
|
"temperature": S.optionalWith(S.Number, { nullable: true }),
|
|
2532
|
-
"max_response_output_tokens": S.optionalWith(
|
|
2533
|
-
|
|
2534
|
-
|
|
2484
|
+
"max_response_output_tokens": S.optionalWith(
|
|
2485
|
+
S.Union(S.Int, RealtimeSessionCreateRequestMaxResponseOutputTokensEnum),
|
|
2486
|
+
{ nullable: true }
|
|
2487
|
+
)
|
|
2535
2488
|
})
|
|
2536
2489
|
{}
|
|
2537
2490
|
|
|
@@ -2539,9 +2492,7 @@ export class RealtimeSessionCreateResponseVoice
|
|
|
2539
2492
|
extends S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse")
|
|
2540
2493
|
{}
|
|
2541
2494
|
|
|
2542
|
-
export class
|
|
2543
|
-
|
|
2544
|
-
export class RealtimeSessionCreateResponseMaxResponseOutputTokens extends S.Literal("inf") {}
|
|
2495
|
+
export class RealtimeSessionCreateResponseMaxResponseOutputTokensEnum extends S.Literal("inf") {}
|
|
2545
2496
|
|
|
2546
2497
|
export class RealtimeSessionCreateResponse
|
|
2547
2498
|
extends S.Class<RealtimeSessionCreateResponse>("RealtimeSessionCreateResponse")({
|
|
@@ -2570,7 +2521,7 @@ export class RealtimeSessionCreateResponse
|
|
|
2570
2521
|
),
|
|
2571
2522
|
"tools": S.optionalWith(
|
|
2572
2523
|
S.Array(S.Struct({
|
|
2573
|
-
"type": S.optionalWith(
|
|
2524
|
+
"type": S.optionalWith(S.Literal("function"), { nullable: true }),
|
|
2574
2525
|
"name": S.optionalWith(S.String, { nullable: true }),
|
|
2575
2526
|
"description": S.optionalWith(S.String, { nullable: true }),
|
|
2576
2527
|
"parameters": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), { nullable: true })
|
|
@@ -2579,9 +2530,10 @@ export class RealtimeSessionCreateResponse
|
|
|
2579
2530
|
),
|
|
2580
2531
|
"tool_choice": S.optionalWith(S.String, { nullable: true }),
|
|
2581
2532
|
"temperature": S.optionalWith(S.Number, { nullable: true }),
|
|
2582
|
-
"max_response_output_tokens": S.optionalWith(
|
|
2583
|
-
|
|
2584
|
-
|
|
2533
|
+
"max_response_output_tokens": S.optionalWith(
|
|
2534
|
+
S.Union(S.Int, RealtimeSessionCreateResponseMaxResponseOutputTokensEnum),
|
|
2535
|
+
{ nullable: true }
|
|
2536
|
+
)
|
|
2585
2537
|
})
|
|
2586
2538
|
{}
|
|
2587
2539
|
|
|
@@ -2650,8 +2602,6 @@ export class CreateMessageRequest extends S.Struct({
|
|
|
2650
2602
|
"metadata": S.optionalWith(Metadata, { nullable: true })
|
|
2651
2603
|
}) {}
|
|
2652
2604
|
|
|
2653
|
-
export class CreateThreadRequestToolResourcesFileSearchVectorStoresChunkingStrategyType extends S.Literal("static") {}
|
|
2654
|
-
|
|
2655
2605
|
export class CreateThreadRequest extends S.Class<CreateThreadRequest>("CreateThreadRequest")({
|
|
2656
2606
|
"messages": S.optionalWith(S.Array(CreateMessageRequest), { nullable: true }),
|
|
2657
2607
|
"tool_resources": S.optionalWith(
|
|
@@ -2711,7 +2661,7 @@ export class ThreadObject extends S.Class<ThreadObject>("ThreadObject")({
|
|
|
2711
2661
|
"metadata": S.NullOr(Metadata)
|
|
2712
2662
|
}) {}
|
|
2713
2663
|
|
|
2714
|
-
export class
|
|
2664
|
+
export class CreateThreadAndRunRequestModelEnum extends S.Literal(
|
|
2715
2665
|
"gpt-4o",
|
|
2716
2666
|
"gpt-4o-2024-11-20",
|
|
2717
2667
|
"gpt-4o-2024-08-06",
|
|
@@ -2745,6 +2695,8 @@ export class TruncationObject extends S.Struct({
|
|
|
2745
2695
|
"last_messages": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1)), { nullable: true })
|
|
2746
2696
|
}) {}
|
|
2747
2697
|
|
|
2698
|
+
export class AssistantsApiToolChoiceOptionEnum extends S.Literal("none", "auto", "required") {}
|
|
2699
|
+
|
|
2748
2700
|
export class AssistantsNamedToolChoiceType extends S.Literal("function", "code_interpreter", "file_search") {}
|
|
2749
2701
|
|
|
2750
2702
|
export class AssistantsNamedToolChoice extends S.Struct({
|
|
@@ -2758,13 +2710,13 @@ export class AssistantsNamedToolChoice extends S.Struct({
|
|
|
2758
2710
|
}) {}
|
|
2759
2711
|
|
|
2760
2712
|
export class AssistantsApiToolChoiceOption
|
|
2761
|
-
extends S.Union(
|
|
2713
|
+
extends S.Union(AssistantsApiToolChoiceOptionEnum, AssistantsNamedToolChoice)
|
|
2762
2714
|
{}
|
|
2763
2715
|
|
|
2764
2716
|
export class CreateThreadAndRunRequest extends S.Class<CreateThreadAndRunRequest>("CreateThreadAndRunRequest")({
|
|
2765
2717
|
"assistant_id": S.String,
|
|
2766
2718
|
"thread": S.optionalWith(CreateThreadRequest, { nullable: true }),
|
|
2767
|
-
"model": S.optionalWith(S.Union(S.String,
|
|
2719
|
+
"model": S.optionalWith(S.Union(S.String, CreateThreadAndRunRequestModelEnum), { nullable: true }),
|
|
2768
2720
|
"instructions": S.optionalWith(S.String, { nullable: true }),
|
|
2769
2721
|
"tools": S.optionalWith(
|
|
2770
2722
|
S.Array(S.Union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction)).pipe(S.maxItems(20)),
|
|
@@ -3047,42 +2999,16 @@ export class ListRunsResponse extends S.Class<ListRunsResponse>("ListRunsRespons
|
|
|
3047
2999
|
"has_more": S.Boolean
|
|
3048
3000
|
}) {}
|
|
3049
3001
|
|
|
3050
|
-
export class CreateRunParamsInclude extends S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
3051
|
-
|
|
3052
3002
|
export class CreateRunParams extends S.Struct({
|
|
3053
|
-
"include[]": S.optionalWith(S.Array(
|
|
3003
|
+
"include[]": S.optionalWith(S.Array(S.Literal("step_details.tool_calls[*].file_search.results[*].content")), {
|
|
3004
|
+
nullable: true
|
|
3005
|
+
})
|
|
3054
3006
|
}) {}
|
|
3055
3007
|
|
|
3056
|
-
export class CreateRunRequestModel extends S.Literal(
|
|
3057
|
-
"gpt-4o",
|
|
3058
|
-
"gpt-4o-2024-11-20",
|
|
3059
|
-
"gpt-4o-2024-08-06",
|
|
3060
|
-
"gpt-4o-2024-05-13",
|
|
3061
|
-
"gpt-4o-mini",
|
|
3062
|
-
"gpt-4o-mini-2024-07-18",
|
|
3063
|
-
"gpt-4-turbo",
|
|
3064
|
-
"gpt-4-turbo-2024-04-09",
|
|
3065
|
-
"gpt-4-0125-preview",
|
|
3066
|
-
"gpt-4-turbo-preview",
|
|
3067
|
-
"gpt-4-1106-preview",
|
|
3068
|
-
"gpt-4-vision-preview",
|
|
3069
|
-
"gpt-4",
|
|
3070
|
-
"gpt-4-0314",
|
|
3071
|
-
"gpt-4-0613",
|
|
3072
|
-
"gpt-4-32k",
|
|
3073
|
-
"gpt-4-32k-0314",
|
|
3074
|
-
"gpt-4-32k-0613",
|
|
3075
|
-
"gpt-3.5-turbo",
|
|
3076
|
-
"gpt-3.5-turbo-16k",
|
|
3077
|
-
"gpt-3.5-turbo-0613",
|
|
3078
|
-
"gpt-3.5-turbo-1106",
|
|
3079
|
-
"gpt-3.5-turbo-0125",
|
|
3080
|
-
"gpt-3.5-turbo-16k-0613"
|
|
3081
|
-
) {}
|
|
3082
|
-
|
|
3083
3008
|
export class CreateRunRequest extends S.Class<CreateRunRequest>("CreateRunRequest")({
|
|
3084
3009
|
"assistant_id": S.String,
|
|
3085
|
-
"model": S.optionalWith(S.Union(S.String,
|
|
3010
|
+
"model": S.optionalWith(S.Union(S.String, AssistantSupportedModels), { nullable: true }),
|
|
3011
|
+
"reasoning_effort": S.optionalWith(ReasoningEffort, { nullable: true, default: () => "medium" as const }),
|
|
3086
3012
|
"instructions": S.optionalWith(S.String, { nullable: true }),
|
|
3087
3013
|
"additional_instructions": S.optionalWith(S.String, { nullable: true }),
|
|
3088
3014
|
"additional_messages": S.optionalWith(S.Array(CreateMessageRequest), { nullable: true }),
|
|
@@ -3114,14 +3040,14 @@ export class ModifyRunRequest extends S.Class<ModifyRunRequest>("ModifyRunReques
|
|
|
3114
3040
|
|
|
3115
3041
|
export class ListRunStepsParamsOrder extends S.Literal("asc", "desc") {}
|
|
3116
3042
|
|
|
3117
|
-
export class ListRunStepsParamsInclude extends S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
3118
|
-
|
|
3119
3043
|
export class ListRunStepsParams extends S.Struct({
|
|
3120
3044
|
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
|
|
3121
3045
|
"order": S.optionalWith(ListRunStepsParamsOrder, { nullable: true, default: () => "desc" as const }),
|
|
3122
3046
|
"after": S.optionalWith(S.String, { nullable: true }),
|
|
3123
3047
|
"before": S.optionalWith(S.String, { nullable: true }),
|
|
3124
|
-
"include[]": S.optionalWith(S.Array(
|
|
3048
|
+
"include[]": S.optionalWith(S.Array(S.Literal("step_details.tool_calls[*].file_search.results[*].content")), {
|
|
3049
|
+
nullable: true
|
|
3050
|
+
})
|
|
3125
3051
|
}) {}
|
|
3126
3052
|
|
|
3127
3053
|
export class RunStepObjectObject extends S.Literal("thread.run.step") {}
|
|
@@ -3177,15 +3103,13 @@ export class RunStepDetailsToolCallsFileSearchRankingOptionsObject extends S.Str
|
|
|
3177
3103
|
"score_threshold": S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1))
|
|
3178
3104
|
}) {}
|
|
3179
3105
|
|
|
3180
|
-
export class RunStepDetailsToolCallsFileSearchResultObjectContentType extends S.Literal("text") {}
|
|
3181
|
-
|
|
3182
3106
|
export class RunStepDetailsToolCallsFileSearchResultObject extends S.Struct({
|
|
3183
3107
|
"file_id": S.String,
|
|
3184
3108
|
"file_name": S.String,
|
|
3185
3109
|
"score": S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1)),
|
|
3186
3110
|
"content": S.optionalWith(
|
|
3187
3111
|
S.Array(S.Struct({
|
|
3188
|
-
"type": S.optionalWith(
|
|
3112
|
+
"type": S.optionalWith(S.Literal("text"), { nullable: true }),
|
|
3189
3113
|
"text": S.optionalWith(S.String, { nullable: true })
|
|
3190
3114
|
})),
|
|
3191
3115
|
{ nullable: true }
|
|
@@ -3262,10 +3186,10 @@ export class ListRunStepsResponse extends S.Class<ListRunStepsResponse>("ListRun
|
|
|
3262
3186
|
"has_more": S.Boolean
|
|
3263
3187
|
}) {}
|
|
3264
3188
|
|
|
3265
|
-
export class GetRunStepParamsInclude extends S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
3266
|
-
|
|
3267
3189
|
export class GetRunStepParams extends S.Struct({
|
|
3268
|
-
"include[]": S.optionalWith(S.Array(
|
|
3190
|
+
"include[]": S.optionalWith(S.Array(S.Literal("step_details.tool_calls[*].file_search.results[*].content")), {
|
|
3191
|
+
nullable: true
|
|
3192
|
+
})
|
|
3269
3193
|
}) {}
|
|
3270
3194
|
|
|
3271
3195
|
export class SubmitToolOutputsRunRequest extends S.Class<SubmitToolOutputsRunRequest>("SubmitToolOutputsRunRequest")({
|