@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.
Files changed (27) hide show
  1. package/dist-cjs/models/models_0.js +4 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +12 -0
  3. package/dist-es/models/models_0.js +4 -0
  4. package/dist-es/protocols/Aws_restJson1.js +12 -0
  5. package/dist-types/commands/InvokeModelCommand.d.ts +1 -1
  6. package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +4 -1
  7. package/dist-types/models/models_0.d.ts +21 -1
  8. package/dist-types/ts3.4/BedrockRuntime.d.ts +41 -24
  9. package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +139 -174
  10. package/dist-types/ts3.4/commands/InvokeModelCommand.d.ts +49 -120
  11. package/dist-types/ts3.4/commands/InvokeModelWithResponseStreamCommand.d.ts +49 -134
  12. package/dist-types/ts3.4/commands/index.d.ts +2 -2
  13. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -22
  14. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -5
  15. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -2
  16. package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -8
  17. package/dist-types/ts3.4/index.d.ts +6 -11
  18. package/dist-types/ts3.4/models/BedrockRuntimeServiceException.d.ts +8 -13
  19. package/dist-types/ts3.4/models/index.d.ts +1 -1
  20. package/dist-types/ts3.4/models/models_0.d.ts +198 -355
  21. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +32 -20
  22. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +98 -47
  23. package/dist-types/ts3.4/runtimeConfig.d.ts +98 -47
  24. package/dist-types/ts3.4/runtimeConfig.native.d.ts +89 -46
  25. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -19
  26. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -17
  27. 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 about invoking models, see Using the API in the <a href="https://d2eo22ngex1n9g.cloudfront.net/Documentation/BedrockUserGuide.pdf">Bedrock User Guide</a>.</p>
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 about invoking models, see Using the API in the <a href="https://d2eo22ngex1n9g.cloudfront.net/Documentation/BedrockUserGuide.pdf">Bedrock User Guide</a>.</p>
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 { InvokeModelCommandInput, InvokeModelCommandOutput } from "./commands/InvokeModelCommand";
4
- import { InvokeModelWithResponseStreamCommandInput, InvokeModelWithResponseStreamCommandOutput } from "./commands/InvokeModelWithResponseStreamCommand";
5
- export interface BedrockRuntime {
6
- /**
7
- * @see {@link InvokeModelCommand}
8
- */
9
- invokeModel(args: InvokeModelCommandInput, options?: __HttpHandlerOptions): Promise<InvokeModelCommandOutput>;
10
- invokeModel(args: InvokeModelCommandInput, cb: (err: any, data?: InvokeModelCommandOutput) => void): void;
11
- invokeModel(args: InvokeModelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeModelCommandOutput) => void): void;
12
- /**
13
- * @see {@link InvokeModelWithResponseStreamCommand}
14
- */
15
- invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options?: __HttpHandlerOptions): Promise<InvokeModelWithResponseStreamCommandOutput>;
16
- invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, cb: (err: any, data?: InvokeModelWithResponseStreamCommandOutput) => void): void;
17
- invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeModelWithResponseStreamCommandOutput) => void): void;
18
- }
19
- /**
20
- * @public
21
- * <p>Describes the API operations for running inference using Bedrock models.</p>
22
- */
23
- export declare class BedrockRuntime extends BedrockRuntimeClient implements BedrockRuntime {
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 { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
2
- import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
3
- import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
4
- import { Credentials as __Credentials } from "@aws-sdk/types";
5
- import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
6
- import { EventStreamSerdeInputConfig, EventStreamSerdeResolvedConfig } from "@smithy/eventstream-serde-config-resolver";
7
- import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
8
- import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
9
- import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
10
- import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
11
- import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
12
- import { InvokeModelCommandInput, InvokeModelCommandOutput } from "./commands/InvokeModelCommand";
13
- import { InvokeModelWithResponseStreamCommandInput, InvokeModelWithResponseStreamCommandOutput } from "./commands/InvokeModelWithResponseStreamCommand";
14
- import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
15
- import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
16
- export { __Client };
17
- /**
18
- * @public
19
- */
20
- export type ServiceInputTypes = InvokeModelCommandInput | InvokeModelWithResponseStreamCommandInput;
21
- /**
22
- * @public
23
- */
24
- export type ServiceOutputTypes = InvokeModelCommandOutput | InvokeModelWithResponseStreamCommandOutput;
25
- /**
26
- * @public
27
- */
28
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
29
- /**
30
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
31
- */
32
- requestHandler?: __HttpHandler;
33
- /**
34
- * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
35
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
36
- * @internal
37
- */
38
- sha256?: __ChecksumConstructor | __HashConstructor;
39
- /**
40
- * The function that will be used to convert strings into HTTP endpoints.
41
- * @internal
42
- */
43
- urlParser?: __UrlParser;
44
- /**
45
- * A function that can calculate the length of a request body.
46
- * @internal
47
- */
48
- bodyLengthChecker?: __BodyLengthCalculator;
49
- /**
50
- * A function that converts a stream into an array of bytes.
51
- * @internal
52
- */
53
- streamCollector?: __StreamCollector;
54
- /**
55
- * The function that will be used to convert a base64-encoded string to a byte array.
56
- * @internal
57
- */
58
- base64Decoder?: __Decoder;
59
- /**
60
- * The function that will be used to convert binary data to a base64-encoded string.
61
- * @internal
62
- */
63
- base64Encoder?: __Encoder;
64
- /**
65
- * The function that will be used to convert a UTF8-encoded string to a byte array.
66
- * @internal
67
- */
68
- utf8Decoder?: __Decoder;
69
- /**
70
- * The function that will be used to convert binary data to a UTF-8 encoded string.
71
- * @internal
72
- */
73
- utf8Encoder?: __Encoder;
74
- /**
75
- * The runtime environment.
76
- * @internal
77
- */
78
- runtime?: string;
79
- /**
80
- * Disable dynamically changing the endpoint of the client based on the hostPrefix
81
- * trait of an operation.
82
- */
83
- disableHostPrefix?: boolean;
84
- /**
85
- * Unique service identifier.
86
- * @internal
87
- */
88
- serviceId?: string;
89
- /**
90
- * Enables IPv6/IPv4 dualstack endpoint.
91
- */
92
- useDualstackEndpoint?: boolean | __Provider<boolean>;
93
- /**
94
- * Enables FIPS compatible endpoints.
95
- */
96
- useFipsEndpoint?: boolean | __Provider<boolean>;
97
- /**
98
- * The AWS region to which this client will send requests
99
- */
100
- region?: string | __Provider<string>;
101
- /**
102
- * Default credentials provider; Not available in browser runtime.
103
- * @internal
104
- */
105
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
106
- /**
107
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
108
- * @internal
109
- */
110
- defaultUserAgentProvider?: Provider<__UserAgent>;
111
- /**
112
- * Value for how many times a request will be made at most in case of retry.
113
- */
114
- maxAttempts?: number | __Provider<number>;
115
- /**
116
- * Specifies which retry algorithm to use.
117
- */
118
- retryMode?: string | __Provider<string>;
119
- /**
120
- * Optional logger for logging debug/info/warn/error.
121
- */
122
- logger?: __Logger;
123
- /**
124
- * Optional extensions
125
- */
126
- extensions?: RuntimeExtension[];
127
- /**
128
- * The function that provides necessary utilities for generating and parsing event stream
129
- */
130
- eventStreamSerdeProvider?: __EventStreamSerdeProvider;
131
- /**
132
- * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
133
- */
134
- defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
135
- }
136
- /**
137
- * @public
138
- */
139
- export type BedrockRuntimeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & EventStreamSerdeInputConfig & ClientInputEndpointParameters;
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
+ }