@aws-sdk/client-bedrock-runtime 3.839.0 → 3.840.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/auth/httpAuthSchemeProvider.js +17 -0
- package/dist-cjs/index.js +80 -2
- package/dist-cjs/runtimeConfig.js +23 -0
- package/dist-cjs/runtimeConfig.shared.js +6 -0
- package/dist-es/BedrockRuntimeClient.js +1 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +17 -0
- package/dist-es/models/models_0.js +48 -0
- package/dist-es/protocols/Aws_restJson1.js +25 -0
- package/dist-es/runtimeConfig.js +24 -1
- package/dist-es/runtimeConfig.shared.js +6 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +4 -1
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +9 -1
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +6 -13
- package/dist-types/commands/ConverseCommand.d.ts +120 -44
- package/dist-types/commands/ConverseStreamCommand.d.ts +89 -48
- package/dist-types/commands/GetAsyncInvokeCommand.d.ts +4 -8
- package/dist-types/commands/InvokeModelCommand.d.ts +8 -30
- package/dist-types/commands/InvokeModelWithBidirectionalStreamCommand.d.ts +8 -18
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +8 -35
- package/dist-types/commands/ListAsyncInvokesCommand.d.ts +4 -8
- package/dist-types/commands/StartAsyncInvokeCommand.d.ts +7 -21
- package/dist-types/models/models_0.d.ts +432 -296
- package/dist-types/runtimeConfig.browser.d.ts +10 -1
- package/dist-types/runtimeConfig.d.ts +13 -1
- package/dist-types/runtimeConfig.native.d.ts +10 -1
- package/dist-types/runtimeConfig.shared.d.ts +12 -1
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +5 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +192 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +27 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +30 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +27 -1
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +27 -1
- package/package.json +15 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme, TokenIdentity, TokenIdentityProvider } from "@smithy/types";
|
|
2
2
|
import { BedrockRuntimeHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
@@ -10,6 +10,8 @@ export interface HttpAuthExtensionConfiguration {
|
|
|
10
10
|
httpAuthSchemeProvider(): BedrockRuntimeHttpAuthSchemeProvider;
|
|
11
11
|
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
12
|
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
setToken(token: TokenIdentity | TokenIdentityProvider): void;
|
|
14
|
+
token(): TokenIdentity | TokenIdentityProvider | undefined;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* @internal
|
|
@@ -18,6 +20,7 @@ export type HttpAuthRuntimeConfig = Partial<{
|
|
|
18
20
|
httpAuthSchemes: HttpAuthScheme[];
|
|
19
21
|
httpAuthSchemeProvider: BedrockRuntimeHttpAuthSchemeProvider;
|
|
20
22
|
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
23
|
+
token: TokenIdentity | TokenIdentityProvider;
|
|
21
24
|
}>;
|
|
22
25
|
/**
|
|
23
26
|
* @internal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
|
|
2
|
-
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
|
|
2
|
+
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider, TokenIdentity, TokenIdentityProvider } from "@smithy/types";
|
|
3
3
|
import { BedrockRuntimeClientResolvedConfig } from "../BedrockRuntimeClient";
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
@@ -46,6 +46,10 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
|
|
|
46
46
|
* @internal
|
|
47
47
|
*/
|
|
48
48
|
httpAuthSchemeProvider?: BedrockRuntimeHttpAuthSchemeProvider;
|
|
49
|
+
/**
|
|
50
|
+
* The token used to authenticate requests.
|
|
51
|
+
*/
|
|
52
|
+
token?: TokenIdentity | TokenIdentityProvider;
|
|
49
53
|
}
|
|
50
54
|
/**
|
|
51
55
|
* @internal
|
|
@@ -68,6 +72,10 @@ export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedCon
|
|
|
68
72
|
* @internal
|
|
69
73
|
*/
|
|
70
74
|
readonly httpAuthSchemeProvider: BedrockRuntimeHttpAuthSchemeProvider;
|
|
75
|
+
/**
|
|
76
|
+
* The token used to authenticate requests.
|
|
77
|
+
*/
|
|
78
|
+
readonly token?: TokenIdentityProvider;
|
|
71
79
|
}
|
|
72
80
|
/**
|
|
73
81
|
* @internal
|
|
@@ -27,9 +27,7 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>The action to apply a guardrail.</p>
|
|
31
|
-
* <p>For troubleshooting some of the common errors you might encounter when using the <code>ApplyGuardrail</code> API,
|
|
32
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
30
|
+
* <p>The action to apply a guardrail.</p> <p>For troubleshooting some of the common errors you might encounter when using the <code>ApplyGuardrail</code> API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
33
31
|
* @example
|
|
34
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
35
33
|
* ```javascript
|
|
@@ -192,27 +190,22 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
192
190
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
193
191
|
*
|
|
194
192
|
* @throws {@link AccessDeniedException} (client fault)
|
|
195
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
196
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
193
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
197
194
|
*
|
|
198
195
|
* @throws {@link InternalServerException} (server fault)
|
|
199
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
200
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
196
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
201
197
|
*
|
|
202
198
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
203
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
204
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
199
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
205
200
|
*
|
|
206
201
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
207
202
|
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
208
203
|
*
|
|
209
204
|
* @throws {@link ThrottlingException} (client fault)
|
|
210
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
211
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
205
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
212
206
|
*
|
|
213
207
|
* @throws {@link ValidationException} (client fault)
|
|
214
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
215
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
208
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
216
209
|
*
|
|
217
210
|
* @throws {@link BedrockRuntimeServiceException}
|
|
218
211
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -27,30 +27,7 @@ declare const ConverseCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Sends messages to the specified Amazon Bedrock model. <code>Converse</code> provides
|
|
31
|
-
* a consistent interface that works with all models that
|
|
32
|
-
* support messages. This allows you to write code once and use it with different models.
|
|
33
|
-
* If a model has unique inference parameters, you can also pass those unique parameters
|
|
34
|
-
* to the model.</p>
|
|
35
|
-
* <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p>
|
|
36
|
-
* <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p>
|
|
37
|
-
* <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p>
|
|
38
|
-
* <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
39
|
-
* To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
40
|
-
* To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i>
|
|
41
|
-
* </p>
|
|
42
|
-
* <p>For example code, see <i>Converse API examples</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
43
|
-
* </p>
|
|
44
|
-
* <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action. </p>
|
|
45
|
-
* <important>
|
|
46
|
-
* <p>To deny all inference access to resources that you specify in the modelId field, you
|
|
47
|
-
* need to deny access to the <code>bedrock:InvokeModel</code> and
|
|
48
|
-
* <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
|
|
49
|
-
* access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
|
|
50
|
-
* </p>
|
|
51
|
-
* </important>
|
|
52
|
-
* <p>For troubleshooting some of the common errors you might encounter when using the <code>Converse</code> API,
|
|
53
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
30
|
+
* <p>Sends messages to the specified Amazon Bedrock model. <code>Converse</code> provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.</p> <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p> <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p> <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p> <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i> </p> <p>For example code, see <i>Converse API examples</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action. </p> <important> <p>To deny all inference access to resources that you specify in the modelId field, you need to deny access to the <code>bedrock:InvokeModel</code> and <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>. </p> </important> <p>For troubleshooting some of the common errors you might encounter when using the <code>Converse</code> API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
54
31
|
* @example
|
|
55
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
56
33
|
* ```javascript
|
|
@@ -76,7 +53,7 @@ declare const ConverseCommand_base: {
|
|
|
76
53
|
* },
|
|
77
54
|
* },
|
|
78
55
|
* document: { // DocumentBlock
|
|
79
|
-
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
56
|
+
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
80
57
|
* name: "STRING_VALUE", // required
|
|
81
58
|
* source: { // DocumentSource Union: only one key present
|
|
82
59
|
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
@@ -84,6 +61,16 @@ declare const ConverseCommand_base: {
|
|
|
84
61
|
* uri: "STRING_VALUE", // required
|
|
85
62
|
* bucketOwner: "STRING_VALUE",
|
|
86
63
|
* },
|
|
64
|
+
* text: "STRING_VALUE",
|
|
65
|
+
* content: [ // DocumentContentBlocks
|
|
66
|
+
* { // DocumentContentBlock Union: only one key present
|
|
67
|
+
* text: "STRING_VALUE",
|
|
68
|
+
* },
|
|
69
|
+
* ],
|
|
70
|
+
* },
|
|
71
|
+
* context: "STRING_VALUE",
|
|
72
|
+
* citations: { // CitationsConfig
|
|
73
|
+
* enabled: true || false, // required
|
|
87
74
|
* },
|
|
88
75
|
* },
|
|
89
76
|
* video: { // VideoBlock
|
|
@@ -118,7 +105,7 @@ declare const ConverseCommand_base: {
|
|
|
118
105
|
* },
|
|
119
106
|
* },
|
|
120
107
|
* document: {
|
|
121
|
-
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
108
|
+
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
122
109
|
* name: "STRING_VALUE", // required
|
|
123
110
|
* source: {// Union: only one key present
|
|
124
111
|
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
@@ -126,6 +113,16 @@ declare const ConverseCommand_base: {
|
|
|
126
113
|
* uri: "STRING_VALUE", // required
|
|
127
114
|
* bucketOwner: "STRING_VALUE",
|
|
128
115
|
* },
|
|
116
|
+
* text: "STRING_VALUE",
|
|
117
|
+
* content: [
|
|
118
|
+
* {// Union: only one key present
|
|
119
|
+
* text: "STRING_VALUE",
|
|
120
|
+
* },
|
|
121
|
+
* ],
|
|
122
|
+
* },
|
|
123
|
+
* context: "STRING_VALUE",
|
|
124
|
+
* citations: {
|
|
125
|
+
* enabled: true || false, // required
|
|
129
126
|
* },
|
|
130
127
|
* },
|
|
131
128
|
* video: {
|
|
@@ -163,6 +160,40 @@ declare const ConverseCommand_base: {
|
|
|
163
160
|
* },
|
|
164
161
|
* redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
165
162
|
* },
|
|
163
|
+
* citationsContent: { // CitationsContentBlock
|
|
164
|
+
* content: [ // CitationGeneratedContentList
|
|
165
|
+
* { // CitationGeneratedContent Union: only one key present
|
|
166
|
+
* text: "STRING_VALUE",
|
|
167
|
+
* },
|
|
168
|
+
* ],
|
|
169
|
+
* citations: [ // Citations
|
|
170
|
+
* { // Citation
|
|
171
|
+
* title: "STRING_VALUE",
|
|
172
|
+
* sourceContent: [ // CitationSourceContentList
|
|
173
|
+
* { // CitationSourceContent Union: only one key present
|
|
174
|
+
* text: "STRING_VALUE",
|
|
175
|
+
* },
|
|
176
|
+
* ],
|
|
177
|
+
* location: { // CitationLocation Union: only one key present
|
|
178
|
+
* documentChar: { // DocumentCharLocation
|
|
179
|
+
* documentIndex: Number("int"),
|
|
180
|
+
* start: Number("int"),
|
|
181
|
+
* end: Number("int"),
|
|
182
|
+
* },
|
|
183
|
+
* documentPage: { // DocumentPageLocation
|
|
184
|
+
* documentIndex: Number("int"),
|
|
185
|
+
* start: Number("int"),
|
|
186
|
+
* end: Number("int"),
|
|
187
|
+
* },
|
|
188
|
+
* documentChunk: { // DocumentChunkLocation
|
|
189
|
+
* documentIndex: Number("int"),
|
|
190
|
+
* start: Number("int"),
|
|
191
|
+
* end: Number("int"),
|
|
192
|
+
* },
|
|
193
|
+
* },
|
|
194
|
+
* },
|
|
195
|
+
* ],
|
|
196
|
+
* },
|
|
166
197
|
* },
|
|
167
198
|
* ],
|
|
168
199
|
* },
|
|
@@ -259,7 +290,7 @@ declare const ConverseCommand_base: {
|
|
|
259
290
|
* // },
|
|
260
291
|
* // },
|
|
261
292
|
* // document: { // DocumentBlock
|
|
262
|
-
* // format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
293
|
+
* // format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
263
294
|
* // name: "STRING_VALUE", // required
|
|
264
295
|
* // source: { // DocumentSource Union: only one key present
|
|
265
296
|
* // bytes: new Uint8Array(),
|
|
@@ -267,6 +298,16 @@ declare const ConverseCommand_base: {
|
|
|
267
298
|
* // uri: "STRING_VALUE", // required
|
|
268
299
|
* // bucketOwner: "STRING_VALUE",
|
|
269
300
|
* // },
|
|
301
|
+
* // text: "STRING_VALUE",
|
|
302
|
+
* // content: [ // DocumentContentBlocks
|
|
303
|
+
* // { // DocumentContentBlock Union: only one key present
|
|
304
|
+
* // text: "STRING_VALUE",
|
|
305
|
+
* // },
|
|
306
|
+
* // ],
|
|
307
|
+
* // },
|
|
308
|
+
* // context: "STRING_VALUE",
|
|
309
|
+
* // citations: { // CitationsConfig
|
|
310
|
+
* // enabled: true || false, // required
|
|
270
311
|
* // },
|
|
271
312
|
* // },
|
|
272
313
|
* // video: { // VideoBlock
|
|
@@ -301,7 +342,7 @@ declare const ConverseCommand_base: {
|
|
|
301
342
|
* // },
|
|
302
343
|
* // },
|
|
303
344
|
* // document: {
|
|
304
|
-
* // format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
345
|
+
* // format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
305
346
|
* // name: "STRING_VALUE", // required
|
|
306
347
|
* // source: {// Union: only one key present
|
|
307
348
|
* // bytes: new Uint8Array(),
|
|
@@ -309,6 +350,16 @@ declare const ConverseCommand_base: {
|
|
|
309
350
|
* // uri: "STRING_VALUE", // required
|
|
310
351
|
* // bucketOwner: "STRING_VALUE",
|
|
311
352
|
* // },
|
|
353
|
+
* // text: "STRING_VALUE",
|
|
354
|
+
* // content: [
|
|
355
|
+
* // {// Union: only one key present
|
|
356
|
+
* // text: "STRING_VALUE",
|
|
357
|
+
* // },
|
|
358
|
+
* // ],
|
|
359
|
+
* // },
|
|
360
|
+
* // context: "STRING_VALUE",
|
|
361
|
+
* // citations: {
|
|
362
|
+
* // enabled: true || false, // required
|
|
312
363
|
* // },
|
|
313
364
|
* // },
|
|
314
365
|
* // video: {
|
|
@@ -346,6 +397,40 @@ declare const ConverseCommand_base: {
|
|
|
346
397
|
* // },
|
|
347
398
|
* // redactedContent: new Uint8Array(),
|
|
348
399
|
* // },
|
|
400
|
+
* // citationsContent: { // CitationsContentBlock
|
|
401
|
+
* // content: [ // CitationGeneratedContentList
|
|
402
|
+
* // { // CitationGeneratedContent Union: only one key present
|
|
403
|
+
* // text: "STRING_VALUE",
|
|
404
|
+
* // },
|
|
405
|
+
* // ],
|
|
406
|
+
* // citations: [ // Citations
|
|
407
|
+
* // { // Citation
|
|
408
|
+
* // title: "STRING_VALUE",
|
|
409
|
+
* // sourceContent: [ // CitationSourceContentList
|
|
410
|
+
* // { // CitationSourceContent Union: only one key present
|
|
411
|
+
* // text: "STRING_VALUE",
|
|
412
|
+
* // },
|
|
413
|
+
* // ],
|
|
414
|
+
* // location: { // CitationLocation Union: only one key present
|
|
415
|
+
* // documentChar: { // DocumentCharLocation
|
|
416
|
+
* // documentIndex: Number("int"),
|
|
417
|
+
* // start: Number("int"),
|
|
418
|
+
* // end: Number("int"),
|
|
419
|
+
* // },
|
|
420
|
+
* // documentPage: { // DocumentPageLocation
|
|
421
|
+
* // documentIndex: Number("int"),
|
|
422
|
+
* // start: Number("int"),
|
|
423
|
+
* // end: Number("int"),
|
|
424
|
+
* // },
|
|
425
|
+
* // documentChunk: { // DocumentChunkLocation
|
|
426
|
+
* // documentIndex: Number("int"),
|
|
427
|
+
* // start: Number("int"),
|
|
428
|
+
* // end: Number("int"),
|
|
429
|
+
* // },
|
|
430
|
+
* // },
|
|
431
|
+
* // },
|
|
432
|
+
* // ],
|
|
433
|
+
* // },
|
|
349
434
|
* // },
|
|
350
435
|
* // ],
|
|
351
436
|
* // },
|
|
@@ -577,40 +662,31 @@ declare const ConverseCommand_base: {
|
|
|
577
662
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
578
663
|
*
|
|
579
664
|
* @throws {@link AccessDeniedException} (client fault)
|
|
580
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
581
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
665
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
582
666
|
*
|
|
583
667
|
* @throws {@link InternalServerException} (server fault)
|
|
584
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
585
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
668
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
586
669
|
*
|
|
587
670
|
* @throws {@link ModelErrorException} (client fault)
|
|
588
671
|
* <p>The request failed due to an error while processing the model.</p>
|
|
589
672
|
*
|
|
590
673
|
* @throws {@link ModelNotReadyException} (client fault)
|
|
591
|
-
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
592
|
-
* will automatically retry the operation up to 5 times. For information about configuring
|
|
593
|
-
* automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
|
|
594
|
-
* reference guide.</p>
|
|
674
|
+
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
|
|
595
675
|
*
|
|
596
676
|
* @throws {@link ModelTimeoutException} (client fault)
|
|
597
677
|
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
598
678
|
*
|
|
599
679
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
600
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
601
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
680
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
602
681
|
*
|
|
603
682
|
* @throws {@link ServiceUnavailableException} (server fault)
|
|
604
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
605
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
683
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
606
684
|
*
|
|
607
685
|
* @throws {@link ThrottlingException} (client fault)
|
|
608
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
609
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
686
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
610
687
|
*
|
|
611
688
|
* @throws {@link ValidationException} (client fault)
|
|
612
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
613
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
689
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
614
690
|
*
|
|
615
691
|
* @throws {@link BedrockRuntimeServiceException}
|
|
616
692
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -27,36 +27,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Sends messages to the specified Amazon Bedrock model and returns
|
|
31
|
-
* the response in a stream. <code>ConverseStream</code> provides a consistent API
|
|
32
|
-
* that works with all Amazon Bedrock models that support messages.
|
|
33
|
-
* This allows you to write code once and use it with different models. Should a
|
|
34
|
-
* model have unique inference parameters, you can also pass those unique parameters to the
|
|
35
|
-
* model. </p>
|
|
36
|
-
* <p>To find out if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a>
|
|
37
|
-
* and check the <code>responseStreamingSupported</code> field in the response.</p>
|
|
38
|
-
* <note>
|
|
39
|
-
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>ConverseStream</code>.</p>
|
|
40
|
-
* </note>
|
|
41
|
-
* <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p>
|
|
42
|
-
* <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p>
|
|
43
|
-
* <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p>
|
|
44
|
-
* <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
45
|
-
* To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
46
|
-
* To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i>
|
|
47
|
-
* </p>
|
|
48
|
-
* <p>For example code, see <i>Conversation streaming example</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
49
|
-
* </p>
|
|
50
|
-
* <p>This operation requires permission for the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
|
|
51
|
-
* <important>
|
|
52
|
-
* <p>To deny all inference access to resources that you specify in the modelId field, you
|
|
53
|
-
* need to deny access to the <code>bedrock:InvokeModel</code> and
|
|
54
|
-
* <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
|
|
55
|
-
* access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
|
|
56
|
-
* </p>
|
|
57
|
-
* </important>
|
|
58
|
-
* <p>For troubleshooting some of the common errors you might encounter when using the <code>ConverseStream</code> API,
|
|
59
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
30
|
+
* <p>Sends messages to the specified Amazon Bedrock model and returns the response in a stream. <code>ConverseStream</code> provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model. </p> <p>To find out if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a> and check the <code>responseStreamingSupported</code> field in the response.</p> <note> <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>ConverseStream</code>.</p> </note> <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p> <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p> <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p> <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i> </p> <p>For example code, see <i>Conversation streaming example</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModelWithResponseStream</code> action.</p> <important> <p>To deny all inference access to resources that you specify in the modelId field, you need to deny access to the <code>bedrock:InvokeModel</code> and <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>. </p> </important> <p>For troubleshooting some of the common errors you might encounter when using the <code>ConverseStream</code> API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
60
31
|
* @example
|
|
61
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
62
33
|
* ```javascript
|
|
@@ -82,7 +53,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
82
53
|
* },
|
|
83
54
|
* },
|
|
84
55
|
* document: { // DocumentBlock
|
|
85
|
-
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
56
|
+
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
86
57
|
* name: "STRING_VALUE", // required
|
|
87
58
|
* source: { // DocumentSource Union: only one key present
|
|
88
59
|
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
@@ -90,6 +61,16 @@ declare const ConverseStreamCommand_base: {
|
|
|
90
61
|
* uri: "STRING_VALUE", // required
|
|
91
62
|
* bucketOwner: "STRING_VALUE",
|
|
92
63
|
* },
|
|
64
|
+
* text: "STRING_VALUE",
|
|
65
|
+
* content: [ // DocumentContentBlocks
|
|
66
|
+
* { // DocumentContentBlock Union: only one key present
|
|
67
|
+
* text: "STRING_VALUE",
|
|
68
|
+
* },
|
|
69
|
+
* ],
|
|
70
|
+
* },
|
|
71
|
+
* context: "STRING_VALUE",
|
|
72
|
+
* citations: { // CitationsConfig
|
|
73
|
+
* enabled: true || false, // required
|
|
93
74
|
* },
|
|
94
75
|
* },
|
|
95
76
|
* video: { // VideoBlock
|
|
@@ -124,7 +105,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
124
105
|
* },
|
|
125
106
|
* },
|
|
126
107
|
* document: {
|
|
127
|
-
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
108
|
+
* format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md",
|
|
128
109
|
* name: "STRING_VALUE", // required
|
|
129
110
|
* source: {// Union: only one key present
|
|
130
111
|
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
@@ -132,6 +113,16 @@ declare const ConverseStreamCommand_base: {
|
|
|
132
113
|
* uri: "STRING_VALUE", // required
|
|
133
114
|
* bucketOwner: "STRING_VALUE",
|
|
134
115
|
* },
|
|
116
|
+
* text: "STRING_VALUE",
|
|
117
|
+
* content: [
|
|
118
|
+
* {// Union: only one key present
|
|
119
|
+
* text: "STRING_VALUE",
|
|
120
|
+
* },
|
|
121
|
+
* ],
|
|
122
|
+
* },
|
|
123
|
+
* context: "STRING_VALUE",
|
|
124
|
+
* citations: {
|
|
125
|
+
* enabled: true || false, // required
|
|
135
126
|
* },
|
|
136
127
|
* },
|
|
137
128
|
* video: {
|
|
@@ -169,6 +160,40 @@ declare const ConverseStreamCommand_base: {
|
|
|
169
160
|
* },
|
|
170
161
|
* redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
171
162
|
* },
|
|
163
|
+
* citationsContent: { // CitationsContentBlock
|
|
164
|
+
* content: [ // CitationGeneratedContentList
|
|
165
|
+
* { // CitationGeneratedContent Union: only one key present
|
|
166
|
+
* text: "STRING_VALUE",
|
|
167
|
+
* },
|
|
168
|
+
* ],
|
|
169
|
+
* citations: [ // Citations
|
|
170
|
+
* { // Citation
|
|
171
|
+
* title: "STRING_VALUE",
|
|
172
|
+
* sourceContent: [ // CitationSourceContentList
|
|
173
|
+
* { // CitationSourceContent Union: only one key present
|
|
174
|
+
* text: "STRING_VALUE",
|
|
175
|
+
* },
|
|
176
|
+
* ],
|
|
177
|
+
* location: { // CitationLocation Union: only one key present
|
|
178
|
+
* documentChar: { // DocumentCharLocation
|
|
179
|
+
* documentIndex: Number("int"),
|
|
180
|
+
* start: Number("int"),
|
|
181
|
+
* end: Number("int"),
|
|
182
|
+
* },
|
|
183
|
+
* documentPage: { // DocumentPageLocation
|
|
184
|
+
* documentIndex: Number("int"),
|
|
185
|
+
* start: Number("int"),
|
|
186
|
+
* end: Number("int"),
|
|
187
|
+
* },
|
|
188
|
+
* documentChunk: { // DocumentChunkLocation
|
|
189
|
+
* documentIndex: Number("int"),
|
|
190
|
+
* start: Number("int"),
|
|
191
|
+
* end: Number("int"),
|
|
192
|
+
* },
|
|
193
|
+
* },
|
|
194
|
+
* },
|
|
195
|
+
* ],
|
|
196
|
+
* },
|
|
172
197
|
* },
|
|
173
198
|
* ],
|
|
174
199
|
* },
|
|
@@ -273,6 +298,31 @@ declare const ConverseStreamCommand_base: {
|
|
|
273
298
|
* // redactedContent: new Uint8Array(),
|
|
274
299
|
* // signature: "STRING_VALUE",
|
|
275
300
|
* // },
|
|
301
|
+
* // citation: { // CitationsDelta
|
|
302
|
+
* // title: "STRING_VALUE",
|
|
303
|
+
* // sourceContent: [ // CitationSourceContentListDelta
|
|
304
|
+
* // { // CitationSourceContentDelta
|
|
305
|
+
* // text: "STRING_VALUE",
|
|
306
|
+
* // },
|
|
307
|
+
* // ],
|
|
308
|
+
* // location: { // CitationLocation Union: only one key present
|
|
309
|
+
* // documentChar: { // DocumentCharLocation
|
|
310
|
+
* // documentIndex: Number("int"),
|
|
311
|
+
* // start: Number("int"),
|
|
312
|
+
* // end: Number("int"),
|
|
313
|
+
* // },
|
|
314
|
+
* // documentPage: { // DocumentPageLocation
|
|
315
|
+
* // documentIndex: Number("int"),
|
|
316
|
+
* // start: Number("int"),
|
|
317
|
+
* // end: Number("int"),
|
|
318
|
+
* // },
|
|
319
|
+
* // documentChunk: { // DocumentChunkLocation
|
|
320
|
+
* // documentIndex: Number("int"),
|
|
321
|
+
* // start: Number("int"),
|
|
322
|
+
* // end: Number("int"),
|
|
323
|
+
* // },
|
|
324
|
+
* // },
|
|
325
|
+
* // },
|
|
276
326
|
* // },
|
|
277
327
|
* // contentBlockIndex: Number("int"), // required
|
|
278
328
|
* // },
|
|
@@ -528,40 +578,31 @@ declare const ConverseStreamCommand_base: {
|
|
|
528
578
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
529
579
|
*
|
|
530
580
|
* @throws {@link AccessDeniedException} (client fault)
|
|
531
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
532
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
581
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
533
582
|
*
|
|
534
583
|
* @throws {@link InternalServerException} (server fault)
|
|
535
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
536
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
584
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
537
585
|
*
|
|
538
586
|
* @throws {@link ModelErrorException} (client fault)
|
|
539
587
|
* <p>The request failed due to an error while processing the model.</p>
|
|
540
588
|
*
|
|
541
589
|
* @throws {@link ModelNotReadyException} (client fault)
|
|
542
|
-
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
543
|
-
* will automatically retry the operation up to 5 times. For information about configuring
|
|
544
|
-
* automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
|
|
545
|
-
* reference guide.</p>
|
|
590
|
+
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
|
|
546
591
|
*
|
|
547
592
|
* @throws {@link ModelTimeoutException} (client fault)
|
|
548
593
|
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
549
594
|
*
|
|
550
595
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
551
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
552
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
596
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
553
597
|
*
|
|
554
598
|
* @throws {@link ServiceUnavailableException} (server fault)
|
|
555
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
556
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
599
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
557
600
|
*
|
|
558
601
|
* @throws {@link ThrottlingException} (client fault)
|
|
559
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
560
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
602
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
561
603
|
*
|
|
562
604
|
* @throws {@link ValidationException} (client fault)
|
|
563
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
564
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
605
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
565
606
|
*
|
|
566
607
|
* @throws {@link BedrockRuntimeServiceException}
|
|
567
608
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -66,20 +66,16 @@ declare const GetAsyncInvokeCommand_base: {
|
|
|
66
66
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
67
67
|
*
|
|
68
68
|
* @throws {@link AccessDeniedException} (client fault)
|
|
69
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
70
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
69
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
71
70
|
*
|
|
72
71
|
* @throws {@link InternalServerException} (server fault)
|
|
73
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
74
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
72
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
75
73
|
*
|
|
76
74
|
* @throws {@link ThrottlingException} (client fault)
|
|
77
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
78
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
75
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
79
76
|
*
|
|
80
77
|
* @throws {@link ValidationException} (client fault)
|
|
81
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
82
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
78
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
83
79
|
*
|
|
84
80
|
* @throws {@link BedrockRuntimeServiceException}
|
|
85
81
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|