@aws-sdk/client-bedrock-runtime 3.784.0 → 3.787.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 +210 -2
- 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 +68 -0
- package/dist-es/protocols/Aws_restJson1.js +100 -1
- 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/InvokeModelWithBidirectionalStreamCommand.d.ts +144 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +233 -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 +157 -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 +7 -5
|
@@ -3605,6 +3605,215 @@ export interface InvokeModelResponse {
|
|
|
3605
3605
|
*/
|
|
3606
3606
|
performanceConfigLatency?: PerformanceConfigLatency | undefined;
|
|
3607
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
|
+
}
|
|
3608
3817
|
/**
|
|
3609
3818
|
* @public
|
|
3610
3819
|
*/
|
|
@@ -3954,6 +4163,30 @@ export declare const InvokeModelRequestFilterSensitiveLog: (obj: InvokeModelRequ
|
|
|
3954
4163
|
* @internal
|
|
3955
4164
|
*/
|
|
3956
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;
|
|
3957
4190
|
/**
|
|
3958
4191
|
* @internal
|
|
3959
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";
|
|
@@ -1582,6 +1582,145 @@ export interface InvokeModelResponse {
|
|
|
1582
1582
|
contentType: string | undefined;
|
|
1583
1583
|
performanceConfigLatency?: PerformanceConfigLatency | undefined;
|
|
1584
1584
|
}
|
|
1585
|
+
export interface BidirectionalInputPayloadPart {
|
|
1586
|
+
bytes?: Uint8Array | undefined;
|
|
1587
|
+
}
|
|
1588
|
+
export type InvokeModelWithBidirectionalStreamInput =
|
|
1589
|
+
| InvokeModelWithBidirectionalStreamInput.ChunkMember
|
|
1590
|
+
| InvokeModelWithBidirectionalStreamInput.$UnknownMember;
|
|
1591
|
+
export declare namespace InvokeModelWithBidirectionalStreamInput {
|
|
1592
|
+
interface ChunkMember {
|
|
1593
|
+
chunk: BidirectionalInputPayloadPart;
|
|
1594
|
+
$unknown?: never;
|
|
1595
|
+
}
|
|
1596
|
+
interface $UnknownMember {
|
|
1597
|
+
chunk?: never;
|
|
1598
|
+
$unknown: [string, any];
|
|
1599
|
+
}
|
|
1600
|
+
interface Visitor<T> {
|
|
1601
|
+
chunk: (value: BidirectionalInputPayloadPart) => T;
|
|
1602
|
+
_: (name: string, value: any) => T;
|
|
1603
|
+
}
|
|
1604
|
+
const visit: <T>(
|
|
1605
|
+
value: InvokeModelWithBidirectionalStreamInput,
|
|
1606
|
+
visitor: Visitor<T>
|
|
1607
|
+
) => T;
|
|
1608
|
+
}
|
|
1609
|
+
export interface InvokeModelWithBidirectionalStreamRequest {
|
|
1610
|
+
modelId: string | undefined;
|
|
1611
|
+
body: AsyncIterable<InvokeModelWithBidirectionalStreamInput> | undefined;
|
|
1612
|
+
}
|
|
1613
|
+
export interface BidirectionalOutputPayloadPart {
|
|
1614
|
+
bytes?: Uint8Array | undefined;
|
|
1615
|
+
}
|
|
1616
|
+
export type InvokeModelWithBidirectionalStreamOutput =
|
|
1617
|
+
| InvokeModelWithBidirectionalStreamOutput.ChunkMember
|
|
1618
|
+
| InvokeModelWithBidirectionalStreamOutput.InternalServerExceptionMember
|
|
1619
|
+
| InvokeModelWithBidirectionalStreamOutput.ModelStreamErrorExceptionMember
|
|
1620
|
+
| InvokeModelWithBidirectionalStreamOutput.ModelTimeoutExceptionMember
|
|
1621
|
+
| InvokeModelWithBidirectionalStreamOutput.ServiceUnavailableExceptionMember
|
|
1622
|
+
| InvokeModelWithBidirectionalStreamOutput.ThrottlingExceptionMember
|
|
1623
|
+
| InvokeModelWithBidirectionalStreamOutput.ValidationExceptionMember
|
|
1624
|
+
| InvokeModelWithBidirectionalStreamOutput.$UnknownMember;
|
|
1625
|
+
export declare namespace InvokeModelWithBidirectionalStreamOutput {
|
|
1626
|
+
interface ChunkMember {
|
|
1627
|
+
chunk: BidirectionalOutputPayloadPart;
|
|
1628
|
+
internalServerException?: never;
|
|
1629
|
+
modelStreamErrorException?: never;
|
|
1630
|
+
validationException?: never;
|
|
1631
|
+
throttlingException?: never;
|
|
1632
|
+
modelTimeoutException?: never;
|
|
1633
|
+
serviceUnavailableException?: never;
|
|
1634
|
+
$unknown?: never;
|
|
1635
|
+
}
|
|
1636
|
+
interface InternalServerExceptionMember {
|
|
1637
|
+
chunk?: never;
|
|
1638
|
+
internalServerException: InternalServerException;
|
|
1639
|
+
modelStreamErrorException?: never;
|
|
1640
|
+
validationException?: never;
|
|
1641
|
+
throttlingException?: never;
|
|
1642
|
+
modelTimeoutException?: never;
|
|
1643
|
+
serviceUnavailableException?: never;
|
|
1644
|
+
$unknown?: never;
|
|
1645
|
+
}
|
|
1646
|
+
interface ModelStreamErrorExceptionMember {
|
|
1647
|
+
chunk?: never;
|
|
1648
|
+
internalServerException?: never;
|
|
1649
|
+
modelStreamErrorException: ModelStreamErrorException;
|
|
1650
|
+
validationException?: never;
|
|
1651
|
+
throttlingException?: never;
|
|
1652
|
+
modelTimeoutException?: never;
|
|
1653
|
+
serviceUnavailableException?: never;
|
|
1654
|
+
$unknown?: never;
|
|
1655
|
+
}
|
|
1656
|
+
interface ValidationExceptionMember {
|
|
1657
|
+
chunk?: never;
|
|
1658
|
+
internalServerException?: never;
|
|
1659
|
+
modelStreamErrorException?: never;
|
|
1660
|
+
validationException: ValidationException;
|
|
1661
|
+
throttlingException?: never;
|
|
1662
|
+
modelTimeoutException?: never;
|
|
1663
|
+
serviceUnavailableException?: never;
|
|
1664
|
+
$unknown?: never;
|
|
1665
|
+
}
|
|
1666
|
+
interface ThrottlingExceptionMember {
|
|
1667
|
+
chunk?: never;
|
|
1668
|
+
internalServerException?: never;
|
|
1669
|
+
modelStreamErrorException?: never;
|
|
1670
|
+
validationException?: never;
|
|
1671
|
+
throttlingException: ThrottlingException;
|
|
1672
|
+
modelTimeoutException?: never;
|
|
1673
|
+
serviceUnavailableException?: never;
|
|
1674
|
+
$unknown?: never;
|
|
1675
|
+
}
|
|
1676
|
+
interface ModelTimeoutExceptionMember {
|
|
1677
|
+
chunk?: never;
|
|
1678
|
+
internalServerException?: never;
|
|
1679
|
+
modelStreamErrorException?: never;
|
|
1680
|
+
validationException?: never;
|
|
1681
|
+
throttlingException?: never;
|
|
1682
|
+
modelTimeoutException: ModelTimeoutException;
|
|
1683
|
+
serviceUnavailableException?: never;
|
|
1684
|
+
$unknown?: never;
|
|
1685
|
+
}
|
|
1686
|
+
interface ServiceUnavailableExceptionMember {
|
|
1687
|
+
chunk?: never;
|
|
1688
|
+
internalServerException?: never;
|
|
1689
|
+
modelStreamErrorException?: never;
|
|
1690
|
+
validationException?: never;
|
|
1691
|
+
throttlingException?: never;
|
|
1692
|
+
modelTimeoutException?: never;
|
|
1693
|
+
serviceUnavailableException: ServiceUnavailableException;
|
|
1694
|
+
$unknown?: never;
|
|
1695
|
+
}
|
|
1696
|
+
interface $UnknownMember {
|
|
1697
|
+
chunk?: never;
|
|
1698
|
+
internalServerException?: never;
|
|
1699
|
+
modelStreamErrorException?: never;
|
|
1700
|
+
validationException?: never;
|
|
1701
|
+
throttlingException?: never;
|
|
1702
|
+
modelTimeoutException?: never;
|
|
1703
|
+
serviceUnavailableException?: never;
|
|
1704
|
+
$unknown: [string, any];
|
|
1705
|
+
}
|
|
1706
|
+
interface Visitor<T> {
|
|
1707
|
+
chunk: (value: BidirectionalOutputPayloadPart) => T;
|
|
1708
|
+
internalServerException: (value: InternalServerException) => T;
|
|
1709
|
+
modelStreamErrorException: (value: ModelStreamErrorException) => T;
|
|
1710
|
+
validationException: (value: ValidationException) => T;
|
|
1711
|
+
throttlingException: (value: ThrottlingException) => T;
|
|
1712
|
+
modelTimeoutException: (value: ModelTimeoutException) => T;
|
|
1713
|
+
serviceUnavailableException: (value: ServiceUnavailableException) => T;
|
|
1714
|
+
_: (name: string, value: any) => T;
|
|
1715
|
+
}
|
|
1716
|
+
const visit: <T>(
|
|
1717
|
+
value: InvokeModelWithBidirectionalStreamOutput,
|
|
1718
|
+
visitor: Visitor<T>
|
|
1719
|
+
) => T;
|
|
1720
|
+
}
|
|
1721
|
+
export interface InvokeModelWithBidirectionalStreamResponse {
|
|
1722
|
+
body: AsyncIterable<InvokeModelWithBidirectionalStreamOutput> | undefined;
|
|
1723
|
+
}
|
|
1585
1724
|
export interface InvokeModelWithResponseStreamRequest {
|
|
1586
1725
|
body?: Uint8Array | undefined;
|
|
1587
1726
|
contentType?: string | undefined;
|
|
@@ -1779,6 +1918,24 @@ export declare const InvokeModelRequestFilterSensitiveLog: (
|
|
|
1779
1918
|
export declare const InvokeModelResponseFilterSensitiveLog: (
|
|
1780
1919
|
obj: InvokeModelResponse
|
|
1781
1920
|
) => any;
|
|
1921
|
+
export declare const BidirectionalInputPayloadPartFilterSensitiveLog: (
|
|
1922
|
+
obj: BidirectionalInputPayloadPart
|
|
1923
|
+
) => any;
|
|
1924
|
+
export declare const InvokeModelWithBidirectionalStreamInputFilterSensitiveLog: (
|
|
1925
|
+
obj: InvokeModelWithBidirectionalStreamInput
|
|
1926
|
+
) => any;
|
|
1927
|
+
export declare const InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog: (
|
|
1928
|
+
obj: InvokeModelWithBidirectionalStreamRequest
|
|
1929
|
+
) => any;
|
|
1930
|
+
export declare const BidirectionalOutputPayloadPartFilterSensitiveLog: (
|
|
1931
|
+
obj: BidirectionalOutputPayloadPart
|
|
1932
|
+
) => any;
|
|
1933
|
+
export declare const InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog: (
|
|
1934
|
+
obj: InvokeModelWithBidirectionalStreamOutput
|
|
1935
|
+
) => any;
|
|
1936
|
+
export declare const InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog: (
|
|
1937
|
+
obj: InvokeModelWithBidirectionalStreamResponse
|
|
1938
|
+
) => any;
|
|
1782
1939
|
export declare const InvokeModelWithResponseStreamRequestFilterSensitiveLog: (
|
|
1783
1940
|
obj: InvokeModelWithResponseStreamRequest
|
|
1784
1941
|
) => any;
|
|
@@ -26,6 +26,10 @@ import {
|
|
|
26
26
|
InvokeModelCommandInput,
|
|
27
27
|
InvokeModelCommandOutput,
|
|
28
28
|
} from "../commands/InvokeModelCommand";
|
|
29
|
+
import {
|
|
30
|
+
InvokeModelWithBidirectionalStreamCommandInput,
|
|
31
|
+
InvokeModelWithBidirectionalStreamCommandOutput,
|
|
32
|
+
} from "../commands/InvokeModelWithBidirectionalStreamCommand";
|
|
29
33
|
import {
|
|
30
34
|
InvokeModelWithResponseStreamCommandInput,
|
|
31
35
|
InvokeModelWithResponseStreamCommandOutput,
|
|
@@ -58,6 +62,10 @@ export declare const se_InvokeModelCommand: (
|
|
|
58
62
|
input: InvokeModelCommandInput,
|
|
59
63
|
context: __SerdeContext
|
|
60
64
|
) => Promise<__HttpRequest>;
|
|
65
|
+
export declare const se_InvokeModelWithBidirectionalStreamCommand: (
|
|
66
|
+
input: InvokeModelWithBidirectionalStreamCommandInput,
|
|
67
|
+
context: __SerdeContext & __EventStreamSerdeContext
|
|
68
|
+
) => Promise<__HttpRequest>;
|
|
61
69
|
export declare const se_InvokeModelWithResponseStreamCommand: (
|
|
62
70
|
input: InvokeModelWithResponseStreamCommandInput,
|
|
63
71
|
context: __SerdeContext
|
|
@@ -90,6 +98,10 @@ export declare const de_InvokeModelCommand: (
|
|
|
90
98
|
output: __HttpResponse,
|
|
91
99
|
context: __SerdeContext
|
|
92
100
|
) => Promise<InvokeModelCommandOutput>;
|
|
101
|
+
export declare const de_InvokeModelWithBidirectionalStreamCommand: (
|
|
102
|
+
output: __HttpResponse,
|
|
103
|
+
context: __SerdeContext & __EventStreamSerdeContext
|
|
104
|
+
) => Promise<InvokeModelWithBidirectionalStreamCommandOutput>;
|
|
93
105
|
export declare const de_InvokeModelWithResponseStreamCommand: (
|
|
94
106
|
output: __HttpResponse,
|
|
95
107
|
context: __SerdeContext & __EventStreamSerdeContext
|
|
@@ -16,6 +16,7 @@ export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
|
16
16
|
| import("@aws-sdk/util-user-agent-browser").PreviouslyResolved
|
|
17
17
|
| undefined
|
|
18
18
|
) => Promise<import("@smithy/types").UserAgent>;
|
|
19
|
+
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
19
20
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
20
21
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
21
22
|
region: string | import("@smithy/types").Provider<any>;
|