@aws-sdk/client-bedrock-runtime 3.782.0 → 3.785.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist-cjs/index.js +232 -8
- package/dist-cjs/runtimeConfig.browser.js +2 -0
- package/dist-cjs/runtimeConfig.js +2 -0
- package/dist-cjs/runtimeConfig.native.js +3 -0
- package/dist-es/BedrockRuntime.js +2 -0
- package/dist-es/BedrockRuntimeClient.js +4 -2
- package/dist-es/commands/InvokeModelWithBidirectionalStreamCommand.js +30 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +78 -0
- package/dist-es/protocols/Aws_restJson1.js +105 -2
- package/dist-es/runtimeConfig.browser.js +3 -1
- package/dist-es/runtimeConfig.js +2 -0
- package/dist-es/runtimeConfig.native.js +3 -0
- package/dist-types/BedrockRuntime.d.ts +7 -0
- package/dist-types/BedrockRuntimeClient.d.ts +12 -4
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +15 -6
- package/dist-types/commands/ConverseCommand.d.ts +28 -13
- package/dist-types/commands/ConverseStreamCommand.d.ts +28 -13
- package/dist-types/commands/InvokeModelCommand.d.ts +1 -1
- package/dist-types/commands/InvokeModelWithBidirectionalStreamCommand.d.ts +144 -0
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +302 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/BedrockRuntime.d.ts +23 -0
- package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +14 -0
- package/dist-types/ts3.4/commands/InvokeModelWithBidirectionalStreamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +179 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +3 -1
|
@@ -541,6 +541,18 @@ export declare namespace GuardrailContentBlock {
|
|
|
541
541
|
}
|
|
542
542
|
const visit: <T>(value: GuardrailContentBlock, visitor: Visitor<T>) => T;
|
|
543
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* @public
|
|
546
|
+
* @enum
|
|
547
|
+
*/
|
|
548
|
+
export declare const GuardrailOutputScope: {
|
|
549
|
+
readonly FULL: "FULL";
|
|
550
|
+
readonly INTERVENTIONS: "INTERVENTIONS";
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* @public
|
|
554
|
+
*/
|
|
555
|
+
export type GuardrailOutputScope = (typeof GuardrailOutputScope)[keyof typeof GuardrailOutputScope];
|
|
544
556
|
/**
|
|
545
557
|
* @public
|
|
546
558
|
* @enum
|
|
@@ -577,6 +589,12 @@ export interface ApplyGuardrailRequest {
|
|
|
577
589
|
* @public
|
|
578
590
|
*/
|
|
579
591
|
content: GuardrailContentBlock[] | undefined;
|
|
592
|
+
/**
|
|
593
|
+
* <p>Specifies the scope of the output that you get in the response. Set to <code>FULL</code> to return the entire output, including any detected and non-detected entries in the response for enhanced debugging.</p>
|
|
594
|
+
* <p>Note that the full output scope doesn't apply to word filters or regex in sensitive information filters. It does apply to all other filtering policies, including sensitive information with filters that can detect personally identifiable information (PII).</p>
|
|
595
|
+
* @public
|
|
596
|
+
*/
|
|
597
|
+
outputScope?: GuardrailOutputScope | undefined;
|
|
580
598
|
}
|
|
581
599
|
/**
|
|
582
600
|
* @public
|
|
@@ -596,6 +614,7 @@ export type GuardrailAction = (typeof GuardrailAction)[keyof typeof GuardrailAct
|
|
|
596
614
|
*/
|
|
597
615
|
export declare const GuardrailContentPolicyAction: {
|
|
598
616
|
readonly BLOCKED: "BLOCKED";
|
|
617
|
+
readonly NONE: "NONE";
|
|
599
618
|
};
|
|
600
619
|
/**
|
|
601
620
|
* @public
|
|
@@ -670,6 +689,11 @@ export interface GuardrailContentFilter {
|
|
|
670
689
|
* @public
|
|
671
690
|
*/
|
|
672
691
|
action: GuardrailContentPolicyAction | undefined;
|
|
692
|
+
/**
|
|
693
|
+
* <p>Indicates whether content that breaches the guardrail configuration is detected.</p>
|
|
694
|
+
* @public
|
|
695
|
+
*/
|
|
696
|
+
detected?: boolean | undefined;
|
|
673
697
|
}
|
|
674
698
|
/**
|
|
675
699
|
* <p>An assessment of a content policy for a guardrail.</p>
|
|
@@ -731,6 +755,11 @@ export interface GuardrailContextualGroundingFilter {
|
|
|
731
755
|
* @public
|
|
732
756
|
*/
|
|
733
757
|
action: GuardrailContextualGroundingPolicyAction | undefined;
|
|
758
|
+
/**
|
|
759
|
+
* <p>Indicates whether content that fails the contextual grounding evaluation (grounding or relevance score less than the corresponding threshold) was detected.</p>
|
|
760
|
+
* @public
|
|
761
|
+
*/
|
|
762
|
+
detected?: boolean | undefined;
|
|
734
763
|
}
|
|
735
764
|
/**
|
|
736
765
|
* <p>The policy assessment details for the guardrails contextual grounding filter.</p>
|
|
@@ -860,6 +889,7 @@ export interface GuardrailInvocationMetrics {
|
|
|
860
889
|
export declare const GuardrailSensitiveInformationPolicyAction: {
|
|
861
890
|
readonly ANONYMIZED: "ANONYMIZED";
|
|
862
891
|
readonly BLOCKED: "BLOCKED";
|
|
892
|
+
readonly NONE: "NONE";
|
|
863
893
|
};
|
|
864
894
|
/**
|
|
865
895
|
* @public
|
|
@@ -926,6 +956,11 @@ export interface GuardrailPiiEntityFilter {
|
|
|
926
956
|
* @public
|
|
927
957
|
*/
|
|
928
958
|
action: GuardrailSensitiveInformationPolicyAction | undefined;
|
|
959
|
+
/**
|
|
960
|
+
* <p>Indicates whether personally identifiable information (PII) that breaches the guardrail configuration is detected.</p>
|
|
961
|
+
* @public
|
|
962
|
+
*/
|
|
963
|
+
detected?: boolean | undefined;
|
|
929
964
|
}
|
|
930
965
|
/**
|
|
931
966
|
* <p>A Regex filter configured in a guardrail.</p>
|
|
@@ -952,6 +987,11 @@ export interface GuardrailRegexFilter {
|
|
|
952
987
|
* @public
|
|
953
988
|
*/
|
|
954
989
|
action: GuardrailSensitiveInformationPolicyAction | undefined;
|
|
990
|
+
/**
|
|
991
|
+
* <p>Indicates whether custom regex entities that breach the guardrail configuration are detected.</p>
|
|
992
|
+
* @public
|
|
993
|
+
*/
|
|
994
|
+
detected?: boolean | undefined;
|
|
955
995
|
}
|
|
956
996
|
/**
|
|
957
997
|
* <p>The assessment for aPersonally Identifiable Information (PII) policy. </p>
|
|
@@ -975,6 +1015,7 @@ export interface GuardrailSensitiveInformationPolicyAssessment {
|
|
|
975
1015
|
*/
|
|
976
1016
|
export declare const GuardrailTopicPolicyAction: {
|
|
977
1017
|
readonly BLOCKED: "BLOCKED";
|
|
1018
|
+
readonly NONE: "NONE";
|
|
978
1019
|
};
|
|
979
1020
|
/**
|
|
980
1021
|
* @public
|
|
@@ -1011,6 +1052,11 @@ export interface GuardrailTopic {
|
|
|
1011
1052
|
* @public
|
|
1012
1053
|
*/
|
|
1013
1054
|
action: GuardrailTopicPolicyAction | undefined;
|
|
1055
|
+
/**
|
|
1056
|
+
* <p>Indicates whether topic content that breaches the guardrail configuration is detected.</p>
|
|
1057
|
+
* @public
|
|
1058
|
+
*/
|
|
1059
|
+
detected?: boolean | undefined;
|
|
1014
1060
|
}
|
|
1015
1061
|
/**
|
|
1016
1062
|
* <p>A behavior assessment of a topic policy.</p>
|
|
@@ -1029,6 +1075,7 @@ export interface GuardrailTopicPolicyAssessment {
|
|
|
1029
1075
|
*/
|
|
1030
1076
|
export declare const GuardrailWordPolicyAction: {
|
|
1031
1077
|
readonly BLOCKED: "BLOCKED";
|
|
1078
|
+
readonly NONE: "NONE";
|
|
1032
1079
|
};
|
|
1033
1080
|
/**
|
|
1034
1081
|
* @public
|
|
@@ -1049,6 +1096,11 @@ export interface GuardrailCustomWord {
|
|
|
1049
1096
|
* @public
|
|
1050
1097
|
*/
|
|
1051
1098
|
action: GuardrailWordPolicyAction | undefined;
|
|
1099
|
+
/**
|
|
1100
|
+
* <p>Indicates whether custom word content that breaches the guardrail configuration is detected.</p>
|
|
1101
|
+
* @public
|
|
1102
|
+
*/
|
|
1103
|
+
detected?: boolean | undefined;
|
|
1052
1104
|
}
|
|
1053
1105
|
/**
|
|
1054
1106
|
* @public
|
|
@@ -1081,6 +1133,11 @@ export interface GuardrailManagedWord {
|
|
|
1081
1133
|
* @public
|
|
1082
1134
|
*/
|
|
1083
1135
|
action: GuardrailWordPolicyAction | undefined;
|
|
1136
|
+
/**
|
|
1137
|
+
* <p>Indicates whether managed word content that breaches the guardrail configuration is detected.</p>
|
|
1138
|
+
* @public
|
|
1139
|
+
*/
|
|
1140
|
+
detected?: boolean | undefined;
|
|
1084
1141
|
}
|
|
1085
1142
|
/**
|
|
1086
1143
|
* <p>The word policy assessment.</p>
|
|
@@ -1159,6 +1216,11 @@ export interface ApplyGuardrailResponse {
|
|
|
1159
1216
|
* @public
|
|
1160
1217
|
*/
|
|
1161
1218
|
action: GuardrailAction | undefined;
|
|
1219
|
+
/**
|
|
1220
|
+
* <p>The reason for the action taken when harmful content is detected.</p>
|
|
1221
|
+
* @public
|
|
1222
|
+
*/
|
|
1223
|
+
actionReason?: string | undefined;
|
|
1162
1224
|
/**
|
|
1163
1225
|
* <p>The output details in the response from the guardrail.</p>
|
|
1164
1226
|
* @public
|
|
@@ -1182,6 +1244,7 @@ export interface ApplyGuardrailResponse {
|
|
|
1182
1244
|
export declare const GuardrailTrace: {
|
|
1183
1245
|
readonly DISABLED: "disabled";
|
|
1184
1246
|
readonly ENABLED: "enabled";
|
|
1247
|
+
readonly ENABLED_FULL: "enabled_full";
|
|
1185
1248
|
};
|
|
1186
1249
|
/**
|
|
1187
1250
|
* @public
|
|
@@ -2572,6 +2635,11 @@ export interface GuardrailTraceAssessment {
|
|
|
2572
2635
|
* @public
|
|
2573
2636
|
*/
|
|
2574
2637
|
outputAssessments?: Record<string, GuardrailAssessment[]> | undefined;
|
|
2638
|
+
/**
|
|
2639
|
+
* <p>Provides the reason for the action taken when harmful content is detected.</p>
|
|
2640
|
+
* @public
|
|
2641
|
+
*/
|
|
2642
|
+
actionReason?: string | undefined;
|
|
2575
2643
|
}
|
|
2576
2644
|
/**
|
|
2577
2645
|
* <p>A prompt router trace.</p>
|
|
@@ -3434,6 +3502,7 @@ export interface ConverseStreamResponse {
|
|
|
3434
3502
|
export declare const Trace: {
|
|
3435
3503
|
readonly DISABLED: "DISABLED";
|
|
3436
3504
|
readonly ENABLED: "ENABLED";
|
|
3505
|
+
readonly ENABLED_FULL: "ENABLED_FULL";
|
|
3437
3506
|
};
|
|
3438
3507
|
/**
|
|
3439
3508
|
* @public
|
|
@@ -3536,6 +3605,215 @@ export interface InvokeModelResponse {
|
|
|
3536
3605
|
*/
|
|
3537
3606
|
performanceConfigLatency?: PerformanceConfigLatency | undefined;
|
|
3538
3607
|
}
|
|
3608
|
+
/**
|
|
3609
|
+
* <p>Payload content for the bidirectional input. The input is an audio stream.</p>
|
|
3610
|
+
* @public
|
|
3611
|
+
*/
|
|
3612
|
+
export interface BidirectionalInputPayloadPart {
|
|
3613
|
+
/**
|
|
3614
|
+
* <p>The audio content for the bidirectional input.</p>
|
|
3615
|
+
* @public
|
|
3616
|
+
*/
|
|
3617
|
+
bytes?: Uint8Array | undefined;
|
|
3618
|
+
}
|
|
3619
|
+
/**
|
|
3620
|
+
* <p>Payload content, the speech chunk, for the bidirectional input of the invocation step.</p>
|
|
3621
|
+
* @public
|
|
3622
|
+
*/
|
|
3623
|
+
export type InvokeModelWithBidirectionalStreamInput = InvokeModelWithBidirectionalStreamInput.ChunkMember | InvokeModelWithBidirectionalStreamInput.$UnknownMember;
|
|
3624
|
+
/**
|
|
3625
|
+
* @public
|
|
3626
|
+
*/
|
|
3627
|
+
export declare namespace InvokeModelWithBidirectionalStreamInput {
|
|
3628
|
+
/**
|
|
3629
|
+
* <p>The audio chunk that is used as input for the invocation step.</p>
|
|
3630
|
+
* @public
|
|
3631
|
+
*/
|
|
3632
|
+
interface ChunkMember {
|
|
3633
|
+
chunk: BidirectionalInputPayloadPart;
|
|
3634
|
+
$unknown?: never;
|
|
3635
|
+
}
|
|
3636
|
+
/**
|
|
3637
|
+
* @public
|
|
3638
|
+
*/
|
|
3639
|
+
interface $UnknownMember {
|
|
3640
|
+
chunk?: never;
|
|
3641
|
+
$unknown: [string, any];
|
|
3642
|
+
}
|
|
3643
|
+
interface Visitor<T> {
|
|
3644
|
+
chunk: (value: BidirectionalInputPayloadPart) => T;
|
|
3645
|
+
_: (name: string, value: any) => T;
|
|
3646
|
+
}
|
|
3647
|
+
const visit: <T>(value: InvokeModelWithBidirectionalStreamInput, visitor: Visitor<T>) => T;
|
|
3648
|
+
}
|
|
3649
|
+
/**
|
|
3650
|
+
* @public
|
|
3651
|
+
*/
|
|
3652
|
+
export interface InvokeModelWithBidirectionalStreamRequest {
|
|
3653
|
+
/**
|
|
3654
|
+
* <p>The model ID or ARN of the model ID to use. Currently, only <code>amazon.nova-sonic-v1:0</code> is supported.</p>
|
|
3655
|
+
* @public
|
|
3656
|
+
*/
|
|
3657
|
+
modelId: string | undefined;
|
|
3658
|
+
/**
|
|
3659
|
+
* <p>The prompt and inference parameters in the format specified in the <code>BidirectionalInputPayloadPart</code> in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters</a>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html">Run inference</a> in the Bedrock User Guide.</p>
|
|
3660
|
+
* @public
|
|
3661
|
+
*/
|
|
3662
|
+
body: AsyncIterable<InvokeModelWithBidirectionalStreamInput> | undefined;
|
|
3663
|
+
}
|
|
3664
|
+
/**
|
|
3665
|
+
* <p>Output from the bidirectional stream. The output is speech and a text transcription.</p>
|
|
3666
|
+
* @public
|
|
3667
|
+
*/
|
|
3668
|
+
export interface BidirectionalOutputPayloadPart {
|
|
3669
|
+
/**
|
|
3670
|
+
* <p>The speech output of the bidirectional stream.</p>
|
|
3671
|
+
* @public
|
|
3672
|
+
*/
|
|
3673
|
+
bytes?: Uint8Array | undefined;
|
|
3674
|
+
}
|
|
3675
|
+
/**
|
|
3676
|
+
* <p>Output from the bidirectional stream that was used for model invocation.</p>
|
|
3677
|
+
* @public
|
|
3678
|
+
*/
|
|
3679
|
+
export type InvokeModelWithBidirectionalStreamOutput = InvokeModelWithBidirectionalStreamOutput.ChunkMember | InvokeModelWithBidirectionalStreamOutput.InternalServerExceptionMember | InvokeModelWithBidirectionalStreamOutput.ModelStreamErrorExceptionMember | InvokeModelWithBidirectionalStreamOutput.ModelTimeoutExceptionMember | InvokeModelWithBidirectionalStreamOutput.ServiceUnavailableExceptionMember | InvokeModelWithBidirectionalStreamOutput.ThrottlingExceptionMember | InvokeModelWithBidirectionalStreamOutput.ValidationExceptionMember | InvokeModelWithBidirectionalStreamOutput.$UnknownMember;
|
|
3680
|
+
/**
|
|
3681
|
+
* @public
|
|
3682
|
+
*/
|
|
3683
|
+
export declare namespace InvokeModelWithBidirectionalStreamOutput {
|
|
3684
|
+
/**
|
|
3685
|
+
* <p>The speech chunk that was provided as output from the invocation step.</p>
|
|
3686
|
+
* @public
|
|
3687
|
+
*/
|
|
3688
|
+
interface ChunkMember {
|
|
3689
|
+
chunk: BidirectionalOutputPayloadPart;
|
|
3690
|
+
internalServerException?: never;
|
|
3691
|
+
modelStreamErrorException?: never;
|
|
3692
|
+
validationException?: never;
|
|
3693
|
+
throttlingException?: never;
|
|
3694
|
+
modelTimeoutException?: never;
|
|
3695
|
+
serviceUnavailableException?: never;
|
|
3696
|
+
$unknown?: never;
|
|
3697
|
+
}
|
|
3698
|
+
/**
|
|
3699
|
+
* <p>The request encountered an unknown internal error.</p>
|
|
3700
|
+
* @public
|
|
3701
|
+
*/
|
|
3702
|
+
interface InternalServerExceptionMember {
|
|
3703
|
+
chunk?: never;
|
|
3704
|
+
internalServerException: InternalServerException;
|
|
3705
|
+
modelStreamErrorException?: never;
|
|
3706
|
+
validationException?: never;
|
|
3707
|
+
throttlingException?: never;
|
|
3708
|
+
modelTimeoutException?: never;
|
|
3709
|
+
serviceUnavailableException?: never;
|
|
3710
|
+
$unknown?: never;
|
|
3711
|
+
}
|
|
3712
|
+
/**
|
|
3713
|
+
* <p>The request encountered an error with the model stream.</p>
|
|
3714
|
+
* @public
|
|
3715
|
+
*/
|
|
3716
|
+
interface ModelStreamErrorExceptionMember {
|
|
3717
|
+
chunk?: never;
|
|
3718
|
+
internalServerException?: never;
|
|
3719
|
+
modelStreamErrorException: ModelStreamErrorException;
|
|
3720
|
+
validationException?: never;
|
|
3721
|
+
throttlingException?: never;
|
|
3722
|
+
modelTimeoutException?: never;
|
|
3723
|
+
serviceUnavailableException?: never;
|
|
3724
|
+
$unknown?: never;
|
|
3725
|
+
}
|
|
3726
|
+
/**
|
|
3727
|
+
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
|
|
3728
|
+
* @public
|
|
3729
|
+
*/
|
|
3730
|
+
interface ValidationExceptionMember {
|
|
3731
|
+
chunk?: never;
|
|
3732
|
+
internalServerException?: never;
|
|
3733
|
+
modelStreamErrorException?: never;
|
|
3734
|
+
validationException: ValidationException;
|
|
3735
|
+
throttlingException?: never;
|
|
3736
|
+
modelTimeoutException?: never;
|
|
3737
|
+
serviceUnavailableException?: never;
|
|
3738
|
+
$unknown?: never;
|
|
3739
|
+
}
|
|
3740
|
+
/**
|
|
3741
|
+
* <p>The request was denied due to request throttling.</p>
|
|
3742
|
+
* @public
|
|
3743
|
+
*/
|
|
3744
|
+
interface ThrottlingExceptionMember {
|
|
3745
|
+
chunk?: never;
|
|
3746
|
+
internalServerException?: never;
|
|
3747
|
+
modelStreamErrorException?: never;
|
|
3748
|
+
validationException?: never;
|
|
3749
|
+
throttlingException: ThrottlingException;
|
|
3750
|
+
modelTimeoutException?: never;
|
|
3751
|
+
serviceUnavailableException?: never;
|
|
3752
|
+
$unknown?: never;
|
|
3753
|
+
}
|
|
3754
|
+
/**
|
|
3755
|
+
* <p>The connection was closed because a request was not received within the timeout period.</p>
|
|
3756
|
+
* @public
|
|
3757
|
+
*/
|
|
3758
|
+
interface ModelTimeoutExceptionMember {
|
|
3759
|
+
chunk?: never;
|
|
3760
|
+
internalServerException?: never;
|
|
3761
|
+
modelStreamErrorException?: never;
|
|
3762
|
+
validationException?: never;
|
|
3763
|
+
throttlingException?: never;
|
|
3764
|
+
modelTimeoutException: ModelTimeoutException;
|
|
3765
|
+
serviceUnavailableException?: never;
|
|
3766
|
+
$unknown?: never;
|
|
3767
|
+
}
|
|
3768
|
+
/**
|
|
3769
|
+
* <p>The request has failed due to a temporary failure of the server.</p>
|
|
3770
|
+
* @public
|
|
3771
|
+
*/
|
|
3772
|
+
interface ServiceUnavailableExceptionMember {
|
|
3773
|
+
chunk?: never;
|
|
3774
|
+
internalServerException?: never;
|
|
3775
|
+
modelStreamErrorException?: never;
|
|
3776
|
+
validationException?: never;
|
|
3777
|
+
throttlingException?: never;
|
|
3778
|
+
modelTimeoutException?: never;
|
|
3779
|
+
serviceUnavailableException: ServiceUnavailableException;
|
|
3780
|
+
$unknown?: never;
|
|
3781
|
+
}
|
|
3782
|
+
/**
|
|
3783
|
+
* @public
|
|
3784
|
+
*/
|
|
3785
|
+
interface $UnknownMember {
|
|
3786
|
+
chunk?: never;
|
|
3787
|
+
internalServerException?: never;
|
|
3788
|
+
modelStreamErrorException?: never;
|
|
3789
|
+
validationException?: never;
|
|
3790
|
+
throttlingException?: never;
|
|
3791
|
+
modelTimeoutException?: never;
|
|
3792
|
+
serviceUnavailableException?: never;
|
|
3793
|
+
$unknown: [string, any];
|
|
3794
|
+
}
|
|
3795
|
+
interface Visitor<T> {
|
|
3796
|
+
chunk: (value: BidirectionalOutputPayloadPart) => T;
|
|
3797
|
+
internalServerException: (value: InternalServerException) => T;
|
|
3798
|
+
modelStreamErrorException: (value: ModelStreamErrorException) => T;
|
|
3799
|
+
validationException: (value: ValidationException) => T;
|
|
3800
|
+
throttlingException: (value: ThrottlingException) => T;
|
|
3801
|
+
modelTimeoutException: (value: ModelTimeoutException) => T;
|
|
3802
|
+
serviceUnavailableException: (value: ServiceUnavailableException) => T;
|
|
3803
|
+
_: (name: string, value: any) => T;
|
|
3804
|
+
}
|
|
3805
|
+
const visit: <T>(value: InvokeModelWithBidirectionalStreamOutput, visitor: Visitor<T>) => T;
|
|
3806
|
+
}
|
|
3807
|
+
/**
|
|
3808
|
+
* @public
|
|
3809
|
+
*/
|
|
3810
|
+
export interface InvokeModelWithBidirectionalStreamResponse {
|
|
3811
|
+
/**
|
|
3812
|
+
* <p>Streaming response from the model in the format specified by the <code>BidirectionalOutputPayloadPart</code> header.</p>
|
|
3813
|
+
* @public
|
|
3814
|
+
*/
|
|
3815
|
+
body: AsyncIterable<InvokeModelWithBidirectionalStreamOutput> | undefined;
|
|
3816
|
+
}
|
|
3539
3817
|
/**
|
|
3540
3818
|
* @public
|
|
3541
3819
|
*/
|
|
@@ -3885,6 +4163,30 @@ export declare const InvokeModelRequestFilterSensitiveLog: (obj: InvokeModelRequ
|
|
|
3885
4163
|
* @internal
|
|
3886
4164
|
*/
|
|
3887
4165
|
export declare const InvokeModelResponseFilterSensitiveLog: (obj: InvokeModelResponse) => any;
|
|
4166
|
+
/**
|
|
4167
|
+
* @internal
|
|
4168
|
+
*/
|
|
4169
|
+
export declare const BidirectionalInputPayloadPartFilterSensitiveLog: (obj: BidirectionalInputPayloadPart) => any;
|
|
4170
|
+
/**
|
|
4171
|
+
* @internal
|
|
4172
|
+
*/
|
|
4173
|
+
export declare const InvokeModelWithBidirectionalStreamInputFilterSensitiveLog: (obj: InvokeModelWithBidirectionalStreamInput) => any;
|
|
4174
|
+
/**
|
|
4175
|
+
* @internal
|
|
4176
|
+
*/
|
|
4177
|
+
export declare const InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog: (obj: InvokeModelWithBidirectionalStreamRequest) => any;
|
|
4178
|
+
/**
|
|
4179
|
+
* @internal
|
|
4180
|
+
*/
|
|
4181
|
+
export declare const BidirectionalOutputPayloadPartFilterSensitiveLog: (obj: BidirectionalOutputPayloadPart) => any;
|
|
4182
|
+
/**
|
|
4183
|
+
* @internal
|
|
4184
|
+
*/
|
|
4185
|
+
export declare const InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog: (obj: InvokeModelWithBidirectionalStreamOutput) => any;
|
|
4186
|
+
/**
|
|
4187
|
+
* @internal
|
|
4188
|
+
*/
|
|
4189
|
+
export declare const InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog: (obj: InvokeModelWithBidirectionalStreamResponse) => any;
|
|
3888
4190
|
/**
|
|
3889
4191
|
* @internal
|
|
3890
4192
|
*/
|
|
@@ -5,6 +5,7 @@ import { ConverseCommandInput, ConverseCommandOutput } from "../commands/Convers
|
|
|
5
5
|
import { ConverseStreamCommandInput, ConverseStreamCommandOutput } from "../commands/ConverseStreamCommand";
|
|
6
6
|
import { GetAsyncInvokeCommandInput, GetAsyncInvokeCommandOutput } from "../commands/GetAsyncInvokeCommand";
|
|
7
7
|
import { InvokeModelCommandInput, InvokeModelCommandOutput } from "../commands/InvokeModelCommand";
|
|
8
|
+
import { InvokeModelWithBidirectionalStreamCommandInput, InvokeModelWithBidirectionalStreamCommandOutput } from "../commands/InvokeModelWithBidirectionalStreamCommand";
|
|
8
9
|
import { InvokeModelWithResponseStreamCommandInput, InvokeModelWithResponseStreamCommandOutput } from "../commands/InvokeModelWithResponseStreamCommand";
|
|
9
10
|
import { ListAsyncInvokesCommandInput, ListAsyncInvokesCommandOutput } from "../commands/ListAsyncInvokesCommand";
|
|
10
11
|
import { StartAsyncInvokeCommandInput, StartAsyncInvokeCommandOutput } from "../commands/StartAsyncInvokeCommand";
|
|
@@ -28,6 +29,10 @@ export declare const se_GetAsyncInvokeCommand: (input: GetAsyncInvokeCommandInpu
|
|
|
28
29
|
* serializeAws_restJson1InvokeModelCommand
|
|
29
30
|
*/
|
|
30
31
|
export declare const se_InvokeModelCommand: (input: InvokeModelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
32
|
+
/**
|
|
33
|
+
* serializeAws_restJson1InvokeModelWithBidirectionalStreamCommand
|
|
34
|
+
*/
|
|
35
|
+
export declare const se_InvokeModelWithBidirectionalStreamCommand: (input: InvokeModelWithBidirectionalStreamCommandInput, context: __SerdeContext & __EventStreamSerdeContext) => Promise<__HttpRequest>;
|
|
31
36
|
/**
|
|
32
37
|
* serializeAws_restJson1InvokeModelWithResponseStreamCommand
|
|
33
38
|
*/
|
|
@@ -60,6 +65,10 @@ export declare const de_GetAsyncInvokeCommand: (output: __HttpResponse, context:
|
|
|
60
65
|
* deserializeAws_restJson1InvokeModelCommand
|
|
61
66
|
*/
|
|
62
67
|
export declare const de_InvokeModelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<InvokeModelCommandOutput>;
|
|
68
|
+
/**
|
|
69
|
+
* deserializeAws_restJson1InvokeModelWithBidirectionalStreamCommand
|
|
70
|
+
*/
|
|
71
|
+
export declare const de_InvokeModelWithBidirectionalStreamCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<InvokeModelWithBidirectionalStreamCommandOutput>;
|
|
63
72
|
/**
|
|
64
73
|
* deserializeAws_restJson1InvokeModelWithResponseStreamCommand
|
|
65
74
|
*/
|
|
@@ -9,6 +9,7 @@ export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
|
9
9
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
10
|
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((_: unknown) => () => Promise<import("@smithy/types").AwsCredentialIdentity>);
|
|
11
11
|
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved | undefined) => Promise<import("@smithy/types").UserAgent>;
|
|
12
|
+
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
12
13
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
13
14
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
14
15
|
region: string | import("@smithy/types").Provider<any>;
|
|
@@ -9,6 +9,7 @@ export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
|
9
9
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
10
|
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit | undefined) => import("@smithy/types").MemoizedProvider<import("@smithy/types").AwsCredentialIdentity>);
|
|
11
11
|
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved | undefined) => Promise<import("@smithy/types").UserAgent>;
|
|
12
|
+
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
12
13
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
13
14
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
14
15
|
region: string | import("@smithy/types").Provider<string>;
|
|
@@ -4,6 +4,7 @@ import { BedrockRuntimeClientConfig } from "./BedrockRuntimeClient";
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
6
6
|
runtime: string;
|
|
7
|
+
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
7
8
|
sha256: import("@smithy/types").HashConstructor;
|
|
8
9
|
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
9
10
|
apiVersion: string;
|
|
@@ -20,6 +20,10 @@ import {
|
|
|
20
20
|
InvokeModelCommandInput,
|
|
21
21
|
InvokeModelCommandOutput,
|
|
22
22
|
} from "./commands/InvokeModelCommand";
|
|
23
|
+
import {
|
|
24
|
+
InvokeModelWithBidirectionalStreamCommandInput,
|
|
25
|
+
InvokeModelWithBidirectionalStreamCommandOutput,
|
|
26
|
+
} from "./commands/InvokeModelWithBidirectionalStreamCommand";
|
|
23
27
|
import {
|
|
24
28
|
InvokeModelWithResponseStreamCommandInput,
|
|
25
29
|
InvokeModelWithResponseStreamCommandOutput,
|
|
@@ -98,6 +102,25 @@ export interface BedrockRuntime {
|
|
|
98
102
|
options: __HttpHandlerOptions,
|
|
99
103
|
cb: (err: any, data?: InvokeModelCommandOutput) => void
|
|
100
104
|
): void;
|
|
105
|
+
invokeModelWithBidirectionalStream(
|
|
106
|
+
args: InvokeModelWithBidirectionalStreamCommandInput,
|
|
107
|
+
options?: __HttpHandlerOptions
|
|
108
|
+
): Promise<InvokeModelWithBidirectionalStreamCommandOutput>;
|
|
109
|
+
invokeModelWithBidirectionalStream(
|
|
110
|
+
args: InvokeModelWithBidirectionalStreamCommandInput,
|
|
111
|
+
cb: (
|
|
112
|
+
err: any,
|
|
113
|
+
data?: InvokeModelWithBidirectionalStreamCommandOutput
|
|
114
|
+
) => void
|
|
115
|
+
): void;
|
|
116
|
+
invokeModelWithBidirectionalStream(
|
|
117
|
+
args: InvokeModelWithBidirectionalStreamCommandInput,
|
|
118
|
+
options: __HttpHandlerOptions,
|
|
119
|
+
cb: (
|
|
120
|
+
err: any,
|
|
121
|
+
data?: InvokeModelWithBidirectionalStreamCommandOutput
|
|
122
|
+
) => void
|
|
123
|
+
): void;
|
|
101
124
|
invokeModelWithResponseStream(
|
|
102
125
|
args: InvokeModelWithResponseStreamCommandInput,
|
|
103
126
|
options?: __HttpHandlerOptions
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EventStreamInputConfig,
|
|
3
|
+
EventStreamResolvedConfig,
|
|
4
|
+
} from "@aws-sdk/middleware-eventstream";
|
|
1
5
|
import {
|
|
2
6
|
HostHeaderInputConfig,
|
|
3
7
|
HostHeaderResolvedConfig,
|
|
@@ -6,6 +10,7 @@ import {
|
|
|
6
10
|
UserAgentInputConfig,
|
|
7
11
|
UserAgentResolvedConfig,
|
|
8
12
|
} from "@aws-sdk/middleware-user-agent";
|
|
13
|
+
import { EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider } from "@aws-sdk/types";
|
|
9
14
|
import {
|
|
10
15
|
RegionInputConfig,
|
|
11
16
|
RegionResolvedConfig,
|
|
@@ -70,6 +75,10 @@ import {
|
|
|
70
75
|
InvokeModelCommandInput,
|
|
71
76
|
InvokeModelCommandOutput,
|
|
72
77
|
} from "./commands/InvokeModelCommand";
|
|
78
|
+
import {
|
|
79
|
+
InvokeModelWithBidirectionalStreamCommandInput,
|
|
80
|
+
InvokeModelWithBidirectionalStreamCommandOutput,
|
|
81
|
+
} from "./commands/InvokeModelWithBidirectionalStreamCommand";
|
|
73
82
|
import {
|
|
74
83
|
InvokeModelWithResponseStreamCommandInput,
|
|
75
84
|
InvokeModelWithResponseStreamCommandOutput,
|
|
@@ -95,6 +104,7 @@ export type ServiceInputTypes =
|
|
|
95
104
|
| ConverseStreamCommandInput
|
|
96
105
|
| GetAsyncInvokeCommandInput
|
|
97
106
|
| InvokeModelCommandInput
|
|
107
|
+
| InvokeModelWithBidirectionalStreamCommandInput
|
|
98
108
|
| InvokeModelWithResponseStreamCommandInput
|
|
99
109
|
| ListAsyncInvokesCommandInput
|
|
100
110
|
| StartAsyncInvokeCommandInput;
|
|
@@ -104,6 +114,7 @@ export type ServiceOutputTypes =
|
|
|
104
114
|
| ConverseStreamCommandOutput
|
|
105
115
|
| GetAsyncInvokeCommandOutput
|
|
106
116
|
| InvokeModelCommandOutput
|
|
117
|
+
| InvokeModelWithBidirectionalStreamCommandOutput
|
|
107
118
|
| InvokeModelWithResponseStreamCommandOutput
|
|
108
119
|
| ListAsyncInvokesCommandOutput
|
|
109
120
|
| StartAsyncInvokeCommandOutput;
|
|
@@ -133,6 +144,7 @@ export interface ClientDefaults
|
|
|
133
144
|
extensions?: RuntimeExtension[];
|
|
134
145
|
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
|
|
135
146
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
147
|
+
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
|
|
136
148
|
}
|
|
137
149
|
export type BedrockRuntimeClientConfigType = Partial<
|
|
138
150
|
__SmithyConfiguration<__HttpHandlerOptions>
|
|
@@ -145,6 +157,7 @@ export type BedrockRuntimeClientConfigType = Partial<
|
|
|
145
157
|
EndpointInputConfig<EndpointParameters> &
|
|
146
158
|
EventStreamSerdeInputConfig &
|
|
147
159
|
HttpAuthSchemeInputConfig &
|
|
160
|
+
EventStreamInputConfig &
|
|
148
161
|
ClientInputEndpointParameters;
|
|
149
162
|
export interface BedrockRuntimeClientConfig
|
|
150
163
|
extends BedrockRuntimeClientConfigType {}
|
|
@@ -159,6 +172,7 @@ export type BedrockRuntimeClientResolvedConfigType =
|
|
|
159
172
|
EndpointResolvedConfig<EndpointParameters> &
|
|
160
173
|
EventStreamSerdeResolvedConfig &
|
|
161
174
|
HttpAuthSchemeResolvedConfig &
|
|
175
|
+
EventStreamResolvedConfig &
|
|
162
176
|
ClientResolvedEndpointParameters;
|
|
163
177
|
export interface BedrockRuntimeClientResolvedConfig
|
|
164
178
|
extends BedrockRuntimeClientResolvedConfigType {}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import {
|
|
4
|
+
BedrockRuntimeClientResolvedConfig,
|
|
5
|
+
ServiceInputTypes,
|
|
6
|
+
ServiceOutputTypes,
|
|
7
|
+
} from "../BedrockRuntimeClient";
|
|
8
|
+
import {
|
|
9
|
+
InvokeModelWithBidirectionalStreamRequest,
|
|
10
|
+
InvokeModelWithBidirectionalStreamResponse,
|
|
11
|
+
} from "../models/models_0";
|
|
12
|
+
export { __MetadataBearer };
|
|
13
|
+
export { $Command };
|
|
14
|
+
export interface InvokeModelWithBidirectionalStreamCommandInput
|
|
15
|
+
extends InvokeModelWithBidirectionalStreamRequest {}
|
|
16
|
+
export interface InvokeModelWithBidirectionalStreamCommandOutput
|
|
17
|
+
extends InvokeModelWithBidirectionalStreamResponse,
|
|
18
|
+
__MetadataBearer {}
|
|
19
|
+
declare const InvokeModelWithBidirectionalStreamCommand_base: {
|
|
20
|
+
new (
|
|
21
|
+
input: InvokeModelWithBidirectionalStreamCommandInput
|
|
22
|
+
): import("@smithy/smithy-client").CommandImpl<
|
|
23
|
+
InvokeModelWithBidirectionalStreamCommandInput,
|
|
24
|
+
InvokeModelWithBidirectionalStreamCommandOutput,
|
|
25
|
+
BedrockRuntimeClientResolvedConfig,
|
|
26
|
+
ServiceInputTypes,
|
|
27
|
+
ServiceOutputTypes
|
|
28
|
+
>;
|
|
29
|
+
new (
|
|
30
|
+
__0_0: InvokeModelWithBidirectionalStreamCommandInput
|
|
31
|
+
): import("@smithy/smithy-client").CommandImpl<
|
|
32
|
+
InvokeModelWithBidirectionalStreamCommandInput,
|
|
33
|
+
InvokeModelWithBidirectionalStreamCommandOutput,
|
|
34
|
+
BedrockRuntimeClientResolvedConfig,
|
|
35
|
+
ServiceInputTypes,
|
|
36
|
+
ServiceOutputTypes
|
|
37
|
+
>;
|
|
38
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
39
|
+
};
|
|
40
|
+
export declare class InvokeModelWithBidirectionalStreamCommand extends InvokeModelWithBidirectionalStreamCommand_base {
|
|
41
|
+
protected static __types: {
|
|
42
|
+
api: {
|
|
43
|
+
input: InvokeModelWithBidirectionalStreamRequest;
|
|
44
|
+
output: InvokeModelWithBidirectionalStreamResponse;
|
|
45
|
+
};
|
|
46
|
+
sdk: {
|
|
47
|
+
input: InvokeModelWithBidirectionalStreamCommandInput;
|
|
48
|
+
output: InvokeModelWithBidirectionalStreamCommandOutput;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from "./ConverseCommand";
|
|
|
3
3
|
export * from "./ConverseStreamCommand";
|
|
4
4
|
export * from "./GetAsyncInvokeCommand";
|
|
5
5
|
export * from "./InvokeModelCommand";
|
|
6
|
+
export * from "./InvokeModelWithBidirectionalStreamCommand";
|
|
6
7
|
export * from "./InvokeModelWithResponseStreamCommand";
|
|
7
8
|
export * from "./ListAsyncInvokesCommand";
|
|
8
9
|
export * from "./StartAsyncInvokeCommand";
|