@aws-sdk/client-bedrock-agent-runtime 3.701.0 → 3.703.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/README.md +16 -0
- package/dist-cjs/index.js +530 -3
- package/dist-es/BedrockAgentRuntime.js +4 -0
- package/dist-es/commands/RerankCommand.js +23 -0
- package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +27 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +180 -0
- package/dist-es/pagination/RerankPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +231 -0
- package/dist-types/BedrockAgentRuntime.d.ts +14 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +45 -2
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +45 -2
- package/dist-types/commands/RerankCommand.d.ts +143 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +42 -2
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +371 -0
- package/dist-types/commands/RetrieveCommand.d.ts +46 -1
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +1038 -166
- package/dist-types/pagination/RerankPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +34 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/RerankCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +455 -0
- package/dist-types/ts3.4/pagination/RerankPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +1 -1
|
@@ -1357,6 +1357,57 @@ export interface FilterAttribute {
|
|
|
1357
1357
|
*/
|
|
1358
1358
|
value: __DocumentType | undefined;
|
|
1359
1359
|
}
|
|
1360
|
+
/**
|
|
1361
|
+
* @public
|
|
1362
|
+
* @enum
|
|
1363
|
+
*/
|
|
1364
|
+
export declare const AttributeType: {
|
|
1365
|
+
readonly BOOLEAN: "BOOLEAN";
|
|
1366
|
+
readonly NUMBER: "NUMBER";
|
|
1367
|
+
readonly STRING: "STRING";
|
|
1368
|
+
readonly STRING_LIST: "STRING_LIST";
|
|
1369
|
+
};
|
|
1370
|
+
/**
|
|
1371
|
+
* @public
|
|
1372
|
+
*/
|
|
1373
|
+
export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
|
|
1374
|
+
/**
|
|
1375
|
+
* <p>Details about a metadata attribute.</p>
|
|
1376
|
+
* @public
|
|
1377
|
+
*/
|
|
1378
|
+
export interface MetadataAttributeSchema {
|
|
1379
|
+
/**
|
|
1380
|
+
* <p>The attribute's key.</p>
|
|
1381
|
+
* @public
|
|
1382
|
+
*/
|
|
1383
|
+
key: string | undefined;
|
|
1384
|
+
/**
|
|
1385
|
+
* <p>The attribute's type.</p>
|
|
1386
|
+
* @public
|
|
1387
|
+
*/
|
|
1388
|
+
type: AttributeType | undefined;
|
|
1389
|
+
/**
|
|
1390
|
+
* <p>The attribute's description.</p>
|
|
1391
|
+
* @public
|
|
1392
|
+
*/
|
|
1393
|
+
description: string | undefined;
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* <p>Settings for implicit filtering, where a model generates a metadata filter based on the prompt.</p>
|
|
1397
|
+
* @public
|
|
1398
|
+
*/
|
|
1399
|
+
export interface ImplicitFilterConfiguration {
|
|
1400
|
+
/**
|
|
1401
|
+
* <p>Metadata that can be used in a filter.</p>
|
|
1402
|
+
* @public
|
|
1403
|
+
*/
|
|
1404
|
+
metadataAttributes: MetadataAttributeSchema[] | undefined;
|
|
1405
|
+
/**
|
|
1406
|
+
* <p>The model that generates the filter.</p>
|
|
1407
|
+
* @public
|
|
1408
|
+
*/
|
|
1409
|
+
modelArn: string | undefined;
|
|
1410
|
+
}
|
|
1360
1411
|
/**
|
|
1361
1412
|
* @public
|
|
1362
1413
|
* @enum
|
|
@@ -1369,6 +1420,151 @@ export declare const SearchType: {
|
|
|
1369
1420
|
* @public
|
|
1370
1421
|
*/
|
|
1371
1422
|
export type SearchType = (typeof SearchType)[keyof typeof SearchType];
|
|
1423
|
+
/**
|
|
1424
|
+
* @public
|
|
1425
|
+
* @enum
|
|
1426
|
+
*/
|
|
1427
|
+
export declare const RerankingMetadataSelectionMode: {
|
|
1428
|
+
readonly ALL: "ALL";
|
|
1429
|
+
readonly SELECTIVE: "SELECTIVE";
|
|
1430
|
+
};
|
|
1431
|
+
/**
|
|
1432
|
+
* @public
|
|
1433
|
+
*/
|
|
1434
|
+
export type RerankingMetadataSelectionMode = (typeof RerankingMetadataSelectionMode)[keyof typeof RerankingMetadataSelectionMode];
|
|
1435
|
+
/**
|
|
1436
|
+
* <p>Contains information for a metadata field to include in or exclude from consideration when reranking.</p>
|
|
1437
|
+
* @public
|
|
1438
|
+
*/
|
|
1439
|
+
export interface FieldForReranking {
|
|
1440
|
+
/**
|
|
1441
|
+
* <p>The name of a metadata field to include in or exclude from consideration when reranking.</p>
|
|
1442
|
+
* @public
|
|
1443
|
+
*/
|
|
1444
|
+
fieldName: string | undefined;
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* <p>Contains configurations for the metadata fields to include or exclude when considering reranking. If you include the <code>fieldsToExclude</code> field, the reranker ignores all the metadata fields that you specify. If you include the <code>fieldsToInclude</code> field, the reranker uses only the metadata fields that you specify and ignores all others. You can include only one of these fields.</p>
|
|
1448
|
+
* @public
|
|
1449
|
+
*/
|
|
1450
|
+
export type RerankingMetadataSelectiveModeConfiguration = RerankingMetadataSelectiveModeConfiguration.FieldsToExcludeMember | RerankingMetadataSelectiveModeConfiguration.FieldsToIncludeMember | RerankingMetadataSelectiveModeConfiguration.$UnknownMember;
|
|
1451
|
+
/**
|
|
1452
|
+
* @public
|
|
1453
|
+
*/
|
|
1454
|
+
export declare namespace RerankingMetadataSelectiveModeConfiguration {
|
|
1455
|
+
/**
|
|
1456
|
+
* <p>An array of objects, each of which specifies a metadata field to include in consideration when reranking. The remaining metadata fields are ignored.</p>
|
|
1457
|
+
* @public
|
|
1458
|
+
*/
|
|
1459
|
+
interface FieldsToIncludeMember {
|
|
1460
|
+
fieldsToInclude: FieldForReranking[];
|
|
1461
|
+
fieldsToExclude?: never;
|
|
1462
|
+
$unknown?: never;
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* <p>An array of objects, each of which specifies a metadata field to exclude from consideration when reranking.</p>
|
|
1466
|
+
* @public
|
|
1467
|
+
*/
|
|
1468
|
+
interface FieldsToExcludeMember {
|
|
1469
|
+
fieldsToInclude?: never;
|
|
1470
|
+
fieldsToExclude: FieldForReranking[];
|
|
1471
|
+
$unknown?: never;
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* @public
|
|
1475
|
+
*/
|
|
1476
|
+
interface $UnknownMember {
|
|
1477
|
+
fieldsToInclude?: never;
|
|
1478
|
+
fieldsToExclude?: never;
|
|
1479
|
+
$unknown: [string, any];
|
|
1480
|
+
}
|
|
1481
|
+
interface Visitor<T> {
|
|
1482
|
+
fieldsToInclude: (value: FieldForReranking[]) => T;
|
|
1483
|
+
fieldsToExclude: (value: FieldForReranking[]) => T;
|
|
1484
|
+
_: (name: string, value: any) => T;
|
|
1485
|
+
}
|
|
1486
|
+
const visit: <T>(value: RerankingMetadataSelectiveModeConfiguration, visitor: Visitor<T>) => T;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* <p>Contains configurations for the metadata to use in reranking.</p>
|
|
1490
|
+
* @public
|
|
1491
|
+
*/
|
|
1492
|
+
export interface MetadataConfigurationForReranking {
|
|
1493
|
+
/**
|
|
1494
|
+
* <p>Specifies whether to consider all metadata when reranking, or only the metadata that you select. If you specify <code>SELECTIVE</code>, include the <code>selectiveModeConfiguration</code> field.</p>
|
|
1495
|
+
* @public
|
|
1496
|
+
*/
|
|
1497
|
+
selectionMode: RerankingMetadataSelectionMode | undefined;
|
|
1498
|
+
/**
|
|
1499
|
+
* <p>Contains configurations for the metadata fields to include or exclude when considering reranking.</p>
|
|
1500
|
+
* @public
|
|
1501
|
+
*/
|
|
1502
|
+
selectiveModeConfiguration?: RerankingMetadataSelectiveModeConfiguration | undefined;
|
|
1503
|
+
}
|
|
1504
|
+
/**
|
|
1505
|
+
* <p>Contains configurations for an Amazon Bedrock reranker model.</p>
|
|
1506
|
+
* @public
|
|
1507
|
+
*/
|
|
1508
|
+
export interface VectorSearchBedrockRerankingModelConfiguration {
|
|
1509
|
+
/**
|
|
1510
|
+
* <p>The ARN of the reranker model to use.</p>
|
|
1511
|
+
* @public
|
|
1512
|
+
*/
|
|
1513
|
+
modelArn: string | undefined;
|
|
1514
|
+
/**
|
|
1515
|
+
* <p>A JSON object whose keys are request fields for the model and whose values are values for those fields.</p>
|
|
1516
|
+
* @public
|
|
1517
|
+
*/
|
|
1518
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* <p>Contains configurations for reranking with an Amazon Bedrock reranker model.</p>
|
|
1522
|
+
* @public
|
|
1523
|
+
*/
|
|
1524
|
+
export interface VectorSearchBedrockRerankingConfiguration {
|
|
1525
|
+
/**
|
|
1526
|
+
* <p>Contains configurations for the reranker model.</p>
|
|
1527
|
+
* @public
|
|
1528
|
+
*/
|
|
1529
|
+
modelConfiguration: VectorSearchBedrockRerankingModelConfiguration | undefined;
|
|
1530
|
+
/**
|
|
1531
|
+
* <p>The number of results to return after reranking.</p>
|
|
1532
|
+
* @public
|
|
1533
|
+
*/
|
|
1534
|
+
numberOfRerankedResults?: number | undefined;
|
|
1535
|
+
/**
|
|
1536
|
+
* <p>Contains configurations for the metadata to use in reranking.</p>
|
|
1537
|
+
* @public
|
|
1538
|
+
*/
|
|
1539
|
+
metadataConfiguration?: MetadataConfigurationForReranking | undefined;
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* @public
|
|
1543
|
+
* @enum
|
|
1544
|
+
*/
|
|
1545
|
+
export declare const VectorSearchRerankingConfigurationType: {
|
|
1546
|
+
readonly BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL";
|
|
1547
|
+
};
|
|
1548
|
+
/**
|
|
1549
|
+
* @public
|
|
1550
|
+
*/
|
|
1551
|
+
export type VectorSearchRerankingConfigurationType = (typeof VectorSearchRerankingConfigurationType)[keyof typeof VectorSearchRerankingConfigurationType];
|
|
1552
|
+
/**
|
|
1553
|
+
* <p>Contains configurations for reranking the retrieved results.</p>
|
|
1554
|
+
* @public
|
|
1555
|
+
*/
|
|
1556
|
+
export interface VectorSearchRerankingConfiguration {
|
|
1557
|
+
/**
|
|
1558
|
+
* <p>The type of reranker model.</p>
|
|
1559
|
+
* @public
|
|
1560
|
+
*/
|
|
1561
|
+
type: VectorSearchRerankingConfigurationType | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* <p>Contains configurations for an Amazon Bedrock reranker model.</p>
|
|
1564
|
+
* @public
|
|
1565
|
+
*/
|
|
1566
|
+
bedrockRerankingConfiguration?: VectorSearchBedrockRerankingConfiguration | undefined;
|
|
1567
|
+
}
|
|
1372
1568
|
/**
|
|
1373
1569
|
* @public
|
|
1374
1570
|
* @enum
|
|
@@ -1682,6 +1878,17 @@ export interface RetrievalResultConfluenceLocation {
|
|
|
1682
1878
|
*/
|
|
1683
1879
|
url?: string | undefined;
|
|
1684
1880
|
}
|
|
1881
|
+
/**
|
|
1882
|
+
* <p>Contains information about the location of a document in a custom data source.</p>
|
|
1883
|
+
* @public
|
|
1884
|
+
*/
|
|
1885
|
+
export interface RetrievalResultCustomDocumentLocation {
|
|
1886
|
+
/**
|
|
1887
|
+
* <p>The ID of the document.</p>
|
|
1888
|
+
* @public
|
|
1889
|
+
*/
|
|
1890
|
+
id?: string | undefined;
|
|
1891
|
+
}
|
|
1685
1892
|
/**
|
|
1686
1893
|
* <p>The S3 data source location.</p>
|
|
1687
1894
|
* <p>This data type is used in the following API operations:</p>
|
|
@@ -1736,6 +1943,7 @@ export interface RetrievalResultSharePointLocation {
|
|
|
1736
1943
|
*/
|
|
1737
1944
|
export declare const RetrievalResultLocationType: {
|
|
1738
1945
|
readonly CONFLUENCE: "CONFLUENCE";
|
|
1946
|
+
readonly CUSTOM: "CUSTOM";
|
|
1739
1947
|
readonly S3: "S3";
|
|
1740
1948
|
readonly SALESFORCE: "SALESFORCE";
|
|
1741
1949
|
readonly SHAREPOINT: "SHAREPOINT";
|
|
@@ -1806,6 +2014,11 @@ export interface RetrievalResultLocation {
|
|
|
1806
2014
|
* @public
|
|
1807
2015
|
*/
|
|
1808
2016
|
sharePointLocation?: RetrievalResultSharePointLocation | undefined;
|
|
2017
|
+
/**
|
|
2018
|
+
* <p>Specifies the location of a document in a custom data source.</p>
|
|
2019
|
+
* @public
|
|
2020
|
+
*/
|
|
2021
|
+
customDocumentLocation?: RetrievalResultCustomDocumentLocation | undefined;
|
|
1809
2022
|
}
|
|
1810
2023
|
/**
|
|
1811
2024
|
* <p>Contains metadata about a source cited for the generated response.</p>
|
|
@@ -2163,7 +2376,7 @@ export interface ReturnControlPayload {
|
|
|
2163
2376
|
}
|
|
2164
2377
|
/**
|
|
2165
2378
|
* <p>
|
|
2166
|
-
* The event in the custom orchestration sequence.
|
|
2379
|
+
* The event in the custom orchestration sequence. Events are the responses which the custom orchestration Lambda function sends as response to the agent.
|
|
2167
2380
|
* </p>
|
|
2168
2381
|
* @public
|
|
2169
2382
|
*/
|
|
@@ -2192,7 +2405,7 @@ export interface CustomOrchestrationTrace {
|
|
|
2192
2405
|
traceId?: string | undefined;
|
|
2193
2406
|
/**
|
|
2194
2407
|
* <p>
|
|
2195
|
-
* The
|
|
2408
|
+
* The event details used with the custom orchestration.
|
|
2196
2409
|
* </p>
|
|
2197
2410
|
* @public
|
|
2198
2411
|
*/
|
|
@@ -4773,148 +4986,366 @@ export interface OptimizePromptResponse {
|
|
|
4773
4986
|
optimizedPrompt: AsyncIterable<OptimizedPromptStream> | undefined;
|
|
4774
4987
|
}
|
|
4775
4988
|
/**
|
|
4776
|
-
* <p>Contains
|
|
4777
|
-
* <p>This data type is used in the following API operations:</p>
|
|
4778
|
-
* <ul>
|
|
4779
|
-
* <li>
|
|
4780
|
-
* <p>
|
|
4781
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>input</code> field</p>
|
|
4782
|
-
* </li>
|
|
4783
|
-
* </ul>
|
|
4989
|
+
* <p>Contains information about a text document to rerank.</p>
|
|
4784
4990
|
* @public
|
|
4785
4991
|
*/
|
|
4786
|
-
export interface
|
|
4992
|
+
export interface RerankTextDocument {
|
|
4787
4993
|
/**
|
|
4788
|
-
* <p>The
|
|
4994
|
+
* <p>The text of the document.</p>
|
|
4789
4995
|
* @public
|
|
4790
4996
|
*/
|
|
4791
|
-
text
|
|
4997
|
+
text?: string | undefined;
|
|
4792
4998
|
}
|
|
4793
4999
|
/**
|
|
4794
|
-
*
|
|
5000
|
+
* @public
|
|
5001
|
+
* @enum
|
|
5002
|
+
*/
|
|
5003
|
+
export declare const RerankQueryContentType: {
|
|
5004
|
+
readonly TEXT: "TEXT";
|
|
5005
|
+
};
|
|
5006
|
+
/**
|
|
4795
5007
|
* @public
|
|
4796
5008
|
*/
|
|
4797
|
-
export
|
|
5009
|
+
export type RerankQueryContentType = (typeof RerankQueryContentType)[keyof typeof RerankQueryContentType];
|
|
5010
|
+
/**
|
|
5011
|
+
* <p>Contains information about a query to submit to the reranker model.</p>
|
|
5012
|
+
* @public
|
|
5013
|
+
*/
|
|
5014
|
+
export interface RerankQuery {
|
|
4798
5015
|
/**
|
|
4799
|
-
* <p>The
|
|
5016
|
+
* <p>The type of the query.</p>
|
|
4800
5017
|
* @public
|
|
4801
5018
|
*/
|
|
4802
|
-
|
|
5019
|
+
type: RerankQueryContentType | undefined;
|
|
4803
5020
|
/**
|
|
4804
|
-
* <p>
|
|
5021
|
+
* <p>Contains information about a text query.</p>
|
|
4805
5022
|
* @public
|
|
4806
5023
|
*/
|
|
4807
|
-
|
|
5024
|
+
textQuery: RerankTextDocument | undefined;
|
|
4808
5025
|
}
|
|
4809
5026
|
/**
|
|
4810
|
-
* <p>
|
|
4811
|
-
* RetrieveAndGenerate operation. Includes parameters like temperature, top-p, maximum token
|
|
4812
|
-
* count, and stop sequences. </p>
|
|
4813
|
-
* <note>
|
|
4814
|
-
* <p>The valid range of <code>maxTokens</code> depends on the accepted values for your chosen
|
|
4815
|
-
* model's inference parameters. To see the inference parameters for your model, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference
|
|
4816
|
-
* parameters for foundation models.</a>
|
|
4817
|
-
* </p>
|
|
4818
|
-
* </note>
|
|
5027
|
+
* <p>Contains configurations for a reranker model.</p>
|
|
4819
5028
|
* @public
|
|
4820
5029
|
*/
|
|
4821
|
-
export interface
|
|
5030
|
+
export interface BedrockRerankingModelConfiguration {
|
|
4822
5031
|
/**
|
|
4823
|
-
* <p>
|
|
5032
|
+
* <p>The ARN of the reranker model.</p>
|
|
4824
5033
|
* @public
|
|
4825
5034
|
*/
|
|
4826
|
-
|
|
5035
|
+
modelArn: string | undefined;
|
|
4827
5036
|
/**
|
|
4828
|
-
* <p>
|
|
5037
|
+
* <p>A JSON object whose keys are request fields for the model and whose values are values for those fields.</p>
|
|
4829
5038
|
* @public
|
|
4830
5039
|
*/
|
|
4831
|
-
|
|
5040
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
5041
|
+
}
|
|
5042
|
+
/**
|
|
5043
|
+
* <p>Contains configurations for an Amazon Bedrock reranker model.</p>
|
|
5044
|
+
* @public
|
|
5045
|
+
*/
|
|
5046
|
+
export interface BedrockRerankingConfiguration {
|
|
4832
5047
|
/**
|
|
4833
|
-
* <p>The
|
|
4834
|
-
* or the maximum of 65536. The limit values described here are arbitary values, for actual
|
|
4835
|
-
* values consult the limits defined by your specific model.</p>
|
|
5048
|
+
* <p>The number of results to return after reranking.</p>
|
|
4836
5049
|
* @public
|
|
4837
5050
|
*/
|
|
4838
|
-
|
|
5051
|
+
numberOfResults?: number | undefined;
|
|
4839
5052
|
/**
|
|
4840
|
-
* <p>
|
|
4841
|
-
* generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The
|
|
4842
|
-
* limit values described here are arbitary values, for actual values consult the limits defined
|
|
4843
|
-
* by your specific model.</p>
|
|
5053
|
+
* <p>Contains configurations for a reranker model.</p>
|
|
4844
5054
|
* @public
|
|
4845
5055
|
*/
|
|
4846
|
-
|
|
5056
|
+
modelConfiguration: BedrockRerankingModelConfiguration | undefined;
|
|
4847
5057
|
}
|
|
4848
5058
|
/**
|
|
4849
|
-
* <p> The configuration for inference settings when generating responses using RetrieveAndGenerate. </p>
|
|
4850
5059
|
* @public
|
|
5060
|
+
* @enum
|
|
4851
5061
|
*/
|
|
4852
|
-
export
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
* @public
|
|
4856
|
-
*/
|
|
4857
|
-
textInferenceConfig?: TextInferenceConfig | undefined;
|
|
4858
|
-
}
|
|
5062
|
+
export declare const RerankingConfigurationType: {
|
|
5063
|
+
readonly BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL";
|
|
5064
|
+
};
|
|
4859
5065
|
/**
|
|
4860
|
-
* <p>Contains the template for the prompt that's sent to the model for response generation. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt">Knowledge base prompt templates</a>.</p>
|
|
4861
|
-
* <p>This data type is used in the following API operations:</p>
|
|
4862
|
-
* <ul>
|
|
4863
|
-
* <li>
|
|
4864
|
-
* <p>
|
|
4865
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>filter</code> field</p>
|
|
4866
|
-
* </li>
|
|
4867
|
-
* </ul>
|
|
4868
5066
|
* @public
|
|
4869
5067
|
*/
|
|
4870
|
-
export
|
|
5068
|
+
export type RerankingConfigurationType = (typeof RerankingConfigurationType)[keyof typeof RerankingConfigurationType];
|
|
5069
|
+
/**
|
|
5070
|
+
* <p>Contains configurations for reranking.</p>
|
|
5071
|
+
* @public
|
|
5072
|
+
*/
|
|
5073
|
+
export interface RerankingConfiguration {
|
|
4871
5074
|
/**
|
|
4872
|
-
* <p>The
|
|
4873
|
-
* <p>For more information, see the following resources:</p>
|
|
4874
|
-
* <ul>
|
|
4875
|
-
* <li>
|
|
4876
|
-
* <p>
|
|
4877
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt">Knowledge base prompt templates</a>
|
|
4878
|
-
* </p>
|
|
4879
|
-
* </li>
|
|
4880
|
-
* <li>
|
|
4881
|
-
* <p>
|
|
4882
|
-
* <a href="https://docs.anthropic.com/claude/docs/use-xml-tags">Use XML tags with Anthropic Claude models</a>
|
|
4883
|
-
* </p>
|
|
4884
|
-
* </li>
|
|
4885
|
-
* </ul>
|
|
5075
|
+
* <p>The type of reranker that the configurations apply to.</p>
|
|
4886
5076
|
* @public
|
|
4887
5077
|
*/
|
|
4888
|
-
|
|
5078
|
+
type: RerankingConfigurationType | undefined;
|
|
5079
|
+
/**
|
|
5080
|
+
* <p>Contains configurations for an Amazon Bedrock reranker.</p>
|
|
5081
|
+
* @public
|
|
5082
|
+
*/
|
|
5083
|
+
bedrockRerankingConfiguration: BedrockRerankingConfiguration | undefined;
|
|
4889
5084
|
}
|
|
4890
5085
|
/**
|
|
4891
|
-
* <p>Contains the generation configuration of the external source wrapper object.</p>
|
|
4892
5086
|
* @public
|
|
5087
|
+
* @enum
|
|
4893
5088
|
*/
|
|
4894
|
-
export
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
5089
|
+
export declare const RerankDocumentType: {
|
|
5090
|
+
readonly JSON: "JSON";
|
|
5091
|
+
readonly TEXT: "TEXT";
|
|
5092
|
+
};
|
|
5093
|
+
/**
|
|
5094
|
+
* @public
|
|
5095
|
+
*/
|
|
5096
|
+
export type RerankDocumentType = (typeof RerankDocumentType)[keyof typeof RerankDocumentType];
|
|
5097
|
+
/**
|
|
5098
|
+
* <p>Contains information about a document to rerank. Choose the <code>type</code> to define and include the field that corresponds to the type.</p>
|
|
5099
|
+
* @public
|
|
5100
|
+
*/
|
|
5101
|
+
export interface RerankDocument {
|
|
4900
5102
|
/**
|
|
4901
|
-
* <p>The
|
|
5103
|
+
* <p>The type of document to rerank.</p>
|
|
4902
5104
|
* @public
|
|
4903
5105
|
*/
|
|
4904
|
-
|
|
5106
|
+
type: RerankDocumentType | undefined;
|
|
4905
5107
|
/**
|
|
4906
|
-
* <p>
|
|
5108
|
+
* <p>Contains information about a text document to rerank.</p>
|
|
4907
5109
|
* @public
|
|
4908
5110
|
*/
|
|
4909
|
-
|
|
5111
|
+
textDocument?: RerankTextDocument | undefined;
|
|
4910
5112
|
/**
|
|
4911
|
-
* <p>
|
|
5113
|
+
* <p>Contains a JSON document to rerank.</p>
|
|
4912
5114
|
* @public
|
|
4913
5115
|
*/
|
|
4914
|
-
|
|
5116
|
+
jsonDocument?: __DocumentType | undefined;
|
|
4915
5117
|
}
|
|
4916
5118
|
/**
|
|
4917
|
-
*
|
|
5119
|
+
* @public
|
|
5120
|
+
* @enum
|
|
5121
|
+
*/
|
|
5122
|
+
export declare const RerankSourceType: {
|
|
5123
|
+
readonly INLINE: "INLINE";
|
|
5124
|
+
};
|
|
5125
|
+
/**
|
|
5126
|
+
* @public
|
|
5127
|
+
*/
|
|
5128
|
+
export type RerankSourceType = (typeof RerankSourceType)[keyof typeof RerankSourceType];
|
|
5129
|
+
/**
|
|
5130
|
+
* <p>Contains information about a source for reranking.</p>
|
|
5131
|
+
* @public
|
|
5132
|
+
*/
|
|
5133
|
+
export interface RerankSource {
|
|
5134
|
+
/**
|
|
5135
|
+
* <p>The type of the source.</p>
|
|
5136
|
+
* @public
|
|
5137
|
+
*/
|
|
5138
|
+
type: RerankSourceType | undefined;
|
|
5139
|
+
/**
|
|
5140
|
+
* <p>Contains an inline definition of a source for reranking.</p>
|
|
5141
|
+
* @public
|
|
5142
|
+
*/
|
|
5143
|
+
inlineDocumentSource: RerankDocument | undefined;
|
|
5144
|
+
}
|
|
5145
|
+
/**
|
|
5146
|
+
* @public
|
|
5147
|
+
*/
|
|
5148
|
+
export interface RerankRequest {
|
|
5149
|
+
/**
|
|
5150
|
+
* <p>An array of objects, each of which contains information about a query to submit to the reranker model.</p>
|
|
5151
|
+
* @public
|
|
5152
|
+
*/
|
|
5153
|
+
queries: RerankQuery[] | undefined;
|
|
5154
|
+
/**
|
|
5155
|
+
* <p>An array of objects, each of which contains information about the sources to rerank.</p>
|
|
5156
|
+
* @public
|
|
5157
|
+
*/
|
|
5158
|
+
sources: RerankSource[] | undefined;
|
|
5159
|
+
/**
|
|
5160
|
+
* <p>Contains configurations for reranking.</p>
|
|
5161
|
+
* @public
|
|
5162
|
+
*/
|
|
5163
|
+
rerankingConfiguration: RerankingConfiguration | undefined;
|
|
5164
|
+
/**
|
|
5165
|
+
* <p>If the total number of results was greater than could fit in a response, a token is returned in the <code>nextToken</code> field. You can enter that token in this field to return the next batch of results.</p>
|
|
5166
|
+
* @public
|
|
5167
|
+
*/
|
|
5168
|
+
nextToken?: string | undefined;
|
|
5169
|
+
}
|
|
5170
|
+
/**
|
|
5171
|
+
* <p>Contains information about a document that was reranked.</p>
|
|
5172
|
+
* @public
|
|
5173
|
+
*/
|
|
5174
|
+
export interface RerankResult {
|
|
5175
|
+
/**
|
|
5176
|
+
* <p>The ranking of the document. The lower a number, the higher the document is ranked.</p>
|
|
5177
|
+
* @public
|
|
5178
|
+
*/
|
|
5179
|
+
index: number | undefined;
|
|
5180
|
+
/**
|
|
5181
|
+
* <p>The relevance score of the document.</p>
|
|
5182
|
+
* @public
|
|
5183
|
+
*/
|
|
5184
|
+
relevanceScore: number | undefined;
|
|
5185
|
+
/**
|
|
5186
|
+
* <p>Contains information about the document.</p>
|
|
5187
|
+
* @public
|
|
5188
|
+
*/
|
|
5189
|
+
document?: RerankDocument | undefined;
|
|
5190
|
+
}
|
|
5191
|
+
/**
|
|
5192
|
+
* @public
|
|
5193
|
+
*/
|
|
5194
|
+
export interface RerankResponse {
|
|
5195
|
+
/**
|
|
5196
|
+
* <p>An array of objects, each of which contains information about the results of reranking.</p>
|
|
5197
|
+
* @public
|
|
5198
|
+
*/
|
|
5199
|
+
results: RerankResult[] | undefined;
|
|
5200
|
+
/**
|
|
5201
|
+
* <p>If the total number of results is greater than can fit in the response, use this token in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
|
|
5202
|
+
* @public
|
|
5203
|
+
*/
|
|
5204
|
+
nextToken?: string | undefined;
|
|
5205
|
+
}
|
|
5206
|
+
/**
|
|
5207
|
+
* <p>Contains the query made to the knowledge base.</p>
|
|
5208
|
+
* <p>This data type is used in the following API operations:</p>
|
|
5209
|
+
* <ul>
|
|
5210
|
+
* <li>
|
|
5211
|
+
* <p>
|
|
5212
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>input</code> field</p>
|
|
5213
|
+
* </li>
|
|
5214
|
+
* </ul>
|
|
5215
|
+
* @public
|
|
5216
|
+
*/
|
|
5217
|
+
export interface RetrieveAndGenerateInput {
|
|
5218
|
+
/**
|
|
5219
|
+
* <p>The query made to the knowledge base.</p>
|
|
5220
|
+
* @public
|
|
5221
|
+
*/
|
|
5222
|
+
text: string | undefined;
|
|
5223
|
+
}
|
|
5224
|
+
/**
|
|
5225
|
+
* <p>The configuration details for the guardrail.</p>
|
|
5226
|
+
* @public
|
|
5227
|
+
*/
|
|
5228
|
+
export interface GuardrailConfiguration {
|
|
5229
|
+
/**
|
|
5230
|
+
* <p>The unique identifier for the guardrail.</p>
|
|
5231
|
+
* @public
|
|
5232
|
+
*/
|
|
5233
|
+
guardrailId: string | undefined;
|
|
5234
|
+
/**
|
|
5235
|
+
* <p>The version of the guardrail.</p>
|
|
5236
|
+
* @public
|
|
5237
|
+
*/
|
|
5238
|
+
guardrailVersion: string | undefined;
|
|
5239
|
+
}
|
|
5240
|
+
/**
|
|
5241
|
+
* <p>Configuration settings for text generation using a language model via the
|
|
5242
|
+
* RetrieveAndGenerate operation. Includes parameters like temperature, top-p, maximum token
|
|
5243
|
+
* count, and stop sequences. </p>
|
|
5244
|
+
* <note>
|
|
5245
|
+
* <p>The valid range of <code>maxTokens</code> depends on the accepted values for your chosen
|
|
5246
|
+
* model's inference parameters. To see the inference parameters for your model, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference
|
|
5247
|
+
* parameters for foundation models.</a>
|
|
5248
|
+
* </p>
|
|
5249
|
+
* </note>
|
|
5250
|
+
* @public
|
|
5251
|
+
*/
|
|
5252
|
+
export interface TextInferenceConfig {
|
|
5253
|
+
/**
|
|
5254
|
+
* <p> Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable. </p>
|
|
5255
|
+
* @public
|
|
5256
|
+
*/
|
|
5257
|
+
temperature?: number | undefined;
|
|
5258
|
+
/**
|
|
5259
|
+
* <p> A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token. </p>
|
|
5260
|
+
* @public
|
|
5261
|
+
*/
|
|
5262
|
+
topP?: number | undefined;
|
|
5263
|
+
/**
|
|
5264
|
+
* <p>The maximum number of tokens to generate in the output text. Do not use the minimum of 0
|
|
5265
|
+
* or the maximum of 65536. The limit values described here are arbitary values, for actual
|
|
5266
|
+
* values consult the limits defined by your specific model.</p>
|
|
5267
|
+
* @public
|
|
5268
|
+
*/
|
|
5269
|
+
maxTokens?: number | undefined;
|
|
5270
|
+
/**
|
|
5271
|
+
* <p>A list of sequences of characters that, if generated, will cause the model to stop
|
|
5272
|
+
* generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The
|
|
5273
|
+
* limit values described here are arbitary values, for actual values consult the limits defined
|
|
5274
|
+
* by your specific model.</p>
|
|
5275
|
+
* @public
|
|
5276
|
+
*/
|
|
5277
|
+
stopSequences?: string[] | undefined;
|
|
5278
|
+
}
|
|
5279
|
+
/**
|
|
5280
|
+
* <p> The configuration for inference settings when generating responses using RetrieveAndGenerate. </p>
|
|
5281
|
+
* @public
|
|
5282
|
+
*/
|
|
5283
|
+
export interface InferenceConfig {
|
|
5284
|
+
/**
|
|
5285
|
+
* <p> Configuration settings specific to text generation while generating responses using RetrieveAndGenerate. </p>
|
|
5286
|
+
* @public
|
|
5287
|
+
*/
|
|
5288
|
+
textInferenceConfig?: TextInferenceConfig | undefined;
|
|
5289
|
+
}
|
|
5290
|
+
/**
|
|
5291
|
+
* <p>Contains the template for the prompt that's sent to the model for response generation. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt">Knowledge base prompt templates</a>.</p>
|
|
5292
|
+
* <p>This data type is used in the following API operations:</p>
|
|
5293
|
+
* <ul>
|
|
5294
|
+
* <li>
|
|
5295
|
+
* <p>
|
|
5296
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>filter</code> field</p>
|
|
5297
|
+
* </li>
|
|
5298
|
+
* </ul>
|
|
5299
|
+
* @public
|
|
5300
|
+
*/
|
|
5301
|
+
export interface PromptTemplate {
|
|
5302
|
+
/**
|
|
5303
|
+
* <p>The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.</p>
|
|
5304
|
+
* <p>For more information, see the following resources:</p>
|
|
5305
|
+
* <ul>
|
|
5306
|
+
* <li>
|
|
5307
|
+
* <p>
|
|
5308
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt">Knowledge base prompt templates</a>
|
|
5309
|
+
* </p>
|
|
5310
|
+
* </li>
|
|
5311
|
+
* <li>
|
|
5312
|
+
* <p>
|
|
5313
|
+
* <a href="https://docs.anthropic.com/claude/docs/use-xml-tags">Use XML tags with Anthropic Claude models</a>
|
|
5314
|
+
* </p>
|
|
5315
|
+
* </li>
|
|
5316
|
+
* </ul>
|
|
5317
|
+
* @public
|
|
5318
|
+
*/
|
|
5319
|
+
textPromptTemplate?: string | undefined;
|
|
5320
|
+
}
|
|
5321
|
+
/**
|
|
5322
|
+
* <p>Contains the generation configuration of the external source wrapper object.</p>
|
|
5323
|
+
* @public
|
|
5324
|
+
*/
|
|
5325
|
+
export interface ExternalSourcesGenerationConfiguration {
|
|
5326
|
+
/**
|
|
5327
|
+
* <p>Contain the textPromptTemplate string for the external source wrapper object.</p>
|
|
5328
|
+
* @public
|
|
5329
|
+
*/
|
|
5330
|
+
promptTemplate?: PromptTemplate | undefined;
|
|
5331
|
+
/**
|
|
5332
|
+
* <p>The configuration details for the guardrail.</p>
|
|
5333
|
+
* @public
|
|
5334
|
+
*/
|
|
5335
|
+
guardrailConfiguration?: GuardrailConfiguration | undefined;
|
|
5336
|
+
/**
|
|
5337
|
+
* <p> Configuration settings for inference when using RetrieveAndGenerate to generate responses while using an external source.</p>
|
|
5338
|
+
* @public
|
|
5339
|
+
*/
|
|
5340
|
+
inferenceConfig?: InferenceConfig | undefined;
|
|
5341
|
+
/**
|
|
5342
|
+
* <p> Additional model parameters and their corresponding values not included in the textInferenceConfig structure for an external source. Takes in custom model parameters specific to the language model being used. </p>
|
|
5343
|
+
* @public
|
|
5344
|
+
*/
|
|
5345
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
5346
|
+
}
|
|
5347
|
+
/**
|
|
5348
|
+
* <p>This property contains the document to chat with, along with its attributes.</p>
|
|
4918
5349
|
* @public
|
|
4919
5350
|
*/
|
|
4920
5351
|
export interface ByteContentDoc {
|
|
@@ -5062,111 +5493,435 @@ export interface QueryTransformationConfiguration {
|
|
|
5062
5493
|
*/
|
|
5063
5494
|
export interface OrchestrationConfiguration {
|
|
5064
5495
|
/**
|
|
5065
|
-
* <p>Contains the template for the prompt that's sent to the model. Orchestration prompts must include the <code>$conversation_history$</code> and <code>$output_format_instructions$</code> variables. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Use placeholder variables</a> in the user guide.</p>
|
|
5496
|
+
* <p>Contains the template for the prompt that's sent to the model. Orchestration prompts must include the <code>$conversation_history$</code> and <code>$output_format_instructions$</code> variables. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Use placeholder variables</a> in the user guide.</p>
|
|
5497
|
+
* @public
|
|
5498
|
+
*/
|
|
5499
|
+
promptTemplate?: PromptTemplate | undefined;
|
|
5500
|
+
/**
|
|
5501
|
+
* <p> Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source. </p>
|
|
5502
|
+
* @public
|
|
5503
|
+
*/
|
|
5504
|
+
inferenceConfig?: InferenceConfig | undefined;
|
|
5505
|
+
/**
|
|
5506
|
+
* <p> Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used. </p>
|
|
5507
|
+
* @public
|
|
5508
|
+
*/
|
|
5509
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
5510
|
+
/**
|
|
5511
|
+
* <p>To split up the prompt and retrieve multiple sources, set the transformation type to
|
|
5512
|
+
* <code>QUERY_DECOMPOSITION</code>.</p>
|
|
5513
|
+
* @public
|
|
5514
|
+
*/
|
|
5515
|
+
queryTransformationConfiguration?: QueryTransformationConfiguration | undefined;
|
|
5516
|
+
}
|
|
5517
|
+
/**
|
|
5518
|
+
* @public
|
|
5519
|
+
* @enum
|
|
5520
|
+
*/
|
|
5521
|
+
export declare const RetrieveAndGenerateType: {
|
|
5522
|
+
readonly EXTERNAL_SOURCES: "EXTERNAL_SOURCES";
|
|
5523
|
+
readonly KNOWLEDGE_BASE: "KNOWLEDGE_BASE";
|
|
5524
|
+
};
|
|
5525
|
+
/**
|
|
5526
|
+
* @public
|
|
5527
|
+
*/
|
|
5528
|
+
export type RetrieveAndGenerateType = (typeof RetrieveAndGenerateType)[keyof typeof RetrieveAndGenerateType];
|
|
5529
|
+
/**
|
|
5530
|
+
* <p>Contains configuration about the session with the knowledge base.</p>
|
|
5531
|
+
* <p>This data type is used in the following API operations:</p>
|
|
5532
|
+
* <ul>
|
|
5533
|
+
* <li>
|
|
5534
|
+
* <p>
|
|
5535
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>sessionConfiguration</code> field</p>
|
|
5536
|
+
* </li>
|
|
5537
|
+
* </ul>
|
|
5538
|
+
* @public
|
|
5539
|
+
*/
|
|
5540
|
+
export interface RetrieveAndGenerateSessionConfiguration {
|
|
5541
|
+
/**
|
|
5542
|
+
* <p>The ARN of the KMS key encrypting the session.</p>
|
|
5543
|
+
* @public
|
|
5544
|
+
*/
|
|
5545
|
+
kmsKeyArn: string | undefined;
|
|
5546
|
+
}
|
|
5547
|
+
/**
|
|
5548
|
+
* @public
|
|
5549
|
+
* @enum
|
|
5550
|
+
*/
|
|
5551
|
+
export declare const GuadrailAction: {
|
|
5552
|
+
readonly INTERVENED: "INTERVENED";
|
|
5553
|
+
readonly NONE: "NONE";
|
|
5554
|
+
};
|
|
5555
|
+
/**
|
|
5556
|
+
* @public
|
|
5557
|
+
*/
|
|
5558
|
+
export type GuadrailAction = (typeof GuadrailAction)[keyof typeof GuadrailAction];
|
|
5559
|
+
/**
|
|
5560
|
+
* <p>Contains the response generated from querying the knowledge base.</p>
|
|
5561
|
+
* <p>This data type is used in the following API operations:</p>
|
|
5562
|
+
* <ul>
|
|
5563
|
+
* <li>
|
|
5564
|
+
* <p>
|
|
5565
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>output</code> field</p>
|
|
5566
|
+
* </li>
|
|
5567
|
+
* </ul>
|
|
5568
|
+
* @public
|
|
5569
|
+
*/
|
|
5570
|
+
export interface RetrieveAndGenerateOutput {
|
|
5571
|
+
/**
|
|
5572
|
+
* <p>The response generated from querying the knowledge base.</p>
|
|
5573
|
+
* @public
|
|
5574
|
+
*/
|
|
5575
|
+
text: string | undefined;
|
|
5576
|
+
}
|
|
5577
|
+
/**
|
|
5578
|
+
* @public
|
|
5579
|
+
*/
|
|
5580
|
+
export interface RetrieveAndGenerateResponse {
|
|
5581
|
+
/**
|
|
5582
|
+
* <p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>
|
|
5583
|
+
* @public
|
|
5584
|
+
*/
|
|
5585
|
+
sessionId: string | undefined;
|
|
5586
|
+
/**
|
|
5587
|
+
* <p>Contains the response generated from querying the knowledge base.</p>
|
|
5588
|
+
* @public
|
|
5589
|
+
*/
|
|
5590
|
+
output: RetrieveAndGenerateOutput | undefined;
|
|
5591
|
+
/**
|
|
5592
|
+
* <p>A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.</p>
|
|
5593
|
+
* @public
|
|
5594
|
+
*/
|
|
5595
|
+
citations?: Citation[] | undefined;
|
|
5596
|
+
/**
|
|
5597
|
+
* <p>Specifies if there is a guardrail intervention in the response.</p>
|
|
5598
|
+
* @public
|
|
5599
|
+
*/
|
|
5600
|
+
guardrailAction?: GuadrailAction | undefined;
|
|
5601
|
+
}
|
|
5602
|
+
/**
|
|
5603
|
+
* <p>A citation event.</p>
|
|
5604
|
+
* @public
|
|
5605
|
+
*/
|
|
5606
|
+
export interface CitationEvent {
|
|
5607
|
+
/**
|
|
5608
|
+
* <p>The citation.</p>
|
|
5609
|
+
* @public
|
|
5610
|
+
*/
|
|
5611
|
+
citation?: Citation | undefined;
|
|
5612
|
+
}
|
|
5613
|
+
/**
|
|
5614
|
+
* <p>A guardrail event.</p>
|
|
5615
|
+
* @public
|
|
5616
|
+
*/
|
|
5617
|
+
export interface GuardrailEvent {
|
|
5618
|
+
/**
|
|
5619
|
+
* <p>The guardrail action.</p>
|
|
5620
|
+
* @public
|
|
5621
|
+
*/
|
|
5622
|
+
action?: GuadrailAction | undefined;
|
|
5623
|
+
}
|
|
5624
|
+
/**
|
|
5625
|
+
* <p>A retrieve and generate output event.</p>
|
|
5626
|
+
* @public
|
|
5627
|
+
*/
|
|
5628
|
+
export interface RetrieveAndGenerateOutputEvent {
|
|
5629
|
+
/**
|
|
5630
|
+
* <p>A text response.</p>
|
|
5631
|
+
* @public
|
|
5632
|
+
*/
|
|
5633
|
+
text: string | undefined;
|
|
5634
|
+
}
|
|
5635
|
+
/**
|
|
5636
|
+
* <p>A retrieve and generate stream response output.</p>
|
|
5637
|
+
* @public
|
|
5638
|
+
*/
|
|
5639
|
+
export type RetrieveAndGenerateStreamResponseOutput = RetrieveAndGenerateStreamResponseOutput.AccessDeniedExceptionMember | RetrieveAndGenerateStreamResponseOutput.BadGatewayExceptionMember | RetrieveAndGenerateStreamResponseOutput.CitationMember | RetrieveAndGenerateStreamResponseOutput.ConflictExceptionMember | RetrieveAndGenerateStreamResponseOutput.DependencyFailedExceptionMember | RetrieveAndGenerateStreamResponseOutput.GuardrailMember | RetrieveAndGenerateStreamResponseOutput.InternalServerExceptionMember | RetrieveAndGenerateStreamResponseOutput.OutputMember | RetrieveAndGenerateStreamResponseOutput.ResourceNotFoundExceptionMember | RetrieveAndGenerateStreamResponseOutput.ServiceQuotaExceededExceptionMember | RetrieveAndGenerateStreamResponseOutput.ThrottlingExceptionMember | RetrieveAndGenerateStreamResponseOutput.ValidationExceptionMember | RetrieveAndGenerateStreamResponseOutput.$UnknownMember;
|
|
5640
|
+
/**
|
|
5641
|
+
* @public
|
|
5642
|
+
*/
|
|
5643
|
+
export declare namespace RetrieveAndGenerateStreamResponseOutput {
|
|
5644
|
+
/**
|
|
5645
|
+
* <p>An output event.</p>
|
|
5646
|
+
* @public
|
|
5647
|
+
*/
|
|
5648
|
+
interface OutputMember {
|
|
5649
|
+
output: RetrieveAndGenerateOutputEvent;
|
|
5650
|
+
citation?: never;
|
|
5651
|
+
guardrail?: never;
|
|
5652
|
+
internalServerException?: never;
|
|
5653
|
+
validationException?: never;
|
|
5654
|
+
resourceNotFoundException?: never;
|
|
5655
|
+
serviceQuotaExceededException?: never;
|
|
5656
|
+
throttlingException?: never;
|
|
5657
|
+
accessDeniedException?: never;
|
|
5658
|
+
conflictException?: never;
|
|
5659
|
+
dependencyFailedException?: never;
|
|
5660
|
+
badGatewayException?: never;
|
|
5661
|
+
$unknown?: never;
|
|
5662
|
+
}
|
|
5663
|
+
/**
|
|
5664
|
+
* <p>A citation event.</p>
|
|
5665
|
+
* @public
|
|
5666
|
+
*/
|
|
5667
|
+
interface CitationMember {
|
|
5668
|
+
output?: never;
|
|
5669
|
+
citation: CitationEvent;
|
|
5670
|
+
guardrail?: never;
|
|
5671
|
+
internalServerException?: never;
|
|
5672
|
+
validationException?: never;
|
|
5673
|
+
resourceNotFoundException?: never;
|
|
5674
|
+
serviceQuotaExceededException?: never;
|
|
5675
|
+
throttlingException?: never;
|
|
5676
|
+
accessDeniedException?: never;
|
|
5677
|
+
conflictException?: never;
|
|
5678
|
+
dependencyFailedException?: never;
|
|
5679
|
+
badGatewayException?: never;
|
|
5680
|
+
$unknown?: never;
|
|
5681
|
+
}
|
|
5682
|
+
/**
|
|
5683
|
+
* <p>A guardrail event.</p>
|
|
5684
|
+
* @public
|
|
5685
|
+
*/
|
|
5686
|
+
interface GuardrailMember {
|
|
5687
|
+
output?: never;
|
|
5688
|
+
citation?: never;
|
|
5689
|
+
guardrail: GuardrailEvent;
|
|
5690
|
+
internalServerException?: never;
|
|
5691
|
+
validationException?: never;
|
|
5692
|
+
resourceNotFoundException?: never;
|
|
5693
|
+
serviceQuotaExceededException?: never;
|
|
5694
|
+
throttlingException?: never;
|
|
5695
|
+
accessDeniedException?: never;
|
|
5696
|
+
conflictException?: never;
|
|
5697
|
+
dependencyFailedException?: never;
|
|
5698
|
+
badGatewayException?: never;
|
|
5699
|
+
$unknown?: never;
|
|
5700
|
+
}
|
|
5701
|
+
/**
|
|
5702
|
+
* <p>An internal server error occurred. Retry your request.</p>
|
|
5703
|
+
* @public
|
|
5704
|
+
*/
|
|
5705
|
+
interface InternalServerExceptionMember {
|
|
5706
|
+
output?: never;
|
|
5707
|
+
citation?: never;
|
|
5708
|
+
guardrail?: never;
|
|
5709
|
+
internalServerException: InternalServerException;
|
|
5710
|
+
validationException?: never;
|
|
5711
|
+
resourceNotFoundException?: never;
|
|
5712
|
+
serviceQuotaExceededException?: never;
|
|
5713
|
+
throttlingException?: never;
|
|
5714
|
+
accessDeniedException?: never;
|
|
5715
|
+
conflictException?: never;
|
|
5716
|
+
dependencyFailedException?: never;
|
|
5717
|
+
badGatewayException?: never;
|
|
5718
|
+
$unknown?: never;
|
|
5719
|
+
}
|
|
5720
|
+
/**
|
|
5721
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
5722
|
+
* 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>
|
|
5723
|
+
* @public
|
|
5724
|
+
*/
|
|
5725
|
+
interface ValidationExceptionMember {
|
|
5726
|
+
output?: never;
|
|
5727
|
+
citation?: never;
|
|
5728
|
+
guardrail?: never;
|
|
5729
|
+
internalServerException?: never;
|
|
5730
|
+
validationException: ValidationException;
|
|
5731
|
+
resourceNotFoundException?: never;
|
|
5732
|
+
serviceQuotaExceededException?: never;
|
|
5733
|
+
throttlingException?: never;
|
|
5734
|
+
accessDeniedException?: never;
|
|
5735
|
+
conflictException?: never;
|
|
5736
|
+
dependencyFailedException?: never;
|
|
5737
|
+
badGatewayException?: never;
|
|
5738
|
+
$unknown?: never;
|
|
5739
|
+
}
|
|
5740
|
+
/**
|
|
5741
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
5742
|
+
* 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>
|
|
5743
|
+
* @public
|
|
5744
|
+
*/
|
|
5745
|
+
interface ResourceNotFoundExceptionMember {
|
|
5746
|
+
output?: never;
|
|
5747
|
+
citation?: never;
|
|
5748
|
+
guardrail?: never;
|
|
5749
|
+
internalServerException?: never;
|
|
5750
|
+
validationException?: never;
|
|
5751
|
+
resourceNotFoundException: ResourceNotFoundException;
|
|
5752
|
+
serviceQuotaExceededException?: never;
|
|
5753
|
+
throttlingException?: never;
|
|
5754
|
+
accessDeniedException?: never;
|
|
5755
|
+
conflictException?: never;
|
|
5756
|
+
dependencyFailedException?: never;
|
|
5757
|
+
badGatewayException?: never;
|
|
5758
|
+
$unknown?: never;
|
|
5759
|
+
}
|
|
5760
|
+
/**
|
|
5761
|
+
* <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>
|
|
5762
|
+
* @public
|
|
5763
|
+
*/
|
|
5764
|
+
interface ServiceQuotaExceededExceptionMember {
|
|
5765
|
+
output?: never;
|
|
5766
|
+
citation?: never;
|
|
5767
|
+
guardrail?: never;
|
|
5768
|
+
internalServerException?: never;
|
|
5769
|
+
validationException?: never;
|
|
5770
|
+
resourceNotFoundException?: never;
|
|
5771
|
+
serviceQuotaExceededException: ServiceQuotaExceededException;
|
|
5772
|
+
throttlingException?: never;
|
|
5773
|
+
accessDeniedException?: never;
|
|
5774
|
+
conflictException?: never;
|
|
5775
|
+
dependencyFailedException?: never;
|
|
5776
|
+
badGatewayException?: never;
|
|
5777
|
+
$unknown?: never;
|
|
5778
|
+
}
|
|
5779
|
+
/**
|
|
5780
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
5781
|
+
* 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>
|
|
5066
5782
|
* @public
|
|
5067
5783
|
*/
|
|
5068
|
-
|
|
5784
|
+
interface ThrottlingExceptionMember {
|
|
5785
|
+
output?: never;
|
|
5786
|
+
citation?: never;
|
|
5787
|
+
guardrail?: never;
|
|
5788
|
+
internalServerException?: never;
|
|
5789
|
+
validationException?: never;
|
|
5790
|
+
resourceNotFoundException?: never;
|
|
5791
|
+
serviceQuotaExceededException?: never;
|
|
5792
|
+
throttlingException: ThrottlingException;
|
|
5793
|
+
accessDeniedException?: never;
|
|
5794
|
+
conflictException?: never;
|
|
5795
|
+
dependencyFailedException?: never;
|
|
5796
|
+
badGatewayException?: never;
|
|
5797
|
+
$unknown?: never;
|
|
5798
|
+
}
|
|
5069
5799
|
/**
|
|
5070
|
-
* <p>
|
|
5800
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
5801
|
+
* 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>
|
|
5071
5802
|
* @public
|
|
5072
5803
|
*/
|
|
5073
|
-
|
|
5804
|
+
interface AccessDeniedExceptionMember {
|
|
5805
|
+
output?: never;
|
|
5806
|
+
citation?: never;
|
|
5807
|
+
guardrail?: never;
|
|
5808
|
+
internalServerException?: never;
|
|
5809
|
+
validationException?: never;
|
|
5810
|
+
resourceNotFoundException?: never;
|
|
5811
|
+
serviceQuotaExceededException?: never;
|
|
5812
|
+
throttlingException?: never;
|
|
5813
|
+
accessDeniedException: AccessDeniedException;
|
|
5814
|
+
conflictException?: never;
|
|
5815
|
+
dependencyFailedException?: never;
|
|
5816
|
+
badGatewayException?: never;
|
|
5817
|
+
$unknown?: never;
|
|
5818
|
+
}
|
|
5074
5819
|
/**
|
|
5075
|
-
* <p>
|
|
5820
|
+
* <p>Error occurred because of a conflict while performing an operation.</p>
|
|
5076
5821
|
* @public
|
|
5077
5822
|
*/
|
|
5078
|
-
|
|
5823
|
+
interface ConflictExceptionMember {
|
|
5824
|
+
output?: never;
|
|
5825
|
+
citation?: never;
|
|
5826
|
+
guardrail?: never;
|
|
5827
|
+
internalServerException?: never;
|
|
5828
|
+
validationException?: never;
|
|
5829
|
+
resourceNotFoundException?: never;
|
|
5830
|
+
serviceQuotaExceededException?: never;
|
|
5831
|
+
throttlingException?: never;
|
|
5832
|
+
accessDeniedException?: never;
|
|
5833
|
+
conflictException: ConflictException;
|
|
5834
|
+
dependencyFailedException?: never;
|
|
5835
|
+
badGatewayException?: never;
|
|
5836
|
+
$unknown?: never;
|
|
5837
|
+
}
|
|
5079
5838
|
/**
|
|
5080
|
-
* <p>
|
|
5081
|
-
* <code>QUERY_DECOMPOSITION</code>.</p>
|
|
5839
|
+
* <p>The request failed due to a dependency error.</p>
|
|
5082
5840
|
* @public
|
|
5083
5841
|
*/
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
* <p>Contains configuration about the session with the knowledge base.</p>
|
|
5100
|
-
* <p>This data type is used in the following API operations:</p>
|
|
5101
|
-
* <ul>
|
|
5102
|
-
* <li>
|
|
5103
|
-
* <p>
|
|
5104
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>sessionConfiguration</code> field</p>
|
|
5105
|
-
* </li>
|
|
5106
|
-
* </ul>
|
|
5107
|
-
* @public
|
|
5108
|
-
*/
|
|
5109
|
-
export interface RetrieveAndGenerateSessionConfiguration {
|
|
5842
|
+
interface DependencyFailedExceptionMember {
|
|
5843
|
+
output?: never;
|
|
5844
|
+
citation?: never;
|
|
5845
|
+
guardrail?: never;
|
|
5846
|
+
internalServerException?: never;
|
|
5847
|
+
validationException?: never;
|
|
5848
|
+
resourceNotFoundException?: never;
|
|
5849
|
+
serviceQuotaExceededException?: never;
|
|
5850
|
+
throttlingException?: never;
|
|
5851
|
+
accessDeniedException?: never;
|
|
5852
|
+
conflictException?: never;
|
|
5853
|
+
dependencyFailedException: DependencyFailedException;
|
|
5854
|
+
badGatewayException?: never;
|
|
5855
|
+
$unknown?: never;
|
|
5856
|
+
}
|
|
5110
5857
|
/**
|
|
5111
|
-
* <p>The
|
|
5858
|
+
* <p>The request failed due to a bad gateway error.</p>
|
|
5112
5859
|
* @public
|
|
5113
5860
|
*/
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
* <p>Contains the response generated from querying the knowledge base.</p>
|
|
5130
|
-
* <p>This data type is used in the following API operations:</p>
|
|
5131
|
-
* <ul>
|
|
5132
|
-
* <li>
|
|
5133
|
-
* <p>
|
|
5134
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>output</code> field</p>
|
|
5135
|
-
* </li>
|
|
5136
|
-
* </ul>
|
|
5137
|
-
* @public
|
|
5138
|
-
*/
|
|
5139
|
-
export interface RetrieveAndGenerateOutput {
|
|
5861
|
+
interface BadGatewayExceptionMember {
|
|
5862
|
+
output?: never;
|
|
5863
|
+
citation?: never;
|
|
5864
|
+
guardrail?: never;
|
|
5865
|
+
internalServerException?: never;
|
|
5866
|
+
validationException?: never;
|
|
5867
|
+
resourceNotFoundException?: never;
|
|
5868
|
+
serviceQuotaExceededException?: never;
|
|
5869
|
+
throttlingException?: never;
|
|
5870
|
+
accessDeniedException?: never;
|
|
5871
|
+
conflictException?: never;
|
|
5872
|
+
dependencyFailedException?: never;
|
|
5873
|
+
badGatewayException: BadGatewayException;
|
|
5874
|
+
$unknown?: never;
|
|
5875
|
+
}
|
|
5140
5876
|
/**
|
|
5141
|
-
* <p>The response generated from querying the knowledge base.</p>
|
|
5142
5877
|
* @public
|
|
5143
5878
|
*/
|
|
5144
|
-
|
|
5879
|
+
interface $UnknownMember {
|
|
5880
|
+
output?: never;
|
|
5881
|
+
citation?: never;
|
|
5882
|
+
guardrail?: never;
|
|
5883
|
+
internalServerException?: never;
|
|
5884
|
+
validationException?: never;
|
|
5885
|
+
resourceNotFoundException?: never;
|
|
5886
|
+
serviceQuotaExceededException?: never;
|
|
5887
|
+
throttlingException?: never;
|
|
5888
|
+
accessDeniedException?: never;
|
|
5889
|
+
conflictException?: never;
|
|
5890
|
+
dependencyFailedException?: never;
|
|
5891
|
+
badGatewayException?: never;
|
|
5892
|
+
$unknown: [string, any];
|
|
5893
|
+
}
|
|
5894
|
+
interface Visitor<T> {
|
|
5895
|
+
output: (value: RetrieveAndGenerateOutputEvent) => T;
|
|
5896
|
+
citation: (value: CitationEvent) => T;
|
|
5897
|
+
guardrail: (value: GuardrailEvent) => T;
|
|
5898
|
+
internalServerException: (value: InternalServerException) => T;
|
|
5899
|
+
validationException: (value: ValidationException) => T;
|
|
5900
|
+
resourceNotFoundException: (value: ResourceNotFoundException) => T;
|
|
5901
|
+
serviceQuotaExceededException: (value: ServiceQuotaExceededException) => T;
|
|
5902
|
+
throttlingException: (value: ThrottlingException) => T;
|
|
5903
|
+
accessDeniedException: (value: AccessDeniedException) => T;
|
|
5904
|
+
conflictException: (value: ConflictException) => T;
|
|
5905
|
+
dependencyFailedException: (value: DependencyFailedException) => T;
|
|
5906
|
+
badGatewayException: (value: BadGatewayException) => T;
|
|
5907
|
+
_: (name: string, value: any) => T;
|
|
5908
|
+
}
|
|
5909
|
+
const visit: <T>(value: RetrieveAndGenerateStreamResponseOutput, visitor: Visitor<T>) => T;
|
|
5145
5910
|
}
|
|
5146
5911
|
/**
|
|
5147
5912
|
* @public
|
|
5148
5913
|
*/
|
|
5149
|
-
export interface
|
|
5150
|
-
/**
|
|
5151
|
-
* <p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>
|
|
5152
|
-
* @public
|
|
5153
|
-
*/
|
|
5154
|
-
sessionId: string | undefined;
|
|
5155
|
-
/**
|
|
5156
|
-
* <p>Contains the response generated from querying the knowledge base.</p>
|
|
5157
|
-
* @public
|
|
5158
|
-
*/
|
|
5159
|
-
output: RetrieveAndGenerateOutput | undefined;
|
|
5914
|
+
export interface RetrieveAndGenerateStreamResponse {
|
|
5160
5915
|
/**
|
|
5161
|
-
* <p>A
|
|
5916
|
+
* <p>A stream of events from the model.</p>
|
|
5162
5917
|
* @public
|
|
5163
5918
|
*/
|
|
5164
|
-
|
|
5919
|
+
stream: AsyncIterable<RetrieveAndGenerateStreamResponseOutput> | undefined;
|
|
5165
5920
|
/**
|
|
5166
|
-
* <p>
|
|
5921
|
+
* <p>The session ID.</p>
|
|
5167
5922
|
* @public
|
|
5168
5923
|
*/
|
|
5169
|
-
|
|
5924
|
+
sessionId: string | undefined;
|
|
5170
5925
|
}
|
|
5171
5926
|
/**
|
|
5172
5927
|
* <p>Contains the query made to the knowledge base.</p>
|
|
@@ -5228,6 +5983,11 @@ export interface RetrieveResponse {
|
|
|
5228
5983
|
* @public
|
|
5229
5984
|
*/
|
|
5230
5985
|
retrievalResults: KnowledgeBaseRetrievalResult[] | undefined;
|
|
5986
|
+
/**
|
|
5987
|
+
* <p>Specifies if there is a guardrail intervention in the response.</p>
|
|
5988
|
+
* @public
|
|
5989
|
+
*/
|
|
5990
|
+
guardrailAction?: GuadrailAction | undefined;
|
|
5231
5991
|
/**
|
|
5232
5992
|
* <p>If there are more results than can fit in the response, the response returns a <code>nextToken</code>. Use this token in the <code>nextToken</code> field of another request to retrieve the next batch of results.</p>
|
|
5233
5993
|
* @public
|
|
@@ -5636,6 +6396,16 @@ export interface KnowledgeBaseVectorSearchConfiguration {
|
|
|
5636
6396
|
* @public
|
|
5637
6397
|
*/
|
|
5638
6398
|
filter?: RetrievalFilter | undefined;
|
|
6399
|
+
/**
|
|
6400
|
+
* <p>Contains configurations for reranking the retrieved results. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/rerank.html">Improve the relevance of query responses with a reranker model</a>.</p>
|
|
6401
|
+
* @public
|
|
6402
|
+
*/
|
|
6403
|
+
rerankingConfiguration?: VectorSearchRerankingConfiguration | undefined;
|
|
6404
|
+
/**
|
|
6405
|
+
* <p>Settings for implicit filtering.</p>
|
|
6406
|
+
* @public
|
|
6407
|
+
*/
|
|
6408
|
+
implicitFilterConfiguration?: ImplicitFilterConfiguration | undefined;
|
|
5639
6409
|
}
|
|
5640
6410
|
/**
|
|
5641
6411
|
* <p>Contains configurations for knowledge base query. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
@@ -5765,6 +6535,11 @@ export interface RetrieveRequest {
|
|
|
5765
6535
|
* @public
|
|
5766
6536
|
*/
|
|
5767
6537
|
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined;
|
|
6538
|
+
/**
|
|
6539
|
+
* <p>Guardrail settings.</p>
|
|
6540
|
+
* @public
|
|
6541
|
+
*/
|
|
6542
|
+
guardrailConfiguration?: GuardrailConfiguration | undefined;
|
|
5768
6543
|
/**
|
|
5769
6544
|
* <p>If there are more results than can fit in the response, the response returns a <code>nextToken</code>. Use this token in the <code>nextToken</code> field of another request to retrieve the next batch of results.</p>
|
|
5770
6545
|
* @public
|
|
@@ -5930,6 +6705,31 @@ export interface RetrieveAndGenerateRequest {
|
|
|
5930
6705
|
*/
|
|
5931
6706
|
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined;
|
|
5932
6707
|
}
|
|
6708
|
+
/**
|
|
6709
|
+
* @public
|
|
6710
|
+
*/
|
|
6711
|
+
export interface RetrieveAndGenerateStreamRequest {
|
|
6712
|
+
/**
|
|
6713
|
+
* <p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>
|
|
6714
|
+
* @public
|
|
6715
|
+
*/
|
|
6716
|
+
sessionId?: string | undefined;
|
|
6717
|
+
/**
|
|
6718
|
+
* <p>Contains the query to be made to the knowledge base.</p>
|
|
6719
|
+
* @public
|
|
6720
|
+
*/
|
|
6721
|
+
input: RetrieveAndGenerateInput | undefined;
|
|
6722
|
+
/**
|
|
6723
|
+
* <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
6724
|
+
* @public
|
|
6725
|
+
*/
|
|
6726
|
+
retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined;
|
|
6727
|
+
/**
|
|
6728
|
+
* <p>Contains details about the session with the knowledge base.</p>
|
|
6729
|
+
* @public
|
|
6730
|
+
*/
|
|
6731
|
+
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined;
|
|
6732
|
+
}
|
|
5933
6733
|
/**
|
|
5934
6734
|
* <p>Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html">Lambda function</a> for an action group or pass them when making an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
|
|
5935
6735
|
* @public
|
|
@@ -6127,6 +6927,30 @@ export declare const FileSourceFilterSensitiveLog: (obj: FileSource) => any;
|
|
|
6127
6927
|
* @internal
|
|
6128
6928
|
*/
|
|
6129
6929
|
export declare const InputFileFilterSensitiveLog: (obj: InputFile) => any;
|
|
6930
|
+
/**
|
|
6931
|
+
* @internal
|
|
6932
|
+
*/
|
|
6933
|
+
export declare const MetadataAttributeSchemaFilterSensitiveLog: (obj: MetadataAttributeSchema) => any;
|
|
6934
|
+
/**
|
|
6935
|
+
* @internal
|
|
6936
|
+
*/
|
|
6937
|
+
export declare const ImplicitFilterConfigurationFilterSensitiveLog: (obj: ImplicitFilterConfiguration) => any;
|
|
6938
|
+
/**
|
|
6939
|
+
* @internal
|
|
6940
|
+
*/
|
|
6941
|
+
export declare const RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog: (obj: RerankingMetadataSelectiveModeConfiguration) => any;
|
|
6942
|
+
/**
|
|
6943
|
+
* @internal
|
|
6944
|
+
*/
|
|
6945
|
+
export declare const MetadataConfigurationForRerankingFilterSensitiveLog: (obj: MetadataConfigurationForReranking) => any;
|
|
6946
|
+
/**
|
|
6947
|
+
* @internal
|
|
6948
|
+
*/
|
|
6949
|
+
export declare const VectorSearchBedrockRerankingConfigurationFilterSensitiveLog: (obj: VectorSearchBedrockRerankingConfiguration) => any;
|
|
6950
|
+
/**
|
|
6951
|
+
* @internal
|
|
6952
|
+
*/
|
|
6953
|
+
export declare const VectorSearchRerankingConfigurationFilterSensitiveLog: (obj: VectorSearchRerankingConfiguration) => any;
|
|
6130
6954
|
/**
|
|
6131
6955
|
* @internal
|
|
6132
6956
|
*/
|
|
@@ -6407,6 +7231,34 @@ export declare const OptimizedPromptStreamFilterSensitiveLog: (obj: OptimizedPro
|
|
|
6407
7231
|
* @internal
|
|
6408
7232
|
*/
|
|
6409
7233
|
export declare const OptimizePromptResponseFilterSensitiveLog: (obj: OptimizePromptResponse) => any;
|
|
7234
|
+
/**
|
|
7235
|
+
* @internal
|
|
7236
|
+
*/
|
|
7237
|
+
export declare const RerankTextDocumentFilterSensitiveLog: (obj: RerankTextDocument) => any;
|
|
7238
|
+
/**
|
|
7239
|
+
* @internal
|
|
7240
|
+
*/
|
|
7241
|
+
export declare const RerankQueryFilterSensitiveLog: (obj: RerankQuery) => any;
|
|
7242
|
+
/**
|
|
7243
|
+
* @internal
|
|
7244
|
+
*/
|
|
7245
|
+
export declare const RerankDocumentFilterSensitiveLog: (obj: RerankDocument) => any;
|
|
7246
|
+
/**
|
|
7247
|
+
* @internal
|
|
7248
|
+
*/
|
|
7249
|
+
export declare const RerankSourceFilterSensitiveLog: (obj: RerankSource) => any;
|
|
7250
|
+
/**
|
|
7251
|
+
* @internal
|
|
7252
|
+
*/
|
|
7253
|
+
export declare const RerankRequestFilterSensitiveLog: (obj: RerankRequest) => any;
|
|
7254
|
+
/**
|
|
7255
|
+
* @internal
|
|
7256
|
+
*/
|
|
7257
|
+
export declare const RerankResultFilterSensitiveLog: (obj: RerankResult) => any;
|
|
7258
|
+
/**
|
|
7259
|
+
* @internal
|
|
7260
|
+
*/
|
|
7261
|
+
export declare const RerankResponseFilterSensitiveLog: (obj: RerankResponse) => any;
|
|
6410
7262
|
/**
|
|
6411
7263
|
* @internal
|
|
6412
7264
|
*/
|
|
@@ -6447,6 +7299,22 @@ export declare const RetrieveAndGenerateOutputFilterSensitiveLog: (obj: Retrieve
|
|
|
6447
7299
|
* @internal
|
|
6448
7300
|
*/
|
|
6449
7301
|
export declare const RetrieveAndGenerateResponseFilterSensitiveLog: (obj: RetrieveAndGenerateResponse) => any;
|
|
7302
|
+
/**
|
|
7303
|
+
* @internal
|
|
7304
|
+
*/
|
|
7305
|
+
export declare const CitationEventFilterSensitiveLog: (obj: CitationEvent) => any;
|
|
7306
|
+
/**
|
|
7307
|
+
* @internal
|
|
7308
|
+
*/
|
|
7309
|
+
export declare const RetrieveAndGenerateOutputEventFilterSensitiveLog: (obj: RetrieveAndGenerateOutputEvent) => any;
|
|
7310
|
+
/**
|
|
7311
|
+
* @internal
|
|
7312
|
+
*/
|
|
7313
|
+
export declare const RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog: (obj: RetrieveAndGenerateStreamResponseOutput) => any;
|
|
7314
|
+
/**
|
|
7315
|
+
* @internal
|
|
7316
|
+
*/
|
|
7317
|
+
export declare const RetrieveAndGenerateStreamResponseFilterSensitiveLog: (obj: RetrieveAndGenerateStreamResponse) => any;
|
|
6450
7318
|
/**
|
|
6451
7319
|
* @internal
|
|
6452
7320
|
*/
|
|
@@ -6499,6 +7367,10 @@ export declare const InvokeInlineAgentRequestFilterSensitiveLog: (obj: InvokeInl
|
|
|
6499
7367
|
* @internal
|
|
6500
7368
|
*/
|
|
6501
7369
|
export declare const RetrieveAndGenerateRequestFilterSensitiveLog: (obj: RetrieveAndGenerateRequest) => any;
|
|
7370
|
+
/**
|
|
7371
|
+
* @internal
|
|
7372
|
+
*/
|
|
7373
|
+
export declare const RetrieveAndGenerateStreamRequestFilterSensitiveLog: (obj: RetrieveAndGenerateStreamRequest) => any;
|
|
6502
7374
|
/**
|
|
6503
7375
|
* @internal
|
|
6504
7376
|
*/
|