@@ -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 ,
@@ -454,7 +455,7 @@ export interface PromptConfiguration {
454
455
export namespace PromptConfiguration {
455
456
export interface Message {
456
457
content : Array <
457
- | Message . TextContentBlockSchema
458
+ | Message . TextContentBlock
458
459
| Message . ImageBase64ContentBlock
459
460
| Message . ToolCallContentBlock
460
461
| Message . ToolResultContentBlock
@@ -464,7 +465,7 @@ export namespace PromptConfiguration {
464
465
}
465
466
466
467
export namespace Message {
467
- export interface TextContentBlockSchema {
468
+ export interface TextContentBlock {
468
469
text : string ;
469
470
470
471
type : 'TEXT' ;
@@ -538,14 +539,9 @@ export namespace PromptConfiguration {
538
539
maxTokens : number | null ;
539
540
540
541
/**
541
- * Example: "gpt-3.5-turbo"
542
+ * The name of the model for the provider.
542
543
*/
543
- modelName : string ;
544
-
545
- /**
546
- * The provider of the provided model.
547
- */
548
- modelProvider : 'ANTHROPIC' | 'OPENAI' ;
544
+ name : string ;
549
545
550
546
parallelToolCalls : boolean ;
551
547
@@ -554,6 +550,11 @@ export namespace PromptConfiguration {
554
550
*/
555
551
presencePenalty : number ;
556
552
553
+ /**
554
+ * The LLM model provider.
555
+ */
556
+ provider : 'ANTHROPIC' | 'OPENAI' ;
557
+
557
558
/**
558
559
* Example: PromptResponseFormat.TEXT
559
560
*/
@@ -630,7 +631,7 @@ export interface PromptCreateParams {
630
631
export namespace PromptCreateParams {
631
632
export interface Message {
632
633
content : Array <
633
- | Message . TextContentBlockSchema
634
+ | Message . TextContentBlock
634
635
| Message . ImageBase64ContentBlock
635
636
| Message . ToolCallContentBlock
636
637
| Message . ToolResultContentBlock
@@ -642,7 +643,7 @@ export namespace PromptCreateParams {
642
643
}
643
644
644
645
export namespace Message {
645
- export interface TextContentBlockSchema {
646
+ export interface TextContentBlock {
646
647
text : string ;
647
648
648
649
type : 'TEXT' ;
@@ -716,14 +717,9 @@ export namespace PromptCreateParams {
716
717
maxTokens : number | null ;
717
718
718
719
/**
719
- * Example: "gpt-3.5-turbo"
720
+ * The name of the model for the provider.
720
721
*/
721
- modelName : string ;
722
-
723
- /**
724
- * The provider of the provided model.
725
- */
726
- modelProvider : 'ANTHROPIC' | 'OPENAI' ;
722
+ name : string ;
727
723
728
724
parallelToolCalls : boolean ;
729
725
@@ -732,6 +728,11 @@ export namespace PromptCreateParams {
732
728
*/
733
729
presencePenalty : number ;
734
730
731
+ /**
732
+ * The LLM model provider.
733
+ */
734
+ provider : 'ANTHROPIC' | 'OPENAI' ;
735
+
735
736
/**
736
737
* Example: PromptResponseFormat.TEXT
737
738
*/
@@ -780,7 +781,7 @@ export interface PromptUpdateParams {
780
781
export namespace PromptUpdateParams {
781
782
export interface Message {
782
783
content : Array <
783
- | Message . TextContentBlockSchema
784
+ | Message . TextContentBlock
784
785
| Message . ImageBase64ContentBlock
785
786
| Message . ToolCallContentBlock
786
787
| Message . ToolResultContentBlock
@@ -792,7 +793,7 @@ export namespace PromptUpdateParams {
792
793
}
793
794
794
795
export namespace Message {
795
- export interface TextContentBlockSchema {
796
+ export interface TextContentBlock {
796
797
text : string ;
797
798
798
799
type : 'TEXT' ;
@@ -866,14 +867,9 @@ export namespace PromptUpdateParams {
866
867
maxTokens : number | null ;
867
868
868
869
/**
869
- * Example: "gpt-3.5-turbo"
870
- */
871
- modelName : string ;
872
-
873
- /**
874
- * The provider of the provided model.
870
+ * The name of the model for the provider.
875
871
*/
876
- modelProvider : 'ANTHROPIC' | 'OPENAI' ;
872
+ name : string ;
877
873
878
874
parallelToolCalls : boolean ;
879
875
@@ -882,6 +878,11 @@ export namespace PromptUpdateParams {
882
878
*/
883
879
presencePenalty : number ;
884
880
881
+ /**
882
+ * The LLM model provider.
883
+ */
884
+ provider : 'ANTHROPIC' | 'OPENAI' ;
885
+
885
886
/**
886
887
* Example: PromptResponseFormat.TEXT
887
888
*/
@@ -944,7 +945,7 @@ export interface PromptGetParametersParams {
944
945
export namespace PromptGetParametersParams {
945
946
export interface AppendMessage {
946
947
content : Array <
947
- | AppendMessage . TextContentBlockSchema
948
+ | AppendMessage . TextContentBlock
948
949
| AppendMessage . ImageBase64ContentBlock
949
950
| AppendMessage . ToolCallContentBlock
950
951
| AppendMessage . ToolResultContentBlock
@@ -954,7 +955,7 @@ export namespace PromptGetParametersParams {
954
955
}
955
956
956
957
export namespace AppendMessage {
957
- export interface TextContentBlockSchema {
958
+ export interface TextContentBlock {
958
959
text : string ;
959
960
960
961
type : 'TEXT' ;
@@ -1018,7 +1019,7 @@ export namespace PromptGetParametersParams {
1018
1019
1019
1020
export interface OverrideMessage {
1020
1021
content : Array <
1021
- | OverrideMessage . TextContentBlockSchema
1022
+ | OverrideMessage . TextContentBlock
1022
1023
| OverrideMessage . ImageBase64ContentBlock
1023
1024
| OverrideMessage . ToolCallContentBlock
1024
1025
| OverrideMessage . ToolResultContentBlock
@@ -1028,7 +1029,7 @@ export namespace PromptGetParametersParams {
1028
1029
}
1029
1030
1030
1031
export namespace OverrideMessage {
1031
- export interface TextContentBlockSchema {
1032
+ export interface TextContentBlock {
1032
1033
text : string ;
1033
1034
1034
1035
type : 'TEXT' ;
0 commit comments