@aws-sdk/client-bedrock-runtime 3.422.0 → 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/models/models_0.d.ts +17 -0
- 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;
|
|
@@ -97,6 +97,7 @@ export type ResponseStream =
|
|
|
97
97
|
| ResponseStream.ChunkMember
|
|
98
98
|
| ResponseStream.InternalServerExceptionMember
|
|
99
99
|
| ResponseStream.ModelStreamErrorExceptionMember
|
|
100
|
+
| ResponseStream.ModelTimeoutExceptionMember
|
|
100
101
|
| ResponseStream.ThrottlingExceptionMember
|
|
101
102
|
| ResponseStream.ValidationExceptionMember
|
|
102
103
|
| ResponseStream.$UnknownMember;
|
|
@@ -107,6 +108,7 @@ export declare namespace ResponseStream {
|
|
|
107
108
|
modelStreamErrorException?: never;
|
|
108
109
|
validationException?: never;
|
|
109
110
|
throttlingException?: never;
|
|
111
|
+
modelTimeoutException?: never;
|
|
110
112
|
$unknown?: never;
|
|
111
113
|
}
|
|
112
114
|
interface InternalServerExceptionMember {
|
|
@@ -115,6 +117,7 @@ export declare namespace ResponseStream {
|
|
|
115
117
|
modelStreamErrorException?: never;
|
|
116
118
|
validationException?: never;
|
|
117
119
|
throttlingException?: never;
|
|
120
|
+
modelTimeoutException?: never;
|
|
118
121
|
$unknown?: never;
|
|
119
122
|
}
|
|
120
123
|
interface ModelStreamErrorExceptionMember {
|
|
@@ -123,6 +126,7 @@ export declare namespace ResponseStream {
|
|
|
123
126
|
modelStreamErrorException: ModelStreamErrorException;
|
|
124
127
|
validationException?: never;
|
|
125
128
|
throttlingException?: never;
|
|
129
|
+
modelTimeoutException?: never;
|
|
126
130
|
$unknown?: never;
|
|
127
131
|
}
|
|
128
132
|
interface ValidationExceptionMember {
|
|
@@ -131,6 +135,7 @@ export declare namespace ResponseStream {
|
|
|
131
135
|
modelStreamErrorException?: never;
|
|
132
136
|
validationException: ValidationException;
|
|
133
137
|
throttlingException?: never;
|
|
138
|
+
modelTimeoutException?: never;
|
|
134
139
|
$unknown?: never;
|
|
135
140
|
}
|
|
136
141
|
interface ThrottlingExceptionMember {
|
|
@@ -139,6 +144,16 @@ export declare namespace ResponseStream {
|
|
|
139
144
|
modelStreamErrorException?: never;
|
|
140
145
|
validationException?: never;
|
|
141
146
|
throttlingException: ThrottlingException;
|
|
147
|
+
modelTimeoutException?: never;
|
|
148
|
+
$unknown?: never;
|
|
149
|
+
}
|
|
150
|
+
interface ModelTimeoutExceptionMember {
|
|
151
|
+
chunk?: never;
|
|
152
|
+
internalServerException?: never;
|
|
153
|
+
modelStreamErrorException?: never;
|
|
154
|
+
validationException?: never;
|
|
155
|
+
throttlingException?: never;
|
|
156
|
+
modelTimeoutException: ModelTimeoutException;
|
|
142
157
|
$unknown?: never;
|
|
143
158
|
}
|
|
144
159
|
interface $UnknownMember {
|
|
@@ -147,6 +162,7 @@ export declare namespace ResponseStream {
|
|
|
147
162
|
modelStreamErrorException?: never;
|
|
148
163
|
validationException?: never;
|
|
149
164
|
throttlingException?: never;
|
|
165
|
+
modelTimeoutException?: never;
|
|
150
166
|
$unknown: [string, any];
|
|
151
167
|
}
|
|
152
168
|
interface Visitor<T> {
|
|
@@ -155,6 +171,7 @@ export declare namespace ResponseStream {
|
|
|
155
171
|
modelStreamErrorException: (value: ModelStreamErrorException) => T;
|
|
156
172
|
validationException: (value: ValidationException) => T;
|
|
157
173
|
throttlingException: (value: ThrottlingException) => T;
|
|
174
|
+
modelTimeoutException: (value: ModelTimeoutException) => T;
|
|
158
175
|
_: (name: string, value: any) => T;
|
|
159
176
|
}
|
|
160
177
|
const visit: <T>(value: ResponseStream, visitor: Visitor<T>) => T;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.423.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.423.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.423.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.418.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.418.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.418.0",
|