@@ -47,9 +47,10 @@ export class Prompts extends APIResource {
47
47
}
48
48
49
49
/**
50
- * Fetches the model configuration parameters for a specified prompt, including
51
- * penalty settings, response format, and the model messages rendered with the
52
- * given variables mapped to the set LLM provider.
50
+ * Fetches the configured model parameters and messages rendered with the provided
51
+ * variables mapped to the set LLM provider. This endpoint abstracts the need to
52
+ * handle mapping between different providers, while still allowing direct calls to
53
+ * the providers.
53
54
*/
54
55
getParameters (
55
56
id : string ,
@@ -452,7 +453,7 @@ export interface PromptConfiguration {
452
453
export namespace PromptConfiguration {
453
454
export interface Message {
454
455
content : Array <
455
- | Message . TextContentBlockSchema
456
+ | Message . TextContentBlock
456
457
| Message . ImageBase64ContentBlock
457
458
| Message . ToolCallContentBlock
458
459
| Message . ToolResultContentBlock
@@ -462,7 +463,7 @@ export namespace PromptConfiguration {
462
463
}
463
464
464
465
export namespace Message {
465
- export interface TextContentBlockSchema {
466
+ export interface TextContentBlock {
466
467
text : string ;
467
468
468
469
type : 'TEXT' ;
@@ -536,14 +537,9 @@ export namespace PromptConfiguration {
536
537
maxTokens : number | null ;
537
538
538
539
/**
539
- * Example: "gpt-3.5-turbo"
540
+ * The name of the model for the provider.
540
541
*/
541
- modelName : string ;
542
-
543
- /**
544
- * The provider of the provided model.
545
- */
546
- modelProvider : 'ANTHROPIC' | 'OPENAI' ;
542
+ name : string ;
547
543
548
544
parallelToolCalls : boolean ;
549
545
@@ -552,6 +548,11 @@ export namespace PromptConfiguration {
552
548
*/
553
549
presencePenalty : number ;
554
550
551
+ /**
552
+ * The LLM model provider.
553
+ */
554
+ provider : 'ANTHROPIC' | 'OPENAI' ;
555
+
555
556
/**
556
557
* Example: PromptResponseFormat.TEXT
557
558
*/
@@ -628,7 +629,7 @@ export interface PromptCreateParams {
628
629
export namespace PromptCreateParams {
629
630
export interface Message {
630
631
content : Array <
631
- | Message . TextContentBlockSchema
632
+ | Message . TextContentBlock
632
633
| Message . ImageBase64ContentBlock
633
634
| Message . ToolCallContentBlock
634
635
| Message . ToolResultContentBlock
@@ -640,7 +641,7 @@ export namespace PromptCreateParams {
640
641
}
641
642
642
643
export namespace Message {
643
- export interface TextContentBlockSchema {
644
+ export interface TextContentBlock {
644
645
text : string ;
645
646
646
647
type : 'TEXT' ;
@@ -714,14 +715,9 @@ export namespace PromptCreateParams {
714
715
maxTokens : number | null ;
715
716
716
717
/**
717
- * Example: "gpt-3.5-turbo"
718
+ * The name of the model for the provider.
718
719
*/
719
- modelName : string ;
720
-
721
- /**
722
- * The provider of the provided model.
723
- */
724
- modelProvider : 'ANTHROPIC' | 'OPENAI' ;
720
+ name : string ;
725
721
726
722
parallelToolCalls : boolean ;
727
723
@@ -730,6 +726,11 @@ export namespace PromptCreateParams {
730
726
*/
731
727
presencePenalty : number ;
732
728
729
+ /**
730
+ * The LLM model provider.
731
+ */
732
+ provider : 'ANTHROPIC' | 'OPENAI' ;
733
+
733
734
/**
734
735
* Example: PromptResponseFormat.TEXT
735
736
*/
@@ -778,7 +779,7 @@ export interface PromptUpdateParams {
778
779
export namespace PromptUpdateParams {
779
780
export interface Message {
780
781
content : Array <
781
- | Message . TextContentBlockSchema
782
+ | Message . TextContentBlock
782
783
| Message . ImageBase64ContentBlock
783
784
| Message . ToolCallContentBlock
784
785
| Message . ToolResultContentBlock
@@ -790,7 +791,7 @@ export namespace PromptUpdateParams {
790
791
}
791
792
792
793
export namespace Message {
793
- export interface TextContentBlockSchema {
794
+ export interface TextContentBlock {
794
795
text : string ;
795
796
796
797
type : 'TEXT' ;
@@ -864,14 +865,9 @@ export namespace PromptUpdateParams {
864
865
maxTokens : number | null ;
865
866
866
867
/**
867
- * Example: "gpt-3.5-turbo"
868
- */
869
- modelName : string ;
870
-
871
- /**
872
- * The provider of the provided model.
868
+ * The name of the model for the provider.
873
869
*/
874
- modelProvider : 'ANTHROPIC' | 'OPENAI' ;
870
+ name : string ;
875
871
876
872
parallelToolCalls : boolean ;
877
873
@@ -880,6 +876,11 @@ export namespace PromptUpdateParams {
880
876
*/
881
877
presencePenalty : number ;
882
878
879
+ /**
880
+ * The LLM model provider.
881
+ */
882
+ provider : 'ANTHROPIC' | 'OPENAI' ;
883
+
883
884
/**
884
885
* Example: PromptResponseFormat.TEXT
885
886
*/
@@ -942,7 +943,7 @@ export interface PromptGetParametersParams {
942
943
export namespace PromptGetParametersParams {
943
944
export interface AppendMessage {
944
945
content : Array <
945
- | AppendMessage . TextContentBlockSchema
946
+ | AppendMessage . TextContentBlock
946
947
| AppendMessage . ImageBase64ContentBlock
947
948
| AppendMessage . ToolCallContentBlock
948
949
| AppendMessage . ToolResultContentBlock
@@ -952,7 +953,7 @@ export namespace PromptGetParametersParams {
952
953
}
953
954
954
955
export namespace AppendMessage {
955
- export interface TextContentBlockSchema {
956
+ export interface TextContentBlock {
956
957
text : string ;
957
958
958
959
type : 'TEXT' ;
@@ -1016,7 +1017,7 @@ export namespace PromptGetParametersParams {
1016
1017
1017
1018
export interface OverrideMessage {
1018
1019
content : Array <
1019
- | OverrideMessage . TextContentBlockSchema
1020
+ | OverrideMessage . TextContentBlock
1020
1021
| OverrideMessage . ImageBase64ContentBlock
1021
1022
| OverrideMessage . ToolCallContentBlock
1022
1023
| OverrideMessage . ToolResultContentBlock
@@ -1026,7 +1027,7 @@ export namespace PromptGetParametersParams {
1026
1027
}
1027
1028
1028
1029
export namespace OverrideMessage {
1029
- export interface TextContentBlockSchema {
1030
+ export interface TextContentBlock {
1030
1031
text : string ;
1031
1032
1032
1033
type : 'TEXT' ;
0 commit comments