@aws-sdk/client-bedrock-runtime 3.422.1 → 3.423.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/dist-cjs/models/models_0.js +4 -0
- package/dist-cjs/protocols/Aws_restJson1.js +12 -0
- package/dist-es/models/models_0.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +12 -0
- package/dist-types/commands/InvokeModelCommand.d.ts +1 -1
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +4 -1
- package/dist-types/models/models_0.d.ts +21 -1
- package/dist-types/ts3.4/BedrockRuntime.d.ts +41 -24
- package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +139 -174
- package/dist-types/ts3.4/commands/InvokeModelCommand.d.ts +49 -120
- package/dist-types/ts3.4/commands/InvokeModelWithResponseStreamCommand.d.ts +49 -134
- package/dist-types/ts3.4/commands/index.d.ts +2 -2
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -22
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -5
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -2
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -8
- package/dist-types/ts3.4/index.d.ts +6 -11
- package/dist-types/ts3.4/models/BedrockRuntimeServiceException.d.ts +8 -13
- package/dist-types/ts3.4/models/index.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +198 -355
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +32 -20
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +98 -47
- package/dist-types/ts3.4/runtimeConfig.d.ts +98 -47
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +89 -46
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -19
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -17
- package/package.json +3 -3
|
@@ -150,6 +150,8 @@ var ResponseStream;
|
|
|
150
150
|
return visitor.validationException(value.validationException);
|
|
151
151
|
if (value.throttlingException !== undefined)
|
|
152
152
|
return visitor.throttlingException(value.throttlingException);
|
|
153
|
+
if (value.modelTimeoutException !== undefined)
|
|
154
|
+
return visitor.modelTimeoutException(value.modelTimeoutException);
|
|
153
155
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
154
156
|
};
|
|
155
157
|
})(ResponseStream = exports.ResponseStream || (exports.ResponseStream = {}));
|
|
@@ -184,6 +186,8 @@ const ResponseStreamFilterSensitiveLog = (obj) => {
|
|
|
184
186
|
return { validationException: obj.validationException };
|
|
185
187
|
if (obj.throttlingException !== undefined)
|
|
186
188
|
return { throttlingException: obj.throttlingException };
|
|
189
|
+
if (obj.modelTimeoutException !== undefined)
|
|
190
|
+
return { modelTimeoutException: obj.modelTimeoutException };
|
|
187
191
|
if (obj.$unknown !== undefined)
|
|
188
192
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
189
193
|
};
|
|
@@ -329,6 +329,11 @@ const de_ResponseStream = (output, context) => {
|
|
|
329
329
|
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context),
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
+
if (event["modelTimeoutException"] != null) {
|
|
333
|
+
return {
|
|
334
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context),
|
|
335
|
+
};
|
|
336
|
+
}
|
|
332
337
|
return { $unknown: output };
|
|
333
338
|
});
|
|
334
339
|
};
|
|
@@ -346,6 +351,13 @@ const de_ModelStreamErrorException_event = async (output, context) => {
|
|
|
346
351
|
};
|
|
347
352
|
return de_ModelStreamErrorExceptionRes(parsedOutput, context);
|
|
348
353
|
};
|
|
354
|
+
const de_ModelTimeoutException_event = async (output, context) => {
|
|
355
|
+
const parsedOutput = {
|
|
356
|
+
...output,
|
|
357
|
+
body: await parseBody(output.body, context),
|
|
358
|
+
};
|
|
359
|
+
return de_ModelTimeoutExceptionRes(parsedOutput, context);
|
|
360
|
+
};
|
|
349
361
|
const de_PayloadPart_event = async (output, context) => {
|
|
350
362
|
const contents = {};
|
|
351
363
|
const data = await parseBody(output.body, context);
|
|
@@ -137,6 +137,8 @@ export var ResponseStream;
|
|
|
137
137
|
return visitor.validationException(value.validationException);
|
|
138
138
|
if (value.throttlingException !== undefined)
|
|
139
139
|
return visitor.throttlingException(value.throttlingException);
|
|
140
|
+
if (value.modelTimeoutException !== undefined)
|
|
141
|
+
return visitor.modelTimeoutException(value.modelTimeoutException);
|
|
140
142
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
141
143
|
};
|
|
142
144
|
})(ResponseStream || (ResponseStream = {}));
|
|
@@ -167,6 +169,8 @@ export const ResponseStreamFilterSensitiveLog = (obj) => {
|
|
|
167
169
|
return { validationException: obj.validationException };
|
|
168
170
|
if (obj.throttlingException !== undefined)
|
|
169
171
|
return { throttlingException: obj.throttlingException };
|
|
172
|
+
if (obj.modelTimeoutException !== undefined)
|
|
173
|
+
return { modelTimeoutException: obj.modelTimeoutException };
|
|
170
174
|
if (obj.$unknown !== undefined)
|
|
171
175
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
172
176
|
};
|
|
@@ -322,6 +322,11 @@ const de_ResponseStream = (output, context) => {
|
|
|
322
322
|
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context),
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
+
if (event["modelTimeoutException"] != null) {
|
|
326
|
+
return {
|
|
327
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context),
|
|
328
|
+
};
|
|
329
|
+
}
|
|
325
330
|
return { $unknown: output };
|
|
326
331
|
});
|
|
327
332
|
};
|
|
@@ -339,6 +344,13 @@ const de_ModelStreamErrorException_event = async (output, context) => {
|
|
|
339
344
|
};
|
|
340
345
|
return de_ModelStreamErrorExceptionRes(parsedOutput, context);
|
|
341
346
|
};
|
|
347
|
+
const de_ModelTimeoutException_event = async (output, context) => {
|
|
348
|
+
const parsedOutput = {
|
|
349
|
+
...output,
|
|
350
|
+
body: await parseBody(output.body, context),
|
|
351
|
+
};
|
|
352
|
+
return de_ModelTimeoutExceptionRes(parsedOutput, context);
|
|
353
|
+
};
|
|
342
354
|
const de_PayloadPart_event = async (output, context) => {
|
|
343
355
|
const contents = {};
|
|
344
356
|
const data = await parseBody(output.body, context);
|
|
@@ -38,7 +38,7 @@ export interface InvokeModelCommandOutput extends InvokeModelCommandOutputType,
|
|
|
38
38
|
* @public
|
|
39
39
|
* <p>Invokes the specified Bedrock model to run inference using the input provided in the request body.
|
|
40
40
|
* You use InvokeModel to run inference for text models, image models, and embedding models.</p>
|
|
41
|
-
* <p>For more information
|
|
41
|
+
* <p>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>
|
|
42
42
|
* <p>For example requests, see Examples (after the Errors section).</p>
|
|
43
43
|
* @example
|
|
44
44
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -31,7 +31,7 @@ export interface InvokeModelWithResponseStreamCommandOutput extends InvokeModelW
|
|
|
31
31
|
* @public
|
|
32
32
|
* <p>Invoke the specified Bedrock model to run inference using the input provided.
|
|
33
33
|
* Return the response in a stream.</p>
|
|
34
|
-
* <p>For more information
|
|
34
|
+
* <p>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>
|
|
35
35
|
* <p>For an example request and response, see Examples (after the Errors section).</p>
|
|
36
36
|
* @example
|
|
37
37
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -66,6 +66,9 @@ export interface InvokeModelWithResponseStreamCommandOutput extends InvokeModelW
|
|
|
66
66
|
* // throttlingException: { // ThrottlingException
|
|
67
67
|
* // message: "STRING_VALUE",
|
|
68
68
|
* // },
|
|
69
|
+
* // modelTimeoutException: { // ModelTimeoutException
|
|
70
|
+
* // message: "STRING_VALUE",
|
|
71
|
+
* // },
|
|
69
72
|
* // },
|
|
70
73
|
* // contentType: "STRING_VALUE", // required
|
|
71
74
|
* // };
|
|
@@ -225,7 +225,7 @@ export declare class ModelStreamErrorException extends __BaseException {
|
|
|
225
225
|
* @public
|
|
226
226
|
* <p>Definition of content in the response stream.</p>
|
|
227
227
|
*/
|
|
228
|
-
export type ResponseStream = ResponseStream.ChunkMember | ResponseStream.InternalServerExceptionMember | ResponseStream.ModelStreamErrorExceptionMember | ResponseStream.ThrottlingExceptionMember | ResponseStream.ValidationExceptionMember | ResponseStream.$UnknownMember;
|
|
228
|
+
export type ResponseStream = ResponseStream.ChunkMember | ResponseStream.InternalServerExceptionMember | ResponseStream.ModelStreamErrorExceptionMember | ResponseStream.ModelTimeoutExceptionMember | ResponseStream.ThrottlingExceptionMember | ResponseStream.ValidationExceptionMember | ResponseStream.$UnknownMember;
|
|
229
229
|
/**
|
|
230
230
|
* @public
|
|
231
231
|
*/
|
|
@@ -240,6 +240,7 @@ export declare namespace ResponseStream {
|
|
|
240
240
|
modelStreamErrorException?: never;
|
|
241
241
|
validationException?: never;
|
|
242
242
|
throttlingException?: never;
|
|
243
|
+
modelTimeoutException?: never;
|
|
243
244
|
$unknown?: never;
|
|
244
245
|
}
|
|
245
246
|
/**
|
|
@@ -252,6 +253,7 @@ export declare namespace ResponseStream {
|
|
|
252
253
|
modelStreamErrorException?: never;
|
|
253
254
|
validationException?: never;
|
|
254
255
|
throttlingException?: never;
|
|
256
|
+
modelTimeoutException?: never;
|
|
255
257
|
$unknown?: never;
|
|
256
258
|
}
|
|
257
259
|
/**
|
|
@@ -264,6 +266,7 @@ export declare namespace ResponseStream {
|
|
|
264
266
|
modelStreamErrorException: ModelStreamErrorException;
|
|
265
267
|
validationException?: never;
|
|
266
268
|
throttlingException?: never;
|
|
269
|
+
modelTimeoutException?: never;
|
|
267
270
|
$unknown?: never;
|
|
268
271
|
}
|
|
269
272
|
/**
|
|
@@ -276,6 +279,7 @@ export declare namespace ResponseStream {
|
|
|
276
279
|
modelStreamErrorException?: never;
|
|
277
280
|
validationException: ValidationException;
|
|
278
281
|
throttlingException?: never;
|
|
282
|
+
modelTimeoutException?: never;
|
|
279
283
|
$unknown?: never;
|
|
280
284
|
}
|
|
281
285
|
/**
|
|
@@ -288,6 +292,20 @@ export declare namespace ResponseStream {
|
|
|
288
292
|
modelStreamErrorException?: never;
|
|
289
293
|
validationException?: never;
|
|
290
294
|
throttlingException: ThrottlingException;
|
|
295
|
+
modelTimeoutException?: never;
|
|
296
|
+
$unknown?: never;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @public
|
|
300
|
+
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
301
|
+
*/
|
|
302
|
+
interface ModelTimeoutExceptionMember {
|
|
303
|
+
chunk?: never;
|
|
304
|
+
internalServerException?: never;
|
|
305
|
+
modelStreamErrorException?: never;
|
|
306
|
+
validationException?: never;
|
|
307
|
+
throttlingException?: never;
|
|
308
|
+
modelTimeoutException: ModelTimeoutException;
|
|
291
309
|
$unknown?: never;
|
|
292
310
|
}
|
|
293
311
|
/**
|
|
@@ -299,6 +317,7 @@ export declare namespace ResponseStream {
|
|
|
299
317
|
modelStreamErrorException?: never;
|
|
300
318
|
validationException?: never;
|
|
301
319
|
throttlingException?: never;
|
|
320
|
+
modelTimeoutException?: never;
|
|
302
321
|
$unknown: [string, any];
|
|
303
322
|
}
|
|
304
323
|
interface Visitor<T> {
|
|
@@ -307,6 +326,7 @@ export declare namespace ResponseStream {
|
|
|
307
326
|
modelStreamErrorException: (value: ModelStreamErrorException) => T;
|
|
308
327
|
validationException: (value: ValidationException) => T;
|
|
309
328
|
throttlingException: (value: ThrottlingException) => T;
|
|
329
|
+
modelTimeoutException: (value: ModelTimeoutException) => T;
|
|
310
330
|
_: (name: string, value: any) => T;
|
|
311
331
|
}
|
|
312
332
|
const visit: <T>(value: ResponseStream, visitor: Visitor<T>) => T;
|
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
-
import { BedrockRuntimeClient } from "./BedrockRuntimeClient";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { BedrockRuntimeClient } from "./BedrockRuntimeClient";
|
|
3
|
+
import {
|
|
4
|
+
InvokeModelCommandInput,
|
|
5
|
+
InvokeModelCommandOutput,
|
|
6
|
+
} from "./commands/InvokeModelCommand";
|
|
7
|
+
import {
|
|
8
|
+
InvokeModelWithResponseStreamCommandInput,
|
|
9
|
+
InvokeModelWithResponseStreamCommandOutput,
|
|
10
|
+
} from "./commands/InvokeModelWithResponseStreamCommand";
|
|
11
|
+
export interface BedrockRuntime {
|
|
12
|
+
invokeModel(
|
|
13
|
+
args: InvokeModelCommandInput,
|
|
14
|
+
options?: __HttpHandlerOptions
|
|
15
|
+
): Promise<InvokeModelCommandOutput>;
|
|
16
|
+
invokeModel(
|
|
17
|
+
args: InvokeModelCommandInput,
|
|
18
|
+
cb: (err: any, data?: InvokeModelCommandOutput) => void
|
|
19
|
+
): void;
|
|
20
|
+
invokeModel(
|
|
21
|
+
args: InvokeModelCommandInput,
|
|
22
|
+
options: __HttpHandlerOptions,
|
|
23
|
+
cb: (err: any, data?: InvokeModelCommandOutput) => void
|
|
24
|
+
): void;
|
|
25
|
+
invokeModelWithResponseStream(
|
|
26
|
+
args: InvokeModelWithResponseStreamCommandInput,
|
|
27
|
+
options?: __HttpHandlerOptions
|
|
28
|
+
): Promise<InvokeModelWithResponseStreamCommandOutput>;
|
|
29
|
+
invokeModelWithResponseStream(
|
|
30
|
+
args: InvokeModelWithResponseStreamCommandInput,
|
|
31
|
+
cb: (err: any, data?: InvokeModelWithResponseStreamCommandOutput) => void
|
|
32
|
+
): void;
|
|
33
|
+
invokeModelWithResponseStream(
|
|
34
|
+
args: InvokeModelWithResponseStreamCommandInput,
|
|
35
|
+
options: __HttpHandlerOptions,
|
|
36
|
+
cb: (err: any, data?: InvokeModelWithResponseStreamCommandOutput) => void
|
|
37
|
+
): void;
|
|
38
|
+
}
|
|
39
|
+
export declare class BedrockRuntime
|
|
40
|
+
extends BedrockRuntimeClient
|
|
41
|
+
implements BedrockRuntime {}
|
|
@@ -1,174 +1,139 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @public
|
|
142
|
-
*
|
|
143
|
-
* The configuration interface of BedrockRuntimeClient class constructor that set the region, credentials and other options.
|
|
144
|
-
*/
|
|
145
|
-
export interface BedrockRuntimeClientConfig extends BedrockRuntimeClientConfigType {
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* @public
|
|
149
|
-
*/
|
|
150
|
-
export type BedrockRuntimeClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & EventStreamSerdeResolvedConfig & ClientResolvedEndpointParameters;
|
|
151
|
-
/**
|
|
152
|
-
* @public
|
|
153
|
-
*
|
|
154
|
-
* The resolved configuration interface of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}.
|
|
155
|
-
*/
|
|
156
|
-
export interface BedrockRuntimeClientResolvedConfig extends BedrockRuntimeClientResolvedConfigType {
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* @public
|
|
160
|
-
* <p>Describes the API operations for running inference using Bedrock models.</p>
|
|
161
|
-
*/
|
|
162
|
-
export declare class BedrockRuntimeClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, BedrockRuntimeClientResolvedConfig> {
|
|
163
|
-
/**
|
|
164
|
-
* The resolved configuration of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}.
|
|
165
|
-
*/
|
|
166
|
-
readonly config: BedrockRuntimeClientResolvedConfig;
|
|
167
|
-
constructor(...[configuration]: __CheckOptionalClientConfig<BedrockRuntimeClientConfig>);
|
|
168
|
-
/**
|
|
169
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
170
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
171
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
172
|
-
*/
|
|
173
|
-
destroy(): void;
|
|
174
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
HostHeaderInputConfig,
|
|
3
|
+
HostHeaderResolvedConfig,
|
|
4
|
+
} from "@aws-sdk/middleware-host-header";
|
|
5
|
+
import {
|
|
6
|
+
AwsAuthInputConfig,
|
|
7
|
+
AwsAuthResolvedConfig,
|
|
8
|
+
} from "@aws-sdk/middleware-signing";
|
|
9
|
+
import {
|
|
10
|
+
UserAgentInputConfig,
|
|
11
|
+
UserAgentResolvedConfig,
|
|
12
|
+
} from "@aws-sdk/middleware-user-agent";
|
|
13
|
+
import { Credentials as __Credentials } from "@aws-sdk/types";
|
|
14
|
+
import {
|
|
15
|
+
RegionInputConfig,
|
|
16
|
+
RegionResolvedConfig,
|
|
17
|
+
} from "@smithy/config-resolver";
|
|
18
|
+
import {
|
|
19
|
+
EventStreamSerdeInputConfig,
|
|
20
|
+
EventStreamSerdeResolvedConfig,
|
|
21
|
+
} from "@smithy/eventstream-serde-config-resolver";
|
|
22
|
+
import {
|
|
23
|
+
EndpointInputConfig,
|
|
24
|
+
EndpointResolvedConfig,
|
|
25
|
+
} from "@smithy/middleware-endpoint";
|
|
26
|
+
import {
|
|
27
|
+
RetryInputConfig,
|
|
28
|
+
RetryResolvedConfig,
|
|
29
|
+
} from "@smithy/middleware-retry";
|
|
30
|
+
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
31
|
+
import {
|
|
32
|
+
Client as __Client,
|
|
33
|
+
DefaultsMode as __DefaultsMode,
|
|
34
|
+
SmithyConfiguration as __SmithyConfiguration,
|
|
35
|
+
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
|
|
36
|
+
} from "@smithy/smithy-client";
|
|
37
|
+
import {
|
|
38
|
+
BodyLengthCalculator as __BodyLengthCalculator,
|
|
39
|
+
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
40
|
+
ChecksumConstructor as __ChecksumConstructor,
|
|
41
|
+
Decoder as __Decoder,
|
|
42
|
+
Encoder as __Encoder,
|
|
43
|
+
EventStreamSerdeProvider as __EventStreamSerdeProvider,
|
|
44
|
+
HashConstructor as __HashConstructor,
|
|
45
|
+
HttpHandlerOptions as __HttpHandlerOptions,
|
|
46
|
+
Logger as __Logger,
|
|
47
|
+
Provider as __Provider,
|
|
48
|
+
Provider,
|
|
49
|
+
StreamCollector as __StreamCollector,
|
|
50
|
+
UrlParser as __UrlParser,
|
|
51
|
+
UserAgent as __UserAgent,
|
|
52
|
+
} from "@smithy/types";
|
|
53
|
+
import {
|
|
54
|
+
InvokeModelCommandInput,
|
|
55
|
+
InvokeModelCommandOutput,
|
|
56
|
+
} from "./commands/InvokeModelCommand";
|
|
57
|
+
import {
|
|
58
|
+
InvokeModelWithResponseStreamCommandInput,
|
|
59
|
+
InvokeModelWithResponseStreamCommandOutput,
|
|
60
|
+
} from "./commands/InvokeModelWithResponseStreamCommand";
|
|
61
|
+
import {
|
|
62
|
+
ClientInputEndpointParameters,
|
|
63
|
+
ClientResolvedEndpointParameters,
|
|
64
|
+
EndpointParameters,
|
|
65
|
+
} from "./endpoint/EndpointParameters";
|
|
66
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
67
|
+
export { __Client };
|
|
68
|
+
export type ServiceInputTypes =
|
|
69
|
+
| InvokeModelCommandInput
|
|
70
|
+
| InvokeModelWithResponseStreamCommandInput;
|
|
71
|
+
export type ServiceOutputTypes =
|
|
72
|
+
| InvokeModelCommandOutput
|
|
73
|
+
| InvokeModelWithResponseStreamCommandOutput;
|
|
74
|
+
export interface ClientDefaults
|
|
75
|
+
extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
76
|
+
requestHandler?: __HttpHandler;
|
|
77
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
78
|
+
urlParser?: __UrlParser;
|
|
79
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
80
|
+
streamCollector?: __StreamCollector;
|
|
81
|
+
base64Decoder?: __Decoder;
|
|
82
|
+
base64Encoder?: __Encoder;
|
|
83
|
+
utf8Decoder?: __Decoder;
|
|
84
|
+
utf8Encoder?: __Encoder;
|
|
85
|
+
runtime?: string;
|
|
86
|
+
disableHostPrefix?: boolean;
|
|
87
|
+
serviceId?: string;
|
|
88
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
89
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
90
|
+
region?: string | __Provider<string>;
|
|
91
|
+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
92
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
93
|
+
maxAttempts?: number | __Provider<number>;
|
|
94
|
+
retryMode?: string | __Provider<string>;
|
|
95
|
+
logger?: __Logger;
|
|
96
|
+
extensions?: RuntimeExtension[];
|
|
97
|
+
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
|
|
98
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
99
|
+
}
|
|
100
|
+
export type BedrockRuntimeClientConfigType = Partial<
|
|
101
|
+
__SmithyConfiguration<__HttpHandlerOptions>
|
|
102
|
+
> &
|
|
103
|
+
ClientDefaults &
|
|
104
|
+
RegionInputConfig &
|
|
105
|
+
EndpointInputConfig<EndpointParameters> &
|
|
106
|
+
RetryInputConfig &
|
|
107
|
+
HostHeaderInputConfig &
|
|
108
|
+
AwsAuthInputConfig &
|
|
109
|
+
UserAgentInputConfig &
|
|
110
|
+
EventStreamSerdeInputConfig &
|
|
111
|
+
ClientInputEndpointParameters;
|
|
112
|
+
export interface BedrockRuntimeClientConfig
|
|
113
|
+
extends BedrockRuntimeClientConfigType {}
|
|
114
|
+
export type BedrockRuntimeClientResolvedConfigType =
|
|
115
|
+
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
116
|
+
Required<ClientDefaults> &
|
|
117
|
+
RuntimeExtensionsConfig &
|
|
118
|
+
RegionResolvedConfig &
|
|
119
|
+
EndpointResolvedConfig<EndpointParameters> &
|
|
120
|
+
RetryResolvedConfig &
|
|
121
|
+
HostHeaderResolvedConfig &
|
|
122
|
+
AwsAuthResolvedConfig &
|
|
123
|
+
UserAgentResolvedConfig &
|
|
124
|
+
EventStreamSerdeResolvedConfig &
|
|
125
|
+
ClientResolvedEndpointParameters;
|
|
126
|
+
export interface BedrockRuntimeClientResolvedConfig
|
|
127
|
+
extends BedrockRuntimeClientResolvedConfigType {}
|
|
128
|
+
export declare class BedrockRuntimeClient extends __Client<
|
|
129
|
+
__HttpHandlerOptions,
|
|
130
|
+
ServiceInputTypes,
|
|
131
|
+
ServiceOutputTypes,
|
|
132
|
+
BedrockRuntimeClientResolvedConfig
|
|
133
|
+
> {
|
|
134
|
+
readonly config: BedrockRuntimeClientResolvedConfig;
|
|
135
|
+
constructor(
|
|
136
|
+
...[configuration]: __CheckOptionalClientConfig<BedrockRuntimeClientConfig>
|
|
137
|
+
);
|
|
138
|
+
destroy(): void;
|
|
139
|
+
}
|