@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
|
@@ -2,8 +2,7 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
|
|
|
2
2
|
import { DocumentType as __DocumentType } from "@smithy/types";
|
|
3
3
|
import { BedrockRuntimeServiceException as __BaseException } from "./BedrockRuntimeServiceException";
|
|
4
4
|
/**
|
|
5
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
6
|
-
* 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>
|
|
5
|
+
* <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>
|
|
7
6
|
* @public
|
|
8
7
|
*/
|
|
9
8
|
export declare class AccessDeniedException extends __BaseException {
|
|
@@ -139,8 +138,7 @@ export interface GetAsyncInvokeResponse {
|
|
|
139
138
|
outputDataConfig: AsyncInvokeOutputDataConfig | undefined;
|
|
140
139
|
}
|
|
141
140
|
/**
|
|
142
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
143
|
-
* 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>
|
|
141
|
+
* <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>
|
|
144
142
|
* @public
|
|
145
143
|
*/
|
|
146
144
|
export declare class InternalServerException extends __BaseException {
|
|
@@ -152,8 +150,7 @@ export declare class InternalServerException extends __BaseException {
|
|
|
152
150
|
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
|
|
153
151
|
}
|
|
154
152
|
/**
|
|
155
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
156
|
-
* 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>
|
|
153
|
+
* <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>
|
|
157
154
|
* @public
|
|
158
155
|
*/
|
|
159
156
|
export declare class ThrottlingException extends __BaseException {
|
|
@@ -165,8 +162,7 @@ export declare class ThrottlingException extends __BaseException {
|
|
|
165
162
|
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>);
|
|
166
163
|
}
|
|
167
164
|
/**
|
|
168
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
169
|
-
* 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>
|
|
165
|
+
* <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>
|
|
170
166
|
* @public
|
|
171
167
|
*/
|
|
172
168
|
export declare class ValidationException extends __BaseException {
|
|
@@ -319,8 +315,7 @@ export declare class ConflictException extends __BaseException {
|
|
|
319
315
|
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
|
|
320
316
|
}
|
|
321
317
|
/**
|
|
322
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
323
|
-
* 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>
|
|
318
|
+
* <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>
|
|
324
319
|
* @public
|
|
325
320
|
*/
|
|
326
321
|
export declare class ResourceNotFoundException extends __BaseException {
|
|
@@ -344,8 +339,7 @@ export declare class ServiceQuotaExceededException extends __BaseException {
|
|
|
344
339
|
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>);
|
|
345
340
|
}
|
|
346
341
|
/**
|
|
347
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
348
|
-
* 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>
|
|
342
|
+
* <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>
|
|
349
343
|
* @public
|
|
350
344
|
*/
|
|
351
345
|
export declare class ServiceUnavailableException extends __BaseException {
|
|
@@ -590,8 +584,7 @@ export interface ApplyGuardrailRequest {
|
|
|
590
584
|
*/
|
|
591
585
|
content: GuardrailContentBlock[] | undefined;
|
|
592
586
|
/**
|
|
593
|
-
* <p>Specifies the scope of the output that you get in the response. Set to <code>FULL</code> to return the entire output, including any detected and non-detected entries in the response for enhanced debugging.</p>
|
|
594
|
-
* <p>Note that the full output scope doesn't apply to word filters or regex in sensitive information filters. It does apply to all other filtering policies, including sensitive information with filters that can detect personally identifiable information (PII).</p>
|
|
587
|
+
* <p>Specifies the scope of the output that you get in the response. Set to <code>FULL</code> to return the entire output, including any detected and non-detected entries in the response for enhanced debugging.</p> <p>Note that the full output scope doesn't apply to word filters or regex in sensitive information filters. It does apply to all other filtering policies, including sensitive information with filters that can detect personally identifiable information (PII).</p>
|
|
595
588
|
* @public
|
|
596
589
|
*/
|
|
597
590
|
outputScope?: GuardrailOutputScope | undefined;
|
|
@@ -1251,7 +1244,7 @@ export declare const GuardrailTrace: {
|
|
|
1251
1244
|
*/
|
|
1252
1245
|
export type GuardrailTrace = (typeof GuardrailTrace)[keyof typeof GuardrailTrace];
|
|
1253
1246
|
/**
|
|
1254
|
-
* <p>Configuration information for a guardrail that you use with the
|
|
1247
|
+
* <p>Configuration information for a guardrail that you use with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> operation.</p>
|
|
1255
1248
|
* @public
|
|
1256
1249
|
*/
|
|
1257
1250
|
export interface GuardrailConfiguration {
|
|
@@ -1272,45 +1265,27 @@ export interface GuardrailConfiguration {
|
|
|
1272
1265
|
trace?: GuardrailTrace | undefined;
|
|
1273
1266
|
}
|
|
1274
1267
|
/**
|
|
1275
|
-
* <p>Base inference parameters to pass to a model in a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>. For more information,
|
|
1276
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>.</p>
|
|
1277
|
-
* <p>If you need to pass additional parameters that the model
|
|
1278
|
-
* supports, use the <code>additionalModelRequestFields</code> request field in the call to <code>Converse</code>
|
|
1279
|
-
* or <code>ConverseStream</code>.
|
|
1280
|
-
* For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
1268
|
+
* <p>Base inference parameters to pass to a model in a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>.</p> <p>If you need to pass additional parameters that the model supports, use the <code>additionalModelRequestFields</code> request field in the call to <code>Converse</code> or <code>ConverseStream</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
1281
1269
|
* @public
|
|
1282
1270
|
*/
|
|
1283
1271
|
export interface InferenceConfiguration {
|
|
1284
1272
|
/**
|
|
1285
|
-
* <p>The maximum number of tokens to allow in the generated response. The default value is
|
|
1286
|
-
* the maximum allowed value for the model that you are using. For more information, see
|
|
1287
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
|
|
1273
|
+
* <p>The maximum number of tokens to allow in the generated response. The default value is the maximum allowed value for the model that you are using. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
|
|
1288
1274
|
* @public
|
|
1289
1275
|
*/
|
|
1290
1276
|
maxTokens?: number | undefined;
|
|
1291
1277
|
/**
|
|
1292
|
-
* <p>The likelihood of the model selecting higher-probability options while generating a
|
|
1293
|
-
* response. A lower value makes the model more likely to choose higher-probability options,
|
|
1294
|
-
* while a higher value makes the model more likely to choose lower-probability
|
|
1295
|
-
* options.</p>
|
|
1296
|
-
* <p>The default value is the default value for the model that
|
|
1297
|
-
* you are using. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation
|
|
1298
|
-
* models</a>. </p>
|
|
1278
|
+
* <p>The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.</p> <p>The default value is the default value for the model that you are using. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
|
|
1299
1279
|
* @public
|
|
1300
1280
|
*/
|
|
1301
1281
|
temperature?: number | undefined;
|
|
1302
1282
|
/**
|
|
1303
|
-
* <p>The percentage of most-likely candidates that the model considers for the next token. For
|
|
1304
|
-
* example, if you choose a value of 0.8 for <code>topP</code>, the model selects from the top 80% of the
|
|
1305
|
-
* probability distribution of tokens that could be next in the sequence.</p>
|
|
1306
|
-
* <p>The default value is the default value for the model that you are using. For more information, see
|
|
1307
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
|
|
1283
|
+
* <p>The percentage of most-likely candidates that the model considers for the next token. For example, if you choose a value of 0.8 for <code>topP</code>, the model selects from the top 80% of the probability distribution of tokens that could be next in the sequence.</p> <p>The default value is the default value for the model that you are using. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
|
|
1308
1284
|
* @public
|
|
1309
1285
|
*/
|
|
1310
1286
|
topP?: number | undefined;
|
|
1311
1287
|
/**
|
|
1312
|
-
* <p>A list of stop sequences. A stop sequence is a sequence of characters that causes the
|
|
1313
|
-
* model to stop generating the response. </p>
|
|
1288
|
+
* <p>A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. </p>
|
|
1314
1289
|
* @public
|
|
1315
1290
|
*/
|
|
1316
1291
|
stopSequences?: string[] | undefined;
|
|
@@ -1337,6 +1312,233 @@ export interface CachePointBlock {
|
|
|
1337
1312
|
*/
|
|
1338
1313
|
type: CachePointType | undefined;
|
|
1339
1314
|
}
|
|
1315
|
+
/**
|
|
1316
|
+
* <p>Specifies a character-level location within a document, providing precise positioning information for cited content using start and end character indices.</p>
|
|
1317
|
+
* @public
|
|
1318
|
+
*/
|
|
1319
|
+
export interface DocumentCharLocation {
|
|
1320
|
+
/**
|
|
1321
|
+
* <p>The index of the document within the array of documents provided in the request.</p>
|
|
1322
|
+
* @public
|
|
1323
|
+
*/
|
|
1324
|
+
documentIndex?: number | undefined;
|
|
1325
|
+
/**
|
|
1326
|
+
* <p>The starting character position of the cited content within the document.</p>
|
|
1327
|
+
* @public
|
|
1328
|
+
*/
|
|
1329
|
+
start?: number | undefined;
|
|
1330
|
+
/**
|
|
1331
|
+
* <p>The ending character position of the cited content within the document.</p>
|
|
1332
|
+
* @public
|
|
1333
|
+
*/
|
|
1334
|
+
end?: number | undefined;
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* <p>Specifies a chunk-level location within a document, providing positioning information for cited content using logical document segments or chunks.</p>
|
|
1338
|
+
* @public
|
|
1339
|
+
*/
|
|
1340
|
+
export interface DocumentChunkLocation {
|
|
1341
|
+
/**
|
|
1342
|
+
* <p>The index of the document within the array of documents provided in the request.</p>
|
|
1343
|
+
* @public
|
|
1344
|
+
*/
|
|
1345
|
+
documentIndex?: number | undefined;
|
|
1346
|
+
/**
|
|
1347
|
+
* <p>The starting chunk identifier or index of the cited content within the document.</p>
|
|
1348
|
+
* @public
|
|
1349
|
+
*/
|
|
1350
|
+
start?: number | undefined;
|
|
1351
|
+
/**
|
|
1352
|
+
* <p>The ending chunk identifier or index of the cited content within the document.</p>
|
|
1353
|
+
* @public
|
|
1354
|
+
*/
|
|
1355
|
+
end?: number | undefined;
|
|
1356
|
+
}
|
|
1357
|
+
/**
|
|
1358
|
+
* <p>Specifies a page-level location within a document, providing positioning information for cited content using page numbers.</p>
|
|
1359
|
+
* @public
|
|
1360
|
+
*/
|
|
1361
|
+
export interface DocumentPageLocation {
|
|
1362
|
+
/**
|
|
1363
|
+
* <p>The index of the document within the array of documents provided in the request.</p>
|
|
1364
|
+
* @public
|
|
1365
|
+
*/
|
|
1366
|
+
documentIndex?: number | undefined;
|
|
1367
|
+
/**
|
|
1368
|
+
* <p>The starting page number of the cited content within the document.</p>
|
|
1369
|
+
* @public
|
|
1370
|
+
*/
|
|
1371
|
+
start?: number | undefined;
|
|
1372
|
+
/**
|
|
1373
|
+
* <p>The ending page number of the cited content within the document.</p>
|
|
1374
|
+
* @public
|
|
1375
|
+
*/
|
|
1376
|
+
end?: number | undefined;
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* <p>Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.</p>
|
|
1380
|
+
* @public
|
|
1381
|
+
*/
|
|
1382
|
+
export type CitationLocation = CitationLocation.DocumentCharMember | CitationLocation.DocumentChunkMember | CitationLocation.DocumentPageMember | CitationLocation.$UnknownMember;
|
|
1383
|
+
/**
|
|
1384
|
+
* @public
|
|
1385
|
+
*/
|
|
1386
|
+
export declare namespace CitationLocation {
|
|
1387
|
+
/**
|
|
1388
|
+
* <p>The character-level location within the document where the cited content is found.</p>
|
|
1389
|
+
* @public
|
|
1390
|
+
*/
|
|
1391
|
+
interface DocumentCharMember {
|
|
1392
|
+
documentChar: DocumentCharLocation;
|
|
1393
|
+
documentPage?: never;
|
|
1394
|
+
documentChunk?: never;
|
|
1395
|
+
$unknown?: never;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* <p>The page-level location within the document where the cited content is found.</p>
|
|
1399
|
+
* @public
|
|
1400
|
+
*/
|
|
1401
|
+
interface DocumentPageMember {
|
|
1402
|
+
documentChar?: never;
|
|
1403
|
+
documentPage: DocumentPageLocation;
|
|
1404
|
+
documentChunk?: never;
|
|
1405
|
+
$unknown?: never;
|
|
1406
|
+
}
|
|
1407
|
+
/**
|
|
1408
|
+
* <p>The chunk-level location within the document where the cited content is found, typically used for documents that have been segmented into logical chunks.</p>
|
|
1409
|
+
* @public
|
|
1410
|
+
*/
|
|
1411
|
+
interface DocumentChunkMember {
|
|
1412
|
+
documentChar?: never;
|
|
1413
|
+
documentPage?: never;
|
|
1414
|
+
documentChunk: DocumentChunkLocation;
|
|
1415
|
+
$unknown?: never;
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* @public
|
|
1419
|
+
*/
|
|
1420
|
+
interface $UnknownMember {
|
|
1421
|
+
documentChar?: never;
|
|
1422
|
+
documentPage?: never;
|
|
1423
|
+
documentChunk?: never;
|
|
1424
|
+
$unknown: [string, any];
|
|
1425
|
+
}
|
|
1426
|
+
interface Visitor<T> {
|
|
1427
|
+
documentChar: (value: DocumentCharLocation) => T;
|
|
1428
|
+
documentPage: (value: DocumentPageLocation) => T;
|
|
1429
|
+
documentChunk: (value: DocumentChunkLocation) => T;
|
|
1430
|
+
_: (name: string, value: any) => T;
|
|
1431
|
+
}
|
|
1432
|
+
const visit: <T>(value: CitationLocation, visitor: Visitor<T>) => T;
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* <p>Contains the actual text content from a source document that is being cited or referenced in the model's response.</p>
|
|
1436
|
+
* @public
|
|
1437
|
+
*/
|
|
1438
|
+
export type CitationSourceContent = CitationSourceContent.TextMember | CitationSourceContent.$UnknownMember;
|
|
1439
|
+
/**
|
|
1440
|
+
* @public
|
|
1441
|
+
*/
|
|
1442
|
+
export declare namespace CitationSourceContent {
|
|
1443
|
+
/**
|
|
1444
|
+
* <p>The text content from the source document that is being cited.</p>
|
|
1445
|
+
* @public
|
|
1446
|
+
*/
|
|
1447
|
+
interface TextMember {
|
|
1448
|
+
text: string;
|
|
1449
|
+
$unknown?: never;
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* @public
|
|
1453
|
+
*/
|
|
1454
|
+
interface $UnknownMember {
|
|
1455
|
+
text?: never;
|
|
1456
|
+
$unknown: [string, any];
|
|
1457
|
+
}
|
|
1458
|
+
interface Visitor<T> {
|
|
1459
|
+
text: (value: string) => T;
|
|
1460
|
+
_: (name: string, value: any) => T;
|
|
1461
|
+
}
|
|
1462
|
+
const visit: <T>(value: CitationSourceContent, visitor: Visitor<T>) => T;
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* <p>Contains information about a citation that references a specific source document. Citations provide traceability between the model's generated response and the source documents that informed that response.</p>
|
|
1466
|
+
* @public
|
|
1467
|
+
*/
|
|
1468
|
+
export interface Citation {
|
|
1469
|
+
/**
|
|
1470
|
+
* <p>The title or identifier of the source document being cited.</p>
|
|
1471
|
+
* @public
|
|
1472
|
+
*/
|
|
1473
|
+
title?: string | undefined;
|
|
1474
|
+
/**
|
|
1475
|
+
* <p>The specific content from the source document that was referenced or cited in the generated response.</p>
|
|
1476
|
+
* @public
|
|
1477
|
+
*/
|
|
1478
|
+
sourceContent?: CitationSourceContent[] | undefined;
|
|
1479
|
+
/**
|
|
1480
|
+
* <p>The precise location within the source document where the cited content can be found, including character positions, page numbers, or chunk identifiers.</p>
|
|
1481
|
+
* @public
|
|
1482
|
+
*/
|
|
1483
|
+
location?: CitationLocation | undefined;
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* <p>Contains the generated text content that corresponds to or is supported by a citation from a source document.</p>
|
|
1487
|
+
* @public
|
|
1488
|
+
*/
|
|
1489
|
+
export type CitationGeneratedContent = CitationGeneratedContent.TextMember | CitationGeneratedContent.$UnknownMember;
|
|
1490
|
+
/**
|
|
1491
|
+
* @public
|
|
1492
|
+
*/
|
|
1493
|
+
export declare namespace CitationGeneratedContent {
|
|
1494
|
+
/**
|
|
1495
|
+
* <p>The text content that was generated by the model and is supported by the associated citation.</p>
|
|
1496
|
+
* @public
|
|
1497
|
+
*/
|
|
1498
|
+
interface TextMember {
|
|
1499
|
+
text: string;
|
|
1500
|
+
$unknown?: never;
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* @public
|
|
1504
|
+
*/
|
|
1505
|
+
interface $UnknownMember {
|
|
1506
|
+
text?: never;
|
|
1507
|
+
$unknown: [string, any];
|
|
1508
|
+
}
|
|
1509
|
+
interface Visitor<T> {
|
|
1510
|
+
text: (value: string) => T;
|
|
1511
|
+
_: (name: string, value: any) => T;
|
|
1512
|
+
}
|
|
1513
|
+
const visit: <T>(value: CitationGeneratedContent, visitor: Visitor<T>) => T;
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* <p>A content block that contains both generated text and associated citation information. This block type is returned when document citations are enabled, providing traceability between the generated content and the source documents that informed the response.</p>
|
|
1517
|
+
* @public
|
|
1518
|
+
*/
|
|
1519
|
+
export interface CitationsContentBlock {
|
|
1520
|
+
/**
|
|
1521
|
+
* <p>The generated content that is supported by the associated citations.</p>
|
|
1522
|
+
* @public
|
|
1523
|
+
*/
|
|
1524
|
+
content?: CitationGeneratedContent[] | undefined;
|
|
1525
|
+
/**
|
|
1526
|
+
* <p>An array of citations that reference the source documents used to generate the associated content.</p>
|
|
1527
|
+
* @public
|
|
1528
|
+
*/
|
|
1529
|
+
citations?: Citation[] | undefined;
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* <p>Configuration settings for enabling and controlling document citations in Converse API responses. When enabled, the model can include citation information that links generated content back to specific source documents.</p>
|
|
1533
|
+
* @public
|
|
1534
|
+
*/
|
|
1535
|
+
export interface CitationsConfig {
|
|
1536
|
+
/**
|
|
1537
|
+
* <p>Specifies whether document citations should be included in the model's response. When set to true, the model can generate citations that reference the source documents used to inform the response.</p>
|
|
1538
|
+
* @public
|
|
1539
|
+
*/
|
|
1540
|
+
enabled: boolean | undefined;
|
|
1541
|
+
}
|
|
1340
1542
|
/**
|
|
1341
1543
|
* @public
|
|
1342
1544
|
* @enum
|
|
@@ -1356,6 +1558,36 @@ export declare const DocumentFormat: {
|
|
|
1356
1558
|
* @public
|
|
1357
1559
|
*/
|
|
1358
1560
|
export type DocumentFormat = (typeof DocumentFormat)[keyof typeof DocumentFormat];
|
|
1561
|
+
/**
|
|
1562
|
+
* <p>Contains the actual content of a document that can be processed by the model and potentially cited in the response.</p>
|
|
1563
|
+
* @public
|
|
1564
|
+
*/
|
|
1565
|
+
export type DocumentContentBlock = DocumentContentBlock.TextMember | DocumentContentBlock.$UnknownMember;
|
|
1566
|
+
/**
|
|
1567
|
+
* @public
|
|
1568
|
+
*/
|
|
1569
|
+
export declare namespace DocumentContentBlock {
|
|
1570
|
+
/**
|
|
1571
|
+
* <p>The text content of the document.</p>
|
|
1572
|
+
* @public
|
|
1573
|
+
*/
|
|
1574
|
+
interface TextMember {
|
|
1575
|
+
text: string;
|
|
1576
|
+
$unknown?: never;
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* @public
|
|
1580
|
+
*/
|
|
1581
|
+
interface $UnknownMember {
|
|
1582
|
+
text?: never;
|
|
1583
|
+
$unknown: [string, any];
|
|
1584
|
+
}
|
|
1585
|
+
interface Visitor<T> {
|
|
1586
|
+
text: (value: string) => T;
|
|
1587
|
+
_: (name: string, value: any) => T;
|
|
1588
|
+
}
|
|
1589
|
+
const visit: <T>(value: DocumentContentBlock, visitor: Visitor<T>) => T;
|
|
1590
|
+
}
|
|
1359
1591
|
/**
|
|
1360
1592
|
* <p>A storage location in an Amazon S3 bucket.</p>
|
|
1361
1593
|
* @public
|
|
@@ -1376,7 +1608,7 @@ export interface S3Location {
|
|
|
1376
1608
|
* <p>Contains the content of a document.</p>
|
|
1377
1609
|
* @public
|
|
1378
1610
|
*/
|
|
1379
|
-
export type DocumentSource = DocumentSource.BytesMember | DocumentSource.S3LocationMember | DocumentSource.$UnknownMember;
|
|
1611
|
+
export type DocumentSource = DocumentSource.BytesMember | DocumentSource.ContentMember | DocumentSource.S3LocationMember | DocumentSource.TextMember | DocumentSource.$UnknownMember;
|
|
1380
1612
|
/**
|
|
1381
1613
|
* @public
|
|
1382
1614
|
*/
|
|
@@ -1388,6 +1620,8 @@ export declare namespace DocumentSource {
|
|
|
1388
1620
|
interface BytesMember {
|
|
1389
1621
|
bytes: Uint8Array;
|
|
1390
1622
|
s3Location?: never;
|
|
1623
|
+
text?: never;
|
|
1624
|
+
content?: never;
|
|
1391
1625
|
$unknown?: never;
|
|
1392
1626
|
}
|
|
1393
1627
|
/**
|
|
@@ -1397,6 +1631,30 @@ export declare namespace DocumentSource {
|
|
|
1397
1631
|
interface S3LocationMember {
|
|
1398
1632
|
bytes?: never;
|
|
1399
1633
|
s3Location: S3Location;
|
|
1634
|
+
text?: never;
|
|
1635
|
+
content?: never;
|
|
1636
|
+
$unknown?: never;
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* <p>The text content of the document source.</p>
|
|
1640
|
+
* @public
|
|
1641
|
+
*/
|
|
1642
|
+
interface TextMember {
|
|
1643
|
+
bytes?: never;
|
|
1644
|
+
s3Location?: never;
|
|
1645
|
+
text: string;
|
|
1646
|
+
content?: never;
|
|
1647
|
+
$unknown?: never;
|
|
1648
|
+
}
|
|
1649
|
+
/**
|
|
1650
|
+
* <p>The structured content of the document source, which may include various content blocks such as text, images, or other document elements.</p>
|
|
1651
|
+
* @public
|
|
1652
|
+
*/
|
|
1653
|
+
interface ContentMember {
|
|
1654
|
+
bytes?: never;
|
|
1655
|
+
s3Location?: never;
|
|
1656
|
+
text?: never;
|
|
1657
|
+
content: DocumentContentBlock[];
|
|
1400
1658
|
$unknown?: never;
|
|
1401
1659
|
}
|
|
1402
1660
|
/**
|
|
@@ -1405,11 +1663,15 @@ export declare namespace DocumentSource {
|
|
|
1405
1663
|
interface $UnknownMember {
|
|
1406
1664
|
bytes?: never;
|
|
1407
1665
|
s3Location?: never;
|
|
1666
|
+
text?: never;
|
|
1667
|
+
content?: never;
|
|
1408
1668
|
$unknown: [string, any];
|
|
1409
1669
|
}
|
|
1410
1670
|
interface Visitor<T> {
|
|
1411
1671
|
bytes: (value: Uint8Array) => T;
|
|
1412
1672
|
s3Location: (value: S3Location) => T;
|
|
1673
|
+
text: (value: string) => T;
|
|
1674
|
+
content: (value: DocumentContentBlock[]) => T;
|
|
1413
1675
|
_: (name: string, value: any) => T;
|
|
1414
1676
|
}
|
|
1415
1677
|
const visit: <T>(value: DocumentSource, visitor: Visitor<T>) => T;
|
|
@@ -1423,29 +1685,9 @@ export interface DocumentBlock {
|
|
|
1423
1685
|
* <p>The format of a document, or its extension.</p>
|
|
1424
1686
|
* @public
|
|
1425
1687
|
*/
|
|
1426
|
-
format
|
|
1427
|
-
/**
|
|
1428
|
-
* <p>A name for the document. The name can only contain the following characters:</p>
|
|
1429
|
-
* <ul>
|
|
1430
|
-
* <li>
|
|
1431
|
-
* <p>Alphanumeric characters</p>
|
|
1432
|
-
* </li>
|
|
1433
|
-
* <li>
|
|
1434
|
-
* <p>Whitespace characters (no more than one in a row)</p>
|
|
1435
|
-
* </li>
|
|
1436
|
-
* <li>
|
|
1437
|
-
* <p>Hyphens</p>
|
|
1438
|
-
* </li>
|
|
1439
|
-
* <li>
|
|
1440
|
-
* <p>Parentheses</p>
|
|
1441
|
-
* </li>
|
|
1442
|
-
* <li>
|
|
1443
|
-
* <p>Square brackets</p>
|
|
1444
|
-
* </li>
|
|
1445
|
-
* </ul>
|
|
1446
|
-
* <note>
|
|
1447
|
-
* <p>This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.</p>
|
|
1448
|
-
* </note>
|
|
1688
|
+
format?: DocumentFormat | undefined;
|
|
1689
|
+
/**
|
|
1690
|
+
* <p>A name for the document. The name can only contain the following characters:</p> <ul> <li> <p>Alphanumeric characters</p> </li> <li> <p>Whitespace characters (no more than one in a row)</p> </li> <li> <p>Hyphens</p> </li> <li> <p>Parentheses</p> </li> <li> <p>Square brackets</p> </li> </ul> <note> <p>This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.</p> </note>
|
|
1449
1691
|
* @public
|
|
1450
1692
|
*/
|
|
1451
1693
|
name: string | undefined;
|
|
@@ -1454,6 +1696,16 @@ export interface DocumentBlock {
|
|
|
1454
1696
|
* @public
|
|
1455
1697
|
*/
|
|
1456
1698
|
source: DocumentSource | undefined;
|
|
1699
|
+
/**
|
|
1700
|
+
* <p>Contextual information about how the document should be processed or interpreted by the model when generating citations.</p>
|
|
1701
|
+
* @public
|
|
1702
|
+
*/
|
|
1703
|
+
context?: string | undefined;
|
|
1704
|
+
/**
|
|
1705
|
+
* <p>Configuration settings that control how citations should be generated for this specific document.</p>
|
|
1706
|
+
* @public
|
|
1707
|
+
*/
|
|
1708
|
+
citations?: CitationsConfig | undefined;
|
|
1457
1709
|
}
|
|
1458
1710
|
/**
|
|
1459
1711
|
* @public
|
|
@@ -1543,9 +1795,7 @@ export interface GuardrailConverseTextBlock {
|
|
|
1543
1795
|
qualifiers?: GuardrailConverseContentQualifier[] | undefined;
|
|
1544
1796
|
}
|
|
1545
1797
|
/**
|
|
1546
|
-
* <p/>
|
|
1547
|
-
* <p>A content block for selective guarding with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations.
|
|
1548
|
-
* </p>
|
|
1798
|
+
* <p/> <p>A content block for selective guarding with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations. </p>
|
|
1549
1799
|
* @public
|
|
1550
1800
|
*/
|
|
1551
1801
|
export type GuardrailConverseContentBlock = GuardrailConverseContentBlock.ImageMember | GuardrailConverseContentBlock.TextMember | GuardrailConverseContentBlock.$UnknownMember;
|
|
@@ -1736,9 +1986,7 @@ export declare const VideoFormat: {
|
|
|
1736
1986
|
*/
|
|
1737
1987
|
export type VideoFormat = (typeof VideoFormat)[keyof typeof VideoFormat];
|
|
1738
1988
|
/**
|
|
1739
|
-
* <p>A video source. You can upload a smaller video as a base64-encoded string as
|
|
1740
|
-
* long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size
|
|
1741
|
-
* from an S3 bucket.</p>
|
|
1989
|
+
* <p>A video source. You can upload a smaller video as a base64-encoded string as long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size from an S3 bucket.</p>
|
|
1742
1990
|
* @public
|
|
1743
1991
|
*/
|
|
1744
1992
|
export type VideoSource = VideoSource.BytesMember | VideoSource.S3LocationMember | VideoSource.$UnknownMember;
|
|
@@ -1829,10 +2077,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
1829
2077
|
$unknown?: never;
|
|
1830
2078
|
}
|
|
1831
2079
|
/**
|
|
1832
|
-
* <p>A tool result that is an image.</p>
|
|
1833
|
-
* <note>
|
|
1834
|
-
* <p>This field is only supported by Anthropic Claude 3 models.</p>
|
|
1835
|
-
* </note>
|
|
2080
|
+
* <p>A tool result that is an image.</p> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>
|
|
1836
2081
|
* @public
|
|
1837
2082
|
*/
|
|
1838
2083
|
interface ImageMember {
|
|
@@ -1901,8 +2146,7 @@ export declare const ToolResultStatus: {
|
|
|
1901
2146
|
*/
|
|
1902
2147
|
export type ToolResultStatus = (typeof ToolResultStatus)[keyof typeof ToolResultStatus];
|
|
1903
2148
|
/**
|
|
1904
|
-
* <p>A tool result block that contains the results for a tool request that
|
|
1905
|
-
* the model previously made.</p>
|
|
2149
|
+
* <p>A tool result block that contains the results for a tool request that the model previously made.</p>
|
|
1906
2150
|
* @public
|
|
1907
2151
|
*/
|
|
1908
2152
|
export interface ToolResultBlock {
|
|
@@ -1917,17 +2161,13 @@ export interface ToolResultBlock {
|
|
|
1917
2161
|
*/
|
|
1918
2162
|
content: ToolResultContentBlock[] | undefined;
|
|
1919
2163
|
/**
|
|
1920
|
-
* <p>The status for the tool result content block.</p>
|
|
1921
|
-
* <note>
|
|
1922
|
-
* <p>This field is only supported Anthropic Claude 3 models.</p>
|
|
1923
|
-
* </note>
|
|
2164
|
+
* <p>The status for the tool result content block.</p> <note> <p>This field is only supported Anthropic Claude 3 models.</p> </note>
|
|
1924
2165
|
* @public
|
|
1925
2166
|
*/
|
|
1926
2167
|
status?: ToolResultStatus | undefined;
|
|
1927
2168
|
}
|
|
1928
2169
|
/**
|
|
1929
|
-
* <p>A tool use content block. Contains information about a tool that the model
|
|
1930
|
-
* is requesting be run., The model uses the result from the tool to generate a response. </p>
|
|
2170
|
+
* <p>A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response. </p>
|
|
1931
2171
|
* @public
|
|
1932
2172
|
*/
|
|
1933
2173
|
export interface ToolUseBlock {
|
|
@@ -1951,7 +2191,7 @@ export interface ToolUseBlock {
|
|
|
1951
2191
|
* <p>A block of content for a message that you pass to, or receive from, a model with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations.</p>
|
|
1952
2192
|
* @public
|
|
1953
2193
|
*/
|
|
1954
|
-
export type ContentBlock = ContentBlock.CachePointMember | ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
2194
|
+
export type ContentBlock = ContentBlock.CachePointMember | ContentBlock.CitationsContentMember | ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
1955
2195
|
/**
|
|
1956
2196
|
* @public
|
|
1957
2197
|
*/
|
|
@@ -1970,13 +2210,11 @@ export declare namespace ContentBlock {
|
|
|
1970
2210
|
guardContent?: never;
|
|
1971
2211
|
cachePoint?: never;
|
|
1972
2212
|
reasoningContent?: never;
|
|
2213
|
+
citationsContent?: never;
|
|
1973
2214
|
$unknown?: never;
|
|
1974
2215
|
}
|
|
1975
2216
|
/**
|
|
1976
|
-
* <p>Image to include in the message. </p>
|
|
1977
|
-
* <note>
|
|
1978
|
-
* <p>This field is only supported by Anthropic Claude 3 models.</p>
|
|
1979
|
-
* </note>
|
|
2217
|
+
* <p>Image to include in the message. </p> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>
|
|
1980
2218
|
* @public
|
|
1981
2219
|
*/
|
|
1982
2220
|
interface ImageMember {
|
|
@@ -1989,6 +2227,7 @@ export declare namespace ContentBlock {
|
|
|
1989
2227
|
guardContent?: never;
|
|
1990
2228
|
cachePoint?: never;
|
|
1991
2229
|
reasoningContent?: never;
|
|
2230
|
+
citationsContent?: never;
|
|
1992
2231
|
$unknown?: never;
|
|
1993
2232
|
}
|
|
1994
2233
|
/**
|
|
@@ -2005,6 +2244,7 @@ export declare namespace ContentBlock {
|
|
|
2005
2244
|
guardContent?: never;
|
|
2006
2245
|
cachePoint?: never;
|
|
2007
2246
|
reasoningContent?: never;
|
|
2247
|
+
citationsContent?: never;
|
|
2008
2248
|
$unknown?: never;
|
|
2009
2249
|
}
|
|
2010
2250
|
/**
|
|
@@ -2021,6 +2261,7 @@ export declare namespace ContentBlock {
|
|
|
2021
2261
|
guardContent?: never;
|
|
2022
2262
|
cachePoint?: never;
|
|
2023
2263
|
reasoningContent?: never;
|
|
2264
|
+
citationsContent?: never;
|
|
2024
2265
|
$unknown?: never;
|
|
2025
2266
|
}
|
|
2026
2267
|
/**
|
|
@@ -2037,6 +2278,7 @@ export declare namespace ContentBlock {
|
|
|
2037
2278
|
guardContent?: never;
|
|
2038
2279
|
cachePoint?: never;
|
|
2039
2280
|
reasoningContent?: never;
|
|
2281
|
+
citationsContent?: never;
|
|
2040
2282
|
$unknown?: never;
|
|
2041
2283
|
}
|
|
2042
2284
|
/**
|
|
@@ -2053,15 +2295,11 @@ export declare namespace ContentBlock {
|
|
|
2053
2295
|
guardContent?: never;
|
|
2054
2296
|
cachePoint?: never;
|
|
2055
2297
|
reasoningContent?: never;
|
|
2298
|
+
citationsContent?: never;
|
|
2056
2299
|
$unknown?: never;
|
|
2057
2300
|
}
|
|
2058
2301
|
/**
|
|
2059
|
-
* <p>Contains the content to assess with the guardrail. If you don't specify
|
|
2060
|
-
* <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the
|
|
2061
|
-
* Converse API) assesses the entire message.</p>
|
|
2062
|
-
* <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
2063
|
-
*
|
|
2064
|
-
* </p>
|
|
2302
|
+
* <p>Contains the content to assess with the guardrail. If you don't specify <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.</p> <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. </p>
|
|
2065
2303
|
* @public
|
|
2066
2304
|
*/
|
|
2067
2305
|
interface GuardContentMember {
|
|
@@ -2074,6 +2312,7 @@ export declare namespace ContentBlock {
|
|
|
2074
2312
|
guardContent: GuardrailConverseContentBlock;
|
|
2075
2313
|
cachePoint?: never;
|
|
2076
2314
|
reasoningContent?: never;
|
|
2315
|
+
citationsContent?: never;
|
|
2077
2316
|
$unknown?: never;
|
|
2078
2317
|
}
|
|
2079
2318
|
/**
|
|
@@ -2090,6 +2329,7 @@ export declare namespace ContentBlock {
|
|
|
2090
2329
|
guardContent?: never;
|
|
2091
2330
|
cachePoint: CachePointBlock;
|
|
2092
2331
|
reasoningContent?: never;
|
|
2332
|
+
citationsContent?: never;
|
|
2093
2333
|
$unknown?: never;
|
|
2094
2334
|
}
|
|
2095
2335
|
/**
|
|
@@ -2106,6 +2346,24 @@ export declare namespace ContentBlock {
|
|
|
2106
2346
|
guardContent?: never;
|
|
2107
2347
|
cachePoint?: never;
|
|
2108
2348
|
reasoningContent: ReasoningContentBlock;
|
|
2349
|
+
citationsContent?: never;
|
|
2350
|
+
$unknown?: never;
|
|
2351
|
+
}
|
|
2352
|
+
/**
|
|
2353
|
+
* <p>A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.</p>
|
|
2354
|
+
* @public
|
|
2355
|
+
*/
|
|
2356
|
+
interface CitationsContentMember {
|
|
2357
|
+
text?: never;
|
|
2358
|
+
image?: never;
|
|
2359
|
+
document?: never;
|
|
2360
|
+
video?: never;
|
|
2361
|
+
toolUse?: never;
|
|
2362
|
+
toolResult?: never;
|
|
2363
|
+
guardContent?: never;
|
|
2364
|
+
cachePoint?: never;
|
|
2365
|
+
reasoningContent?: never;
|
|
2366
|
+
citationsContent: CitationsContentBlock;
|
|
2109
2367
|
$unknown?: never;
|
|
2110
2368
|
}
|
|
2111
2369
|
/**
|
|
@@ -2121,6 +2379,7 @@ export declare namespace ContentBlock {
|
|
|
2121
2379
|
guardContent?: never;
|
|
2122
2380
|
cachePoint?: never;
|
|
2123
2381
|
reasoningContent?: never;
|
|
2382
|
+
citationsContent?: never;
|
|
2124
2383
|
$unknown: [string, any];
|
|
2125
2384
|
}
|
|
2126
2385
|
interface Visitor<T> {
|
|
@@ -2133,6 +2392,7 @@ export declare namespace ContentBlock {
|
|
|
2133
2392
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
2134
2393
|
cachePoint: (value: CachePointBlock) => T;
|
|
2135
2394
|
reasoningContent: (value: ReasoningContentBlock) => T;
|
|
2395
|
+
citationsContent: (value: CitationsContentBlock) => T;
|
|
2136
2396
|
_: (name: string, value: any) => T;
|
|
2137
2397
|
}
|
|
2138
2398
|
const visit: <T>(value: ContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -2160,21 +2420,7 @@ export interface Message {
|
|
|
2160
2420
|
*/
|
|
2161
2421
|
role: ConversationRole | undefined;
|
|
2162
2422
|
/**
|
|
2163
|
-
* <p>The message content. Note the following restrictions:</p>
|
|
2164
|
-
* <ul>
|
|
2165
|
-
* <li>
|
|
2166
|
-
* <p>You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.</p>
|
|
2167
|
-
* </li>
|
|
2168
|
-
* <li>
|
|
2169
|
-
* <p>You can include up to five documents. Each document's size must be no more than 4.5 MB.</p>
|
|
2170
|
-
* </li>
|
|
2171
|
-
* <li>
|
|
2172
|
-
* <p>If you include a <code>ContentBlock</code> with a <code>document</code> field in the array, you must also include a <code>ContentBlock</code> with a <code>text</code> field.</p>
|
|
2173
|
-
* </li>
|
|
2174
|
-
* <li>
|
|
2175
|
-
* <p>You can only include images and documents if the <code>role</code> is <code>user</code>.</p>
|
|
2176
|
-
* </li>
|
|
2177
|
-
* </ul>
|
|
2423
|
+
* <p>The message content. Note the following restrictions:</p> <ul> <li> <p>You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.</p> </li> <li> <p>You can include up to five documents. Each document's size must be no more than 4.5 MB.</p> </li> <li> <p>If you include a <code>ContentBlock</code> with a <code>document</code> field in the array, you must also include a <code>ContentBlock</code> with a <code>text</code> field.</p> </li> <li> <p>You can only include images and documents if the <code>role</code> is <code>user</code>.</p> </li> </ul>
|
|
2178
2424
|
* @public
|
|
2179
2425
|
*/
|
|
2180
2426
|
content: ContentBlock[] | undefined;
|
|
@@ -2252,9 +2498,7 @@ export declare namespace SystemContentBlock {
|
|
|
2252
2498
|
$unknown?: never;
|
|
2253
2499
|
}
|
|
2254
2500
|
/**
|
|
2255
|
-
* <p>A content block to assess with the guardrail. Use with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations. </p>
|
|
2256
|
-
* <p>For more information, see <i>Use a guardrail with the Converse
|
|
2257
|
-
* API</i> in the <i>Amazon Bedrock User Guide</i>.</p>
|
|
2501
|
+
* <p>A content block to assess with the guardrail. Use with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations. </p> <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.</p>
|
|
2258
2502
|
* @public
|
|
2259
2503
|
*/
|
|
2260
2504
|
interface GuardContentMember {
|
|
@@ -2297,17 +2541,13 @@ export declare namespace SystemContentBlock {
|
|
|
2297
2541
|
export interface AnyToolChoice {
|
|
2298
2542
|
}
|
|
2299
2543
|
/**
|
|
2300
|
-
* <p>The Model automatically decides if a tool should be called or whether to generate text instead.
|
|
2301
|
-
* For example, <code>\{"auto" : \{\}\}</code>.</p>
|
|
2544
|
+
* <p>The Model automatically decides if a tool should be called or whether to generate text instead. For example, <code>\{"auto" : \{\}\}</code>.</p>
|
|
2302
2545
|
* @public
|
|
2303
2546
|
*/
|
|
2304
2547
|
export interface AutoToolChoice {
|
|
2305
2548
|
}
|
|
2306
2549
|
/**
|
|
2307
|
-
* <p>The model must request a specific tool.
|
|
2308
|
-
* <note>
|
|
2309
|
-
* <p>This field is only supported by Anthropic Claude 3 models.</p>
|
|
2310
|
-
* </note>
|
|
2550
|
+
* <p>The model must request a specific tool. For example, <code>\{"tool" : \{"name" : "Your tool name"\}\}</code>.</p> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>
|
|
2311
2551
|
* @public
|
|
2312
2552
|
*/
|
|
2313
2553
|
export interface SpecificToolChoice {
|
|
@@ -2318,9 +2558,7 @@ export interface SpecificToolChoice {
|
|
|
2318
2558
|
name: string | undefined;
|
|
2319
2559
|
}
|
|
2320
2560
|
/**
|
|
2321
|
-
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>.
|
|
2322
|
-
* <code>ToolChoice</code> is only supported by
|
|
2323
|
-
* Anthropic Claude 3 models and by Mistral AI Mistral Large.</p>
|
|
2561
|
+
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>. <code>ToolChoice</code> is only supported by Anthropic Claude 3 models and by Mistral AI Mistral Large.</p>
|
|
2324
2562
|
* @public
|
|
2325
2563
|
*/
|
|
2326
2564
|
export type ToolChoice = ToolChoice.AnyMember | ToolChoice.AutoMember | ToolChoice.ToolMember | ToolChoice.$UnknownMember;
|
|
@@ -2349,7 +2587,7 @@ export declare namespace ToolChoice {
|
|
|
2349
2587
|
$unknown?: never;
|
|
2350
2588
|
}
|
|
2351
2589
|
/**
|
|
2352
|
-
* <p>The Model must request the specified tool.
|
|
2590
|
+
* <p>The Model must request the specified tool. Only supported by Anthropic Claude 3 models. </p>
|
|
2353
2591
|
* @public
|
|
2354
2592
|
*/
|
|
2355
2593
|
interface ToolMember {
|
|
@@ -2489,25 +2727,7 @@ export interface ToolConfiguration {
|
|
|
2489
2727
|
*/
|
|
2490
2728
|
export interface ConverseRequest {
|
|
2491
2729
|
/**
|
|
2492
|
-
* <p>Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:</p>
|
|
2493
|
-
* <ul>
|
|
2494
|
-
* <li>
|
|
2495
|
-
* <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
|
|
2496
|
-
* </li>
|
|
2497
|
-
* <li>
|
|
2498
|
-
* <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p>
|
|
2499
|
-
* </li>
|
|
2500
|
-
* <li>
|
|
2501
|
-
* <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p>
|
|
2502
|
-
* </li>
|
|
2503
|
-
* <li>
|
|
2504
|
-
* <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
|
|
2505
|
-
* </li>
|
|
2506
|
-
* <li>
|
|
2507
|
-
* <p>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt management</a>, specify the ARN of the prompt version to use.</p>
|
|
2508
|
-
* </li>
|
|
2509
|
-
* </ul>
|
|
2510
|
-
* <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
|
|
2730
|
+
* <p>Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:</p> <ul> <li> <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt management</a>, specify the ARN of the prompt version to use.</p> </li> </ul> <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
|
|
2511
2731
|
* @public
|
|
2512
2732
|
*/
|
|
2513
2733
|
modelId: string | undefined;
|
|
@@ -2522,16 +2742,12 @@ export interface ConverseRequest {
|
|
|
2522
2742
|
*/
|
|
2523
2743
|
system?: SystemContentBlock[] | undefined;
|
|
2524
2744
|
/**
|
|
2525
|
-
* <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base
|
|
2526
|
-
* set of inference parameters. If you need to pass additional parameters that the model
|
|
2527
|
-
* supports, use the <code>additionalModelRequestFields</code> request field.</p>
|
|
2745
|
+
* <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base set of inference parameters. If you need to pass additional parameters that the model supports, use the <code>additionalModelRequestFields</code> request field.</p>
|
|
2528
2746
|
* @public
|
|
2529
2747
|
*/
|
|
2530
2748
|
inferenceConfig?: InferenceConfiguration | undefined;
|
|
2531
2749
|
/**
|
|
2532
|
-
* <p>Configuration information for the tools that the model can use when generating a response. </p>
|
|
2533
|
-
* <p>For information about models that support tool use, see
|
|
2534
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features">Supported models and model features</a>.</p>
|
|
2750
|
+
* <p>Configuration information for the tools that the model can use when generating a response. </p> <p>For information about models that support tool use, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features">Supported models and model features</a>.</p>
|
|
2535
2751
|
* @public
|
|
2536
2752
|
*/
|
|
2537
2753
|
toolConfig?: ToolConfiguration | undefined;
|
|
@@ -2541,9 +2757,7 @@ export interface ConverseRequest {
|
|
|
2541
2757
|
*/
|
|
2542
2758
|
guardrailConfig?: GuardrailConfiguration | undefined;
|
|
2543
2759
|
/**
|
|
2544
|
-
* <p>Additional inference parameters that the model supports, beyond the
|
|
2545
|
-
* base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code>
|
|
2546
|
-
* field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
2760
|
+
* <p>Additional inference parameters that the model supports, beyond the base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code> field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
2547
2761
|
* @public
|
|
2548
2762
|
*/
|
|
2549
2763
|
additionalModelRequestFields?: __DocumentType | undefined;
|
|
@@ -2553,20 +2767,7 @@ export interface ConverseRequest {
|
|
|
2553
2767
|
*/
|
|
2554
2768
|
promptVariables?: Record<string, PromptVariableValues> | undefined;
|
|
2555
2769
|
/**
|
|
2556
|
-
* <p>Additional model parameters field paths to return in the
|
|
2557
|
-
* response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the
|
|
2558
|
-
* <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p>
|
|
2559
|
-
* <p>
|
|
2560
|
-
* <code>[
|
|
2561
|
-
* "/stop_sequence"
|
|
2562
|
-
* ]</code>
|
|
2563
|
-
* </p>
|
|
2564
|
-
* <p>For information about the JSON Pointer syntax, see the
|
|
2565
|
-
* <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
|
|
2566
|
-
* <p>
|
|
2567
|
-
* <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured
|
|
2568
|
-
* JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested
|
|
2569
|
-
* field is not in the model response, it is ignored by <code>Converse</code>.</p>
|
|
2770
|
+
* <p>Additional model parameters field paths to return in the response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p> <p> <code>[ "/stop_sequence" ]</code> </p> <p>For information about the JSON Pointer syntax, see the <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p> <p> <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored by <code>Converse</code>.</p>
|
|
2570
2771
|
* @public
|
|
2571
2772
|
*/
|
|
2572
2773
|
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
@@ -2587,8 +2788,7 @@ export interface ConverseRequest {
|
|
|
2587
2788
|
*/
|
|
2588
2789
|
export interface ConverseMetrics {
|
|
2589
2790
|
/**
|
|
2590
|
-
* <p>The latency of the call to <code>Converse</code>, in milliseconds.
|
|
2591
|
-
* </p>
|
|
2791
|
+
* <p>The latency of the call to <code>Converse</code>, in milliseconds. </p>
|
|
2592
2792
|
* @public
|
|
2593
2793
|
*/
|
|
2594
2794
|
latencyMs: number | undefined;
|
|
@@ -2738,8 +2938,7 @@ export interface ConverseResponse {
|
|
|
2738
2938
|
*/
|
|
2739
2939
|
stopReason: StopReason | undefined;
|
|
2740
2940
|
/**
|
|
2741
|
-
* <p>The total number of tokens used in the call to <code>Converse</code>. The total includes
|
|
2742
|
-
* the tokens input to the model and the tokens generated by the model.</p>
|
|
2941
|
+
* <p>The total number of tokens used in the call to <code>Converse</code>. The total includes the tokens input to the model and the tokens generated by the model.</p>
|
|
2743
2942
|
* @public
|
|
2744
2943
|
*/
|
|
2745
2944
|
usage: TokenUsage | undefined;
|
|
@@ -2787,10 +2986,7 @@ export declare class ModelErrorException extends __BaseException {
|
|
|
2787
2986
|
constructor(opts: __ExceptionOptionType<ModelErrorException, __BaseException>);
|
|
2788
2987
|
}
|
|
2789
2988
|
/**
|
|
2790
|
-
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
2791
|
-
* will automatically retry the operation up to 5 times. For information about configuring
|
|
2792
|
-
* 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>
|
|
2793
|
-
* reference guide.</p>
|
|
2989
|
+
* <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>
|
|
2794
2990
|
* @public
|
|
2795
2991
|
*/
|
|
2796
2992
|
export declare class ModelNotReadyException extends __BaseException {
|
|
@@ -2827,8 +3023,7 @@ export declare const GuardrailStreamProcessingMode: {
|
|
|
2827
3023
|
*/
|
|
2828
3024
|
export type GuardrailStreamProcessingMode = (typeof GuardrailStreamProcessingMode)[keyof typeof GuardrailStreamProcessingMode];
|
|
2829
3025
|
/**
|
|
2830
|
-
* <p>Configuration information for a guardrail that you use with the <a>ConverseStream</a> action.
|
|
2831
|
-
* </p>
|
|
3026
|
+
* <p>Configuration information for a guardrail that you use with the <a>ConverseStream</a> action. </p>
|
|
2832
3027
|
* @public
|
|
2833
3028
|
*/
|
|
2834
3029
|
export interface GuardrailStreamConfiguration {
|
|
@@ -2848,9 +3043,7 @@ export interface GuardrailStreamConfiguration {
|
|
|
2848
3043
|
*/
|
|
2849
3044
|
trace?: GuardrailTrace | undefined;
|
|
2850
3045
|
/**
|
|
2851
|
-
* <p>The processing mode. </p>
|
|
2852
|
-
* <p>The processing mode. For more information, see <i>Configure streaming response behavior</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
2853
|
-
* </p>
|
|
3046
|
+
* <p>The processing mode. </p> <p>The processing mode. For more information, see <i>Configure streaming response behavior</i> in the <i>Amazon Bedrock User Guide</i>. </p>
|
|
2854
3047
|
* @public
|
|
2855
3048
|
*/
|
|
2856
3049
|
streamProcessingMode?: GuardrailStreamProcessingMode | undefined;
|
|
@@ -2860,25 +3053,7 @@ export interface GuardrailStreamConfiguration {
|
|
|
2860
3053
|
*/
|
|
2861
3054
|
export interface ConverseStreamRequest {
|
|
2862
3055
|
/**
|
|
2863
|
-
* <p>Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:</p>
|
|
2864
|
-
* <ul>
|
|
2865
|
-
* <li>
|
|
2866
|
-
* <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
|
|
2867
|
-
* </li>
|
|
2868
|
-
* <li>
|
|
2869
|
-
* <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p>
|
|
2870
|
-
* </li>
|
|
2871
|
-
* <li>
|
|
2872
|
-
* <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p>
|
|
2873
|
-
* </li>
|
|
2874
|
-
* <li>
|
|
2875
|
-
* <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
|
|
2876
|
-
* </li>
|
|
2877
|
-
* <li>
|
|
2878
|
-
* <p>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt management</a>, specify the ARN of the prompt version to use.</p>
|
|
2879
|
-
* </li>
|
|
2880
|
-
* </ul>
|
|
2881
|
-
* <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
|
|
3056
|
+
* <p>Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:</p> <ul> <li> <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt management</a>, specify the ARN of the prompt version to use.</p> </li> </ul> <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
|
|
2882
3057
|
* @public
|
|
2883
3058
|
*/
|
|
2884
3059
|
modelId: string | undefined;
|
|
@@ -2893,16 +3068,12 @@ export interface ConverseStreamRequest {
|
|
|
2893
3068
|
*/
|
|
2894
3069
|
system?: SystemContentBlock[] | undefined;
|
|
2895
3070
|
/**
|
|
2896
|
-
* <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base
|
|
2897
|
-
* set of inference parameters. If you need to pass additional parameters that the model
|
|
2898
|
-
* supports, use the <code>additionalModelRequestFields</code> request field.</p>
|
|
3071
|
+
* <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base set of inference parameters. If you need to pass additional parameters that the model supports, use the <code>additionalModelRequestFields</code> request field.</p>
|
|
2899
3072
|
* @public
|
|
2900
3073
|
*/
|
|
2901
3074
|
inferenceConfig?: InferenceConfiguration | undefined;
|
|
2902
3075
|
/**
|
|
2903
|
-
* <p>Configuration information for the tools that the model can use when generating a response.</p>
|
|
2904
|
-
* <p>For information about models that support streaming tool use, see
|
|
2905
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features">Supported models and model features</a>.</p>
|
|
3076
|
+
* <p>Configuration information for the tools that the model can use when generating a response.</p> <p>For information about models that support streaming tool use, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features">Supported models and model features</a>.</p>
|
|
2906
3077
|
* @public
|
|
2907
3078
|
*/
|
|
2908
3079
|
toolConfig?: ToolConfiguration | undefined;
|
|
@@ -2912,9 +3083,7 @@ export interface ConverseStreamRequest {
|
|
|
2912
3083
|
*/
|
|
2913
3084
|
guardrailConfig?: GuardrailStreamConfiguration | undefined;
|
|
2914
3085
|
/**
|
|
2915
|
-
* <p>Additional inference parameters that the model supports, beyond the
|
|
2916
|
-
* base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code>
|
|
2917
|
-
* field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
3086
|
+
* <p>Additional inference parameters that the model supports, beyond the base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code> field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
2918
3087
|
* @public
|
|
2919
3088
|
*/
|
|
2920
3089
|
additionalModelRequestFields?: __DocumentType | undefined;
|
|
@@ -2924,20 +3093,7 @@ export interface ConverseStreamRequest {
|
|
|
2924
3093
|
*/
|
|
2925
3094
|
promptVariables?: Record<string, PromptVariableValues> | undefined;
|
|
2926
3095
|
/**
|
|
2927
|
-
* <p>Additional model parameters field paths to return in the
|
|
2928
|
-
* response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the
|
|
2929
|
-
* <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p>
|
|
2930
|
-
* <p>
|
|
2931
|
-
* <code>[
|
|
2932
|
-
* "/stop_sequence"
|
|
2933
|
-
* ]</code>
|
|
2934
|
-
* </p>
|
|
2935
|
-
* <p>For information about the JSON Pointer syntax, see the
|
|
2936
|
-
* <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
|
|
2937
|
-
* <p>
|
|
2938
|
-
* <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured
|
|
2939
|
-
* JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested
|
|
2940
|
-
* field is not in the model response, it is ignored by <code>Converse</code>.</p>
|
|
3096
|
+
* <p>Additional model parameters field paths to return in the response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p> <p> <code>[ "/stop_sequence" ]</code> </p> <p>For information about the JSON Pointer syntax, see the <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p> <p> <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored by <code>Converse</code>.</p>
|
|
2941
3097
|
* @public
|
|
2942
3098
|
*/
|
|
2943
3099
|
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
@@ -2952,6 +3108,38 @@ export interface ConverseStreamRequest {
|
|
|
2952
3108
|
*/
|
|
2953
3109
|
performanceConfig?: PerformanceConfiguration | undefined;
|
|
2954
3110
|
}
|
|
3111
|
+
/**
|
|
3112
|
+
* <p>Contains incremental updates to the source content text during streaming responses, allowing clients to build up the cited content progressively.</p>
|
|
3113
|
+
* @public
|
|
3114
|
+
*/
|
|
3115
|
+
export interface CitationSourceContentDelta {
|
|
3116
|
+
/**
|
|
3117
|
+
* <p>An incremental update to the text content from the source document that is being cited.</p>
|
|
3118
|
+
* @public
|
|
3119
|
+
*/
|
|
3120
|
+
text?: string | undefined;
|
|
3121
|
+
}
|
|
3122
|
+
/**
|
|
3123
|
+
* <p>Contains incremental updates to citation information during streaming responses. This allows clients to build up citation data progressively as the response is generated.</p>
|
|
3124
|
+
* @public
|
|
3125
|
+
*/
|
|
3126
|
+
export interface CitationsDelta {
|
|
3127
|
+
/**
|
|
3128
|
+
* <p>The title or identifier of the source document being cited.</p>
|
|
3129
|
+
* @public
|
|
3130
|
+
*/
|
|
3131
|
+
title?: string | undefined;
|
|
3132
|
+
/**
|
|
3133
|
+
* <p>The specific content from the source document that was referenced or cited in the generated response.</p>
|
|
3134
|
+
* @public
|
|
3135
|
+
*/
|
|
3136
|
+
sourceContent?: CitationSourceContentDelta[] | undefined;
|
|
3137
|
+
/**
|
|
3138
|
+
* <p>Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.</p>
|
|
3139
|
+
* @public
|
|
3140
|
+
*/
|
|
3141
|
+
location?: CitationLocation | undefined;
|
|
3142
|
+
}
|
|
2955
3143
|
/**
|
|
2956
3144
|
* <p>Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.</p>
|
|
2957
3145
|
* @public
|
|
@@ -3023,7 +3211,7 @@ export interface ToolUseBlockDelta {
|
|
|
3023
3211
|
* <p>A block of content in a streaming response.</p>
|
|
3024
3212
|
* @public
|
|
3025
3213
|
*/
|
|
3026
|
-
export type ContentBlockDelta = ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
3214
|
+
export type ContentBlockDelta = ContentBlockDelta.CitationMember | ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
3027
3215
|
/**
|
|
3028
3216
|
* @public
|
|
3029
3217
|
*/
|
|
@@ -3036,6 +3224,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3036
3224
|
text: string;
|
|
3037
3225
|
toolUse?: never;
|
|
3038
3226
|
reasoningContent?: never;
|
|
3227
|
+
citation?: never;
|
|
3039
3228
|
$unknown?: never;
|
|
3040
3229
|
}
|
|
3041
3230
|
/**
|
|
@@ -3046,6 +3235,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3046
3235
|
text?: never;
|
|
3047
3236
|
toolUse: ToolUseBlockDelta;
|
|
3048
3237
|
reasoningContent?: never;
|
|
3238
|
+
citation?: never;
|
|
3049
3239
|
$unknown?: never;
|
|
3050
3240
|
}
|
|
3051
3241
|
/**
|
|
@@ -3056,6 +3246,18 @@ export declare namespace ContentBlockDelta {
|
|
|
3056
3246
|
text?: never;
|
|
3057
3247
|
toolUse?: never;
|
|
3058
3248
|
reasoningContent: ReasoningContentBlockDelta;
|
|
3249
|
+
citation?: never;
|
|
3250
|
+
$unknown?: never;
|
|
3251
|
+
}
|
|
3252
|
+
/**
|
|
3253
|
+
* <p>Incremental citation information that is streamed as part of the response generation process.</p>
|
|
3254
|
+
* @public
|
|
3255
|
+
*/
|
|
3256
|
+
interface CitationMember {
|
|
3257
|
+
text?: never;
|
|
3258
|
+
toolUse?: never;
|
|
3259
|
+
reasoningContent?: never;
|
|
3260
|
+
citation: CitationsDelta;
|
|
3059
3261
|
$unknown?: never;
|
|
3060
3262
|
}
|
|
3061
3263
|
/**
|
|
@@ -3065,12 +3267,14 @@ export declare namespace ContentBlockDelta {
|
|
|
3065
3267
|
text?: never;
|
|
3066
3268
|
toolUse?: never;
|
|
3067
3269
|
reasoningContent?: never;
|
|
3270
|
+
citation?: never;
|
|
3068
3271
|
$unknown: [string, any];
|
|
3069
3272
|
}
|
|
3070
3273
|
interface Visitor<T> {
|
|
3071
3274
|
text: (value: string) => T;
|
|
3072
3275
|
toolUse: (value: ToolUseBlockDelta) => T;
|
|
3073
3276
|
reasoningContent: (value: ReasoningContentBlockDelta) => T;
|
|
3277
|
+
citation: (value: CitationsDelta) => T;
|
|
3074
3278
|
_: (name: string, value: any) => T;
|
|
3075
3279
|
}
|
|
3076
3280
|
const visit: <T>(value: ContentBlockDelta, visitor: Visitor<T>) => T;
|
|
@@ -3143,7 +3347,7 @@ export declare namespace ContentBlockStart {
|
|
|
3143
3347
|
*/
|
|
3144
3348
|
export interface ContentBlockStartEvent {
|
|
3145
3349
|
/**
|
|
3146
|
-
* <p>Start information about a content block start event.
|
|
3350
|
+
* <p>Start information about a content block start event. </p>
|
|
3147
3351
|
* @public
|
|
3148
3352
|
*/
|
|
3149
3353
|
start: ContentBlockStart | undefined;
|
|
@@ -3420,8 +3624,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
3420
3624
|
$unknown?: never;
|
|
3421
3625
|
}
|
|
3422
3626
|
/**
|
|
3423
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
3424
|
-
* 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>
|
|
3627
|
+
* <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>
|
|
3425
3628
|
* @public
|
|
3426
3629
|
*/
|
|
3427
3630
|
interface ValidationExceptionMember {
|
|
@@ -3439,8 +3642,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
3439
3642
|
$unknown?: never;
|
|
3440
3643
|
}
|
|
3441
3644
|
/**
|
|
3442
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
3443
|
-
* 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>
|
|
3645
|
+
* <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>
|
|
3444
3646
|
* @public
|
|
3445
3647
|
*/
|
|
3446
3648
|
interface ThrottlingExceptionMember {
|
|
@@ -3458,8 +3660,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
3458
3660
|
$unknown?: never;
|
|
3459
3661
|
}
|
|
3460
3662
|
/**
|
|
3461
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
3462
|
-
* 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>
|
|
3663
|
+
* <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>
|
|
3463
3664
|
* @public
|
|
3464
3665
|
*/
|
|
3465
3666
|
interface ServiceUnavailableExceptionMember {
|
|
@@ -3542,8 +3743,7 @@ export interface InvokeModelRequest {
|
|
|
3542
3743
|
*/
|
|
3543
3744
|
body?: Uint8Array | undefined;
|
|
3544
3745
|
/**
|
|
3545
|
-
* <p>The MIME type of the input data in the request. You must specify
|
|
3546
|
-
* <code>application/json</code>.</p>
|
|
3746
|
+
* <p>The MIME type of the input data in the request. You must specify <code>application/json</code>.</p>
|
|
3547
3747
|
* @public
|
|
3548
3748
|
*/
|
|
3549
3749
|
contentType?: string | undefined;
|
|
@@ -3553,25 +3753,7 @@ export interface InvokeModelRequest {
|
|
|
3553
3753
|
*/
|
|
3554
3754
|
accept?: string | undefined;
|
|
3555
3755
|
/**
|
|
3556
|
-
* <p>The unique identifier of the model to invoke to run inference.</p>
|
|
3557
|
-
* <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
|
|
3558
|
-
* <ul>
|
|
3559
|
-
* <li>
|
|
3560
|
-
* <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
|
|
3561
|
-
* </li>
|
|
3562
|
-
* <li>
|
|
3563
|
-
* <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p>
|
|
3564
|
-
* </li>
|
|
3565
|
-
* <li>
|
|
3566
|
-
* <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p>
|
|
3567
|
-
* </li>
|
|
3568
|
-
* <li>
|
|
3569
|
-
* <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
|
|
3570
|
-
* </li>
|
|
3571
|
-
* <li>
|
|
3572
|
-
* <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p>
|
|
3573
|
-
* </li>
|
|
3574
|
-
* </ul>
|
|
3756
|
+
* <p>The unique identifier of the model to invoke to run inference.</p> <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p> <ul> <li> <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a custom model, specify the ARN of the custom model deployment (for on-demand inference) or the ARN of your provisioned model (for Provisioned Throughput). For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p> </li> </ul>
|
|
3575
3757
|
* @public
|
|
3576
3758
|
*/
|
|
3577
3759
|
modelId: string | undefined;
|
|
@@ -3581,20 +3763,7 @@ export interface InvokeModelRequest {
|
|
|
3581
3763
|
*/
|
|
3582
3764
|
trace?: Trace | undefined;
|
|
3583
3765
|
/**
|
|
3584
|
-
* <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied
|
|
3585
|
-
* to the invocation.</p>
|
|
3586
|
-
* <p>An error will be thrown in the following situations.</p>
|
|
3587
|
-
* <ul>
|
|
3588
|
-
* <li>
|
|
3589
|
-
* <p>You don't provide a guardrail identifier but you specify the <code>amazon-bedrock-guardrailConfig</code> field in the request body.</p>
|
|
3590
|
-
* </li>
|
|
3591
|
-
* <li>
|
|
3592
|
-
* <p>You enable the guardrail but the <code>contentType</code> isn't <code>application/json</code>.</p>
|
|
3593
|
-
* </li>
|
|
3594
|
-
* <li>
|
|
3595
|
-
* <p>You provide a guardrail identifier, but <code>guardrailVersion</code> isn't specified.</p>
|
|
3596
|
-
* </li>
|
|
3597
|
-
* </ul>
|
|
3766
|
+
* <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied to the invocation.</p> <p>An error will be thrown in the following situations.</p> <ul> <li> <p>You don't provide a guardrail identifier but you specify the <code>amazon-bedrock-guardrailConfig</code> field in the request body.</p> </li> <li> <p>You enable the guardrail but the <code>contentType</code> isn't <code>application/json</code>.</p> </li> <li> <p>You provide a guardrail identifier, but <code>guardrailVersion</code> isn't specified.</p> </li> </ul>
|
|
3598
3767
|
* @public
|
|
3599
3768
|
*/
|
|
3600
3769
|
guardrailIdentifier?: string | undefined;
|
|
@@ -3848,37 +4017,17 @@ export interface InvokeModelWithResponseStreamRequest {
|
|
|
3848
4017
|
*/
|
|
3849
4018
|
body?: Uint8Array | undefined;
|
|
3850
4019
|
/**
|
|
3851
|
-
* <p>The MIME type of the input data in the request. You must specify
|
|
3852
|
-
* <code>application/json</code>.</p>
|
|
4020
|
+
* <p>The MIME type of the input data in the request. You must specify <code>application/json</code>.</p>
|
|
3853
4021
|
* @public
|
|
3854
4022
|
*/
|
|
3855
4023
|
contentType?: string | undefined;
|
|
3856
4024
|
/**
|
|
3857
|
-
* <p>The desired MIME type of the inference body in the response. The default value is
|
|
3858
|
-
* <code>application/json</code>.</p>
|
|
4025
|
+
* <p>The desired MIME type of the inference body in the response. The default value is <code>application/json</code>.</p>
|
|
3859
4026
|
* @public
|
|
3860
4027
|
*/
|
|
3861
4028
|
accept?: string | undefined;
|
|
3862
4029
|
/**
|
|
3863
|
-
* <p>The unique identifier of the model to invoke to run inference.</p>
|
|
3864
|
-
* <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
|
|
3865
|
-
* <ul>
|
|
3866
|
-
* <li>
|
|
3867
|
-
* <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
|
|
3868
|
-
* </li>
|
|
3869
|
-
* <li>
|
|
3870
|
-
* <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p>
|
|
3871
|
-
* </li>
|
|
3872
|
-
* <li>
|
|
3873
|
-
* <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p>
|
|
3874
|
-
* </li>
|
|
3875
|
-
* <li>
|
|
3876
|
-
* <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
|
|
3877
|
-
* </li>
|
|
3878
|
-
* <li>
|
|
3879
|
-
* <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p>
|
|
3880
|
-
* </li>
|
|
3881
|
-
* </ul>
|
|
4030
|
+
* <p>The unique identifier of the model to invoke to run inference.</p> <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p> <ul> <li> <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a custom model, specify the ARN of the custom model deployment (for on-demand inference) or the ARN of your provisioned model (for Provisioned Throughput). For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p> </li> </ul>
|
|
3882
4031
|
* @public
|
|
3883
4032
|
*/
|
|
3884
4033
|
modelId: string | undefined;
|
|
@@ -3888,20 +4037,7 @@ export interface InvokeModelWithResponseStreamRequest {
|
|
|
3888
4037
|
*/
|
|
3889
4038
|
trace?: Trace | undefined;
|
|
3890
4039
|
/**
|
|
3891
|
-
* <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied
|
|
3892
|
-
* to the invocation.</p>
|
|
3893
|
-
* <p>An error is thrown in the following situations.</p>
|
|
3894
|
-
* <ul>
|
|
3895
|
-
* <li>
|
|
3896
|
-
* <p>You don't provide a guardrail identifier but you specify the <code>amazon-bedrock-guardrailConfig</code> field in the request body.</p>
|
|
3897
|
-
* </li>
|
|
3898
|
-
* <li>
|
|
3899
|
-
* <p>You enable the guardrail but the <code>contentType</code> isn't <code>application/json</code>.</p>
|
|
3900
|
-
* </li>
|
|
3901
|
-
* <li>
|
|
3902
|
-
* <p>You provide a guardrail identifier, but <code>guardrailVersion</code> isn't specified.</p>
|
|
3903
|
-
* </li>
|
|
3904
|
-
* </ul>
|
|
4040
|
+
* <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied to the invocation.</p> <p>An error is thrown in the following situations.</p> <ul> <li> <p>You don't provide a guardrail identifier but you specify the <code>amazon-bedrock-guardrailConfig</code> field in the request body.</p> </li> <li> <p>You enable the guardrail but the <code>contentType</code> isn't <code>application/json</code>.</p> </li> <li> <p>You provide a guardrail identifier, but <code>guardrailVersion</code> isn't specified.</p> </li> </ul>
|
|
3905
4041
|
* @public
|
|
3906
4042
|
*/
|
|
3907
4043
|
guardrailIdentifier?: string | undefined;
|