@effect/ai-openai 0.15.2 → 0.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Generated.js +1541 -408
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/cjs/OpenAiCompletions.js.map +1 -1
- package/dist/dts/Generated.d.ts +2529 -380
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/esm/Generated.js +1326 -374
- package/dist/esm/Generated.js.map +1 -1
- package/dist/esm/OpenAiCompletions.js.map +1 -1
- package/package.json +5 -5
- package/src/Generated.ts +1764 -572
- package/src/OpenAiCompletions.ts +2 -2
package/src/Generated.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type * as HttpClient from "@effect/platform/HttpClient"
|
|
|
5
5
|
import * as HttpClientError from "@effect/platform/HttpClientError"
|
|
6
6
|
import * as HttpClientRequest from "@effect/platform/HttpClientRequest"
|
|
7
7
|
import * as HttpClientResponse from "@effect/platform/HttpClientResponse"
|
|
8
|
+
import type * as UrlParams from "@effect/platform/UrlParams"
|
|
8
9
|
import * as Effect from "effect/Effect"
|
|
9
10
|
import type { ParseError } from "effect/ParseResult"
|
|
10
11
|
import * as S from "effect/Schema"
|
|
@@ -28,10 +29,10 @@ export class AssistantToolsCode extends S.Struct({
|
|
|
28
29
|
|
|
29
30
|
export class AssistantToolsFileSearchType extends S.Literal("file_search") {}
|
|
30
31
|
|
|
31
|
-
export class
|
|
32
|
+
export class FileSearchRanker extends S.Literal("auto", "default_2024_08_21") {}
|
|
32
33
|
|
|
33
34
|
export class FileSearchRankingOptions extends S.Struct({
|
|
34
|
-
"ranker": S.optionalWith(
|
|
35
|
+
"ranker": S.optionalWith(FileSearchRanker, { nullable: true }),
|
|
35
36
|
"score_threshold": S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1))
|
|
36
37
|
}) {}
|
|
37
38
|
|
|
@@ -162,6 +163,8 @@ export class AssistantSupportedModels extends S.Literal(
|
|
|
162
163
|
"gpt-4o-2024-05-13",
|
|
163
164
|
"gpt-4o-mini",
|
|
164
165
|
"gpt-4o-mini-2024-07-18",
|
|
166
|
+
"gpt-4.5-preview",
|
|
167
|
+
"gpt-4.5-preview-2025-02-27",
|
|
165
168
|
"gpt-4-turbo",
|
|
166
169
|
"gpt-4-turbo-2024-04-09",
|
|
167
170
|
"gpt-4-0125-preview",
|
|
@@ -447,6 +450,132 @@ export class CreateBatchRequest extends S.Class<CreateBatchRequest>("CreateBatch
|
|
|
447
450
|
"metadata": S.optionalWith(Metadata, { nullable: true })
|
|
448
451
|
}) {}
|
|
449
452
|
|
|
453
|
+
export class ListChatCompletionsParamsOrder extends S.Literal("asc", "desc") {}
|
|
454
|
+
|
|
455
|
+
export class ListChatCompletionsParams extends S.Struct({
|
|
456
|
+
"model": S.optionalWith(S.String, { nullable: true }),
|
|
457
|
+
"metadata": S.optionalWith(Metadata, { nullable: true }),
|
|
458
|
+
"after": S.optionalWith(S.String, { nullable: true }),
|
|
459
|
+
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
|
|
460
|
+
"order": S.optionalWith(ListChatCompletionsParamsOrder, { nullable: true, default: () => "asc" as const })
|
|
461
|
+
}) {}
|
|
462
|
+
|
|
463
|
+
export class ChatCompletionListObject extends S.Literal("list") {}
|
|
464
|
+
|
|
465
|
+
export class ChatCompletionMessageToolCallType extends S.Literal("function") {}
|
|
466
|
+
|
|
467
|
+
export class ChatCompletionMessageToolCall extends S.Struct({
|
|
468
|
+
"id": S.String,
|
|
469
|
+
"type": ChatCompletionMessageToolCallType,
|
|
470
|
+
"function": S.Struct({
|
|
471
|
+
"name": S.String,
|
|
472
|
+
"arguments": S.String
|
|
473
|
+
})
|
|
474
|
+
}) {}
|
|
475
|
+
|
|
476
|
+
export class ChatCompletionMessageToolCalls extends S.Array(ChatCompletionMessageToolCall) {}
|
|
477
|
+
|
|
478
|
+
export class ChatCompletionResponseMessageRole extends S.Literal("assistant") {}
|
|
479
|
+
|
|
480
|
+
export class ChatCompletionResponseMessage extends S.Struct({
|
|
481
|
+
"content": S.NullOr(S.String),
|
|
482
|
+
"refusal": S.NullOr(S.String),
|
|
483
|
+
"tool_calls": S.optionalWith(ChatCompletionMessageToolCalls, { nullable: true }),
|
|
484
|
+
"annotations": S.optionalWith(
|
|
485
|
+
S.Array(S.Struct({
|
|
486
|
+
"type": S.Literal("url_citation"),
|
|
487
|
+
"url_citation": S.Struct({
|
|
488
|
+
"end_index": S.Int,
|
|
489
|
+
"start_index": S.Int,
|
|
490
|
+
"url": S.String,
|
|
491
|
+
"title": S.String
|
|
492
|
+
})
|
|
493
|
+
})),
|
|
494
|
+
{ nullable: true }
|
|
495
|
+
),
|
|
496
|
+
"role": ChatCompletionResponseMessageRole,
|
|
497
|
+
"function_call": S.optionalWith(
|
|
498
|
+
S.Struct({
|
|
499
|
+
"arguments": S.String,
|
|
500
|
+
"name": S.String
|
|
501
|
+
}),
|
|
502
|
+
{ nullable: true }
|
|
503
|
+
),
|
|
504
|
+
"audio": S.optionalWith(
|
|
505
|
+
S.Struct({
|
|
506
|
+
"id": S.String,
|
|
507
|
+
"expires_at": S.Int,
|
|
508
|
+
"data": S.String,
|
|
509
|
+
"transcript": S.String
|
|
510
|
+
}),
|
|
511
|
+
{ nullable: true }
|
|
512
|
+
)
|
|
513
|
+
}) {}
|
|
514
|
+
|
|
515
|
+
export class ChatCompletionTokenLogprob extends S.Struct({
|
|
516
|
+
"token": S.String,
|
|
517
|
+
"logprob": S.Number,
|
|
518
|
+
"bytes": S.NullOr(S.Array(S.Int)),
|
|
519
|
+
"top_logprobs": S.Array(S.Struct({
|
|
520
|
+
"token": S.String,
|
|
521
|
+
"logprob": S.Number,
|
|
522
|
+
"bytes": S.NullOr(S.Array(S.Int))
|
|
523
|
+
}))
|
|
524
|
+
}) {}
|
|
525
|
+
|
|
526
|
+
export class CreateChatCompletionResponseServiceTier extends S.Literal("scale", "default") {}
|
|
527
|
+
|
|
528
|
+
export class CreateChatCompletionResponseObject extends S.Literal("chat.completion") {}
|
|
529
|
+
|
|
530
|
+
export class CompletionUsage extends S.Struct({
|
|
531
|
+
"completion_tokens": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
|
|
532
|
+
"prompt_tokens": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
|
|
533
|
+
"total_tokens": S.Int.pipe(S.propertySignature, S.withConstructorDefault(() => 0 as const)),
|
|
534
|
+
"completion_tokens_details": S.optionalWith(
|
|
535
|
+
S.Struct({
|
|
536
|
+
"accepted_prediction_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
537
|
+
"audio_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
538
|
+
"reasoning_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
539
|
+
"rejected_prediction_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const })
|
|
540
|
+
}),
|
|
541
|
+
{ nullable: true }
|
|
542
|
+
),
|
|
543
|
+
"prompt_tokens_details": S.optionalWith(
|
|
544
|
+
S.Struct({
|
|
545
|
+
"audio_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
546
|
+
"cached_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const })
|
|
547
|
+
}),
|
|
548
|
+
{ nullable: true }
|
|
549
|
+
)
|
|
550
|
+
}) {}
|
|
551
|
+
|
|
552
|
+
export class CreateChatCompletionResponse extends S.Struct({
|
|
553
|
+
"id": S.String,
|
|
554
|
+
"choices": S.Array(S.Struct({
|
|
555
|
+
"finish_reason": S.Literal("stop", "length", "tool_calls", "content_filter", "function_call"),
|
|
556
|
+
"index": S.Int,
|
|
557
|
+
"message": ChatCompletionResponseMessage,
|
|
558
|
+
"logprobs": S.NullOr(S.Struct({
|
|
559
|
+
"content": S.NullOr(S.Array(ChatCompletionTokenLogprob)),
|
|
560
|
+
"refusal": S.NullOr(S.Array(ChatCompletionTokenLogprob))
|
|
561
|
+
}))
|
|
562
|
+
})),
|
|
563
|
+
"created": S.Int,
|
|
564
|
+
"model": S.String,
|
|
565
|
+
"service_tier": S.optionalWith(CreateChatCompletionResponseServiceTier, { nullable: true }),
|
|
566
|
+
"system_fingerprint": S.optionalWith(S.String, { nullable: true }),
|
|
567
|
+
"object": CreateChatCompletionResponseObject,
|
|
568
|
+
"usage": S.optionalWith(CompletionUsage, { nullable: true })
|
|
569
|
+
}) {}
|
|
570
|
+
|
|
571
|
+
export class ChatCompletionList extends S.Class<ChatCompletionList>("ChatCompletionList")({
|
|
572
|
+
"object": ChatCompletionListObject.pipe(S.propertySignature, S.withConstructorDefault(() => "list" as const)),
|
|
573
|
+
"data": S.Array(CreateChatCompletionResponse),
|
|
574
|
+
"first_id": S.String,
|
|
575
|
+
"last_id": S.String,
|
|
576
|
+
"has_more": S.Boolean
|
|
577
|
+
}) {}
|
|
578
|
+
|
|
450
579
|
export class ChatCompletionRequestMessageContentPartTextType extends S.Literal("text") {}
|
|
451
580
|
|
|
452
581
|
export class ChatCompletionRequestMessageContentPartText extends S.Struct({
|
|
@@ -499,10 +628,22 @@ export class ChatCompletionRequestMessageContentPartAudio extends S.Struct({
|
|
|
499
628
|
})
|
|
500
629
|
}) {}
|
|
501
630
|
|
|
631
|
+
export class ChatCompletionRequestMessageContentPartFileType extends S.Literal("file") {}
|
|
632
|
+
|
|
633
|
+
export class ChatCompletionRequestMessageContentPartFile extends S.Struct({
|
|
634
|
+
"type": ChatCompletionRequestMessageContentPartFileType,
|
|
635
|
+
"file": S.Struct({
|
|
636
|
+
"file_name": S.optionalWith(S.String, { nullable: true }),
|
|
637
|
+
"file_data": S.optionalWith(S.String, { nullable: true }),
|
|
638
|
+
"file_id": S.optionalWith(S.String, { nullable: true })
|
|
639
|
+
})
|
|
640
|
+
}) {}
|
|
641
|
+
|
|
502
642
|
export class ChatCompletionRequestUserMessageContentPart extends S.Union(
|
|
503
643
|
ChatCompletionRequestMessageContentPartText,
|
|
504
644
|
ChatCompletionRequestMessageContentPartImage,
|
|
505
|
-
ChatCompletionRequestMessageContentPartAudio
|
|
645
|
+
ChatCompletionRequestMessageContentPartAudio,
|
|
646
|
+
ChatCompletionRequestMessageContentPartFile
|
|
506
647
|
) {}
|
|
507
648
|
|
|
508
649
|
export class ChatCompletionRequestUserMessageRole extends S.Literal("user") {}
|
|
@@ -526,19 +667,6 @@ export class ChatCompletionRequestAssistantMessageContentPart
|
|
|
526
667
|
|
|
527
668
|
export class ChatCompletionRequestAssistantMessageRole extends S.Literal("assistant") {}
|
|
528
669
|
|
|
529
|
-
export class ChatCompletionMessageToolCallType extends S.Literal("function") {}
|
|
530
|
-
|
|
531
|
-
export class ChatCompletionMessageToolCall extends S.Struct({
|
|
532
|
-
"id": S.String,
|
|
533
|
-
"type": ChatCompletionMessageToolCallType,
|
|
534
|
-
"function": S.Struct({
|
|
535
|
-
"name": S.String,
|
|
536
|
-
"arguments": S.String
|
|
537
|
-
})
|
|
538
|
-
}) {}
|
|
539
|
-
|
|
540
|
-
export class ChatCompletionMessageToolCalls extends S.Array(ChatCompletionMessageToolCall) {}
|
|
541
|
-
|
|
542
670
|
export class ChatCompletionRequestAssistantMessage extends S.Struct({
|
|
543
671
|
"content": S.optionalWith(S.Union(S.String, S.NonEmptyArray(ChatCompletionRequestAssistantMessageContentPart)), {
|
|
544
672
|
nullable: true
|
|
@@ -589,64 +717,35 @@ export class ChatCompletionRequestMessage extends S.Union(
|
|
|
589
717
|
ChatCompletionRequestFunctionMessage
|
|
590
718
|
) {}
|
|
591
719
|
|
|
592
|
-
export class
|
|
593
|
-
"o3-mini",
|
|
594
|
-
"o3-mini-2025-01-31",
|
|
595
|
-
"o1",
|
|
596
|
-
"o1-2024-12-17",
|
|
597
|
-
"o1-preview",
|
|
598
|
-
"o1-preview-2024-09-12",
|
|
599
|
-
"o1-mini",
|
|
600
|
-
"o1-mini-2024-09-12",
|
|
601
|
-
"gpt-4o",
|
|
602
|
-
"gpt-4o-2024-11-20",
|
|
603
|
-
"gpt-4o-2024-08-06",
|
|
604
|
-
"gpt-4o-2024-05-13",
|
|
605
|
-
"gpt-4o-audio-preview",
|
|
606
|
-
"gpt-4o-audio-preview-2024-10-01",
|
|
607
|
-
"gpt-4o-audio-preview-2024-12-17",
|
|
608
|
-
"gpt-4o-mini-audio-preview",
|
|
609
|
-
"gpt-4o-mini-audio-preview-2024-12-17",
|
|
610
|
-
"chatgpt-4o-latest",
|
|
611
|
-
"gpt-4o-mini",
|
|
612
|
-
"gpt-4o-mini-2024-07-18",
|
|
613
|
-
"gpt-4-turbo",
|
|
614
|
-
"gpt-4-turbo-2024-04-09",
|
|
615
|
-
"gpt-4-0125-preview",
|
|
616
|
-
"gpt-4-turbo-preview",
|
|
617
|
-
"gpt-4-1106-preview",
|
|
618
|
-
"gpt-4-vision-preview",
|
|
619
|
-
"gpt-4",
|
|
620
|
-
"gpt-4-0314",
|
|
621
|
-
"gpt-4-0613",
|
|
622
|
-
"gpt-4-32k",
|
|
623
|
-
"gpt-4-32k-0314",
|
|
624
|
-
"gpt-4-32k-0613",
|
|
625
|
-
"gpt-3.5-turbo",
|
|
626
|
-
"gpt-3.5-turbo-16k",
|
|
627
|
-
"gpt-3.5-turbo-0301",
|
|
628
|
-
"gpt-3.5-turbo-0613",
|
|
629
|
-
"gpt-3.5-turbo-1106",
|
|
630
|
-
"gpt-3.5-turbo-0125",
|
|
631
|
-
"gpt-3.5-turbo-16k-0613"
|
|
632
|
-
) {}
|
|
633
|
-
|
|
634
|
-
export class ChatCompletionModalities extends S.Array(S.Literal("text", "audio")) {}
|
|
720
|
+
export class ResponseModalities extends S.Array(S.Literal("text", "audio")) {}
|
|
635
721
|
|
|
636
|
-
export class
|
|
722
|
+
export class CreateChatCompletionRequestWebSearchOptionsUserLocationType extends S.Literal("approximate") {}
|
|
637
723
|
|
|
638
|
-
export class
|
|
639
|
-
"
|
|
640
|
-
"
|
|
724
|
+
export class WebSearchLocation extends S.Struct({
|
|
725
|
+
"country": S.optionalWith(S.String, { nullable: true }),
|
|
726
|
+
"region": S.optionalWith(S.String, { nullable: true }),
|
|
727
|
+
"city": S.optionalWith(S.String, { nullable: true }),
|
|
728
|
+
"timezone": S.optionalWith(S.String, { nullable: true })
|
|
641
729
|
}) {}
|
|
642
730
|
|
|
731
|
+
export class WebSearchContextSize extends S.Literal("low", "medium", "high") {}
|
|
732
|
+
|
|
733
|
+
export class CreateChatCompletionRequestServiceTier extends S.Literal("auto", "default") {}
|
|
734
|
+
|
|
643
735
|
export class CreateChatCompletionRequestAudioVoice
|
|
644
736
|
extends S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse")
|
|
645
737
|
{}
|
|
646
738
|
|
|
647
739
|
export class CreateChatCompletionRequestAudioFormat extends S.Literal("wav", "mp3", "flac", "opus", "pcm16") {}
|
|
648
740
|
|
|
649
|
-
export class
|
|
741
|
+
export class StopConfiguration extends S.Union(S.String, S.Array(S.String).pipe(S.minItems(1), S.maxItems(4))) {}
|
|
742
|
+
|
|
743
|
+
export class PredictionContentType extends S.Literal("content") {}
|
|
744
|
+
|
|
745
|
+
export class PredictionContent extends S.Struct({
|
|
746
|
+
"type": PredictionContentType,
|
|
747
|
+
"content": S.Union(S.String, S.NonEmptyArray(ChatCompletionRequestMessageContentPartText))
|
|
748
|
+
}) {}
|
|
650
749
|
|
|
651
750
|
export class ChatCompletionStreamOptions extends S.Struct({
|
|
652
751
|
"include_usage": S.optionalWith(S.Boolean, { nullable: true })
|
|
@@ -688,152 +787,196 @@ export class ChatCompletionFunctions extends S.Struct({
|
|
|
688
787
|
"parameters": S.optionalWith(FunctionParameters, { nullable: true })
|
|
689
788
|
}) {}
|
|
690
789
|
|
|
790
|
+
export class CreateChatCompletionRequestModelEnum extends S.Literal(
|
|
791
|
+
"o3-mini",
|
|
792
|
+
"o3-mini-2025-01-31",
|
|
793
|
+
"o1",
|
|
794
|
+
"o1-2024-12-17",
|
|
795
|
+
"o1-preview",
|
|
796
|
+
"o1-preview-2024-09-12",
|
|
797
|
+
"o1-mini",
|
|
798
|
+
"o1-mini-2024-09-12",
|
|
799
|
+
"computer-use-preview",
|
|
800
|
+
"computer-use-preview-2025-02-04",
|
|
801
|
+
"computer-use-preview-2025-03-11",
|
|
802
|
+
"gpt-4.5-preview",
|
|
803
|
+
"gpt-4.5-preview-2025-02-27",
|
|
804
|
+
"gpt-4o",
|
|
805
|
+
"gpt-4o-2024-11-20",
|
|
806
|
+
"gpt-4o-2024-08-06",
|
|
807
|
+
"gpt-4o-2024-05-13",
|
|
808
|
+
"gpt-4o-audio-preview",
|
|
809
|
+
"gpt-4o-audio-preview-2024-10-01",
|
|
810
|
+
"gpt-4o-audio-preview-2024-12-17",
|
|
811
|
+
"gpt-4o-mini-audio-preview",
|
|
812
|
+
"gpt-4o-mini-audio-preview-2024-12-17",
|
|
813
|
+
"chatgpt-4o-latest",
|
|
814
|
+
"gpt-4o-mini",
|
|
815
|
+
"gpt-4o-mini-2024-07-18",
|
|
816
|
+
"gpt-4-turbo",
|
|
817
|
+
"gpt-4-turbo-2024-04-09",
|
|
818
|
+
"gpt-4-0125-preview",
|
|
819
|
+
"gpt-4-turbo-preview",
|
|
820
|
+
"gpt-4-1106-preview",
|
|
821
|
+
"gpt-4-vision-preview",
|
|
822
|
+
"gpt-4",
|
|
823
|
+
"gpt-4-0314",
|
|
824
|
+
"gpt-4-0613",
|
|
825
|
+
"gpt-4-32k",
|
|
826
|
+
"gpt-4-32k-0314",
|
|
827
|
+
"gpt-4-32k-0613",
|
|
828
|
+
"gpt-3.5-turbo",
|
|
829
|
+
"gpt-3.5-turbo-16k",
|
|
830
|
+
"gpt-3.5-turbo-0301",
|
|
831
|
+
"gpt-3.5-turbo-0613",
|
|
832
|
+
"gpt-3.5-turbo-1106",
|
|
833
|
+
"gpt-3.5-turbo-0125",
|
|
834
|
+
"gpt-3.5-turbo-16k-0613"
|
|
835
|
+
) {}
|
|
836
|
+
|
|
691
837
|
export class CreateChatCompletionRequest extends S.Class<CreateChatCompletionRequest>("CreateChatCompletionRequest")({
|
|
692
838
|
"messages": S.NonEmptyArray(ChatCompletionRequestMessage),
|
|
693
|
-
"
|
|
694
|
-
"store": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
839
|
+
"modalities": S.optionalWith(ResponseModalities, { nullable: true }),
|
|
695
840
|
"reasoning_effort": S.optionalWith(ReasoningEffort, { nullable: true, default: () => "medium" as const }),
|
|
696
|
-
"
|
|
841
|
+
"max_completion_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
697
842
|
"frequency_penalty": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(-2), S.lessThanOrEqualTo(2)), {
|
|
698
843
|
nullable: true,
|
|
699
844
|
default: () => 0 as const
|
|
700
845
|
}),
|
|
701
|
-
"
|
|
702
|
-
"logprobs": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
703
|
-
"top_logprobs": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(20)), { nullable: true }),
|
|
704
|
-
"max_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
705
|
-
"max_completion_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
706
|
-
"n": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(128)), {
|
|
846
|
+
"presence_penalty": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(-2), S.lessThanOrEqualTo(2)), {
|
|
707
847
|
nullable: true,
|
|
708
|
-
default: () =>
|
|
848
|
+
default: () => 0 as const
|
|
709
849
|
}),
|
|
710
|
-
"
|
|
711
|
-
"prediction": S.optionalWith(PredictionContent, { nullable: true }),
|
|
712
|
-
"audio": S.optionalWith(
|
|
850
|
+
"web_search_options": S.optionalWith(
|
|
713
851
|
S.Struct({
|
|
714
|
-
"
|
|
715
|
-
|
|
852
|
+
"user_location": S.optionalWith(
|
|
853
|
+
S.Struct({
|
|
854
|
+
"type": CreateChatCompletionRequestWebSearchOptionsUserLocationType,
|
|
855
|
+
"approximate": WebSearchLocation
|
|
856
|
+
}),
|
|
857
|
+
{ nullable: true }
|
|
858
|
+
),
|
|
859
|
+
"search_context_size": S.optionalWith(WebSearchContextSize, { nullable: true, default: () => "medium" as const })
|
|
716
860
|
}),
|
|
717
861
|
{ nullable: true }
|
|
718
862
|
),
|
|
719
|
-
"
|
|
720
|
-
|
|
721
|
-
default: () => 0 as const
|
|
722
|
-
}),
|
|
723
|
-
"response_format": S.optionalWith(S.Union(ResponseFormatText, ResponseFormatJsonObject, ResponseFormatJsonSchema), {
|
|
863
|
+
"top_logprobs": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(20)), { nullable: true }),
|
|
864
|
+
"response_format": S.optionalWith(S.Union(ResponseFormatText, ResponseFormatJsonSchema, ResponseFormatJsonObject), {
|
|
724
865
|
nullable: true
|
|
725
866
|
}),
|
|
726
|
-
"seed": S.optionalWith(S.Int, { nullable: true }),
|
|
727
867
|
"service_tier": S.optionalWith(CreateChatCompletionRequestServiceTier, {
|
|
728
868
|
nullable: true,
|
|
729
869
|
default: () => "auto" as const
|
|
730
870
|
}),
|
|
731
|
-
"
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}),
|
|
740
|
-
"
|
|
871
|
+
"audio": S.optionalWith(
|
|
872
|
+
S.Struct({
|
|
873
|
+
"voice": CreateChatCompletionRequestAudioVoice,
|
|
874
|
+
"format": CreateChatCompletionRequestAudioFormat
|
|
875
|
+
}),
|
|
876
|
+
{ nullable: true }
|
|
877
|
+
),
|
|
878
|
+
"store": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
879
|
+
"stream": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
880
|
+
"stop": S.optionalWith(S.NullOr(StopConfiguration), { default: () => null }),
|
|
881
|
+
"logit_bias": S.optionalWith(S.NullOr(S.Record({ key: S.String, value: S.Unknown })), { default: () => null }),
|
|
882
|
+
"logprobs": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
883
|
+
"max_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
884
|
+
"n": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(128)), {
|
|
741
885
|
nullable: true,
|
|
742
886
|
default: () => 1 as const
|
|
743
887
|
}),
|
|
888
|
+
"prediction": S.optionalWith(PredictionContent, { nullable: true }),
|
|
889
|
+
"seed": S.optionalWith(
|
|
890
|
+
S.Int.pipe(S.greaterThanOrEqualTo(-9223372036854776000), S.lessThanOrEqualTo(9223372036854776000)),
|
|
891
|
+
{ nullable: true }
|
|
892
|
+
),
|
|
893
|
+
"stream_options": S.optionalWith(S.NullOr(ChatCompletionStreamOptions), { default: () => null }),
|
|
744
894
|
"tools": S.optionalWith(S.Array(ChatCompletionTool), { nullable: true }),
|
|
745
895
|
"tool_choice": S.optionalWith(ChatCompletionToolChoiceOption, { nullable: true }),
|
|
746
896
|
"parallel_tool_calls": S.optionalWith(ParallelToolCalls, { nullable: true, default: () => true as const }),
|
|
747
|
-
"user": S.optionalWith(S.String, { nullable: true }),
|
|
748
897
|
"function_call": S.optionalWith(
|
|
749
898
|
S.Union(CreateChatCompletionRequestFunctionCallEnum, ChatCompletionFunctionCallOption),
|
|
750
899
|
{ nullable: true }
|
|
751
900
|
),
|
|
752
|
-
"functions": S.optionalWith(S.Array(ChatCompletionFunctions).pipe(S.minItems(1), S.maxItems(128)), {
|
|
901
|
+
"functions": S.optionalWith(S.Array(ChatCompletionFunctions).pipe(S.minItems(1), S.maxItems(128)), {
|
|
902
|
+
nullable: true
|
|
903
|
+
}),
|
|
904
|
+
"model": S.Union(S.String, CreateChatCompletionRequestModelEnum),
|
|
905
|
+
"metadata": S.optionalWith(Metadata, { nullable: true }),
|
|
906
|
+
"temperature": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(2)), {
|
|
907
|
+
nullable: true,
|
|
908
|
+
default: () => 1 as const
|
|
909
|
+
}),
|
|
910
|
+
"top_p": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1)), {
|
|
911
|
+
nullable: true,
|
|
912
|
+
default: () => 1 as const
|
|
913
|
+
}),
|
|
914
|
+
"user": S.optionalWith(S.String, { nullable: true })
|
|
753
915
|
}) {}
|
|
754
916
|
|
|
755
|
-
export class
|
|
756
|
-
|
|
757
|
-
export class ChatCompletionResponseMessage extends S.Struct({
|
|
758
|
-
"content": S.NullOr(S.String),
|
|
759
|
-
"refusal": S.NullOr(S.String),
|
|
760
|
-
"tool_calls": S.optionalWith(ChatCompletionMessageToolCalls, { nullable: true }),
|
|
761
|
-
"role": ChatCompletionResponseMessageRole,
|
|
762
|
-
"function_call": S.optionalWith(
|
|
763
|
-
S.Struct({
|
|
764
|
-
"arguments": S.String,
|
|
765
|
-
"name": S.String
|
|
766
|
-
}),
|
|
767
|
-
{ nullable: true }
|
|
768
|
-
),
|
|
769
|
-
"audio": S.optionalWith(
|
|
770
|
-
S.Struct({
|
|
771
|
-
"id": S.String,
|
|
772
|
-
"expires_at": S.Int,
|
|
773
|
-
"data": S.String,
|
|
774
|
-
"transcript": S.String
|
|
775
|
-
}),
|
|
776
|
-
{ nullable: true }
|
|
777
|
-
)
|
|
917
|
+
export class UpdateChatCompletionRequest extends S.Class<UpdateChatCompletionRequest>("UpdateChatCompletionRequest")({
|
|
918
|
+
"metadata": S.NullOr(Metadata)
|
|
778
919
|
}) {}
|
|
779
920
|
|
|
780
|
-
export class
|
|
781
|
-
"token": S.String,
|
|
782
|
-
"logprob": S.Number,
|
|
783
|
-
"bytes": S.NullOr(S.Array(S.Int)),
|
|
784
|
-
"top_logprobs": S.Array(S.Struct({
|
|
785
|
-
"token": S.String,
|
|
786
|
-
"logprob": S.Number,
|
|
787
|
-
"bytes": S.NullOr(S.Array(S.Int))
|
|
788
|
-
}))
|
|
789
|
-
}) {}
|
|
921
|
+
export class ChatCompletionDeletedObject extends S.Literal("chat.completion.deleted") {}
|
|
790
922
|
|
|
791
|
-
export class
|
|
923
|
+
export class ChatCompletionDeleted extends S.Class<ChatCompletionDeleted>("ChatCompletionDeleted")({
|
|
924
|
+
"object": ChatCompletionDeletedObject,
|
|
925
|
+
"id": S.String,
|
|
926
|
+
"deleted": S.Boolean
|
|
927
|
+
}) {}
|
|
792
928
|
|
|
793
|
-
export class
|
|
929
|
+
export class GetChatCompletionMessagesParamsOrder extends S.Literal("asc", "desc") {}
|
|
794
930
|
|
|
795
|
-
export class
|
|
796
|
-
"
|
|
797
|
-
"
|
|
798
|
-
"
|
|
799
|
-
"completion_tokens_details": S.optionalWith(
|
|
800
|
-
S.Struct({
|
|
801
|
-
"accepted_prediction_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
802
|
-
"audio_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
803
|
-
"reasoning_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
804
|
-
"rejected_prediction_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const })
|
|
805
|
-
}),
|
|
806
|
-
{ nullable: true }
|
|
807
|
-
),
|
|
808
|
-
"prompt_tokens_details": S.optionalWith(
|
|
809
|
-
S.Struct({
|
|
810
|
-
"audio_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const }),
|
|
811
|
-
"cached_tokens": S.optionalWith(S.Int, { nullable: true, default: () => 0 as const })
|
|
812
|
-
}),
|
|
813
|
-
{ nullable: true }
|
|
814
|
-
)
|
|
931
|
+
export class GetChatCompletionMessagesParams extends S.Struct({
|
|
932
|
+
"after": S.optionalWith(S.String, { nullable: true }),
|
|
933
|
+
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
|
|
934
|
+
"order": S.optionalWith(GetChatCompletionMessagesParamsOrder, { nullable: true, default: () => "asc" as const })
|
|
815
935
|
}) {}
|
|
816
936
|
|
|
817
|
-
export class
|
|
818
|
-
|
|
937
|
+
export class ChatCompletionMessageListObject extends S.Literal("list") {}
|
|
938
|
+
|
|
939
|
+
export class ChatCompletionMessageList extends S.Class<ChatCompletionMessageList>("ChatCompletionMessageList")({
|
|
940
|
+
"object": ChatCompletionMessageListObject.pipe(S.propertySignature, S.withConstructorDefault(() => "list" as const)),
|
|
941
|
+
"data": S.Array(S.Struct({
|
|
819
942
|
"id": S.String,
|
|
820
|
-
"
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
"
|
|
826
|
-
"
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
943
|
+
"content": S.NullOr(S.String),
|
|
944
|
+
"refusal": S.NullOr(S.String),
|
|
945
|
+
"tool_calls": S.optionalWith(ChatCompletionMessageToolCalls, { nullable: true }),
|
|
946
|
+
"annotations": S.optionalWith(
|
|
947
|
+
S.Array(S.Struct({
|
|
948
|
+
"type": S.Literal("url_citation"),
|
|
949
|
+
"url_citation": S.Struct({
|
|
950
|
+
"end_index": S.Int,
|
|
951
|
+
"start_index": S.Int,
|
|
952
|
+
"url": S.String,
|
|
953
|
+
"title": S.String
|
|
954
|
+
})
|
|
955
|
+
})),
|
|
956
|
+
{ nullable: true }
|
|
957
|
+
),
|
|
958
|
+
"role": S.Literal("assistant"),
|
|
959
|
+
"function_call": S.optionalWith(
|
|
960
|
+
S.Struct({
|
|
961
|
+
"arguments": S.String,
|
|
962
|
+
"name": S.String
|
|
963
|
+
}),
|
|
964
|
+
{ nullable: true }
|
|
965
|
+
),
|
|
966
|
+
"audio": S.optionalWith(
|
|
967
|
+
S.Struct({
|
|
968
|
+
"id": S.String,
|
|
969
|
+
"expires_at": S.Int,
|
|
970
|
+
"data": S.String,
|
|
971
|
+
"transcript": S.String
|
|
972
|
+
}),
|
|
973
|
+
{ nullable: true }
|
|
974
|
+
)
|
|
975
|
+
})),
|
|
976
|
+
"first_id": S.String,
|
|
977
|
+
"last_id": S.String,
|
|
978
|
+
"has_more": S.Boolean
|
|
979
|
+
}) {}
|
|
837
980
|
|
|
838
981
|
export class CreateCompletionRequestModelEnum
|
|
839
982
|
extends S.Literal("gpt-3.5-turbo-instruct", "davinci-002", "babbage-002")
|
|
@@ -867,9 +1010,7 @@ export class CreateCompletionRequest extends S.Class<CreateCompletionRequest>("C
|
|
|
867
1010
|
default: () => 0 as const
|
|
868
1011
|
}),
|
|
869
1012
|
"seed": S.optionalWith(S.Int, { nullable: true }),
|
|
870
|
-
"stop": S.optionalWith(S.NullOr(
|
|
871
|
-
default: () => null
|
|
872
|
-
}),
|
|
1013
|
+
"stop": S.optionalWith(S.NullOr(StopConfiguration), { default: () => null }),
|
|
873
1014
|
"stream": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
874
1015
|
"stream_options": S.optionalWith(S.NullOr(ChatCompletionStreamOptions), { default: () => null }),
|
|
875
1016
|
"suffix": S.optionalWith(S.NullOr(S.String), { default: () => null }),
|
|
@@ -975,6 +1116,7 @@ export class OpenAIFile extends S.Struct({
|
|
|
975
1116
|
"id": S.String,
|
|
976
1117
|
"bytes": S.Int,
|
|
977
1118
|
"created_at": S.Int,
|
|
1119
|
+
"expires_at": S.optionalWith(S.Int, { nullable: true }),
|
|
978
1120
|
"filename": S.String,
|
|
979
1121
|
"object": OpenAIFileObject,
|
|
980
1122
|
"purpose": OpenAIFilePurpose,
|
|
@@ -1002,7 +1144,8 @@ export class DownloadFile200 extends S.String {}
|
|
|
1002
1144
|
|
|
1003
1145
|
export class ListPaginatedFineTuningJobsParams extends S.Struct({
|
|
1004
1146
|
"after": S.optionalWith(S.String, { nullable: true }),
|
|
1005
|
-
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const })
|
|
1147
|
+
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
|
|
1148
|
+
"metadata": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), { nullable: true })
|
|
1006
1149
|
}) {}
|
|
1007
1150
|
|
|
1008
1151
|
export class FineTuningJobHyperparametersBatchSizeEnum extends S.Literal("auto") {}
|
|
@@ -1160,7 +1303,8 @@ export class FineTuningJob extends S.Struct({
|
|
|
1160
1303
|
"integrations": S.optionalWith(S.Array(FineTuningIntegration).pipe(S.maxItems(5)), { nullable: true }),
|
|
1161
1304
|
"seed": S.Int,
|
|
1162
1305
|
"estimated_finish": S.optionalWith(S.Int, { nullable: true }),
|
|
1163
|
-
"method": S.optionalWith(FineTuneMethod, { nullable: true })
|
|
1306
|
+
"method": S.optionalWith(FineTuneMethod, { nullable: true }),
|
|
1307
|
+
"metadata": S.optionalWith(Metadata, { nullable: true })
|
|
1164
1308
|
}) {}
|
|
1165
1309
|
|
|
1166
1310
|
export class ListPaginatedFineTuningJobsResponseObject extends S.Literal("list") {}
|
|
@@ -1227,7 +1371,8 @@ export class CreateFineTuningJobRequest extends S.Class<CreateFineTuningJobReque
|
|
|
1227
1371
|
{ nullable: true }
|
|
1228
1372
|
),
|
|
1229
1373
|
"seed": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(2147483647)), { nullable: true }),
|
|
1230
|
-
"method": S.optionalWith(FineTuneMethod, { nullable: true })
|
|
1374
|
+
"method": S.optionalWith(FineTuneMethod, { nullable: true }),
|
|
1375
|
+
"metadata": S.optionalWith(Metadata, { nullable: true })
|
|
1231
1376
|
}) {}
|
|
1232
1377
|
|
|
1233
1378
|
export class ListFineTuningJobCheckpointsParams extends S.Struct({
|
|
@@ -2466,7 +2611,8 @@ export class RealtimeSessionCreateRequest
|
|
|
2466
2611
|
"threshold": S.optionalWith(S.Number, { nullable: true }),
|
|
2467
2612
|
"prefix_padding_ms": S.optionalWith(S.Int, { nullable: true }),
|
|
2468
2613
|
"silence_duration_ms": S.optionalWith(S.Int, { nullable: true }),
|
|
2469
|
-
"create_response": S.optionalWith(S.Boolean, { nullable: true, default: () => true as const })
|
|
2614
|
+
"create_response": S.optionalWith(S.Boolean, { nullable: true, default: () => true as const }),
|
|
2615
|
+
"interrupt_response": S.optionalWith(S.Boolean, { nullable: true, default: () => true as const })
|
|
2470
2616
|
}),
|
|
2471
2617
|
{ nullable: true }
|
|
2472
2618
|
),
|
|
@@ -2537,6 +2683,745 @@ export class RealtimeSessionCreateResponse
|
|
|
2537
2683
|
})
|
|
2538
2684
|
{}
|
|
2539
2685
|
|
|
2686
|
+
export class EasyInputMessageRole extends S.Literal("user", "assistant", "system", "developer") {}
|
|
2687
|
+
|
|
2688
|
+
export class InputTextType extends S.Literal("input_text") {}
|
|
2689
|
+
|
|
2690
|
+
export class InputText extends S.Struct({
|
|
2691
|
+
"type": InputTextType,
|
|
2692
|
+
"text": S.String
|
|
2693
|
+
}) {}
|
|
2694
|
+
|
|
2695
|
+
export class InputImageType extends S.Literal("input_image") {}
|
|
2696
|
+
|
|
2697
|
+
export class InputImageDetail extends S.Literal("high", "low", "auto") {}
|
|
2698
|
+
|
|
2699
|
+
export class InputImage extends S.Struct({
|
|
2700
|
+
"type": InputImageType,
|
|
2701
|
+
"image_url": S.optionalWith(S.String, { nullable: true }),
|
|
2702
|
+
"file_id": S.optionalWith(S.String, { nullable: true }),
|
|
2703
|
+
"detail": InputImageDetail.pipe(S.propertySignature, S.withConstructorDefault(() => "auto" as const))
|
|
2704
|
+
}) {}
|
|
2705
|
+
|
|
2706
|
+
export class InputFileType extends S.Literal("input_file") {}
|
|
2707
|
+
|
|
2708
|
+
export class InputFile extends S.Struct({
|
|
2709
|
+
"type": InputFileType,
|
|
2710
|
+
"file_id": S.optionalWith(S.String, { nullable: true }),
|
|
2711
|
+
"filename": S.optionalWith(S.String, { nullable: true }),
|
|
2712
|
+
"file_data": S.optionalWith(S.String, { nullable: true })
|
|
2713
|
+
}) {}
|
|
2714
|
+
|
|
2715
|
+
export class InputContent extends S.Union(InputText, InputImage, InputFile) {}
|
|
2716
|
+
|
|
2717
|
+
export class InputMessageContentList extends S.Array(InputContent) {}
|
|
2718
|
+
|
|
2719
|
+
export class EasyInputMessageType extends S.Literal("message") {}
|
|
2720
|
+
|
|
2721
|
+
export class EasyInputMessage extends S.Struct({
|
|
2722
|
+
"role": EasyInputMessageRole,
|
|
2723
|
+
"content": S.Union(S.String, InputMessageContentList),
|
|
2724
|
+
"type": S.optionalWith(EasyInputMessageType, { nullable: true })
|
|
2725
|
+
}) {}
|
|
2726
|
+
|
|
2727
|
+
export class InputMessageType extends S.Literal("message") {}
|
|
2728
|
+
|
|
2729
|
+
export class InputMessageRole extends S.Literal("user", "system", "developer") {}
|
|
2730
|
+
|
|
2731
|
+
export class InputMessageStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2732
|
+
|
|
2733
|
+
export class InputMessage extends S.Struct({
|
|
2734
|
+
"type": S.optionalWith(InputMessageType, { nullable: true }),
|
|
2735
|
+
"role": InputMessageRole,
|
|
2736
|
+
"status": S.optionalWith(InputMessageStatus, { nullable: true }),
|
|
2737
|
+
"content": InputMessageContentList
|
|
2738
|
+
}) {}
|
|
2739
|
+
|
|
2740
|
+
export class OutputMessageType extends S.Literal("message") {}
|
|
2741
|
+
|
|
2742
|
+
export class OutputMessageRole extends S.Literal("assistant") {}
|
|
2743
|
+
|
|
2744
|
+
export class OutputTextType extends S.Literal("output_text") {}
|
|
2745
|
+
|
|
2746
|
+
export class FileCitationType extends S.Literal("file_citation") {}
|
|
2747
|
+
|
|
2748
|
+
export class FileCitation extends S.Struct({
|
|
2749
|
+
"type": FileCitationType,
|
|
2750
|
+
"index": S.Int,
|
|
2751
|
+
"file_id": S.String
|
|
2752
|
+
}) {}
|
|
2753
|
+
|
|
2754
|
+
export class UrlCitationType extends S.Literal("url_citation") {}
|
|
2755
|
+
|
|
2756
|
+
export class UrlCitation extends S.Struct({
|
|
2757
|
+
"url": S.String,
|
|
2758
|
+
"title": S.String,
|
|
2759
|
+
"type": UrlCitationType,
|
|
2760
|
+
"start_index": S.Int,
|
|
2761
|
+
"end_index": S.Int
|
|
2762
|
+
}) {}
|
|
2763
|
+
|
|
2764
|
+
export class FilePathType extends S.Literal("file_path") {}
|
|
2765
|
+
|
|
2766
|
+
export class FilePath extends S.Struct({
|
|
2767
|
+
"type": FilePathType,
|
|
2768
|
+
"file_id": S.String,
|
|
2769
|
+
"index": S.Int
|
|
2770
|
+
}) {}
|
|
2771
|
+
|
|
2772
|
+
export class Annotation extends S.Union(FileCitation, UrlCitation, FilePath) {}
|
|
2773
|
+
|
|
2774
|
+
export class OutputText extends S.Struct({
|
|
2775
|
+
"type": OutputTextType,
|
|
2776
|
+
"text": S.String,
|
|
2777
|
+
"annotations": S.Array(Annotation)
|
|
2778
|
+
}) {}
|
|
2779
|
+
|
|
2780
|
+
export class RefusalType extends S.Literal("refusal") {}
|
|
2781
|
+
|
|
2782
|
+
export class Refusal extends S.Struct({
|
|
2783
|
+
"type": RefusalType,
|
|
2784
|
+
"refusal": S.String
|
|
2785
|
+
}) {}
|
|
2786
|
+
|
|
2787
|
+
export class OutputContent extends S.Union(OutputText, Refusal) {}
|
|
2788
|
+
|
|
2789
|
+
export class OutputMessageStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2790
|
+
|
|
2791
|
+
export class OutputMessage extends S.Struct({
|
|
2792
|
+
"id": S.String,
|
|
2793
|
+
"type": OutputMessageType,
|
|
2794
|
+
"role": OutputMessageRole,
|
|
2795
|
+
"content": S.Array(OutputContent),
|
|
2796
|
+
"status": OutputMessageStatus
|
|
2797
|
+
}) {}
|
|
2798
|
+
|
|
2799
|
+
export class FileSearchToolCallType extends S.Literal("file_search_call") {}
|
|
2800
|
+
|
|
2801
|
+
export class FileSearchToolCallStatus
|
|
2802
|
+
extends S.Literal("in_progress", "searching", "completed", "incomplete", "failed")
|
|
2803
|
+
{}
|
|
2804
|
+
|
|
2805
|
+
export class VectorStoreFileAttributes extends S.Record({ key: S.String, value: S.Unknown }) {}
|
|
2806
|
+
|
|
2807
|
+
export class FileSearchToolCall extends S.Struct({
|
|
2808
|
+
"id": S.String,
|
|
2809
|
+
"type": FileSearchToolCallType,
|
|
2810
|
+
"status": FileSearchToolCallStatus,
|
|
2811
|
+
"queries": S.Array(S.String),
|
|
2812
|
+
"results": S.optionalWith(
|
|
2813
|
+
S.Array(S.Struct({
|
|
2814
|
+
"file_id": S.optionalWith(S.String, { nullable: true }),
|
|
2815
|
+
"text": S.optionalWith(S.String, { nullable: true }),
|
|
2816
|
+
"filename": S.optionalWith(S.String, { nullable: true }),
|
|
2817
|
+
"attributes": S.optionalWith(VectorStoreFileAttributes, { nullable: true }),
|
|
2818
|
+
"score": S.optionalWith(S.Number, { nullable: true })
|
|
2819
|
+
})),
|
|
2820
|
+
{ nullable: true }
|
|
2821
|
+
)
|
|
2822
|
+
}) {}
|
|
2823
|
+
|
|
2824
|
+
export class ComputerToolCallType extends S.Literal("computer_call") {}
|
|
2825
|
+
|
|
2826
|
+
export class ClickType extends S.Literal("click") {}
|
|
2827
|
+
|
|
2828
|
+
export class ClickButton extends S.Literal("left", "right", "wheel", "back", "forward") {}
|
|
2829
|
+
|
|
2830
|
+
export class Click extends S.Struct({
|
|
2831
|
+
"type": ClickType.pipe(S.propertySignature, S.withConstructorDefault(() => "click" as const)),
|
|
2832
|
+
"button": ClickButton,
|
|
2833
|
+
"x": S.Int,
|
|
2834
|
+
"y": S.Int
|
|
2835
|
+
}) {}
|
|
2836
|
+
|
|
2837
|
+
export class DoubleClickType extends S.Literal("double_click") {}
|
|
2838
|
+
|
|
2839
|
+
export class DoubleClick extends S.Struct({
|
|
2840
|
+
"type": DoubleClickType.pipe(S.propertySignature, S.withConstructorDefault(() => "double_click" as const)),
|
|
2841
|
+
"x": S.Int,
|
|
2842
|
+
"y": S.Int
|
|
2843
|
+
}) {}
|
|
2844
|
+
|
|
2845
|
+
export class DragType extends S.Literal("drag") {}
|
|
2846
|
+
|
|
2847
|
+
export class Coordinate extends S.Struct({
|
|
2848
|
+
"x": S.Int,
|
|
2849
|
+
"y": S.Int
|
|
2850
|
+
}) {}
|
|
2851
|
+
|
|
2852
|
+
export class Drag extends S.Struct({
|
|
2853
|
+
"type": DragType.pipe(S.propertySignature, S.withConstructorDefault(() => "drag" as const)),
|
|
2854
|
+
"path": S.Array(Coordinate)
|
|
2855
|
+
}) {}
|
|
2856
|
+
|
|
2857
|
+
export class KeyPressType extends S.Literal("keypress") {}
|
|
2858
|
+
|
|
2859
|
+
export class KeyPress extends S.Struct({
|
|
2860
|
+
"type": KeyPressType.pipe(S.propertySignature, S.withConstructorDefault(() => "keypress" as const)),
|
|
2861
|
+
"keys": S.Array(S.String)
|
|
2862
|
+
}) {}
|
|
2863
|
+
|
|
2864
|
+
export class MoveType extends S.Literal("move") {}
|
|
2865
|
+
|
|
2866
|
+
export class Move extends S.Struct({
|
|
2867
|
+
"type": MoveType.pipe(S.propertySignature, S.withConstructorDefault(() => "move" as const)),
|
|
2868
|
+
"x": S.Int,
|
|
2869
|
+
"y": S.Int
|
|
2870
|
+
}) {}
|
|
2871
|
+
|
|
2872
|
+
export class ScreenshotType extends S.Literal("screenshot") {}
|
|
2873
|
+
|
|
2874
|
+
export class Screenshot extends S.Struct({
|
|
2875
|
+
"type": ScreenshotType.pipe(S.propertySignature, S.withConstructorDefault(() => "screenshot" as const))
|
|
2876
|
+
}) {}
|
|
2877
|
+
|
|
2878
|
+
export class ScrollType extends S.Literal("scroll") {}
|
|
2879
|
+
|
|
2880
|
+
export class Scroll extends S.Struct({
|
|
2881
|
+
"type": ScrollType.pipe(S.propertySignature, S.withConstructorDefault(() => "scroll" as const)),
|
|
2882
|
+
"x": S.Int,
|
|
2883
|
+
"y": S.Int,
|
|
2884
|
+
"scroll_x": S.Int,
|
|
2885
|
+
"scroll_y": S.Int
|
|
2886
|
+
}) {}
|
|
2887
|
+
|
|
2888
|
+
export class TypeType extends S.Literal("type") {}
|
|
2889
|
+
|
|
2890
|
+
export class Type extends S.Struct({
|
|
2891
|
+
"type": TypeType.pipe(S.propertySignature, S.withConstructorDefault(() => "type" as const)),
|
|
2892
|
+
"text": S.String
|
|
2893
|
+
}) {}
|
|
2894
|
+
|
|
2895
|
+
export class WaitType extends S.Literal("wait") {}
|
|
2896
|
+
|
|
2897
|
+
export class Wait extends S.Struct({
|
|
2898
|
+
"type": WaitType.pipe(S.propertySignature, S.withConstructorDefault(() => "wait" as const))
|
|
2899
|
+
}) {}
|
|
2900
|
+
|
|
2901
|
+
export class ComputerAction extends S.Union(Click, DoubleClick, Drag, KeyPress, Move, Screenshot, Scroll, Type, Wait) {}
|
|
2902
|
+
|
|
2903
|
+
export class ComputerToolCallSafetyCheck extends S.Struct({
|
|
2904
|
+
"id": S.String,
|
|
2905
|
+
"code": S.String,
|
|
2906
|
+
"message": S.String
|
|
2907
|
+
}) {}
|
|
2908
|
+
|
|
2909
|
+
export class ComputerToolCallStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2910
|
+
|
|
2911
|
+
export class ComputerToolCall extends S.Struct({
|
|
2912
|
+
"type": ComputerToolCallType.pipe(S.propertySignature, S.withConstructorDefault(() => "computer_call" as const)),
|
|
2913
|
+
"id": S.String,
|
|
2914
|
+
"call_id": S.String,
|
|
2915
|
+
"action": ComputerAction,
|
|
2916
|
+
"pending_safety_checks": S.Array(ComputerToolCallSafetyCheck),
|
|
2917
|
+
"status": ComputerToolCallStatus
|
|
2918
|
+
}) {}
|
|
2919
|
+
|
|
2920
|
+
export class ComputerToolCallOutputType extends S.Literal("computer_call_output") {}
|
|
2921
|
+
|
|
2922
|
+
export class ComputerScreenshotImageType extends S.Literal("computer_screenshot") {}
|
|
2923
|
+
|
|
2924
|
+
export class ComputerScreenshotImage extends S.Struct({
|
|
2925
|
+
"type": ComputerScreenshotImageType.pipe(
|
|
2926
|
+
S.propertySignature,
|
|
2927
|
+
S.withConstructorDefault(() => "computer_screenshot" as const)
|
|
2928
|
+
),
|
|
2929
|
+
"image_url": S.optionalWith(S.String, { nullable: true }),
|
|
2930
|
+
"file_id": S.optionalWith(S.String, { nullable: true })
|
|
2931
|
+
}) {}
|
|
2932
|
+
|
|
2933
|
+
export class ComputerToolCallOutputStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2934
|
+
|
|
2935
|
+
export class ComputerToolCallOutput extends S.Struct({
|
|
2936
|
+
"type": ComputerToolCallOutputType.pipe(
|
|
2937
|
+
S.propertySignature,
|
|
2938
|
+
S.withConstructorDefault(() => "computer_call_output" as const)
|
|
2939
|
+
),
|
|
2940
|
+
"id": S.optionalWith(S.String, { nullable: true }),
|
|
2941
|
+
"call_id": S.String,
|
|
2942
|
+
"acknowledged_safety_checks": S.optionalWith(S.Array(ComputerToolCallSafetyCheck), { nullable: true }),
|
|
2943
|
+
"output": ComputerScreenshotImage,
|
|
2944
|
+
"status": S.optionalWith(ComputerToolCallOutputStatus, { nullable: true })
|
|
2945
|
+
}) {}
|
|
2946
|
+
|
|
2947
|
+
export class WebSearchToolCallType extends S.Literal("web_search_call") {}
|
|
2948
|
+
|
|
2949
|
+
export class WebSearchToolCallStatus extends S.Literal("in_progress", "searching", "completed", "failed") {}
|
|
2950
|
+
|
|
2951
|
+
export class WebSearchToolCall extends S.Struct({
|
|
2952
|
+
"id": S.String,
|
|
2953
|
+
"type": WebSearchToolCallType,
|
|
2954
|
+
"status": WebSearchToolCallStatus
|
|
2955
|
+
}) {}
|
|
2956
|
+
|
|
2957
|
+
export class FunctionToolCallType extends S.Literal("function_call") {}
|
|
2958
|
+
|
|
2959
|
+
export class FunctionToolCallStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2960
|
+
|
|
2961
|
+
export class FunctionToolCall extends S.Struct({
|
|
2962
|
+
"id": S.String,
|
|
2963
|
+
"type": FunctionToolCallType,
|
|
2964
|
+
"call_id": S.String,
|
|
2965
|
+
"name": S.String,
|
|
2966
|
+
"arguments": S.String,
|
|
2967
|
+
"status": S.optionalWith(FunctionToolCallStatus, { nullable: true })
|
|
2968
|
+
}) {}
|
|
2969
|
+
|
|
2970
|
+
export class FunctionToolCallOutputType extends S.Literal("function_call_output") {}
|
|
2971
|
+
|
|
2972
|
+
export class FunctionToolCallOutputStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2973
|
+
|
|
2974
|
+
export class FunctionToolCallOutput extends S.Struct({
|
|
2975
|
+
"id": S.optionalWith(S.String, { nullable: true }),
|
|
2976
|
+
"type": FunctionToolCallOutputType,
|
|
2977
|
+
"call_id": S.String,
|
|
2978
|
+
"output": S.String,
|
|
2979
|
+
"status": S.optionalWith(FunctionToolCallOutputStatus, { nullable: true })
|
|
2980
|
+
}) {}
|
|
2981
|
+
|
|
2982
|
+
export class ReasoningItemType extends S.Literal("reasoning") {}
|
|
2983
|
+
|
|
2984
|
+
export class ReasoningItemStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
2985
|
+
|
|
2986
|
+
export class ReasoningItem extends S.Struct({
|
|
2987
|
+
"type": ReasoningItemType,
|
|
2988
|
+
"id": S.String,
|
|
2989
|
+
"content": S.Array(S.Struct({
|
|
2990
|
+
"type": S.Literal("reasoning_summary"),
|
|
2991
|
+
"text": S.String
|
|
2992
|
+
})),
|
|
2993
|
+
"status": S.optionalWith(ReasoningItemStatus, { nullable: true })
|
|
2994
|
+
}) {}
|
|
2995
|
+
|
|
2996
|
+
export class Item extends S.Record({ key: S.String, value: S.Unknown }) {}
|
|
2997
|
+
|
|
2998
|
+
export class ItemReferenceType extends S.Literal("item_reference") {}
|
|
2999
|
+
|
|
3000
|
+
export class ItemReference extends S.Struct({
|
|
3001
|
+
"id": S.String,
|
|
3002
|
+
"type": ItemReferenceType
|
|
3003
|
+
}) {}
|
|
3004
|
+
|
|
3005
|
+
export class InputItem
|
|
3006
|
+
extends S.Union(EasyInputMessage, S.Record({ key: S.String, value: S.Unknown }), ItemReference)
|
|
3007
|
+
{}
|
|
3008
|
+
|
|
3009
|
+
export class Includable extends S.Literal(
|
|
3010
|
+
"file_search_call.results",
|
|
3011
|
+
"message.input_image.image_url",
|
|
3012
|
+
"computer_call_output.output.image_url"
|
|
3013
|
+
) {}
|
|
3014
|
+
|
|
3015
|
+
export class ReasoningGenerateSummary extends S.Literal("concise", "detailed") {}
|
|
3016
|
+
|
|
3017
|
+
export class Reasoning extends S.Struct({
|
|
3018
|
+
"effort": S.NullOr(ReasoningEffort).pipe(S.propertySignature, S.withConstructorDefault(() => "medium" as const)),
|
|
3019
|
+
"generate_summary": S.optionalWith(ReasoningGenerateSummary, { nullable: true })
|
|
3020
|
+
}) {}
|
|
3021
|
+
|
|
3022
|
+
export class TextResponseFormatJsonSchemaType extends S.Literal("json_schema") {}
|
|
3023
|
+
|
|
3024
|
+
export class TextResponseFormatJsonSchema extends S.Struct({
|
|
3025
|
+
"type": TextResponseFormatJsonSchemaType,
|
|
3026
|
+
"description": S.optionalWith(S.String, { nullable: true }),
|
|
3027
|
+
"name": S.optionalWith(S.String, { nullable: true }),
|
|
3028
|
+
"schema": ResponseFormatJsonSchemaSchema,
|
|
3029
|
+
"strict": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const })
|
|
3030
|
+
}) {}
|
|
3031
|
+
|
|
3032
|
+
export class TextResponseFormatConfiguration
|
|
3033
|
+
extends S.Union(ResponseFormatText, TextResponseFormatJsonSchema, ResponseFormatJsonObject)
|
|
3034
|
+
{}
|
|
3035
|
+
|
|
3036
|
+
export class FileSearchToolType extends S.Literal("file_search") {}
|
|
3037
|
+
|
|
3038
|
+
export class ComparisonFilterType extends S.Literal("eq", "ne", "gt", "gte", "lt", "lte") {}
|
|
3039
|
+
|
|
3040
|
+
export class ComparisonFilter extends S.Struct({
|
|
3041
|
+
"type": ComparisonFilterType.pipe(S.propertySignature, S.withConstructorDefault(() => "eq" as const)),
|
|
3042
|
+
"key": S.String,
|
|
3043
|
+
"value": S.Union(S.String, S.Number, S.Boolean)
|
|
3044
|
+
}) {}
|
|
3045
|
+
|
|
3046
|
+
export class CompoundFilterType extends S.Literal("and", "or") {}
|
|
3047
|
+
|
|
3048
|
+
export class CompoundFilter extends S.Struct({
|
|
3049
|
+
"type": CompoundFilterType,
|
|
3050
|
+
"filters": S.Array(ComparisonFilter)
|
|
3051
|
+
}) {}
|
|
3052
|
+
|
|
3053
|
+
export class FileSearchToolRankingOptionsRanker extends S.Literal("auto", "default-2024-11-15") {}
|
|
3054
|
+
|
|
3055
|
+
export class FileSearchTool extends S.Struct({
|
|
3056
|
+
"type": FileSearchToolType,
|
|
3057
|
+
"vector_store_ids": S.Array(S.String),
|
|
3058
|
+
"max_num_results": S.optionalWith(S.Int, { nullable: true }),
|
|
3059
|
+
"filters": S.optionalWith(S.Union(ComparisonFilter, CompoundFilter), { nullable: true }),
|
|
3060
|
+
"ranking_options": S.optionalWith(
|
|
3061
|
+
S.Struct({
|
|
3062
|
+
"ranker": S.optionalWith(FileSearchToolRankingOptionsRanker, { nullable: true, default: () => "auto" as const }),
|
|
3063
|
+
"score_threshold": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1)), {
|
|
3064
|
+
nullable: true,
|
|
3065
|
+
default: () => 0 as const
|
|
3066
|
+
})
|
|
3067
|
+
}),
|
|
3068
|
+
{ nullable: true }
|
|
3069
|
+
)
|
|
3070
|
+
}) {}
|
|
3071
|
+
|
|
3072
|
+
export class FunctionToolType extends S.Literal("function") {}
|
|
3073
|
+
|
|
3074
|
+
export class FunctionTool extends S.Struct({
|
|
3075
|
+
"type": FunctionToolType,
|
|
3076
|
+
"name": S.String,
|
|
3077
|
+
"description": S.optionalWith(S.String, { nullable: true }),
|
|
3078
|
+
"parameters": S.Record({ key: S.String, value: S.Unknown }),
|
|
3079
|
+
"strict": S.Boolean
|
|
3080
|
+
}) {}
|
|
3081
|
+
|
|
3082
|
+
export class ComputerToolType extends S.Literal("computer-preview") {}
|
|
3083
|
+
|
|
3084
|
+
export class ComputerToolEnvironment extends S.Literal("mac", "windows", "ubuntu", "browser") {}
|
|
3085
|
+
|
|
3086
|
+
export class ComputerTool extends S.Struct({
|
|
3087
|
+
"type": ComputerToolType,
|
|
3088
|
+
"display_width": S.Number,
|
|
3089
|
+
"display_height": S.Number,
|
|
3090
|
+
"environment": ComputerToolEnvironment
|
|
3091
|
+
}) {}
|
|
3092
|
+
|
|
3093
|
+
export class WebSearchToolType extends S.Literal("web_search_preview", "web_search_preview_2025_03_11") {}
|
|
3094
|
+
|
|
3095
|
+
export class WebSearchToolUserLocationEnumType extends S.Literal("approximate") {}
|
|
3096
|
+
|
|
3097
|
+
export class WebSearchToolUserLocation extends S.Struct({
|
|
3098
|
+
"type": S.Literal("approximate"),
|
|
3099
|
+
"country": S.optionalWith(S.String, { nullable: true }),
|
|
3100
|
+
"region": S.optionalWith(S.String, { nullable: true }),
|
|
3101
|
+
"city": S.optionalWith(S.String, { nullable: true }),
|
|
3102
|
+
"timezone": S.optionalWith(S.String, { nullable: true })
|
|
3103
|
+
}) {}
|
|
3104
|
+
|
|
3105
|
+
export class WebSearchTool extends S.Struct({
|
|
3106
|
+
"type": WebSearchToolType,
|
|
3107
|
+
"user_location": S.optionalWith(WebSearchToolUserLocation, { nullable: true }),
|
|
3108
|
+
"search_context_size": S.optionalWith(WebSearchContextSize, { nullable: true, default: () => "medium" as const })
|
|
3109
|
+
}) {}
|
|
3110
|
+
|
|
3111
|
+
export class Tool extends S.Union(FileSearchTool, FunctionTool, ComputerTool, WebSearchTool) {}
|
|
3112
|
+
|
|
3113
|
+
export class ToolChoiceOptions extends S.Literal("none", "auto", "required") {}
|
|
3114
|
+
|
|
3115
|
+
export class ToolChoiceTypesType
|
|
3116
|
+
extends S.Literal("file_search", "web_search_preview", "computer_use_preview", "web_search_preview_2025_03_11")
|
|
3117
|
+
{}
|
|
3118
|
+
|
|
3119
|
+
export class ToolChoiceTypes extends S.Struct({
|
|
3120
|
+
"type": ToolChoiceTypesType
|
|
3121
|
+
}) {}
|
|
3122
|
+
|
|
3123
|
+
export class ToolChoiceFunctionType extends S.Literal("function") {}
|
|
3124
|
+
|
|
3125
|
+
export class ToolChoiceFunction extends S.Struct({
|
|
3126
|
+
"type": ToolChoiceFunctionType,
|
|
3127
|
+
"name": S.String
|
|
3128
|
+
}) {}
|
|
3129
|
+
|
|
3130
|
+
export class CreateResponseTruncation extends S.Literal("auto", "disabled") {}
|
|
3131
|
+
|
|
3132
|
+
export class CreateResponseModelEnum extends S.Literal(
|
|
3133
|
+
"o3-mini",
|
|
3134
|
+
"o3-mini-2025-01-31",
|
|
3135
|
+
"o1",
|
|
3136
|
+
"o1-2024-12-17",
|
|
3137
|
+
"o1-preview",
|
|
3138
|
+
"o1-preview-2024-09-12",
|
|
3139
|
+
"o1-mini",
|
|
3140
|
+
"o1-mini-2024-09-12",
|
|
3141
|
+
"computer-use-preview",
|
|
3142
|
+
"computer-use-preview-2025-02-04",
|
|
3143
|
+
"computer-use-preview-2025-03-11",
|
|
3144
|
+
"gpt-4.5-preview",
|
|
3145
|
+
"gpt-4.5-preview-2025-02-27",
|
|
3146
|
+
"gpt-4o",
|
|
3147
|
+
"gpt-4o-2024-11-20",
|
|
3148
|
+
"gpt-4o-2024-08-06",
|
|
3149
|
+
"gpt-4o-2024-05-13",
|
|
3150
|
+
"gpt-4o-audio-preview",
|
|
3151
|
+
"gpt-4o-audio-preview-2024-10-01",
|
|
3152
|
+
"gpt-4o-audio-preview-2024-12-17",
|
|
3153
|
+
"gpt-4o-mini-audio-preview",
|
|
3154
|
+
"gpt-4o-mini-audio-preview-2024-12-17",
|
|
3155
|
+
"chatgpt-4o-latest",
|
|
3156
|
+
"gpt-4o-mini",
|
|
3157
|
+
"gpt-4o-mini-2024-07-18",
|
|
3158
|
+
"gpt-4-turbo",
|
|
3159
|
+
"gpt-4-turbo-2024-04-09",
|
|
3160
|
+
"gpt-4-0125-preview",
|
|
3161
|
+
"gpt-4-turbo-preview",
|
|
3162
|
+
"gpt-4-1106-preview",
|
|
3163
|
+
"gpt-4-vision-preview",
|
|
3164
|
+
"gpt-4",
|
|
3165
|
+
"gpt-4-0314",
|
|
3166
|
+
"gpt-4-0613",
|
|
3167
|
+
"gpt-4-32k",
|
|
3168
|
+
"gpt-4-32k-0314",
|
|
3169
|
+
"gpt-4-32k-0613",
|
|
3170
|
+
"gpt-3.5-turbo",
|
|
3171
|
+
"gpt-3.5-turbo-16k",
|
|
3172
|
+
"gpt-3.5-turbo-0301",
|
|
3173
|
+
"gpt-3.5-turbo-0613",
|
|
3174
|
+
"gpt-3.5-turbo-1106",
|
|
3175
|
+
"gpt-3.5-turbo-0125",
|
|
3176
|
+
"gpt-3.5-turbo-16k-0613"
|
|
3177
|
+
) {}
|
|
3178
|
+
|
|
3179
|
+
export class CreateResponse extends S.Class<CreateResponse>("CreateResponse")({
|
|
3180
|
+
"input": S.Union(S.String, S.Array(InputItem)),
|
|
3181
|
+
"include": S.optionalWith(S.Array(Includable), { nullable: true }),
|
|
3182
|
+
"parallel_tool_calls": S.optionalWith(S.Boolean, { nullable: true, default: () => true as const }),
|
|
3183
|
+
"store": S.optionalWith(S.Boolean, { nullable: true, default: () => true as const }),
|
|
3184
|
+
"stream": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
3185
|
+
"previous_response_id": S.optionalWith(S.String, { nullable: true }),
|
|
3186
|
+
"reasoning": S.optionalWith(Reasoning, { nullable: true }),
|
|
3187
|
+
"max_output_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
3188
|
+
"instructions": S.optionalWith(S.String, { nullable: true }),
|
|
3189
|
+
"text": S.optionalWith(
|
|
3190
|
+
S.Struct({
|
|
3191
|
+
"format": S.optionalWith(TextResponseFormatConfiguration, { nullable: true })
|
|
3192
|
+
}),
|
|
3193
|
+
{ nullable: true }
|
|
3194
|
+
),
|
|
3195
|
+
"tools": S.optionalWith(S.Array(Tool), { nullable: true }),
|
|
3196
|
+
"tool_choice": S.optionalWith(S.Union(ToolChoiceOptions, ToolChoiceTypes, ToolChoiceFunction), { nullable: true }),
|
|
3197
|
+
"truncation": S.optionalWith(CreateResponseTruncation, { nullable: true, default: () => "disabled" as const }),
|
|
3198
|
+
"model": S.Union(S.String, CreateResponseModelEnum),
|
|
3199
|
+
"metadata": S.optionalWith(Metadata, { nullable: true }),
|
|
3200
|
+
"temperature": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(2)), {
|
|
3201
|
+
nullable: true,
|
|
3202
|
+
default: () => 1 as const
|
|
3203
|
+
}),
|
|
3204
|
+
"top_p": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1)), {
|
|
3205
|
+
nullable: true,
|
|
3206
|
+
default: () => 1 as const
|
|
3207
|
+
}),
|
|
3208
|
+
"user": S.optionalWith(S.String, { nullable: true })
|
|
3209
|
+
}) {}
|
|
3210
|
+
|
|
3211
|
+
export class ResponseObject extends S.Literal("response") {}
|
|
3212
|
+
|
|
3213
|
+
export class ResponseStatus extends S.Literal("completed", "failed", "in_progress", "incomplete") {}
|
|
3214
|
+
|
|
3215
|
+
export class ResponseErrorCode extends S.Literal(
|
|
3216
|
+
"server_error",
|
|
3217
|
+
"rate_limit_exceeded",
|
|
3218
|
+
"invalid_prompt",
|
|
3219
|
+
"vector_store_timeout",
|
|
3220
|
+
"invalid_image",
|
|
3221
|
+
"invalid_image_format",
|
|
3222
|
+
"invalid_base64_image",
|
|
3223
|
+
"invalid_image_url",
|
|
3224
|
+
"image_too_large",
|
|
3225
|
+
"image_too_small",
|
|
3226
|
+
"image_parse_error",
|
|
3227
|
+
"image_content_policy_violation",
|
|
3228
|
+
"invalid_image_mode",
|
|
3229
|
+
"image_file_too_large",
|
|
3230
|
+
"unsupported_image_media_type",
|
|
3231
|
+
"empty_image_file",
|
|
3232
|
+
"failed_to_download_image",
|
|
3233
|
+
"image_file_not_found"
|
|
3234
|
+
) {}
|
|
3235
|
+
|
|
3236
|
+
export class ResponseError extends S.Struct({
|
|
3237
|
+
"code": ResponseErrorCode,
|
|
3238
|
+
"message": S.String
|
|
3239
|
+
}) {}
|
|
3240
|
+
|
|
3241
|
+
export class ResponseIncompleteDetailsReason extends S.Literal("max_output_tokens", "content_filter") {}
|
|
3242
|
+
|
|
3243
|
+
export class OutputItem extends S.Union(
|
|
3244
|
+
OutputMessage,
|
|
3245
|
+
FileSearchToolCall,
|
|
3246
|
+
FunctionToolCall,
|
|
3247
|
+
WebSearchToolCall,
|
|
3248
|
+
ComputerToolCall,
|
|
3249
|
+
ReasoningItem
|
|
3250
|
+
) {}
|
|
3251
|
+
|
|
3252
|
+
export class ResponseUsage extends S.Struct({
|
|
3253
|
+
"input_tokens": S.Int,
|
|
3254
|
+
"output_tokens": S.Int,
|
|
3255
|
+
"output_tokens_details": S.Struct({
|
|
3256
|
+
"reasoning_tokens": S.Int
|
|
3257
|
+
}),
|
|
3258
|
+
"total_tokens": S.Int
|
|
3259
|
+
}) {}
|
|
3260
|
+
|
|
3261
|
+
export class ResponseTruncation extends S.Literal("auto", "disabled") {}
|
|
3262
|
+
|
|
3263
|
+
export class ResponseModelEnum extends S.Literal(
|
|
3264
|
+
"o3-mini",
|
|
3265
|
+
"o3-mini-2025-01-31",
|
|
3266
|
+
"o1",
|
|
3267
|
+
"o1-2024-12-17",
|
|
3268
|
+
"o1-preview",
|
|
3269
|
+
"o1-preview-2024-09-12",
|
|
3270
|
+
"o1-mini",
|
|
3271
|
+
"o1-mini-2024-09-12",
|
|
3272
|
+
"computer-use-preview",
|
|
3273
|
+
"computer-use-preview-2025-02-04",
|
|
3274
|
+
"computer-use-preview-2025-03-11",
|
|
3275
|
+
"gpt-4.5-preview",
|
|
3276
|
+
"gpt-4.5-preview-2025-02-27",
|
|
3277
|
+
"gpt-4o",
|
|
3278
|
+
"gpt-4o-2024-11-20",
|
|
3279
|
+
"gpt-4o-2024-08-06",
|
|
3280
|
+
"gpt-4o-2024-05-13",
|
|
3281
|
+
"gpt-4o-audio-preview",
|
|
3282
|
+
"gpt-4o-audio-preview-2024-10-01",
|
|
3283
|
+
"gpt-4o-audio-preview-2024-12-17",
|
|
3284
|
+
"gpt-4o-mini-audio-preview",
|
|
3285
|
+
"gpt-4o-mini-audio-preview-2024-12-17",
|
|
3286
|
+
"chatgpt-4o-latest",
|
|
3287
|
+
"gpt-4o-mini",
|
|
3288
|
+
"gpt-4o-mini-2024-07-18",
|
|
3289
|
+
"gpt-4-turbo",
|
|
3290
|
+
"gpt-4-turbo-2024-04-09",
|
|
3291
|
+
"gpt-4-0125-preview",
|
|
3292
|
+
"gpt-4-turbo-preview",
|
|
3293
|
+
"gpt-4-1106-preview",
|
|
3294
|
+
"gpt-4-vision-preview",
|
|
3295
|
+
"gpt-4",
|
|
3296
|
+
"gpt-4-0314",
|
|
3297
|
+
"gpt-4-0613",
|
|
3298
|
+
"gpt-4-32k",
|
|
3299
|
+
"gpt-4-32k-0314",
|
|
3300
|
+
"gpt-4-32k-0613",
|
|
3301
|
+
"gpt-3.5-turbo",
|
|
3302
|
+
"gpt-3.5-turbo-16k",
|
|
3303
|
+
"gpt-3.5-turbo-0301",
|
|
3304
|
+
"gpt-3.5-turbo-0613",
|
|
3305
|
+
"gpt-3.5-turbo-1106",
|
|
3306
|
+
"gpt-3.5-turbo-0125",
|
|
3307
|
+
"gpt-3.5-turbo-16k-0613"
|
|
3308
|
+
) {}
|
|
3309
|
+
|
|
3310
|
+
export class Response extends S.Class<Response>("Response")({
|
|
3311
|
+
"id": S.String,
|
|
3312
|
+
"object": ResponseObject,
|
|
3313
|
+
"status": S.optionalWith(ResponseStatus, { nullable: true }),
|
|
3314
|
+
"created_at": S.Number,
|
|
3315
|
+
"error": S.NullOr(ResponseError),
|
|
3316
|
+
"incomplete_details": S.NullOr(S.Struct({
|
|
3317
|
+
"reason": S.optionalWith(ResponseIncompleteDetailsReason, { nullable: true })
|
|
3318
|
+
})),
|
|
3319
|
+
"output": S.Array(OutputItem),
|
|
3320
|
+
"output_text": S.optionalWith(S.String, { nullable: true }),
|
|
3321
|
+
"usage": S.optionalWith(ResponseUsage, { nullable: true }),
|
|
3322
|
+
"parallel_tool_calls": S.Boolean.pipe(S.propertySignature, S.withConstructorDefault(() => true as const)),
|
|
3323
|
+
"previous_response_id": S.optionalWith(S.String, { nullable: true }),
|
|
3324
|
+
"reasoning": S.optionalWith(Reasoning, { nullable: true }),
|
|
3325
|
+
"max_output_tokens": S.optionalWith(S.Int, { nullable: true }),
|
|
3326
|
+
"instructions": S.NullOr(S.String),
|
|
3327
|
+
"text": S.optionalWith(
|
|
3328
|
+
S.Struct({
|
|
3329
|
+
"format": S.optionalWith(TextResponseFormatConfiguration, { nullable: true })
|
|
3330
|
+
}),
|
|
3331
|
+
{ nullable: true }
|
|
3332
|
+
),
|
|
3333
|
+
"tools": S.Array(Tool),
|
|
3334
|
+
"tool_choice": S.Union(ToolChoiceOptions, ToolChoiceTypes, ToolChoiceFunction),
|
|
3335
|
+
"truncation": S.optionalWith(ResponseTruncation, { nullable: true, default: () => "disabled" as const }),
|
|
3336
|
+
"model": S.Union(S.String, ResponseModelEnum),
|
|
3337
|
+
"metadata": S.NullOr(Metadata),
|
|
3338
|
+
"temperature": S.NullOr(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(2))).pipe(
|
|
3339
|
+
S.propertySignature,
|
|
3340
|
+
S.withConstructorDefault(() => 1 as const)
|
|
3341
|
+
),
|
|
3342
|
+
"top_p": S.NullOr(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1))).pipe(
|
|
3343
|
+
S.propertySignature,
|
|
3344
|
+
S.withConstructorDefault(() => 1 as const)
|
|
3345
|
+
),
|
|
3346
|
+
"user": S.optionalWith(S.String, { nullable: true })
|
|
3347
|
+
}) {}
|
|
3348
|
+
|
|
3349
|
+
export class GetResponseParams extends S.Struct({
|
|
3350
|
+
"include": S.optionalWith(S.Array(Includable), { nullable: true })
|
|
3351
|
+
}) {}
|
|
3352
|
+
|
|
3353
|
+
export class ListInputItemsParamsOrder extends S.Literal("asc", "desc") {}
|
|
3354
|
+
|
|
3355
|
+
export class ListInputItemsParams extends S.Struct({
|
|
3356
|
+
"limit": S.optionalWith(S.Int, { nullable: true, default: () => 20 as const }),
|
|
3357
|
+
"order": S.optionalWith(ListInputItemsParamsOrder, { nullable: true }),
|
|
3358
|
+
"after": S.optionalWith(S.String, { nullable: true }),
|
|
3359
|
+
"before": S.optionalWith(S.String, { nullable: true })
|
|
3360
|
+
}) {}
|
|
3361
|
+
|
|
3362
|
+
export class ResponseItemListObject extends S.Literal("list") {}
|
|
3363
|
+
|
|
3364
|
+
export class InputMessageResourceType extends S.Literal("message") {}
|
|
3365
|
+
|
|
3366
|
+
export class InputMessageResourceRole extends S.Literal("user", "system", "developer") {}
|
|
3367
|
+
|
|
3368
|
+
export class InputMessageResourceStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
3369
|
+
|
|
3370
|
+
export class InputMessageResource extends S.Struct({
|
|
3371
|
+
"id": S.String,
|
|
3372
|
+
"type": S.optionalWith(InputMessageResourceType, { nullable: true }),
|
|
3373
|
+
"role": InputMessageResourceRole,
|
|
3374
|
+
"status": S.optionalWith(InputMessageResourceStatus, { nullable: true }),
|
|
3375
|
+
"content": InputMessageContentList
|
|
3376
|
+
}) {}
|
|
3377
|
+
|
|
3378
|
+
export class ComputerToolCallOutputResourceType extends S.Literal("computer_call_output") {}
|
|
3379
|
+
|
|
3380
|
+
export class ComputerToolCallOutputResourceStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
3381
|
+
|
|
3382
|
+
export class ComputerToolCallOutputResource extends S.Struct({
|
|
3383
|
+
"id": S.String,
|
|
3384
|
+
"type": ComputerToolCallOutputResourceType.pipe(
|
|
3385
|
+
S.propertySignature,
|
|
3386
|
+
S.withConstructorDefault(() => "computer_call_output" as const)
|
|
3387
|
+
),
|
|
3388
|
+
"call_id": S.String,
|
|
3389
|
+
"acknowledged_safety_checks": S.optionalWith(S.Array(ComputerToolCallSafetyCheck), { nullable: true }),
|
|
3390
|
+
"output": ComputerScreenshotImage,
|
|
3391
|
+
"status": S.optionalWith(ComputerToolCallOutputResourceStatus, { nullable: true })
|
|
3392
|
+
}) {}
|
|
3393
|
+
|
|
3394
|
+
export class FunctionToolCallOutputResourceType extends S.Literal("function_call_output") {}
|
|
3395
|
+
|
|
3396
|
+
export class FunctionToolCallOutputResourceStatus extends S.Literal("in_progress", "completed", "incomplete") {}
|
|
3397
|
+
|
|
3398
|
+
export class FunctionToolCallOutputResource extends S.Struct({
|
|
3399
|
+
"id": S.String,
|
|
3400
|
+
"type": FunctionToolCallOutputResourceType,
|
|
3401
|
+
"call_id": S.String,
|
|
3402
|
+
"output": S.String,
|
|
3403
|
+
"status": S.optionalWith(FunctionToolCallOutputResourceStatus, { nullable: true })
|
|
3404
|
+
}) {}
|
|
3405
|
+
|
|
3406
|
+
export class ItemResource extends S.Union(
|
|
3407
|
+
InputMessageResource,
|
|
3408
|
+
OutputMessage,
|
|
3409
|
+
FileSearchToolCall,
|
|
3410
|
+
ComputerToolCall,
|
|
3411
|
+
ComputerToolCallOutputResource,
|
|
3412
|
+
WebSearchToolCall,
|
|
3413
|
+
FunctionToolCall,
|
|
3414
|
+
FunctionToolCallOutputResource
|
|
3415
|
+
) {}
|
|
3416
|
+
|
|
3417
|
+
export class ResponseItemList extends S.Class<ResponseItemList>("ResponseItemList")({
|
|
3418
|
+
"object": ResponseItemListObject,
|
|
3419
|
+
"data": S.Array(ItemResource),
|
|
3420
|
+
"has_more": S.Boolean,
|
|
3421
|
+
"first_id": S.String,
|
|
3422
|
+
"last_id": S.String
|
|
3423
|
+
}) {}
|
|
3424
|
+
|
|
2540
3425
|
export class CreateMessageRequestRole extends S.Literal("user", "assistant") {}
|
|
2541
3426
|
|
|
2542
3427
|
export class MessageContentImageFileObjectType extends S.Literal("image_file") {}
|
|
@@ -2668,6 +3553,8 @@ export class CreateThreadAndRunRequestModelEnum extends S.Literal(
|
|
|
2668
3553
|
"gpt-4o-2024-05-13",
|
|
2669
3554
|
"gpt-4o-mini",
|
|
2670
3555
|
"gpt-4o-mini-2024-07-18",
|
|
3556
|
+
"gpt-4.5-preview",
|
|
3557
|
+
"gpt-4.5-preview-2025-02-27",
|
|
2671
3558
|
"gpt-4-turbo",
|
|
2672
3559
|
"gpt-4-turbo-2024-04-09",
|
|
2673
3560
|
"gpt-4-0125-preview",
|
|
@@ -2688,14 +3575,14 @@ export class CreateThreadAndRunRequestModelEnum extends S.Literal(
|
|
|
2688
3575
|
"gpt-3.5-turbo-16k-0613"
|
|
2689
3576
|
) {}
|
|
2690
3577
|
|
|
2691
|
-
export class
|
|
3578
|
+
export class CreateThreadAndRunRequestTruncationStrategyEnumType extends S.Literal("auto", "last_messages") {}
|
|
2692
3579
|
|
|
2693
|
-
export class
|
|
2694
|
-
"type":
|
|
3580
|
+
export class CreateThreadAndRunRequestTruncationStrategy extends S.Struct({
|
|
3581
|
+
"type": S.Literal("auto", "last_messages"),
|
|
2695
3582
|
"last_messages": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1)), { nullable: true })
|
|
2696
3583
|
}) {}
|
|
2697
3584
|
|
|
2698
|
-
export class
|
|
3585
|
+
export class CreateThreadAndRunRequestToolChoiceEnumEnum extends S.Literal("none", "auto", "required") {}
|
|
2699
3586
|
|
|
2700
3587
|
export class AssistantsNamedToolChoiceType extends S.Literal("function", "code_interpreter", "file_search") {}
|
|
2701
3588
|
|
|
@@ -2709,8 +3596,8 @@ export class AssistantsNamedToolChoice extends S.Struct({
|
|
|
2709
3596
|
)
|
|
2710
3597
|
}) {}
|
|
2711
3598
|
|
|
2712
|
-
export class
|
|
2713
|
-
extends S.Union(
|
|
3599
|
+
export class CreateThreadAndRunRequestToolChoice
|
|
3600
|
+
extends S.Union(S.Literal("none", "auto", "required"), AssistantsNamedToolChoice)
|
|
2714
3601
|
{}
|
|
2715
3602
|
|
|
2716
3603
|
export class CreateThreadAndRunRequest extends S.Class<CreateThreadAndRunRequest>("CreateThreadAndRunRequest")({
|
|
@@ -2754,8 +3641,8 @@ export class CreateThreadAndRunRequest extends S.Class<CreateThreadAndRunRequest
|
|
|
2754
3641
|
"stream": S.optionalWith(S.Boolean, { nullable: true }),
|
|
2755
3642
|
"max_prompt_tokens": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(256)), { nullable: true }),
|
|
2756
3643
|
"max_completion_tokens": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(256)), { nullable: true }),
|
|
2757
|
-
"truncation_strategy": S.optionalWith(
|
|
2758
|
-
"tool_choice": S.optionalWith(
|
|
3644
|
+
"truncation_strategy": S.optionalWith(CreateThreadAndRunRequestTruncationStrategy, { nullable: true }),
|
|
3645
|
+
"tool_choice": S.optionalWith(CreateThreadAndRunRequestToolChoice, { nullable: true }),
|
|
2759
3646
|
"parallel_tool_calls": S.optionalWith(ParallelToolCalls, { nullable: true, default: () => true as const }),
|
|
2760
3647
|
"response_format": S.optionalWith(AssistantsApiResponseFormatOption, { nullable: true })
|
|
2761
3648
|
}) {}
|
|
@@ -2797,6 +3684,17 @@ export class RunCompletionUsage extends S.Struct({
|
|
|
2797
3684
|
"total_tokens": S.Int
|
|
2798
3685
|
}) {}
|
|
2799
3686
|
|
|
3687
|
+
export class RunObjectTruncationStrategyEnumType extends S.Literal("auto", "last_messages") {}
|
|
3688
|
+
|
|
3689
|
+
export class RunObjectTruncationStrategy extends S.Struct({
|
|
3690
|
+
"type": S.Literal("auto", "last_messages"),
|
|
3691
|
+
"last_messages": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1)), { nullable: true })
|
|
3692
|
+
}) {}
|
|
3693
|
+
|
|
3694
|
+
export class RunObjectToolChoiceEnumEnum extends S.Literal("none", "auto", "required") {}
|
|
3695
|
+
|
|
3696
|
+
export class RunObjectToolChoice extends S.Union(S.Literal("none", "auto", "required"), AssistantsNamedToolChoice) {}
|
|
3697
|
+
|
|
2800
3698
|
export class RunObject extends S.Class<RunObject>("RunObject")({
|
|
2801
3699
|
"id": S.String,
|
|
2802
3700
|
"object": RunObjectObject,
|
|
@@ -2832,8 +3730,8 @@ export class RunObject extends S.Class<RunObject>("RunObject")({
|
|
|
2832
3730
|
"top_p": S.optionalWith(S.Number, { nullable: true }),
|
|
2833
3731
|
"max_prompt_tokens": S.NullOr(S.Int.pipe(S.greaterThanOrEqualTo(256))),
|
|
2834
3732
|
"max_completion_tokens": S.NullOr(S.Int.pipe(S.greaterThanOrEqualTo(256))),
|
|
2835
|
-
"truncation_strategy":
|
|
2836
|
-
"tool_choice":
|
|
3733
|
+
"truncation_strategy": RunObjectTruncationStrategy,
|
|
3734
|
+
"tool_choice": RunObjectToolChoice,
|
|
2837
3735
|
"parallel_tool_calls": ParallelToolCalls.pipe(S.propertySignature, S.withConstructorDefault(() => true as const)),
|
|
2838
3736
|
"response_format": AssistantsApiResponseFormatOption
|
|
2839
3737
|
}) {}
|
|
@@ -3005,6 +3903,19 @@ export class CreateRunParams extends S.Struct({
|
|
|
3005
3903
|
})
|
|
3006
3904
|
}) {}
|
|
3007
3905
|
|
|
3906
|
+
export class CreateRunRequestTruncationStrategyEnumType extends S.Literal("auto", "last_messages") {}
|
|
3907
|
+
|
|
3908
|
+
export class CreateRunRequestTruncationStrategy extends S.Struct({
|
|
3909
|
+
"type": S.Literal("auto", "last_messages"),
|
|
3910
|
+
"last_messages": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1)), { nullable: true })
|
|
3911
|
+
}) {}
|
|
3912
|
+
|
|
3913
|
+
export class CreateRunRequestToolChoiceEnumEnum extends S.Literal("none", "auto", "required") {}
|
|
3914
|
+
|
|
3915
|
+
export class CreateRunRequestToolChoice
|
|
3916
|
+
extends S.Union(S.Literal("none", "auto", "required"), AssistantsNamedToolChoice)
|
|
3917
|
+
{}
|
|
3918
|
+
|
|
3008
3919
|
export class CreateRunRequest extends S.Class<CreateRunRequest>("CreateRunRequest")({
|
|
3009
3920
|
"assistant_id": S.String,
|
|
3010
3921
|
"model": S.optionalWith(S.Union(S.String, AssistantSupportedModels), { nullable: true }),
|
|
@@ -3028,8 +3939,8 @@ export class CreateRunRequest extends S.Class<CreateRunRequest>("CreateRunReques
|
|
|
3028
3939
|
"stream": S.optionalWith(S.Boolean, { nullable: true }),
|
|
3029
3940
|
"max_prompt_tokens": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(256)), { nullable: true }),
|
|
3030
3941
|
"max_completion_tokens": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(256)), { nullable: true }),
|
|
3031
|
-
"truncation_strategy": S.optionalWith(
|
|
3032
|
-
"tool_choice": S.optionalWith(
|
|
3942
|
+
"truncation_strategy": S.optionalWith(CreateRunRequestTruncationStrategy, { nullable: true }),
|
|
3943
|
+
"tool_choice": S.optionalWith(CreateRunRequestToolChoice, { nullable: true }),
|
|
3033
3944
|
"parallel_tool_calls": S.optionalWith(ParallelToolCalls, { nullable: true, default: () => true as const }),
|
|
3034
3945
|
"response_format": S.optionalWith(AssistantsApiResponseFormatOption, { nullable: true })
|
|
3035
3946
|
}) {}
|
|
@@ -3096,10 +4007,8 @@ export class RunStepDetailsToolCallsCodeObject extends S.Struct({
|
|
|
3096
4007
|
|
|
3097
4008
|
export class RunStepDetailsToolCallsFileSearchObjectType extends S.Literal("file_search") {}
|
|
3098
4009
|
|
|
3099
|
-
export class RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker extends S.Literal("default_2024_08_21") {}
|
|
3100
|
-
|
|
3101
4010
|
export class RunStepDetailsToolCallsFileSearchRankingOptionsObject extends S.Struct({
|
|
3102
|
-
"ranker":
|
|
4011
|
+
"ranker": FileSearchRanker,
|
|
3103
4012
|
"score_threshold": S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1))
|
|
3104
4013
|
}) {}
|
|
3105
4014
|
|
|
@@ -3213,6 +4122,40 @@ export class UploadStatus extends S.Literal("pending", "completed", "cancelled",
|
|
|
3213
4122
|
|
|
3214
4123
|
export class UploadObject extends S.Literal("upload") {}
|
|
3215
4124
|
|
|
4125
|
+
export class UploadFileEnumObject extends S.Literal("file") {}
|
|
4126
|
+
|
|
4127
|
+
export class UploadFileEnumPurpose extends S.Literal(
|
|
4128
|
+
"assistants",
|
|
4129
|
+
"assistants_output",
|
|
4130
|
+
"batch",
|
|
4131
|
+
"batch_output",
|
|
4132
|
+
"fine-tune",
|
|
4133
|
+
"fine-tune-results",
|
|
4134
|
+
"vision"
|
|
4135
|
+
) {}
|
|
4136
|
+
|
|
4137
|
+
export class UploadFileEnumStatus extends S.Literal("uploaded", "processed", "error") {}
|
|
4138
|
+
|
|
4139
|
+
export class UploadFile extends S.Struct({
|
|
4140
|
+
"id": S.String,
|
|
4141
|
+
"bytes": S.Int,
|
|
4142
|
+
"created_at": S.Int,
|
|
4143
|
+
"expires_at": S.optionalWith(S.Int, { nullable: true }),
|
|
4144
|
+
"filename": S.String,
|
|
4145
|
+
"object": S.Literal("file"),
|
|
4146
|
+
"purpose": S.Literal(
|
|
4147
|
+
"assistants",
|
|
4148
|
+
"assistants_output",
|
|
4149
|
+
"batch",
|
|
4150
|
+
"batch_output",
|
|
4151
|
+
"fine-tune",
|
|
4152
|
+
"fine-tune-results",
|
|
4153
|
+
"vision"
|
|
4154
|
+
),
|
|
4155
|
+
"status": S.Literal("uploaded", "processed", "error"),
|
|
4156
|
+
"status_details": S.optionalWith(S.String, { nullable: true })
|
|
4157
|
+
}) {}
|
|
4158
|
+
|
|
3216
4159
|
export class Upload extends S.Class<Upload>("Upload")({
|
|
3217
4160
|
"id": S.String,
|
|
3218
4161
|
"created_at": S.Int,
|
|
@@ -3222,7 +4165,7 @@ export class Upload extends S.Class<Upload>("Upload")({
|
|
|
3222
4165
|
"status": UploadStatus,
|
|
3223
4166
|
"expires_at": S.Int,
|
|
3224
4167
|
"object": S.optionalWith(UploadObject, { nullable: true }),
|
|
3225
|
-
"file": S.optionalWith(
|
|
4168
|
+
"file": S.optionalWith(UploadFile, { nullable: true })
|
|
3226
4169
|
}) {}
|
|
3227
4170
|
|
|
3228
4171
|
export class CompleteUploadRequest extends S.Class<CompleteUploadRequest>("CompleteUploadRequest")({
|
|
@@ -3313,9 +4256,16 @@ export class CreateVectorStoreRequest extends S.Class<CreateVectorStoreRequest>(
|
|
|
3313
4256
|
"metadata": S.optionalWith(Metadata, { nullable: true })
|
|
3314
4257
|
}) {}
|
|
3315
4258
|
|
|
4259
|
+
export class UpdateVectorStoreRequestExpiresAfterEnumAnchor extends S.Literal("last_active_at") {}
|
|
4260
|
+
|
|
4261
|
+
export class UpdateVectorStoreRequestExpiresAfter extends S.Struct({
|
|
4262
|
+
"anchor": S.Literal("last_active_at"),
|
|
4263
|
+
"days": S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(365))
|
|
4264
|
+
}) {}
|
|
4265
|
+
|
|
3316
4266
|
export class UpdateVectorStoreRequest extends S.Class<UpdateVectorStoreRequest>("UpdateVectorStoreRequest")({
|
|
3317
4267
|
"name": S.optionalWith(S.String, { nullable: true }),
|
|
3318
|
-
"expires_after": S.optionalWith(
|
|
4268
|
+
"expires_after": S.optionalWith(UpdateVectorStoreRequestExpiresAfter, { nullable: true }),
|
|
3319
4269
|
"metadata": S.optionalWith(Metadata, { nullable: true })
|
|
3320
4270
|
}) {}
|
|
3321
4271
|
|
|
@@ -3332,7 +4282,8 @@ export class ChunkingStrategyRequestParam extends S.Record({ key: S.String, valu
|
|
|
3332
4282
|
export class CreateVectorStoreFileBatchRequest
|
|
3333
4283
|
extends S.Class<CreateVectorStoreFileBatchRequest>("CreateVectorStoreFileBatchRequest")({
|
|
3334
4284
|
"file_ids": S.Array(S.String).pipe(S.minItems(1), S.maxItems(500)),
|
|
3335
|
-
"chunking_strategy": S.optionalWith(ChunkingStrategyRequestParam, { nullable: true })
|
|
4285
|
+
"chunking_strategy": S.optionalWith(ChunkingStrategyRequestParam, { nullable: true }),
|
|
4286
|
+
"attributes": S.optionalWith(VectorStoreFileAttributes, { nullable: true })
|
|
3336
4287
|
})
|
|
3337
4288
|
{}
|
|
3338
4289
|
|
|
@@ -3399,7 +4350,8 @@ export class VectorStoreFileObject extends S.Struct({
|
|
|
3399
4350
|
"code": VectorStoreFileObjectLastErrorCode,
|
|
3400
4351
|
"message": S.String
|
|
3401
4352
|
})),
|
|
3402
|
-
"chunking_strategy": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), { nullable: true })
|
|
4353
|
+
"chunking_strategy": S.optionalWith(S.Record({ key: S.String, value: S.Unknown }), { nullable: true }),
|
|
4354
|
+
"attributes": S.optionalWith(VectorStoreFileAttributes, { nullable: true })
|
|
3403
4355
|
}) {}
|
|
3404
4356
|
|
|
3405
4357
|
export class ListVectorStoreFilesResponse
|
|
@@ -3427,7 +4379,14 @@ export class ListVectorStoreFilesParams extends S.Struct({
|
|
|
3427
4379
|
export class CreateVectorStoreFileRequest
|
|
3428
4380
|
extends S.Class<CreateVectorStoreFileRequest>("CreateVectorStoreFileRequest")({
|
|
3429
4381
|
"file_id": S.String,
|
|
3430
|
-
"chunking_strategy": S.optionalWith(ChunkingStrategyRequestParam, { nullable: true })
|
|
4382
|
+
"chunking_strategy": S.optionalWith(ChunkingStrategyRequestParam, { nullable: true }),
|
|
4383
|
+
"attributes": S.optionalWith(VectorStoreFileAttributes, { nullable: true })
|
|
4384
|
+
})
|
|
4385
|
+
{}
|
|
4386
|
+
|
|
4387
|
+
export class UpdateVectorStoreFileAttributesRequest
|
|
4388
|
+
extends S.Class<UpdateVectorStoreFileAttributesRequest>("UpdateVectorStoreFileAttributesRequest")({
|
|
4389
|
+
"attributes": S.NullOr(VectorStoreFileAttributes)
|
|
3431
4390
|
})
|
|
3432
4391
|
{}
|
|
3433
4392
|
|
|
@@ -3441,6 +4400,72 @@ export class DeleteVectorStoreFileResponse
|
|
|
3441
4400
|
})
|
|
3442
4401
|
{}
|
|
3443
4402
|
|
|
4403
|
+
export class VectorStoreFileContentResponseObject extends S.Literal("vector_store.file_content.page") {}
|
|
4404
|
+
|
|
4405
|
+
export class VectorStoreFileContentResponse
|
|
4406
|
+
extends S.Class<VectorStoreFileContentResponse>("VectorStoreFileContentResponse")({
|
|
4407
|
+
"object": VectorStoreFileContentResponseObject,
|
|
4408
|
+
"data": S.Array(S.Struct({
|
|
4409
|
+
"type": S.optionalWith(S.String, { nullable: true }),
|
|
4410
|
+
"text": S.optionalWith(S.String, { nullable: true })
|
|
4411
|
+
})),
|
|
4412
|
+
"has_more": S.Boolean,
|
|
4413
|
+
"next_page": S.NullOr(S.String)
|
|
4414
|
+
})
|
|
4415
|
+
{}
|
|
4416
|
+
|
|
4417
|
+
export class VectorStoreSearchRequestRankingOptionsRanker extends S.Literal("auto", "default-2024-11-15") {}
|
|
4418
|
+
|
|
4419
|
+
export class VectorStoreSearchRequest extends S.Class<VectorStoreSearchRequest>("VectorStoreSearchRequest")({
|
|
4420
|
+
"query": S.Union(S.String, S.Array(S.String)),
|
|
4421
|
+
"rewrite_query": S.optionalWith(S.Boolean, { nullable: true, default: () => false as const }),
|
|
4422
|
+
"max_num_results": S.optionalWith(S.Int.pipe(S.greaterThanOrEqualTo(1), S.lessThanOrEqualTo(50)), {
|
|
4423
|
+
nullable: true,
|
|
4424
|
+
default: () => 10 as const
|
|
4425
|
+
}),
|
|
4426
|
+
"filters": S.optionalWith(S.Union(ComparisonFilter, CompoundFilter), { nullable: true }),
|
|
4427
|
+
"ranking_options": S.optionalWith(
|
|
4428
|
+
S.Struct({
|
|
4429
|
+
"ranker": S.optionalWith(VectorStoreSearchRequestRankingOptionsRanker, {
|
|
4430
|
+
nullable: true,
|
|
4431
|
+
default: () => "auto" as const
|
|
4432
|
+
}),
|
|
4433
|
+
"score_threshold": S.optionalWith(S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1)), {
|
|
4434
|
+
nullable: true,
|
|
4435
|
+
default: () => 0 as const
|
|
4436
|
+
})
|
|
4437
|
+
}),
|
|
4438
|
+
{ nullable: true }
|
|
4439
|
+
)
|
|
4440
|
+
}) {}
|
|
4441
|
+
|
|
4442
|
+
export class VectorStoreSearchResultsPageObject extends S.Literal("vector_store.search_results.page") {}
|
|
4443
|
+
|
|
4444
|
+
export class VectorStoreSearchResultContentObjectType extends S.Literal("text") {}
|
|
4445
|
+
|
|
4446
|
+
export class VectorStoreSearchResultContentObject extends S.Struct({
|
|
4447
|
+
"type": VectorStoreSearchResultContentObjectType,
|
|
4448
|
+
"text": S.String
|
|
4449
|
+
}) {}
|
|
4450
|
+
|
|
4451
|
+
export class VectorStoreSearchResultItem extends S.Struct({
|
|
4452
|
+
"file_id": S.String,
|
|
4453
|
+
"filename": S.String,
|
|
4454
|
+
"score": S.Number.pipe(S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1)),
|
|
4455
|
+
"attributes": S.NullOr(VectorStoreFileAttributes),
|
|
4456
|
+
"content": S.Array(VectorStoreSearchResultContentObject)
|
|
4457
|
+
}) {}
|
|
4458
|
+
|
|
4459
|
+
export class VectorStoreSearchResultsPage
|
|
4460
|
+
extends S.Class<VectorStoreSearchResultsPage>("VectorStoreSearchResultsPage")({
|
|
4461
|
+
"object": VectorStoreSearchResultsPageObject,
|
|
4462
|
+
"search_query": S.Array(S.String),
|
|
4463
|
+
"data": S.Array(VectorStoreSearchResultItem),
|
|
4464
|
+
"has_more": S.Boolean,
|
|
4465
|
+
"next_page": S.NullOr(S.String)
|
|
4466
|
+
})
|
|
4467
|
+
{}
|
|
4468
|
+
|
|
3444
4469
|
export const make = (
|
|
3445
4470
|
httpClient: HttpClient.HttpClient,
|
|
3446
4471
|
options: {
|
|
@@ -3471,10 +4496,10 @@ export const make = (
|
|
|
3471
4496
|
"listAssistants": (options) =>
|
|
3472
4497
|
HttpClientRequest.make("GET")(`/assistants`).pipe(
|
|
3473
4498
|
HttpClientRequest.setUrlParams({
|
|
3474
|
-
"limit": options["limit"],
|
|
3475
|
-
"order": options["order"],
|
|
3476
|
-
"after": options["after"],
|
|
3477
|
-
"before": options["before"]
|
|
4499
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
4500
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
4501
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4502
|
+
"before": options["before"] as UrlParams.Coercible
|
|
3478
4503
|
}),
|
|
3479
4504
|
Effect.succeed,
|
|
3480
4505
|
Effect.flatMap((request) =>
|
|
@@ -3486,8 +4511,7 @@ export const make = (
|
|
|
3486
4511
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3487
4512
|
})
|
|
3488
4513
|
))
|
|
3489
|
-
)
|
|
3490
|
-
Effect.scoped
|
|
4514
|
+
)
|
|
3491
4515
|
),
|
|
3492
4516
|
"createAssistant": (options) =>
|
|
3493
4517
|
HttpClientRequest.make("POST")(`/assistants`).pipe(
|
|
@@ -3501,8 +4525,7 @@ export const make = (
|
|
|
3501
4525
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3502
4526
|
})
|
|
3503
4527
|
))
|
|
3504
|
-
)
|
|
3505
|
-
Effect.scoped
|
|
4528
|
+
)
|
|
3506
4529
|
),
|
|
3507
4530
|
"getAssistant": (assistantId) =>
|
|
3508
4531
|
HttpClientRequest.make("GET")(`/assistants/${assistantId}`).pipe(
|
|
@@ -3516,8 +4539,7 @@ export const make = (
|
|
|
3516
4539
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3517
4540
|
})
|
|
3518
4541
|
))
|
|
3519
|
-
)
|
|
3520
|
-
Effect.scoped
|
|
4542
|
+
)
|
|
3521
4543
|
),
|
|
3522
4544
|
"modifyAssistant": (assistantId, options) =>
|
|
3523
4545
|
HttpClientRequest.make("POST")(`/assistants/${assistantId}`).pipe(
|
|
@@ -3531,8 +4553,7 @@ export const make = (
|
|
|
3531
4553
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3532
4554
|
})
|
|
3533
4555
|
))
|
|
3534
|
-
)
|
|
3535
|
-
Effect.scoped
|
|
4556
|
+
)
|
|
3536
4557
|
),
|
|
3537
4558
|
"deleteAssistant": (assistantId) =>
|
|
3538
4559
|
HttpClientRequest.make("DELETE")(`/assistants/${assistantId}`).pipe(
|
|
@@ -3546,8 +4567,7 @@ export const make = (
|
|
|
3546
4567
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3547
4568
|
})
|
|
3548
4569
|
))
|
|
3549
|
-
)
|
|
3550
|
-
Effect.scoped
|
|
4570
|
+
)
|
|
3551
4571
|
),
|
|
3552
4572
|
"createSpeech": (options) =>
|
|
3553
4573
|
HttpClientRequest.make("POST")(`/audio/speech`).pipe(
|
|
@@ -3560,8 +4580,7 @@ export const make = (
|
|
|
3560
4580
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3561
4581
|
})
|
|
3562
4582
|
))
|
|
3563
|
-
)
|
|
3564
|
-
Effect.scoped
|
|
4583
|
+
)
|
|
3565
4584
|
),
|
|
3566
4585
|
"createTranscription": (options) =>
|
|
3567
4586
|
HttpClientRequest.make("POST")(`/audio/transcriptions`).pipe(
|
|
@@ -3576,8 +4595,7 @@ export const make = (
|
|
|
3576
4595
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3577
4596
|
})
|
|
3578
4597
|
))
|
|
3579
|
-
)
|
|
3580
|
-
Effect.scoped
|
|
4598
|
+
)
|
|
3581
4599
|
),
|
|
3582
4600
|
"createTranslation": (options) =>
|
|
3583
4601
|
HttpClientRequest.make("POST")(`/audio/translations`).pipe(
|
|
@@ -3592,12 +4610,14 @@ export const make = (
|
|
|
3592
4610
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3593
4611
|
})
|
|
3594
4612
|
))
|
|
3595
|
-
)
|
|
3596
|
-
Effect.scoped
|
|
4613
|
+
)
|
|
3597
4614
|
),
|
|
3598
4615
|
"listBatches": (options) =>
|
|
3599
4616
|
HttpClientRequest.make("GET")(`/batches`).pipe(
|
|
3600
|
-
HttpClientRequest.setUrlParams({
|
|
4617
|
+
HttpClientRequest.setUrlParams({
|
|
4618
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4619
|
+
"limit": options["limit"] as UrlParams.Coercible
|
|
4620
|
+
}),
|
|
3601
4621
|
Effect.succeed,
|
|
3602
4622
|
Effect.flatMap((request) =>
|
|
3603
4623
|
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
@@ -3608,8 +4628,7 @@ export const make = (
|
|
|
3608
4628
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3609
4629
|
})
|
|
3610
4630
|
))
|
|
3611
|
-
)
|
|
3612
|
-
Effect.scoped
|
|
4631
|
+
)
|
|
3613
4632
|
),
|
|
3614
4633
|
"createBatch": (options) =>
|
|
3615
4634
|
HttpClientRequest.make("POST")(`/batches`).pipe(
|
|
@@ -3623,8 +4642,7 @@ export const make = (
|
|
|
3623
4642
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3624
4643
|
})
|
|
3625
4644
|
))
|
|
3626
|
-
)
|
|
3627
|
-
Effect.scoped
|
|
4645
|
+
)
|
|
3628
4646
|
),
|
|
3629
4647
|
"retrieveBatch": (batchId) =>
|
|
3630
4648
|
HttpClientRequest.make("GET")(`/batches/${batchId}`).pipe(
|
|
@@ -3638,8 +4656,7 @@ export const make = (
|
|
|
3638
4656
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3639
4657
|
})
|
|
3640
4658
|
))
|
|
3641
|
-
)
|
|
3642
|
-
Effect.scoped
|
|
4659
|
+
)
|
|
3643
4660
|
),
|
|
3644
4661
|
"cancelBatch": (batchId) =>
|
|
3645
4662
|
HttpClientRequest.make("POST")(`/batches/${batchId}/cancel`).pipe(
|
|
@@ -3653,8 +4670,28 @@ export const make = (
|
|
|
3653
4670
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3654
4671
|
})
|
|
3655
4672
|
))
|
|
3656
|
-
)
|
|
3657
|
-
|
|
4673
|
+
)
|
|
4674
|
+
),
|
|
4675
|
+
"listChatCompletions": (options) =>
|
|
4676
|
+
HttpClientRequest.make("GET")(`/chat/completions`).pipe(
|
|
4677
|
+
HttpClientRequest.setUrlParams({
|
|
4678
|
+
"model": options["model"] as UrlParams.Coercible,
|
|
4679
|
+
"metadata": options["metadata"] as UrlParams.Coercible,
|
|
4680
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4681
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
4682
|
+
"order": options["order"] as UrlParams.Coercible
|
|
4683
|
+
}),
|
|
4684
|
+
Effect.succeed,
|
|
4685
|
+
Effect.flatMap((request) =>
|
|
4686
|
+
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
4687
|
+
Effect.flatMap(
|
|
4688
|
+
httpClient.execute(request),
|
|
4689
|
+
HttpClientResponse.matchStatus({
|
|
4690
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(ChatCompletionList)(r),
|
|
4691
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
4692
|
+
})
|
|
4693
|
+
))
|
|
4694
|
+
)
|
|
3658
4695
|
),
|
|
3659
4696
|
"createChatCompletion": (options) =>
|
|
3660
4697
|
HttpClientRequest.make("POST")(`/chat/completions`).pipe(
|
|
@@ -3668,8 +4705,77 @@ export const make = (
|
|
|
3668
4705
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3669
4706
|
})
|
|
3670
4707
|
))
|
|
3671
|
-
)
|
|
3672
|
-
|
|
4708
|
+
)
|
|
4709
|
+
),
|
|
4710
|
+
"getChatCompletion": (completionId) =>
|
|
4711
|
+
HttpClientRequest.make("GET")(`/chat/completions/${completionId}`).pipe(
|
|
4712
|
+
Effect.succeed,
|
|
4713
|
+
Effect.flatMap((request) =>
|
|
4714
|
+
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
4715
|
+
Effect.flatMap(
|
|
4716
|
+
httpClient.execute(request),
|
|
4717
|
+
HttpClientResponse.matchStatus({
|
|
4718
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(CreateChatCompletionResponse)(r),
|
|
4719
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
4720
|
+
})
|
|
4721
|
+
))
|
|
4722
|
+
)
|
|
4723
|
+
),
|
|
4724
|
+
"updateChatCompletion": (completionId, options) =>
|
|
4725
|
+
HttpClientRequest.make("POST")(`/chat/completions/${completionId}`).pipe(
|
|
4726
|
+
(req) => Effect.orDie(HttpClientRequest.bodyJson(req, options)),
|
|
4727
|
+
Effect.flatMap((request) =>
|
|
4728
|
+
Effect.flatMap(
|
|
4729
|
+
applyClientTransform(httpClient),
|
|
4730
|
+
(httpClient) =>
|
|
4731
|
+
Effect.flatMap(
|
|
4732
|
+
httpClient.execute(request),
|
|
4733
|
+
HttpClientResponse.matchStatus({
|
|
4734
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(CreateChatCompletionResponse)(r),
|
|
4735
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
4736
|
+
})
|
|
4737
|
+
)
|
|
4738
|
+
)
|
|
4739
|
+
)
|
|
4740
|
+
),
|
|
4741
|
+
"deleteChatCompletion": (completionId) =>
|
|
4742
|
+
HttpClientRequest.make("DELETE")(`/chat/completions/${completionId}`).pipe(
|
|
4743
|
+
Effect.succeed,
|
|
4744
|
+
Effect.flatMap((request) =>
|
|
4745
|
+
Effect.flatMap(
|
|
4746
|
+
applyClientTransform(httpClient),
|
|
4747
|
+
(httpClient) =>
|
|
4748
|
+
Effect.flatMap(
|
|
4749
|
+
httpClient.execute(request),
|
|
4750
|
+
HttpClientResponse.matchStatus({
|
|
4751
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(ChatCompletionDeleted)(r),
|
|
4752
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
4753
|
+
})
|
|
4754
|
+
)
|
|
4755
|
+
)
|
|
4756
|
+
)
|
|
4757
|
+
),
|
|
4758
|
+
"getChatCompletionMessages": (completionId, options) =>
|
|
4759
|
+
HttpClientRequest.make("GET")(`/chat/completions/${completionId}/messages`).pipe(
|
|
4760
|
+
HttpClientRequest.setUrlParams({
|
|
4761
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4762
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
4763
|
+
"order": options["order"] as UrlParams.Coercible
|
|
4764
|
+
}),
|
|
4765
|
+
Effect.succeed,
|
|
4766
|
+
Effect.flatMap((request) =>
|
|
4767
|
+
Effect.flatMap(
|
|
4768
|
+
applyClientTransform(httpClient),
|
|
4769
|
+
(httpClient) =>
|
|
4770
|
+
Effect.flatMap(
|
|
4771
|
+
httpClient.execute(request),
|
|
4772
|
+
HttpClientResponse.matchStatus({
|
|
4773
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(ChatCompletionMessageList)(r),
|
|
4774
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
4775
|
+
})
|
|
4776
|
+
)
|
|
4777
|
+
)
|
|
4778
|
+
)
|
|
3673
4779
|
),
|
|
3674
4780
|
"createCompletion": (options) =>
|
|
3675
4781
|
HttpClientRequest.make("POST")(`/completions`).pipe(
|
|
@@ -3683,8 +4789,7 @@ export const make = (
|
|
|
3683
4789
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3684
4790
|
})
|
|
3685
4791
|
))
|
|
3686
|
-
)
|
|
3687
|
-
Effect.scoped
|
|
4792
|
+
)
|
|
3688
4793
|
),
|
|
3689
4794
|
"createEmbedding": (options) =>
|
|
3690
4795
|
HttpClientRequest.make("POST")(`/embeddings`).pipe(
|
|
@@ -3698,16 +4803,15 @@ export const make = (
|
|
|
3698
4803
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3699
4804
|
})
|
|
3700
4805
|
))
|
|
3701
|
-
)
|
|
3702
|
-
Effect.scoped
|
|
4806
|
+
)
|
|
3703
4807
|
),
|
|
3704
4808
|
"listFiles": (options) =>
|
|
3705
4809
|
HttpClientRequest.make("GET")(`/files`).pipe(
|
|
3706
4810
|
HttpClientRequest.setUrlParams({
|
|
3707
|
-
"purpose": options["purpose"],
|
|
3708
|
-
"limit": options["limit"],
|
|
3709
|
-
"order": options["order"],
|
|
3710
|
-
"after": options["after"]
|
|
4811
|
+
"purpose": options["purpose"] as UrlParams.Coercible,
|
|
4812
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
4813
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
4814
|
+
"after": options["after"] as UrlParams.Coercible
|
|
3711
4815
|
}),
|
|
3712
4816
|
Effect.succeed,
|
|
3713
4817
|
Effect.flatMap((request) =>
|
|
@@ -3719,8 +4823,7 @@ export const make = (
|
|
|
3719
4823
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3720
4824
|
})
|
|
3721
4825
|
))
|
|
3722
|
-
)
|
|
3723
|
-
Effect.scoped
|
|
4826
|
+
)
|
|
3724
4827
|
),
|
|
3725
4828
|
"createFile": (options) =>
|
|
3726
4829
|
HttpClientRequest.make("POST")(`/files`).pipe(
|
|
@@ -3735,8 +4838,7 @@ export const make = (
|
|
|
3735
4838
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3736
4839
|
})
|
|
3737
4840
|
))
|
|
3738
|
-
)
|
|
3739
|
-
Effect.scoped
|
|
4841
|
+
)
|
|
3740
4842
|
),
|
|
3741
4843
|
"retrieveFile": (fileId) =>
|
|
3742
4844
|
HttpClientRequest.make("GET")(`/files/${fileId}`).pipe(
|
|
@@ -3750,8 +4852,7 @@ export const make = (
|
|
|
3750
4852
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3751
4853
|
})
|
|
3752
4854
|
))
|
|
3753
|
-
)
|
|
3754
|
-
Effect.scoped
|
|
4855
|
+
)
|
|
3755
4856
|
),
|
|
3756
4857
|
"deleteFile": (fileId) =>
|
|
3757
4858
|
HttpClientRequest.make("DELETE")(`/files/${fileId}`).pipe(
|
|
@@ -3765,8 +4866,7 @@ export const make = (
|
|
|
3765
4866
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3766
4867
|
})
|
|
3767
4868
|
))
|
|
3768
|
-
)
|
|
3769
|
-
Effect.scoped
|
|
4869
|
+
)
|
|
3770
4870
|
),
|
|
3771
4871
|
"downloadFile": (fileId) =>
|
|
3772
4872
|
HttpClientRequest.make("GET")(`/files/${fileId}/content`).pipe(
|
|
@@ -3780,12 +4880,15 @@ export const make = (
|
|
|
3780
4880
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3781
4881
|
})
|
|
3782
4882
|
))
|
|
3783
|
-
)
|
|
3784
|
-
Effect.scoped
|
|
4883
|
+
)
|
|
3785
4884
|
),
|
|
3786
4885
|
"listPaginatedFineTuningJobs": (options) =>
|
|
3787
4886
|
HttpClientRequest.make("GET")(`/fine_tuning/jobs`).pipe(
|
|
3788
|
-
HttpClientRequest.setUrlParams({
|
|
4887
|
+
HttpClientRequest.setUrlParams({
|
|
4888
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4889
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
4890
|
+
"metadata": options["metadata"] as UrlParams.Coercible
|
|
4891
|
+
}),
|
|
3789
4892
|
Effect.succeed,
|
|
3790
4893
|
Effect.flatMap((request) =>
|
|
3791
4894
|
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
@@ -3796,8 +4899,7 @@ export const make = (
|
|
|
3796
4899
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3797
4900
|
})
|
|
3798
4901
|
))
|
|
3799
|
-
)
|
|
3800
|
-
Effect.scoped
|
|
4902
|
+
)
|
|
3801
4903
|
),
|
|
3802
4904
|
"createFineTuningJob": (options) =>
|
|
3803
4905
|
HttpClientRequest.make("POST")(`/fine_tuning/jobs`).pipe(
|
|
@@ -3811,8 +4913,7 @@ export const make = (
|
|
|
3811
4913
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3812
4914
|
})
|
|
3813
4915
|
))
|
|
3814
|
-
)
|
|
3815
|
-
Effect.scoped
|
|
4916
|
+
)
|
|
3816
4917
|
),
|
|
3817
4918
|
"retrieveFineTuningJob": (fineTuningJobId) =>
|
|
3818
4919
|
HttpClientRequest.make("GET")(`/fine_tuning/jobs/${fineTuningJobId}`).pipe(
|
|
@@ -3829,8 +4930,7 @@ export const make = (
|
|
|
3829
4930
|
})
|
|
3830
4931
|
)
|
|
3831
4932
|
)
|
|
3832
|
-
)
|
|
3833
|
-
Effect.scoped
|
|
4933
|
+
)
|
|
3834
4934
|
),
|
|
3835
4935
|
"cancelFineTuningJob": (fineTuningJobId) =>
|
|
3836
4936
|
HttpClientRequest.make("POST")(`/fine_tuning/jobs/${fineTuningJobId}/cancel`).pipe(
|
|
@@ -3847,12 +4947,14 @@ export const make = (
|
|
|
3847
4947
|
})
|
|
3848
4948
|
)
|
|
3849
4949
|
)
|
|
3850
|
-
)
|
|
3851
|
-
Effect.scoped
|
|
4950
|
+
)
|
|
3852
4951
|
),
|
|
3853
4952
|
"listFineTuningJobCheckpoints": (fineTuningJobId, options) =>
|
|
3854
4953
|
HttpClientRequest.make("GET")(`/fine_tuning/jobs/${fineTuningJobId}/checkpoints`).pipe(
|
|
3855
|
-
HttpClientRequest.setUrlParams({
|
|
4954
|
+
HttpClientRequest.setUrlParams({
|
|
4955
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4956
|
+
"limit": options["limit"] as UrlParams.Coercible
|
|
4957
|
+
}),
|
|
3856
4958
|
Effect.succeed,
|
|
3857
4959
|
Effect.flatMap((request) =>
|
|
3858
4960
|
Effect.flatMap(
|
|
@@ -3866,12 +4968,14 @@ export const make = (
|
|
|
3866
4968
|
})
|
|
3867
4969
|
)
|
|
3868
4970
|
)
|
|
3869
|
-
)
|
|
3870
|
-
Effect.scoped
|
|
4971
|
+
)
|
|
3871
4972
|
),
|
|
3872
4973
|
"listFineTuningEvents": (fineTuningJobId, options) =>
|
|
3873
4974
|
HttpClientRequest.make("GET")(`/fine_tuning/jobs/${fineTuningJobId}/events`).pipe(
|
|
3874
|
-
HttpClientRequest.setUrlParams({
|
|
4975
|
+
HttpClientRequest.setUrlParams({
|
|
4976
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
4977
|
+
"limit": options["limit"] as UrlParams.Coercible
|
|
4978
|
+
}),
|
|
3875
4979
|
Effect.succeed,
|
|
3876
4980
|
Effect.flatMap((request) =>
|
|
3877
4981
|
Effect.flatMap(
|
|
@@ -3885,8 +4989,7 @@ export const make = (
|
|
|
3885
4989
|
})
|
|
3886
4990
|
)
|
|
3887
4991
|
)
|
|
3888
|
-
)
|
|
3889
|
-
Effect.scoped
|
|
4992
|
+
)
|
|
3890
4993
|
),
|
|
3891
4994
|
"createImageEdit": (options) =>
|
|
3892
4995
|
HttpClientRequest.make("POST")(`/images/edits`).pipe(
|
|
@@ -3901,8 +5004,7 @@ export const make = (
|
|
|
3901
5004
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3902
5005
|
})
|
|
3903
5006
|
))
|
|
3904
|
-
)
|
|
3905
|
-
Effect.scoped
|
|
5007
|
+
)
|
|
3906
5008
|
),
|
|
3907
5009
|
"createImage": (options) =>
|
|
3908
5010
|
HttpClientRequest.make("POST")(`/images/generations`).pipe(
|
|
@@ -3916,8 +5018,7 @@ export const make = (
|
|
|
3916
5018
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3917
5019
|
})
|
|
3918
5020
|
))
|
|
3919
|
-
)
|
|
3920
|
-
Effect.scoped
|
|
5021
|
+
)
|
|
3921
5022
|
),
|
|
3922
5023
|
"createImageVariation": (options) =>
|
|
3923
5024
|
HttpClientRequest.make("POST")(`/images/variations`).pipe(
|
|
@@ -3932,8 +5033,7 @@ export const make = (
|
|
|
3932
5033
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3933
5034
|
})
|
|
3934
5035
|
))
|
|
3935
|
-
)
|
|
3936
|
-
Effect.scoped
|
|
5036
|
+
)
|
|
3937
5037
|
),
|
|
3938
5038
|
"listModels": () =>
|
|
3939
5039
|
HttpClientRequest.make("GET")(`/models`).pipe(
|
|
@@ -3947,8 +5047,7 @@ export const make = (
|
|
|
3947
5047
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3948
5048
|
})
|
|
3949
5049
|
))
|
|
3950
|
-
)
|
|
3951
|
-
Effect.scoped
|
|
5050
|
+
)
|
|
3952
5051
|
),
|
|
3953
5052
|
"retrieveModel": (model) =>
|
|
3954
5053
|
HttpClientRequest.make("GET")(`/models/${model}`).pipe(
|
|
@@ -3962,8 +5061,7 @@ export const make = (
|
|
|
3962
5061
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3963
5062
|
})
|
|
3964
5063
|
))
|
|
3965
|
-
)
|
|
3966
|
-
Effect.scoped
|
|
5064
|
+
)
|
|
3967
5065
|
),
|
|
3968
5066
|
"deleteModel": (model) =>
|
|
3969
5067
|
HttpClientRequest.make("DELETE")(`/models/${model}`).pipe(
|
|
@@ -3977,8 +5075,7 @@ export const make = (
|
|
|
3977
5075
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3978
5076
|
})
|
|
3979
5077
|
))
|
|
3980
|
-
)
|
|
3981
|
-
Effect.scoped
|
|
5078
|
+
)
|
|
3982
5079
|
),
|
|
3983
5080
|
"createModeration": (options) =>
|
|
3984
5081
|
HttpClientRequest.make("POST")(`/moderations`).pipe(
|
|
@@ -3992,15 +5089,14 @@ export const make = (
|
|
|
3992
5089
|
orElse: (response) => unexpectedStatus(request, response)
|
|
3993
5090
|
})
|
|
3994
5091
|
))
|
|
3995
|
-
)
|
|
3996
|
-
Effect.scoped
|
|
5092
|
+
)
|
|
3997
5093
|
),
|
|
3998
5094
|
"adminApiKeysList": (options) =>
|
|
3999
5095
|
HttpClientRequest.make("GET")(`/organization/admin_api_keys`).pipe(
|
|
4000
5096
|
HttpClientRequest.setUrlParams({
|
|
4001
|
-
"after": options["after"],
|
|
4002
|
-
"order": options["order"],
|
|
4003
|
-
"limit": options["limit"]
|
|
5097
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
5098
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
5099
|
+
"limit": options["limit"] as UrlParams.Coercible
|
|
4004
5100
|
}),
|
|
4005
5101
|
Effect.succeed,
|
|
4006
5102
|
Effect.flatMap((request) =>
|
|
@@ -4012,8 +5108,7 @@ export const make = (
|
|
|
4012
5108
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4013
5109
|
})
|
|
4014
5110
|
))
|
|
4015
|
-
)
|
|
4016
|
-
Effect.scoped
|
|
5111
|
+
)
|
|
4017
5112
|
),
|
|
4018
5113
|
"adminApiKeysCreate": (options) =>
|
|
4019
5114
|
HttpClientRequest.make("POST")(`/organization/admin_api_keys`).pipe(
|
|
@@ -4027,8 +5122,7 @@ export const make = (
|
|
|
4027
5122
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4028
5123
|
})
|
|
4029
5124
|
))
|
|
4030
|
-
)
|
|
4031
|
-
Effect.scoped
|
|
5125
|
+
)
|
|
4032
5126
|
),
|
|
4033
5127
|
"adminApiKeysGet": (keyId) =>
|
|
4034
5128
|
HttpClientRequest.make("GET")(`/organization/admin_api_keys/${keyId}`).pipe(
|
|
@@ -4042,8 +5136,7 @@ export const make = (
|
|
|
4042
5136
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4043
5137
|
})
|
|
4044
5138
|
))
|
|
4045
|
-
)
|
|
4046
|
-
Effect.scoped
|
|
5139
|
+
)
|
|
4047
5140
|
),
|
|
4048
5141
|
"adminApiKeysDelete": (keyId) =>
|
|
4049
5142
|
HttpClientRequest.make("DELETE")(`/organization/admin_api_keys/${keyId}`).pipe(
|
|
@@ -4057,24 +5150,23 @@ export const make = (
|
|
|
4057
5150
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4058
5151
|
})
|
|
4059
5152
|
))
|
|
4060
|
-
)
|
|
4061
|
-
Effect.scoped
|
|
5153
|
+
)
|
|
4062
5154
|
),
|
|
4063
5155
|
"listAuditLogs": (options) =>
|
|
4064
5156
|
HttpClientRequest.make("GET")(`/organization/audit_logs`).pipe(
|
|
4065
5157
|
HttpClientRequest.setUrlParams({
|
|
4066
|
-
"effective_at[gt]": options["effective_at[gt]"],
|
|
4067
|
-
"effective_at[gte]": options["effective_at[gte]"],
|
|
4068
|
-
"effective_at[lt]": options["effective_at[lt]"],
|
|
4069
|
-
"effective_at[lte]": options["effective_at[lte]"],
|
|
4070
|
-
"project_ids[]": options["project_ids[]"],
|
|
4071
|
-
"event_types[]": options["event_types[]"],
|
|
4072
|
-
"actor_ids[]": options["actor_ids[]"],
|
|
4073
|
-
"actor_emails[]": options["actor_emails[]"],
|
|
4074
|
-
"resource_ids[]": options["resource_ids[]"],
|
|
4075
|
-
"limit": options["limit"],
|
|
4076
|
-
"after": options["after"],
|
|
4077
|
-
"before": options["before"]
|
|
5158
|
+
"effective_at[gt]": options["effective_at[gt]"] as UrlParams.Coercible,
|
|
5159
|
+
"effective_at[gte]": options["effective_at[gte]"] as UrlParams.Coercible,
|
|
5160
|
+
"effective_at[lt]": options["effective_at[lt]"] as UrlParams.Coercible,
|
|
5161
|
+
"effective_at[lte]": options["effective_at[lte]"] as UrlParams.Coercible,
|
|
5162
|
+
"project_ids[]": options["project_ids[]"] as UrlParams.Coercible,
|
|
5163
|
+
"event_types[]": options["event_types[]"] as UrlParams.Coercible,
|
|
5164
|
+
"actor_ids[]": options["actor_ids[]"] as UrlParams.Coercible,
|
|
5165
|
+
"actor_emails[]": options["actor_emails[]"] as UrlParams.Coercible,
|
|
5166
|
+
"resource_ids[]": options["resource_ids[]"] as UrlParams.Coercible,
|
|
5167
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5168
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
5169
|
+
"before": options["before"] as UrlParams.Coercible
|
|
4078
5170
|
}),
|
|
4079
5171
|
Effect.succeed,
|
|
4080
5172
|
Effect.flatMap((request) =>
|
|
@@ -4086,19 +5178,18 @@ export const make = (
|
|
|
4086
5178
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4087
5179
|
})
|
|
4088
5180
|
))
|
|
4089
|
-
)
|
|
4090
|
-
Effect.scoped
|
|
5181
|
+
)
|
|
4091
5182
|
),
|
|
4092
5183
|
"usageCosts": (options) =>
|
|
4093
5184
|
HttpClientRequest.make("GET")(`/organization/costs`).pipe(
|
|
4094
5185
|
HttpClientRequest.setUrlParams({
|
|
4095
|
-
"start_time": options["start_time"],
|
|
4096
|
-
"end_time": options["end_time"],
|
|
4097
|
-
"bucket_width": options["bucket_width"],
|
|
4098
|
-
"project_ids": options["project_ids"],
|
|
4099
|
-
"group_by": options["group_by"],
|
|
4100
|
-
"limit": options["limit"],
|
|
4101
|
-
"page": options["page"]
|
|
5186
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5187
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5188
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5189
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5190
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5191
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5192
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4102
5193
|
}),
|
|
4103
5194
|
Effect.succeed,
|
|
4104
5195
|
Effect.flatMap((request) =>
|
|
@@ -4110,12 +5201,14 @@ export const make = (
|
|
|
4110
5201
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4111
5202
|
})
|
|
4112
5203
|
))
|
|
4113
|
-
)
|
|
4114
|
-
Effect.scoped
|
|
5204
|
+
)
|
|
4115
5205
|
),
|
|
4116
5206
|
"listInvites": (options) =>
|
|
4117
5207
|
HttpClientRequest.make("GET")(`/organization/invites`).pipe(
|
|
4118
|
-
HttpClientRequest.setUrlParams({
|
|
5208
|
+
HttpClientRequest.setUrlParams({
|
|
5209
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5210
|
+
"after": options["after"] as UrlParams.Coercible
|
|
5211
|
+
}),
|
|
4119
5212
|
Effect.succeed,
|
|
4120
5213
|
Effect.flatMap((request) =>
|
|
4121
5214
|
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
@@ -4126,8 +5219,7 @@ export const make = (
|
|
|
4126
5219
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4127
5220
|
})
|
|
4128
5221
|
))
|
|
4129
|
-
)
|
|
4130
|
-
Effect.scoped
|
|
5222
|
+
)
|
|
4131
5223
|
),
|
|
4132
5224
|
"inviteUser": (options) =>
|
|
4133
5225
|
HttpClientRequest.make("POST")(`/organization/invites`).pipe(
|
|
@@ -4141,8 +5233,7 @@ export const make = (
|
|
|
4141
5233
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4142
5234
|
})
|
|
4143
5235
|
))
|
|
4144
|
-
)
|
|
4145
|
-
Effect.scoped
|
|
5236
|
+
)
|
|
4146
5237
|
),
|
|
4147
5238
|
"retrieveInvite": (inviteId) =>
|
|
4148
5239
|
HttpClientRequest.make("GET")(`/organization/invites/${inviteId}`).pipe(
|
|
@@ -4156,8 +5247,7 @@ export const make = (
|
|
|
4156
5247
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4157
5248
|
})
|
|
4158
5249
|
))
|
|
4159
|
-
)
|
|
4160
|
-
Effect.scoped
|
|
5250
|
+
)
|
|
4161
5251
|
),
|
|
4162
5252
|
"deleteInvite": (inviteId) =>
|
|
4163
5253
|
HttpClientRequest.make("DELETE")(`/organization/invites/${inviteId}`).pipe(
|
|
@@ -4171,15 +5261,14 @@ export const make = (
|
|
|
4171
5261
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4172
5262
|
})
|
|
4173
5263
|
))
|
|
4174
|
-
)
|
|
4175
|
-
Effect.scoped
|
|
5264
|
+
)
|
|
4176
5265
|
),
|
|
4177
5266
|
"listProjects": (options) =>
|
|
4178
5267
|
HttpClientRequest.make("GET")(`/organization/projects`).pipe(
|
|
4179
5268
|
HttpClientRequest.setUrlParams({
|
|
4180
|
-
"limit": options["limit"],
|
|
4181
|
-
"after": options["after"],
|
|
4182
|
-
"include_archived": options["include_archived"]
|
|
5269
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5270
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
5271
|
+
"include_archived": options["include_archived"] as UrlParams.Coercible
|
|
4183
5272
|
}),
|
|
4184
5273
|
Effect.succeed,
|
|
4185
5274
|
Effect.flatMap((request) =>
|
|
@@ -4191,8 +5280,7 @@ export const make = (
|
|
|
4191
5280
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4192
5281
|
})
|
|
4193
5282
|
))
|
|
4194
|
-
)
|
|
4195
|
-
Effect.scoped
|
|
5283
|
+
)
|
|
4196
5284
|
),
|
|
4197
5285
|
"createProject": (options) =>
|
|
4198
5286
|
HttpClientRequest.make("POST")(`/organization/projects`).pipe(
|
|
@@ -4206,8 +5294,7 @@ export const make = (
|
|
|
4206
5294
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4207
5295
|
})
|
|
4208
5296
|
))
|
|
4209
|
-
)
|
|
4210
|
-
Effect.scoped
|
|
5297
|
+
)
|
|
4211
5298
|
),
|
|
4212
5299
|
"retrieveProject": (projectId) =>
|
|
4213
5300
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}`).pipe(
|
|
@@ -4221,8 +5308,7 @@ export const make = (
|
|
|
4221
5308
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4222
5309
|
})
|
|
4223
5310
|
))
|
|
4224
|
-
)
|
|
4225
|
-
Effect.scoped
|
|
5311
|
+
)
|
|
4226
5312
|
),
|
|
4227
5313
|
"modifyProject": (projectId, options) =>
|
|
4228
5314
|
HttpClientRequest.make("POST")(`/organization/projects/${projectId}`).pipe(
|
|
@@ -4237,12 +5323,14 @@ export const make = (
|
|
|
4237
5323
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4238
5324
|
})
|
|
4239
5325
|
))
|
|
4240
|
-
)
|
|
4241
|
-
Effect.scoped
|
|
5326
|
+
)
|
|
4242
5327
|
),
|
|
4243
5328
|
"listProjectApiKeys": (projectId, options) =>
|
|
4244
5329
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/api_keys`).pipe(
|
|
4245
|
-
HttpClientRequest.setUrlParams({
|
|
5330
|
+
HttpClientRequest.setUrlParams({
|
|
5331
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5332
|
+
"after": options["after"] as UrlParams.Coercible
|
|
5333
|
+
}),
|
|
4246
5334
|
Effect.succeed,
|
|
4247
5335
|
Effect.flatMap((request) =>
|
|
4248
5336
|
Effect.flatMap(
|
|
@@ -4256,8 +5344,7 @@ export const make = (
|
|
|
4256
5344
|
})
|
|
4257
5345
|
)
|
|
4258
5346
|
)
|
|
4259
|
-
)
|
|
4260
|
-
Effect.scoped
|
|
5347
|
+
)
|
|
4261
5348
|
),
|
|
4262
5349
|
"retrieveProjectApiKey": (projectId, keyId) =>
|
|
4263
5350
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/api_keys/${keyId}`).pipe(
|
|
@@ -4274,8 +5361,7 @@ export const make = (
|
|
|
4274
5361
|
})
|
|
4275
5362
|
)
|
|
4276
5363
|
)
|
|
4277
|
-
)
|
|
4278
|
-
Effect.scoped
|
|
5364
|
+
)
|
|
4279
5365
|
),
|
|
4280
5366
|
"deleteProjectApiKey": (projectId, keyId) =>
|
|
4281
5367
|
HttpClientRequest.make("DELETE")(`/organization/projects/${projectId}/api_keys/${keyId}`).pipe(
|
|
@@ -4293,8 +5379,7 @@ export const make = (
|
|
|
4293
5379
|
})
|
|
4294
5380
|
)
|
|
4295
5381
|
)
|
|
4296
|
-
)
|
|
4297
|
-
Effect.scoped
|
|
5382
|
+
)
|
|
4298
5383
|
),
|
|
4299
5384
|
"archiveProject": (projectId) =>
|
|
4300
5385
|
HttpClientRequest.make("POST")(`/organization/projects/${projectId}/archive`).pipe(
|
|
@@ -4308,15 +5393,14 @@ export const make = (
|
|
|
4308
5393
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4309
5394
|
})
|
|
4310
5395
|
))
|
|
4311
|
-
)
|
|
4312
|
-
Effect.scoped
|
|
5396
|
+
)
|
|
4313
5397
|
),
|
|
4314
5398
|
"listProjectRateLimits": (projectId, options) =>
|
|
4315
5399
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/rate_limits`).pipe(
|
|
4316
5400
|
HttpClientRequest.setUrlParams({
|
|
4317
|
-
"limit": options["limit"],
|
|
4318
|
-
"after": options["after"],
|
|
4319
|
-
"before": options["before"]
|
|
5401
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5402
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
5403
|
+
"before": options["before"] as UrlParams.Coercible
|
|
4320
5404
|
}),
|
|
4321
5405
|
Effect.succeed,
|
|
4322
5406
|
Effect.flatMap((request) =>
|
|
@@ -4331,8 +5415,7 @@ export const make = (
|
|
|
4331
5415
|
})
|
|
4332
5416
|
)
|
|
4333
5417
|
)
|
|
4334
|
-
)
|
|
4335
|
-
Effect.scoped
|
|
5418
|
+
)
|
|
4336
5419
|
),
|
|
4337
5420
|
"updateProjectRateLimits": (projectId, rateLimitId, options) =>
|
|
4338
5421
|
HttpClientRequest.make("POST")(`/organization/projects/${projectId}/rate_limits/${rateLimitId}`).pipe(
|
|
@@ -4350,12 +5433,14 @@ export const make = (
|
|
|
4350
5433
|
})
|
|
4351
5434
|
)
|
|
4352
5435
|
)
|
|
4353
|
-
)
|
|
4354
|
-
Effect.scoped
|
|
5436
|
+
)
|
|
4355
5437
|
),
|
|
4356
5438
|
"listProjectServiceAccounts": (projectId, options) =>
|
|
4357
5439
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/service_accounts`).pipe(
|
|
4358
|
-
HttpClientRequest.setUrlParams({
|
|
5440
|
+
HttpClientRequest.setUrlParams({
|
|
5441
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5442
|
+
"after": options["after"] as UrlParams.Coercible
|
|
5443
|
+
}),
|
|
4359
5444
|
Effect.succeed,
|
|
4360
5445
|
Effect.flatMap((request) =>
|
|
4361
5446
|
Effect.flatMap(
|
|
@@ -4370,8 +5455,7 @@ export const make = (
|
|
|
4370
5455
|
})
|
|
4371
5456
|
)
|
|
4372
5457
|
)
|
|
4373
|
-
)
|
|
4374
|
-
Effect.scoped
|
|
5458
|
+
)
|
|
4375
5459
|
),
|
|
4376
5460
|
"createProjectServiceAccount": (projectId, options) =>
|
|
4377
5461
|
HttpClientRequest.make("POST")(`/organization/projects/${projectId}/service_accounts`).pipe(
|
|
@@ -4389,8 +5473,7 @@ export const make = (
|
|
|
4389
5473
|
})
|
|
4390
5474
|
)
|
|
4391
5475
|
)
|
|
4392
|
-
)
|
|
4393
|
-
Effect.scoped
|
|
5476
|
+
)
|
|
4394
5477
|
),
|
|
4395
5478
|
"retrieveProjectServiceAccount": (projectId, serviceAccountId) =>
|
|
4396
5479
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/service_accounts/${serviceAccountId}`).pipe(
|
|
@@ -4407,8 +5490,7 @@ export const make = (
|
|
|
4407
5490
|
})
|
|
4408
5491
|
)
|
|
4409
5492
|
)
|
|
4410
|
-
)
|
|
4411
|
-
Effect.scoped
|
|
5493
|
+
)
|
|
4412
5494
|
),
|
|
4413
5495
|
"deleteProjectServiceAccount": (projectId, serviceAccountId) =>
|
|
4414
5496
|
HttpClientRequest.make("DELETE")(`/organization/projects/${projectId}/service_accounts/${serviceAccountId}`).pipe(
|
|
@@ -4425,12 +5507,14 @@ export const make = (
|
|
|
4425
5507
|
})
|
|
4426
5508
|
)
|
|
4427
5509
|
)
|
|
4428
|
-
)
|
|
4429
|
-
Effect.scoped
|
|
5510
|
+
)
|
|
4430
5511
|
),
|
|
4431
5512
|
"listProjectUsers": (projectId, options) =>
|
|
4432
5513
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/users`).pipe(
|
|
4433
|
-
HttpClientRequest.setUrlParams({
|
|
5514
|
+
HttpClientRequest.setUrlParams({
|
|
5515
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5516
|
+
"after": options["after"] as UrlParams.Coercible
|
|
5517
|
+
}),
|
|
4434
5518
|
Effect.succeed,
|
|
4435
5519
|
Effect.flatMap((request) =>
|
|
4436
5520
|
Effect.flatMap(
|
|
@@ -4445,8 +5529,7 @@ export const make = (
|
|
|
4445
5529
|
})
|
|
4446
5530
|
)
|
|
4447
5531
|
)
|
|
4448
|
-
)
|
|
4449
|
-
Effect.scoped
|
|
5532
|
+
)
|
|
4450
5533
|
),
|
|
4451
5534
|
"createProjectUser": (projectId, options) =>
|
|
4452
5535
|
HttpClientRequest.make("POST")(`/organization/projects/${projectId}/users`).pipe(
|
|
@@ -4464,8 +5547,7 @@ export const make = (
|
|
|
4464
5547
|
})
|
|
4465
5548
|
)
|
|
4466
5549
|
)
|
|
4467
|
-
)
|
|
4468
|
-
Effect.scoped
|
|
5550
|
+
)
|
|
4469
5551
|
),
|
|
4470
5552
|
"retrieveProjectUser": (projectId, userId) =>
|
|
4471
5553
|
HttpClientRequest.make("GET")(`/organization/projects/${projectId}/users/${userId}`).pipe(
|
|
@@ -4482,8 +5564,7 @@ export const make = (
|
|
|
4482
5564
|
})
|
|
4483
5565
|
)
|
|
4484
5566
|
)
|
|
4485
|
-
)
|
|
4486
|
-
Effect.scoped
|
|
5567
|
+
)
|
|
4487
5568
|
),
|
|
4488
5569
|
"modifyProjectUser": (projectId, userId, options) =>
|
|
4489
5570
|
HttpClientRequest.make("POST")(`/organization/projects/${projectId}/users/${userId}`).pipe(
|
|
@@ -4501,8 +5582,7 @@ export const make = (
|
|
|
4501
5582
|
})
|
|
4502
5583
|
)
|
|
4503
5584
|
)
|
|
4504
|
-
)
|
|
4505
|
-
Effect.scoped
|
|
5585
|
+
)
|
|
4506
5586
|
),
|
|
4507
5587
|
"deleteProjectUser": (projectId, userId) =>
|
|
4508
5588
|
HttpClientRequest.make("DELETE")(`/organization/projects/${projectId}/users/${userId}`).pipe(
|
|
@@ -4520,22 +5600,21 @@ export const make = (
|
|
|
4520
5600
|
})
|
|
4521
5601
|
)
|
|
4522
5602
|
)
|
|
4523
|
-
)
|
|
4524
|
-
Effect.scoped
|
|
5603
|
+
)
|
|
4525
5604
|
),
|
|
4526
5605
|
"usageAudioSpeeches": (options) =>
|
|
4527
5606
|
HttpClientRequest.make("GET")(`/organization/usage/audio_speeches`).pipe(
|
|
4528
5607
|
HttpClientRequest.setUrlParams({
|
|
4529
|
-
"start_time": options["start_time"],
|
|
4530
|
-
"end_time": options["end_time"],
|
|
4531
|
-
"bucket_width": options["bucket_width"],
|
|
4532
|
-
"project_ids": options["project_ids"],
|
|
4533
|
-
"user_ids": options["user_ids"],
|
|
4534
|
-
"api_key_ids": options["api_key_ids"],
|
|
4535
|
-
"models": options["models"],
|
|
4536
|
-
"group_by": options["group_by"],
|
|
4537
|
-
"limit": options["limit"],
|
|
4538
|
-
"page": options["page"]
|
|
5608
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5609
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5610
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5611
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5612
|
+
"user_ids": options["user_ids"] as UrlParams.Coercible,
|
|
5613
|
+
"api_key_ids": options["api_key_ids"] as UrlParams.Coercible,
|
|
5614
|
+
"models": options["models"] as UrlParams.Coercible,
|
|
5615
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5616
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5617
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4539
5618
|
}),
|
|
4540
5619
|
Effect.succeed,
|
|
4541
5620
|
Effect.flatMap((request) =>
|
|
@@ -4547,22 +5626,21 @@ export const make = (
|
|
|
4547
5626
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4548
5627
|
})
|
|
4549
5628
|
))
|
|
4550
|
-
)
|
|
4551
|
-
Effect.scoped
|
|
5629
|
+
)
|
|
4552
5630
|
),
|
|
4553
5631
|
"usageAudioTranscriptions": (options) =>
|
|
4554
5632
|
HttpClientRequest.make("GET")(`/organization/usage/audio_transcriptions`).pipe(
|
|
4555
5633
|
HttpClientRequest.setUrlParams({
|
|
4556
|
-
"start_time": options["start_time"],
|
|
4557
|
-
"end_time": options["end_time"],
|
|
4558
|
-
"bucket_width": options["bucket_width"],
|
|
4559
|
-
"project_ids": options["project_ids"],
|
|
4560
|
-
"user_ids": options["user_ids"],
|
|
4561
|
-
"api_key_ids": options["api_key_ids"],
|
|
4562
|
-
"models": options["models"],
|
|
4563
|
-
"group_by": options["group_by"],
|
|
4564
|
-
"limit": options["limit"],
|
|
4565
|
-
"page": options["page"]
|
|
5634
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5635
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5636
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5637
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5638
|
+
"user_ids": options["user_ids"] as UrlParams.Coercible,
|
|
5639
|
+
"api_key_ids": options["api_key_ids"] as UrlParams.Coercible,
|
|
5640
|
+
"models": options["models"] as UrlParams.Coercible,
|
|
5641
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5642
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5643
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4566
5644
|
}),
|
|
4567
5645
|
Effect.succeed,
|
|
4568
5646
|
Effect.flatMap((request) =>
|
|
@@ -4577,19 +5655,18 @@ export const make = (
|
|
|
4577
5655
|
})
|
|
4578
5656
|
)
|
|
4579
5657
|
)
|
|
4580
|
-
)
|
|
4581
|
-
Effect.scoped
|
|
5658
|
+
)
|
|
4582
5659
|
),
|
|
4583
5660
|
"usageCodeInterpreterSessions": (options) =>
|
|
4584
5661
|
HttpClientRequest.make("GET")(`/organization/usage/code_interpreter_sessions`).pipe(
|
|
4585
5662
|
HttpClientRequest.setUrlParams({
|
|
4586
|
-
"start_time": options["start_time"],
|
|
4587
|
-
"end_time": options["end_time"],
|
|
4588
|
-
"bucket_width": options["bucket_width"],
|
|
4589
|
-
"project_ids": options["project_ids"],
|
|
4590
|
-
"group_by": options["group_by"],
|
|
4591
|
-
"limit": options["limit"],
|
|
4592
|
-
"page": options["page"]
|
|
5663
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5664
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5665
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5666
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5667
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5668
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5669
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4593
5670
|
}),
|
|
4594
5671
|
Effect.succeed,
|
|
4595
5672
|
Effect.flatMap((request) =>
|
|
@@ -4604,23 +5681,22 @@ export const make = (
|
|
|
4604
5681
|
})
|
|
4605
5682
|
)
|
|
4606
5683
|
)
|
|
4607
|
-
)
|
|
4608
|
-
Effect.scoped
|
|
5684
|
+
)
|
|
4609
5685
|
),
|
|
4610
5686
|
"usageCompletions": (options) =>
|
|
4611
5687
|
HttpClientRequest.make("GET")(`/organization/usage/completions`).pipe(
|
|
4612
5688
|
HttpClientRequest.setUrlParams({
|
|
4613
|
-
"start_time": options["start_time"],
|
|
4614
|
-
"end_time": options["end_time"],
|
|
4615
|
-
"bucket_width": options["bucket_width"],
|
|
4616
|
-
"project_ids": options["project_ids"],
|
|
4617
|
-
"user_ids": options["user_ids"],
|
|
4618
|
-
"api_key_ids": options["api_key_ids"],
|
|
4619
|
-
"models": options["models"],
|
|
4620
|
-
"batch": options["batch"],
|
|
4621
|
-
"group_by": options["group_by"],
|
|
4622
|
-
"limit": options["limit"],
|
|
4623
|
-
"page": options["page"]
|
|
5689
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5690
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5691
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5692
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5693
|
+
"user_ids": options["user_ids"] as UrlParams.Coercible,
|
|
5694
|
+
"api_key_ids": options["api_key_ids"] as UrlParams.Coercible,
|
|
5695
|
+
"models": options["models"] as UrlParams.Coercible,
|
|
5696
|
+
"batch": options["batch"] as UrlParams.Coercible,
|
|
5697
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5698
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5699
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4624
5700
|
}),
|
|
4625
5701
|
Effect.succeed,
|
|
4626
5702
|
Effect.flatMap((request) =>
|
|
@@ -4632,22 +5708,21 @@ export const make = (
|
|
|
4632
5708
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4633
5709
|
})
|
|
4634
5710
|
))
|
|
4635
|
-
)
|
|
4636
|
-
Effect.scoped
|
|
5711
|
+
)
|
|
4637
5712
|
),
|
|
4638
5713
|
"usageEmbeddings": (options) =>
|
|
4639
5714
|
HttpClientRequest.make("GET")(`/organization/usage/embeddings`).pipe(
|
|
4640
5715
|
HttpClientRequest.setUrlParams({
|
|
4641
|
-
"start_time": options["start_time"],
|
|
4642
|
-
"end_time": options["end_time"],
|
|
4643
|
-
"bucket_width": options["bucket_width"],
|
|
4644
|
-
"project_ids": options["project_ids"],
|
|
4645
|
-
"user_ids": options["user_ids"],
|
|
4646
|
-
"api_key_ids": options["api_key_ids"],
|
|
4647
|
-
"models": options["models"],
|
|
4648
|
-
"group_by": options["group_by"],
|
|
4649
|
-
"limit": options["limit"],
|
|
4650
|
-
"page": options["page"]
|
|
5716
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5717
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5718
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5719
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5720
|
+
"user_ids": options["user_ids"] as UrlParams.Coercible,
|
|
5721
|
+
"api_key_ids": options["api_key_ids"] as UrlParams.Coercible,
|
|
5722
|
+
"models": options["models"] as UrlParams.Coercible,
|
|
5723
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5724
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5725
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4651
5726
|
}),
|
|
4652
5727
|
Effect.succeed,
|
|
4653
5728
|
Effect.flatMap((request) =>
|
|
@@ -4659,24 +5734,23 @@ export const make = (
|
|
|
4659
5734
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4660
5735
|
})
|
|
4661
5736
|
))
|
|
4662
|
-
)
|
|
4663
|
-
Effect.scoped
|
|
5737
|
+
)
|
|
4664
5738
|
),
|
|
4665
5739
|
"usageImages": (options) =>
|
|
4666
5740
|
HttpClientRequest.make("GET")(`/organization/usage/images`).pipe(
|
|
4667
5741
|
HttpClientRequest.setUrlParams({
|
|
4668
|
-
"start_time": options["start_time"],
|
|
4669
|
-
"end_time": options["end_time"],
|
|
4670
|
-
"bucket_width": options["bucket_width"],
|
|
4671
|
-
"sources": options["sources"],
|
|
4672
|
-
"sizes": options["sizes"],
|
|
4673
|
-
"project_ids": options["project_ids"],
|
|
4674
|
-
"user_ids": options["user_ids"],
|
|
4675
|
-
"api_key_ids": options["api_key_ids"],
|
|
4676
|
-
"models": options["models"],
|
|
4677
|
-
"group_by": options["group_by"],
|
|
4678
|
-
"limit": options["limit"],
|
|
4679
|
-
"page": options["page"]
|
|
5742
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5743
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5744
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5745
|
+
"sources": options["sources"] as UrlParams.Coercible,
|
|
5746
|
+
"sizes": options["sizes"] as UrlParams.Coercible,
|
|
5747
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5748
|
+
"user_ids": options["user_ids"] as UrlParams.Coercible,
|
|
5749
|
+
"api_key_ids": options["api_key_ids"] as UrlParams.Coercible,
|
|
5750
|
+
"models": options["models"] as UrlParams.Coercible,
|
|
5751
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5752
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5753
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4680
5754
|
}),
|
|
4681
5755
|
Effect.succeed,
|
|
4682
5756
|
Effect.flatMap((request) =>
|
|
@@ -4688,22 +5762,21 @@ export const make = (
|
|
|
4688
5762
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4689
5763
|
})
|
|
4690
5764
|
))
|
|
4691
|
-
)
|
|
4692
|
-
Effect.scoped
|
|
5765
|
+
)
|
|
4693
5766
|
),
|
|
4694
5767
|
"usageModerations": (options) =>
|
|
4695
5768
|
HttpClientRequest.make("GET")(`/organization/usage/moderations`).pipe(
|
|
4696
5769
|
HttpClientRequest.setUrlParams({
|
|
4697
|
-
"start_time": options["start_time"],
|
|
4698
|
-
"end_time": options["end_time"],
|
|
4699
|
-
"bucket_width": options["bucket_width"],
|
|
4700
|
-
"project_ids": options["project_ids"],
|
|
4701
|
-
"user_ids": options["user_ids"],
|
|
4702
|
-
"api_key_ids": options["api_key_ids"],
|
|
4703
|
-
"models": options["models"],
|
|
4704
|
-
"group_by": options["group_by"],
|
|
4705
|
-
"limit": options["limit"],
|
|
4706
|
-
"page": options["page"]
|
|
5770
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5771
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5772
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5773
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5774
|
+
"user_ids": options["user_ids"] as UrlParams.Coercible,
|
|
5775
|
+
"api_key_ids": options["api_key_ids"] as UrlParams.Coercible,
|
|
5776
|
+
"models": options["models"] as UrlParams.Coercible,
|
|
5777
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5778
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5779
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4707
5780
|
}),
|
|
4708
5781
|
Effect.succeed,
|
|
4709
5782
|
Effect.flatMap((request) =>
|
|
@@ -4715,19 +5788,18 @@ export const make = (
|
|
|
4715
5788
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4716
5789
|
})
|
|
4717
5790
|
))
|
|
4718
|
-
)
|
|
4719
|
-
Effect.scoped
|
|
5791
|
+
)
|
|
4720
5792
|
),
|
|
4721
5793
|
"usageVectorStores": (options) =>
|
|
4722
5794
|
HttpClientRequest.make("GET")(`/organization/usage/vector_stores`).pipe(
|
|
4723
5795
|
HttpClientRequest.setUrlParams({
|
|
4724
|
-
"start_time": options["start_time"],
|
|
4725
|
-
"end_time": options["end_time"],
|
|
4726
|
-
"bucket_width": options["bucket_width"],
|
|
4727
|
-
"project_ids": options["project_ids"],
|
|
4728
|
-
"group_by": options["group_by"],
|
|
4729
|
-
"limit": options["limit"],
|
|
4730
|
-
"page": options["page"]
|
|
5796
|
+
"start_time": options["start_time"] as UrlParams.Coercible,
|
|
5797
|
+
"end_time": options["end_time"] as UrlParams.Coercible,
|
|
5798
|
+
"bucket_width": options["bucket_width"] as UrlParams.Coercible,
|
|
5799
|
+
"project_ids": options["project_ids"] as UrlParams.Coercible,
|
|
5800
|
+
"group_by": options["group_by"] as UrlParams.Coercible,
|
|
5801
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5802
|
+
"page": options["page"] as UrlParams.Coercible
|
|
4731
5803
|
}),
|
|
4732
5804
|
Effect.succeed,
|
|
4733
5805
|
Effect.flatMap((request) =>
|
|
@@ -4739,15 +5811,14 @@ export const make = (
|
|
|
4739
5811
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4740
5812
|
})
|
|
4741
5813
|
))
|
|
4742
|
-
)
|
|
4743
|
-
Effect.scoped
|
|
5814
|
+
)
|
|
4744
5815
|
),
|
|
4745
5816
|
"listUsers": (options) =>
|
|
4746
5817
|
HttpClientRequest.make("GET")(`/organization/users`).pipe(
|
|
4747
5818
|
HttpClientRequest.setUrlParams({
|
|
4748
|
-
"limit": options["limit"],
|
|
4749
|
-
"after": options["after"],
|
|
4750
|
-
"emails": options["emails"]
|
|
5819
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5820
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
5821
|
+
"emails": options["emails"] as UrlParams.Coercible
|
|
4751
5822
|
}),
|
|
4752
5823
|
Effect.succeed,
|
|
4753
5824
|
Effect.flatMap((request) =>
|
|
@@ -4759,8 +5830,7 @@ export const make = (
|
|
|
4759
5830
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4760
5831
|
})
|
|
4761
5832
|
))
|
|
4762
|
-
)
|
|
4763
|
-
Effect.scoped
|
|
5833
|
+
)
|
|
4764
5834
|
),
|
|
4765
5835
|
"retrieveUser": (userId) =>
|
|
4766
5836
|
HttpClientRequest.make("GET")(`/organization/users/${userId}`).pipe(
|
|
@@ -4774,8 +5844,7 @@ export const make = (
|
|
|
4774
5844
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4775
5845
|
})
|
|
4776
5846
|
))
|
|
4777
|
-
)
|
|
4778
|
-
Effect.scoped
|
|
5847
|
+
)
|
|
4779
5848
|
),
|
|
4780
5849
|
"modifyUser": (userId, options) =>
|
|
4781
5850
|
HttpClientRequest.make("POST")(`/organization/users/${userId}`).pipe(
|
|
@@ -4789,8 +5858,7 @@ export const make = (
|
|
|
4789
5858
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4790
5859
|
})
|
|
4791
5860
|
))
|
|
4792
|
-
)
|
|
4793
|
-
Effect.scoped
|
|
5861
|
+
)
|
|
4794
5862
|
),
|
|
4795
5863
|
"deleteUser": (userId) =>
|
|
4796
5864
|
HttpClientRequest.make("DELETE")(`/organization/users/${userId}`).pipe(
|
|
@@ -4804,8 +5872,7 @@ export const make = (
|
|
|
4804
5872
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4805
5873
|
})
|
|
4806
5874
|
))
|
|
4807
|
-
)
|
|
4808
|
-
Effect.scoped
|
|
5875
|
+
)
|
|
4809
5876
|
),
|
|
4810
5877
|
"createRealtimeSession": (options) =>
|
|
4811
5878
|
HttpClientRequest.make("POST")(`/realtime/sessions`).pipe(
|
|
@@ -4819,8 +5886,73 @@ export const make = (
|
|
|
4819
5886
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4820
5887
|
})
|
|
4821
5888
|
))
|
|
4822
|
-
)
|
|
4823
|
-
|
|
5889
|
+
)
|
|
5890
|
+
),
|
|
5891
|
+
"createResponse": (options) =>
|
|
5892
|
+
HttpClientRequest.make("POST")(`/responses`).pipe(
|
|
5893
|
+
(req) => Effect.orDie(HttpClientRequest.bodyJson(req, options)),
|
|
5894
|
+
Effect.flatMap((request) =>
|
|
5895
|
+
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
5896
|
+
Effect.flatMap(
|
|
5897
|
+
httpClient.execute(request),
|
|
5898
|
+
HttpClientResponse.matchStatus({
|
|
5899
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(Response)(r),
|
|
5900
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
5901
|
+
})
|
|
5902
|
+
))
|
|
5903
|
+
)
|
|
5904
|
+
),
|
|
5905
|
+
"getResponse": (responseId, options) =>
|
|
5906
|
+
HttpClientRequest.make("GET")(`/responses/${responseId}`).pipe(
|
|
5907
|
+
HttpClientRequest.setUrlParams({ "include": options["include"] as UrlParams.Coercible }),
|
|
5908
|
+
Effect.succeed,
|
|
5909
|
+
Effect.flatMap((request) =>
|
|
5910
|
+
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
5911
|
+
Effect.flatMap(
|
|
5912
|
+
httpClient.execute(request),
|
|
5913
|
+
HttpClientResponse.matchStatus({
|
|
5914
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(Response)(r),
|
|
5915
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
5916
|
+
})
|
|
5917
|
+
))
|
|
5918
|
+
)
|
|
5919
|
+
),
|
|
5920
|
+
"deleteResponse": (responseId) =>
|
|
5921
|
+
HttpClientRequest.make("DELETE")(`/responses/${responseId}`).pipe(
|
|
5922
|
+
Effect.succeed,
|
|
5923
|
+
Effect.flatMap((request) =>
|
|
5924
|
+
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
5925
|
+
Effect.flatMap(
|
|
5926
|
+
httpClient.execute(request),
|
|
5927
|
+
HttpClientResponse.matchStatus({
|
|
5928
|
+
"404": (r) => decodeError(r, Error),
|
|
5929
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
5930
|
+
})
|
|
5931
|
+
))
|
|
5932
|
+
)
|
|
5933
|
+
),
|
|
5934
|
+
"listInputItems": (responseId, options) =>
|
|
5935
|
+
HttpClientRequest.make("GET")(`/responses/${responseId}/input_items`).pipe(
|
|
5936
|
+
HttpClientRequest.setUrlParams({
|
|
5937
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
5938
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
5939
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
5940
|
+
"before": options["before"] as UrlParams.Coercible
|
|
5941
|
+
}),
|
|
5942
|
+
Effect.succeed,
|
|
5943
|
+
Effect.flatMap((request) =>
|
|
5944
|
+
Effect.flatMap(
|
|
5945
|
+
applyClientTransform(httpClient),
|
|
5946
|
+
(httpClient) =>
|
|
5947
|
+
Effect.flatMap(
|
|
5948
|
+
httpClient.execute(request),
|
|
5949
|
+
HttpClientResponse.matchStatus({
|
|
5950
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(ResponseItemList)(r),
|
|
5951
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
5952
|
+
})
|
|
5953
|
+
)
|
|
5954
|
+
)
|
|
5955
|
+
)
|
|
4824
5956
|
),
|
|
4825
5957
|
"createThread": (options) =>
|
|
4826
5958
|
HttpClientRequest.make("POST")(`/threads`).pipe(
|
|
@@ -4834,8 +5966,7 @@ export const make = (
|
|
|
4834
5966
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4835
5967
|
})
|
|
4836
5968
|
))
|
|
4837
|
-
)
|
|
4838
|
-
Effect.scoped
|
|
5969
|
+
)
|
|
4839
5970
|
),
|
|
4840
5971
|
"createThreadAndRun": (options) =>
|
|
4841
5972
|
HttpClientRequest.make("POST")(`/threads/runs`).pipe(
|
|
@@ -4849,8 +5980,7 @@ export const make = (
|
|
|
4849
5980
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4850
5981
|
})
|
|
4851
5982
|
))
|
|
4852
|
-
)
|
|
4853
|
-
Effect.scoped
|
|
5983
|
+
)
|
|
4854
5984
|
),
|
|
4855
5985
|
"getThread": (threadId) =>
|
|
4856
5986
|
HttpClientRequest.make("GET")(`/threads/${threadId}`).pipe(
|
|
@@ -4864,8 +5994,7 @@ export const make = (
|
|
|
4864
5994
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4865
5995
|
})
|
|
4866
5996
|
))
|
|
4867
|
-
)
|
|
4868
|
-
Effect.scoped
|
|
5997
|
+
)
|
|
4869
5998
|
),
|
|
4870
5999
|
"modifyThread": (threadId, options) =>
|
|
4871
6000
|
HttpClientRequest.make("POST")(`/threads/${threadId}`).pipe(
|
|
@@ -4879,8 +6008,7 @@ export const make = (
|
|
|
4879
6008
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4880
6009
|
})
|
|
4881
6010
|
))
|
|
4882
|
-
)
|
|
4883
|
-
Effect.scoped
|
|
6011
|
+
)
|
|
4884
6012
|
),
|
|
4885
6013
|
"deleteThread": (threadId) =>
|
|
4886
6014
|
HttpClientRequest.make("DELETE")(`/threads/${threadId}`).pipe(
|
|
@@ -4894,17 +6022,16 @@ export const make = (
|
|
|
4894
6022
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4895
6023
|
})
|
|
4896
6024
|
))
|
|
4897
|
-
)
|
|
4898
|
-
Effect.scoped
|
|
6025
|
+
)
|
|
4899
6026
|
),
|
|
4900
6027
|
"listMessages": (threadId, options) =>
|
|
4901
6028
|
HttpClientRequest.make("GET")(`/threads/${threadId}/messages`).pipe(
|
|
4902
6029
|
HttpClientRequest.setUrlParams({
|
|
4903
|
-
"limit": options["limit"],
|
|
4904
|
-
"order": options["order"],
|
|
4905
|
-
"after": options["after"],
|
|
4906
|
-
"before": options["before"],
|
|
4907
|
-
"run_id": options["run_id"]
|
|
6030
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
6031
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
6032
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
6033
|
+
"before": options["before"] as UrlParams.Coercible,
|
|
6034
|
+
"run_id": options["run_id"] as UrlParams.Coercible
|
|
4908
6035
|
}),
|
|
4909
6036
|
Effect.succeed,
|
|
4910
6037
|
Effect.flatMap((request) =>
|
|
@@ -4916,8 +6043,7 @@ export const make = (
|
|
|
4916
6043
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4917
6044
|
})
|
|
4918
6045
|
))
|
|
4919
|
-
)
|
|
4920
|
-
Effect.scoped
|
|
6046
|
+
)
|
|
4921
6047
|
),
|
|
4922
6048
|
"createMessage": (threadId, options) =>
|
|
4923
6049
|
HttpClientRequest.make("POST")(`/threads/${threadId}/messages`).pipe(
|
|
@@ -4931,8 +6057,7 @@ export const make = (
|
|
|
4931
6057
|
orElse: (response) => unexpectedStatus(request, response)
|
|
4932
6058
|
})
|
|
4933
6059
|
))
|
|
4934
|
-
)
|
|
4935
|
-
Effect.scoped
|
|
6060
|
+
)
|
|
4936
6061
|
),
|
|
4937
6062
|
"getMessage": (threadId, messageId) =>
|
|
4938
6063
|
HttpClientRequest.make("GET")(`/threads/${threadId}/messages/${messageId}`).pipe(
|
|
@@ -4949,8 +6074,7 @@ export const make = (
|
|
|
4949
6074
|
})
|
|
4950
6075
|
)
|
|
4951
6076
|
)
|
|
4952
|
-
)
|
|
4953
|
-
Effect.scoped
|
|
6077
|
+
)
|
|
4954
6078
|
),
|
|
4955
6079
|
"modifyMessage": (threadId, messageId, options) =>
|
|
4956
6080
|
HttpClientRequest.make("POST")(`/threads/${threadId}/messages/${messageId}`).pipe(
|
|
@@ -4967,8 +6091,7 @@ export const make = (
|
|
|
4967
6091
|
})
|
|
4968
6092
|
)
|
|
4969
6093
|
)
|
|
4970
|
-
)
|
|
4971
|
-
Effect.scoped
|
|
6094
|
+
)
|
|
4972
6095
|
),
|
|
4973
6096
|
"deleteMessage": (threadId, messageId) =>
|
|
4974
6097
|
HttpClientRequest.make("DELETE")(`/threads/${threadId}/messages/${messageId}`).pipe(
|
|
@@ -4985,16 +6108,15 @@ export const make = (
|
|
|
4985
6108
|
})
|
|
4986
6109
|
)
|
|
4987
6110
|
)
|
|
4988
|
-
)
|
|
4989
|
-
Effect.scoped
|
|
6111
|
+
)
|
|
4990
6112
|
),
|
|
4991
6113
|
"listRuns": (threadId, options) =>
|
|
4992
6114
|
HttpClientRequest.make("GET")(`/threads/${threadId}/runs`).pipe(
|
|
4993
6115
|
HttpClientRequest.setUrlParams({
|
|
4994
|
-
"limit": options["limit"],
|
|
4995
|
-
"order": options["order"],
|
|
4996
|
-
"after": options["after"],
|
|
4997
|
-
"before": options["before"]
|
|
6116
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
6117
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
6118
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
6119
|
+
"before": options["before"] as UrlParams.Coercible
|
|
4998
6120
|
}),
|
|
4999
6121
|
Effect.succeed,
|
|
5000
6122
|
Effect.flatMap((request) =>
|
|
@@ -5006,12 +6128,11 @@ export const make = (
|
|
|
5006
6128
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5007
6129
|
})
|
|
5008
6130
|
))
|
|
5009
|
-
)
|
|
5010
|
-
Effect.scoped
|
|
6131
|
+
)
|
|
5011
6132
|
),
|
|
5012
6133
|
"createRun": (threadId, options) =>
|
|
5013
6134
|
HttpClientRequest.make("POST")(`/threads/${threadId}/runs`).pipe(
|
|
5014
|
-
HttpClientRequest.setUrlParams({ "include[]": options.params["include[]"] }),
|
|
6135
|
+
HttpClientRequest.setUrlParams({ "include[]": options.params["include[]"] as UrlParams.Coercible }),
|
|
5015
6136
|
(req) => Effect.orDie(HttpClientRequest.bodyJson(req, options.payload)),
|
|
5016
6137
|
Effect.flatMap((request) =>
|
|
5017
6138
|
Effect.flatMap(applyClientTransform(httpClient), (httpClient) =>
|
|
@@ -5022,8 +6143,7 @@ export const make = (
|
|
|
5022
6143
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5023
6144
|
})
|
|
5024
6145
|
))
|
|
5025
|
-
)
|
|
5026
|
-
Effect.scoped
|
|
6146
|
+
)
|
|
5027
6147
|
),
|
|
5028
6148
|
"getRun": (threadId, runId) =>
|
|
5029
6149
|
HttpClientRequest.make("GET")(`/threads/${threadId}/runs/${runId}`).pipe(
|
|
@@ -5037,8 +6157,7 @@ export const make = (
|
|
|
5037
6157
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5038
6158
|
})
|
|
5039
6159
|
))
|
|
5040
|
-
)
|
|
5041
|
-
Effect.scoped
|
|
6160
|
+
)
|
|
5042
6161
|
),
|
|
5043
6162
|
"modifyRun": (threadId, runId, options) =>
|
|
5044
6163
|
HttpClientRequest.make("POST")(`/threads/${threadId}/runs/${runId}`).pipe(
|
|
@@ -5055,8 +6174,7 @@ export const make = (
|
|
|
5055
6174
|
})
|
|
5056
6175
|
)
|
|
5057
6176
|
)
|
|
5058
|
-
)
|
|
5059
|
-
Effect.scoped
|
|
6177
|
+
)
|
|
5060
6178
|
),
|
|
5061
6179
|
"cancelRun": (threadId, runId) =>
|
|
5062
6180
|
HttpClientRequest.make("POST")(`/threads/${threadId}/runs/${runId}/cancel`).pipe(
|
|
@@ -5070,17 +6188,16 @@ export const make = (
|
|
|
5070
6188
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5071
6189
|
})
|
|
5072
6190
|
))
|
|
5073
|
-
)
|
|
5074
|
-
Effect.scoped
|
|
6191
|
+
)
|
|
5075
6192
|
),
|
|
5076
6193
|
"listRunSteps": (threadId, runId, options) =>
|
|
5077
6194
|
HttpClientRequest.make("GET")(`/threads/${threadId}/runs/${runId}/steps`).pipe(
|
|
5078
6195
|
HttpClientRequest.setUrlParams({
|
|
5079
|
-
"limit": options["limit"],
|
|
5080
|
-
"order": options["order"],
|
|
5081
|
-
"after": options["after"],
|
|
5082
|
-
"before": options["before"],
|
|
5083
|
-
"include[]": options["include[]"]
|
|
6196
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
6197
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
6198
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
6199
|
+
"before": options["before"] as UrlParams.Coercible,
|
|
6200
|
+
"include[]": options["include[]"] as UrlParams.Coercible
|
|
5084
6201
|
}),
|
|
5085
6202
|
Effect.succeed,
|
|
5086
6203
|
Effect.flatMap((request) =>
|
|
@@ -5095,12 +6212,11 @@ export const make = (
|
|
|
5095
6212
|
})
|
|
5096
6213
|
)
|
|
5097
6214
|
)
|
|
5098
|
-
)
|
|
5099
|
-
Effect.scoped
|
|
6215
|
+
)
|
|
5100
6216
|
),
|
|
5101
6217
|
"getRunStep": (threadId, runId, stepId, options) =>
|
|
5102
6218
|
HttpClientRequest.make("GET")(`/threads/${threadId}/runs/${runId}/steps/${stepId}`).pipe(
|
|
5103
|
-
HttpClientRequest.setUrlParams({ "include[]": options["include[]"] }),
|
|
6219
|
+
HttpClientRequest.setUrlParams({ "include[]": options["include[]"] as UrlParams.Coercible }),
|
|
5104
6220
|
Effect.succeed,
|
|
5105
6221
|
Effect.flatMap((request) =>
|
|
5106
6222
|
Effect.flatMap(
|
|
@@ -5114,8 +6230,7 @@ export const make = (
|
|
|
5114
6230
|
})
|
|
5115
6231
|
)
|
|
5116
6232
|
)
|
|
5117
|
-
)
|
|
5118
|
-
Effect.scoped
|
|
6233
|
+
)
|
|
5119
6234
|
),
|
|
5120
6235
|
"submitToolOuputsToRun": (threadId, runId, options) =>
|
|
5121
6236
|
HttpClientRequest.make("POST")(`/threads/${threadId}/runs/${runId}/submit_tool_outputs`).pipe(
|
|
@@ -5132,8 +6247,7 @@ export const make = (
|
|
|
5132
6247
|
})
|
|
5133
6248
|
)
|
|
5134
6249
|
)
|
|
5135
|
-
)
|
|
5136
|
-
Effect.scoped
|
|
6250
|
+
)
|
|
5137
6251
|
),
|
|
5138
6252
|
"createUpload": (options) =>
|
|
5139
6253
|
HttpClientRequest.make("POST")(`/uploads`).pipe(
|
|
@@ -5147,8 +6261,7 @@ export const make = (
|
|
|
5147
6261
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5148
6262
|
})
|
|
5149
6263
|
))
|
|
5150
|
-
)
|
|
5151
|
-
Effect.scoped
|
|
6264
|
+
)
|
|
5152
6265
|
),
|
|
5153
6266
|
"cancelUpload": (uploadId) =>
|
|
5154
6267
|
HttpClientRequest.make("POST")(`/uploads/${uploadId}/cancel`).pipe(
|
|
@@ -5162,8 +6275,7 @@ export const make = (
|
|
|
5162
6275
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5163
6276
|
})
|
|
5164
6277
|
))
|
|
5165
|
-
)
|
|
5166
|
-
Effect.scoped
|
|
6278
|
+
)
|
|
5167
6279
|
),
|
|
5168
6280
|
"completeUpload": (uploadId, options) =>
|
|
5169
6281
|
HttpClientRequest.make("POST")(`/uploads/${uploadId}/complete`).pipe(
|
|
@@ -5177,8 +6289,7 @@ export const make = (
|
|
|
5177
6289
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5178
6290
|
})
|
|
5179
6291
|
))
|
|
5180
|
-
)
|
|
5181
|
-
Effect.scoped
|
|
6292
|
+
)
|
|
5182
6293
|
),
|
|
5183
6294
|
"addUploadPart": (uploadId, options) =>
|
|
5184
6295
|
HttpClientRequest.make("POST")(`/uploads/${uploadId}/parts`).pipe(
|
|
@@ -5193,16 +6304,15 @@ export const make = (
|
|
|
5193
6304
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5194
6305
|
})
|
|
5195
6306
|
))
|
|
5196
|
-
)
|
|
5197
|
-
Effect.scoped
|
|
6307
|
+
)
|
|
5198
6308
|
),
|
|
5199
6309
|
"listVectorStores": (options) =>
|
|
5200
6310
|
HttpClientRequest.make("GET")(`/vector_stores`).pipe(
|
|
5201
6311
|
HttpClientRequest.setUrlParams({
|
|
5202
|
-
"limit": options["limit"],
|
|
5203
|
-
"order": options["order"],
|
|
5204
|
-
"after": options["after"],
|
|
5205
|
-
"before": options["before"]
|
|
6312
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
6313
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
6314
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
6315
|
+
"before": options["before"] as UrlParams.Coercible
|
|
5206
6316
|
}),
|
|
5207
6317
|
Effect.succeed,
|
|
5208
6318
|
Effect.flatMap((request) =>
|
|
@@ -5214,8 +6324,7 @@ export const make = (
|
|
|
5214
6324
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5215
6325
|
})
|
|
5216
6326
|
))
|
|
5217
|
-
)
|
|
5218
|
-
Effect.scoped
|
|
6327
|
+
)
|
|
5219
6328
|
),
|
|
5220
6329
|
"createVectorStore": (options) =>
|
|
5221
6330
|
HttpClientRequest.make("POST")(`/vector_stores`).pipe(
|
|
@@ -5229,8 +6338,7 @@ export const make = (
|
|
|
5229
6338
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5230
6339
|
})
|
|
5231
6340
|
))
|
|
5232
|
-
)
|
|
5233
|
-
Effect.scoped
|
|
6341
|
+
)
|
|
5234
6342
|
),
|
|
5235
6343
|
"getVectorStore": (vectorStoreId) =>
|
|
5236
6344
|
HttpClientRequest.make("GET")(`/vector_stores/${vectorStoreId}`).pipe(
|
|
@@ -5244,8 +6352,7 @@ export const make = (
|
|
|
5244
6352
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5245
6353
|
})
|
|
5246
6354
|
))
|
|
5247
|
-
)
|
|
5248
|
-
Effect.scoped
|
|
6355
|
+
)
|
|
5249
6356
|
),
|
|
5250
6357
|
"modifyVectorStore": (vectorStoreId, options) =>
|
|
5251
6358
|
HttpClientRequest.make("POST")(`/vector_stores/${vectorStoreId}`).pipe(
|
|
@@ -5262,8 +6369,7 @@ export const make = (
|
|
|
5262
6369
|
})
|
|
5263
6370
|
)
|
|
5264
6371
|
)
|
|
5265
|
-
)
|
|
5266
|
-
Effect.scoped
|
|
6372
|
+
)
|
|
5267
6373
|
),
|
|
5268
6374
|
"deleteVectorStore": (vectorStoreId) =>
|
|
5269
6375
|
HttpClientRequest.make("DELETE")(`/vector_stores/${vectorStoreId}`).pipe(
|
|
@@ -5277,8 +6383,7 @@ export const make = (
|
|
|
5277
6383
|
orElse: (response) => unexpectedStatus(request, response)
|
|
5278
6384
|
})
|
|
5279
6385
|
))
|
|
5280
|
-
)
|
|
5281
|
-
Effect.scoped
|
|
6386
|
+
)
|
|
5282
6387
|
),
|
|
5283
6388
|
"createVectorStoreFileBatch": (vectorStoreId, options) =>
|
|
5284
6389
|
HttpClientRequest.make("POST")(`/vector_stores/${vectorStoreId}/file_batches`).pipe(
|
|
@@ -5295,8 +6400,7 @@ export const make = (
|
|
|
5295
6400
|
})
|
|
5296
6401
|
)
|
|
5297
6402
|
)
|
|
5298
|
-
)
|
|
5299
|
-
Effect.scoped
|
|
6403
|
+
)
|
|
5300
6404
|
),
|
|
5301
6405
|
"getVectorStoreFileBatch": (vectorStoreId, batchId) =>
|
|
5302
6406
|
HttpClientRequest.make("GET")(`/vector_stores/${vectorStoreId}/file_batches/${batchId}`).pipe(
|
|
@@ -5313,8 +6417,7 @@ export const make = (
|
|
|
5313
6417
|
})
|
|
5314
6418
|
)
|
|
5315
6419
|
)
|
|
5316
|
-
)
|
|
5317
|
-
Effect.scoped
|
|
6420
|
+
)
|
|
5318
6421
|
),
|
|
5319
6422
|
"cancelVectorStoreFileBatch": (vectorStoreId, batchId) =>
|
|
5320
6423
|
HttpClientRequest.make("POST")(`/vector_stores/${vectorStoreId}/file_batches/${batchId}/cancel`).pipe(
|
|
@@ -5331,17 +6434,16 @@ export const make = (
|
|
|
5331
6434
|
})
|
|
5332
6435
|
)
|
|
5333
6436
|
)
|
|
5334
|
-
)
|
|
5335
|
-
Effect.scoped
|
|
6437
|
+
)
|
|
5336
6438
|
),
|
|
5337
6439
|
"listFilesInVectorStoreBatch": (vectorStoreId, batchId, options) =>
|
|
5338
6440
|
HttpClientRequest.make("GET")(`/vector_stores/${vectorStoreId}/file_batches/${batchId}/files`).pipe(
|
|
5339
6441
|
HttpClientRequest.setUrlParams({
|
|
5340
|
-
"limit": options["limit"],
|
|
5341
|
-
"order": options["order"],
|
|
5342
|
-
"after": options["after"],
|
|
5343
|
-
"before": options["before"],
|
|
5344
|
-
"filter": options["filter"]
|
|
6442
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
6443
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
6444
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
6445
|
+
"before": options["before"] as UrlParams.Coercible,
|
|
6446
|
+
"filter": options["filter"] as UrlParams.Coercible
|
|
5345
6447
|
}),
|
|
5346
6448
|
Effect.succeed,
|
|
5347
6449
|
Effect.flatMap((request) =>
|
|
@@ -5356,17 +6458,16 @@ export const make = (
|
|
|
5356
6458
|
})
|
|
5357
6459
|
)
|
|
5358
6460
|
)
|
|
5359
|
-
)
|
|
5360
|
-
Effect.scoped
|
|
6461
|
+
)
|
|
5361
6462
|
),
|
|
5362
6463
|
"listVectorStoreFiles": (vectorStoreId, options) =>
|
|
5363
6464
|
HttpClientRequest.make("GET")(`/vector_stores/${vectorStoreId}/files`).pipe(
|
|
5364
6465
|
HttpClientRequest.setUrlParams({
|
|
5365
|
-
"limit": options["limit"],
|
|
5366
|
-
"order": options["order"],
|
|
5367
|
-
"after": options["after"],
|
|
5368
|
-
"before": options["before"],
|
|
5369
|
-
"filter": options["filter"]
|
|
6466
|
+
"limit": options["limit"] as UrlParams.Coercible,
|
|
6467
|
+
"order": options["order"] as UrlParams.Coercible,
|
|
6468
|
+
"after": options["after"] as UrlParams.Coercible,
|
|
6469
|
+
"before": options["before"] as UrlParams.Coercible,
|
|
6470
|
+
"filter": options["filter"] as UrlParams.Coercible
|
|
5370
6471
|
}),
|
|
5371
6472
|
Effect.succeed,
|
|
5372
6473
|
Effect.flatMap((request) =>
|
|
@@ -5381,8 +6482,7 @@ export const make = (
|
|
|
5381
6482
|
})
|
|
5382
6483
|
)
|
|
5383
6484
|
)
|
|
5384
|
-
)
|
|
5385
|
-
Effect.scoped
|
|
6485
|
+
)
|
|
5386
6486
|
),
|
|
5387
6487
|
"createVectorStoreFile": (vectorStoreId, options) =>
|
|
5388
6488
|
HttpClientRequest.make("POST")(`/vector_stores/${vectorStoreId}/files`).pipe(
|
|
@@ -5399,8 +6499,7 @@ export const make = (
|
|
|
5399
6499
|
})
|
|
5400
6500
|
)
|
|
5401
6501
|
)
|
|
5402
|
-
)
|
|
5403
|
-
Effect.scoped
|
|
6502
|
+
)
|
|
5404
6503
|
),
|
|
5405
6504
|
"getVectorStoreFile": (vectorStoreId, fileId) =>
|
|
5406
6505
|
HttpClientRequest.make("GET")(`/vector_stores/${vectorStoreId}/files/${fileId}`).pipe(
|
|
@@ -5417,8 +6516,24 @@ export const make = (
|
|
|
5417
6516
|
})
|
|
5418
6517
|
)
|
|
5419
6518
|
)
|
|
5420
|
-
)
|
|
5421
|
-
|
|
6519
|
+
)
|
|
6520
|
+
),
|
|
6521
|
+
"updateVectorStoreFileAttributes": (vectorStoreId, fileId, options) =>
|
|
6522
|
+
HttpClientRequest.make("POST")(`/vector_stores/${vectorStoreId}/files/${fileId}`).pipe(
|
|
6523
|
+
(req) => Effect.orDie(HttpClientRequest.bodyJson(req, options)),
|
|
6524
|
+
Effect.flatMap((request) =>
|
|
6525
|
+
Effect.flatMap(
|
|
6526
|
+
applyClientTransform(httpClient),
|
|
6527
|
+
(httpClient) =>
|
|
6528
|
+
Effect.flatMap(
|
|
6529
|
+
httpClient.execute(request),
|
|
6530
|
+
HttpClientResponse.matchStatus({
|
|
6531
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(VectorStoreFileObject)(r),
|
|
6532
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
6533
|
+
})
|
|
6534
|
+
)
|
|
6535
|
+
)
|
|
6536
|
+
)
|
|
5422
6537
|
),
|
|
5423
6538
|
"deleteVectorStoreFile": (vectorStoreId, fileId) =>
|
|
5424
6539
|
HttpClientRequest.make("DELETE")(`/vector_stores/${vectorStoreId}/files/${fileId}`).pipe(
|
|
@@ -5435,8 +6550,41 @@ export const make = (
|
|
|
5435
6550
|
})
|
|
5436
6551
|
)
|
|
5437
6552
|
)
|
|
5438
|
-
)
|
|
5439
|
-
|
|
6553
|
+
)
|
|
6554
|
+
),
|
|
6555
|
+
"retrieveVectorStoreFileContent": (vectorStoreId, fileId) =>
|
|
6556
|
+
HttpClientRequest.make("GET")(`/vector_stores/${vectorStoreId}/files/${fileId}/content`).pipe(
|
|
6557
|
+
Effect.succeed,
|
|
6558
|
+
Effect.flatMap((request) =>
|
|
6559
|
+
Effect.flatMap(
|
|
6560
|
+
applyClientTransform(httpClient),
|
|
6561
|
+
(httpClient) =>
|
|
6562
|
+
Effect.flatMap(
|
|
6563
|
+
httpClient.execute(request),
|
|
6564
|
+
HttpClientResponse.matchStatus({
|
|
6565
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(VectorStoreFileContentResponse)(r),
|
|
6566
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
6567
|
+
})
|
|
6568
|
+
)
|
|
6569
|
+
)
|
|
6570
|
+
)
|
|
6571
|
+
),
|
|
6572
|
+
"searchVectorStore": (vectorStoreId, options) =>
|
|
6573
|
+
HttpClientRequest.make("POST")(`/vector_stores/${vectorStoreId}/search`).pipe(
|
|
6574
|
+
(req) => Effect.orDie(HttpClientRequest.bodyJson(req, options)),
|
|
6575
|
+
Effect.flatMap((request) =>
|
|
6576
|
+
Effect.flatMap(
|
|
6577
|
+
applyClientTransform(httpClient),
|
|
6578
|
+
(httpClient) =>
|
|
6579
|
+
Effect.flatMap(
|
|
6580
|
+
httpClient.execute(request),
|
|
6581
|
+
HttpClientResponse.matchStatus({
|
|
6582
|
+
"200": (r) => HttpClientResponse.schemaBodyJson(VectorStoreSearchResultsPage)(r),
|
|
6583
|
+
orElse: (response) => unexpectedStatus(request, response)
|
|
6584
|
+
})
|
|
6585
|
+
)
|
|
6586
|
+
)
|
|
6587
|
+
)
|
|
5440
6588
|
)
|
|
5441
6589
|
}
|
|
5442
6590
|
}
|
|
@@ -5479,9 +6627,26 @@ export interface Client {
|
|
|
5479
6627
|
readonly "cancelBatch": (
|
|
5480
6628
|
batchId: string
|
|
5481
6629
|
) => Effect.Effect<typeof Batch.Type, HttpClientError.HttpClientError | ParseError>
|
|
6630
|
+
readonly "listChatCompletions": (
|
|
6631
|
+
options: typeof ListChatCompletionsParams.Encoded
|
|
6632
|
+
) => Effect.Effect<typeof ChatCompletionList.Type, HttpClientError.HttpClientError | ParseError>
|
|
5482
6633
|
readonly "createChatCompletion": (
|
|
5483
6634
|
options: typeof CreateChatCompletionRequest.Encoded
|
|
5484
6635
|
) => Effect.Effect<typeof CreateChatCompletionResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
6636
|
+
readonly "getChatCompletion": (
|
|
6637
|
+
completionId: string
|
|
6638
|
+
) => Effect.Effect<typeof CreateChatCompletionResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
6639
|
+
readonly "updateChatCompletion": (
|
|
6640
|
+
completionId: string,
|
|
6641
|
+
options: typeof UpdateChatCompletionRequest.Encoded
|
|
6642
|
+
) => Effect.Effect<typeof CreateChatCompletionResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
6643
|
+
readonly "deleteChatCompletion": (
|
|
6644
|
+
completionId: string
|
|
6645
|
+
) => Effect.Effect<typeof ChatCompletionDeleted.Type, HttpClientError.HttpClientError | ParseError>
|
|
6646
|
+
readonly "getChatCompletionMessages": (
|
|
6647
|
+
completionId: string,
|
|
6648
|
+
options: typeof GetChatCompletionMessagesParams.Encoded
|
|
6649
|
+
) => Effect.Effect<typeof ChatCompletionMessageList.Type, HttpClientError.HttpClientError | ParseError>
|
|
5485
6650
|
readonly "createCompletion": (
|
|
5486
6651
|
options: typeof CreateCompletionRequest.Encoded
|
|
5487
6652
|
) => Effect.Effect<typeof CreateCompletionResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
@@ -5707,6 +6872,20 @@ export interface Client {
|
|
|
5707
6872
|
readonly "createRealtimeSession": (
|
|
5708
6873
|
options: typeof RealtimeSessionCreateRequest.Encoded
|
|
5709
6874
|
) => Effect.Effect<typeof RealtimeSessionCreateResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
6875
|
+
readonly "createResponse": (
|
|
6876
|
+
options: typeof CreateResponse.Encoded
|
|
6877
|
+
) => Effect.Effect<typeof Response.Type, HttpClientError.HttpClientError | ParseError>
|
|
6878
|
+
readonly "getResponse": (
|
|
6879
|
+
responseId: string,
|
|
6880
|
+
options: typeof GetResponseParams.Encoded
|
|
6881
|
+
) => Effect.Effect<typeof Response.Type, HttpClientError.HttpClientError | ParseError>
|
|
6882
|
+
readonly "deleteResponse": (
|
|
6883
|
+
responseId: string
|
|
6884
|
+
) => Effect.Effect<void, HttpClientError.HttpClientError | ParseError | typeof Error.Type>
|
|
6885
|
+
readonly "listInputItems": (
|
|
6886
|
+
responseId: string,
|
|
6887
|
+
options: typeof ListInputItemsParams.Encoded
|
|
6888
|
+
) => Effect.Effect<typeof ResponseItemList.Type, HttpClientError.HttpClientError | ParseError>
|
|
5710
6889
|
readonly "createThread": (
|
|
5711
6890
|
options: typeof CreateThreadRequest.Encoded
|
|
5712
6891
|
) => Effect.Effect<typeof ThreadObject.Type, HttpClientError.HttpClientError | ParseError>
|
|
@@ -5840,8 +7019,21 @@ export interface Client {
|
|
|
5840
7019
|
vectorStoreId: string,
|
|
5841
7020
|
fileId: string
|
|
5842
7021
|
) => Effect.Effect<typeof VectorStoreFileObject.Type, HttpClientError.HttpClientError | ParseError>
|
|
7022
|
+
readonly "updateVectorStoreFileAttributes": (
|
|
7023
|
+
vectorStoreId: string,
|
|
7024
|
+
fileId: string,
|
|
7025
|
+
options: typeof UpdateVectorStoreFileAttributesRequest.Encoded
|
|
7026
|
+
) => Effect.Effect<typeof VectorStoreFileObject.Type, HttpClientError.HttpClientError | ParseError>
|
|
5843
7027
|
readonly "deleteVectorStoreFile": (
|
|
5844
7028
|
vectorStoreId: string,
|
|
5845
7029
|
fileId: string
|
|
5846
7030
|
) => Effect.Effect<typeof DeleteVectorStoreFileResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
7031
|
+
readonly "retrieveVectorStoreFileContent": (
|
|
7032
|
+
vectorStoreId: string,
|
|
7033
|
+
fileId: string
|
|
7034
|
+
) => Effect.Effect<typeof VectorStoreFileContentResponse.Type, HttpClientError.HttpClientError | ParseError>
|
|
7035
|
+
readonly "searchVectorStore": (
|
|
7036
|
+
vectorStoreId: string,
|
|
7037
|
+
options: typeof VectorStoreSearchRequest.Encoded
|
|
7038
|
+
) => Effect.Effect<typeof VectorStoreSearchResultsPage.Type, HttpClientError.HttpClientError | ParseError>
|
|
5847
7039
|
}
|