@aws-sdk/client-bedrock-agent-runtime 3.699.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 +552 -4
- 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 +191 -0
- package/dist-es/pagination/RerankPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +237 -0
- package/dist-types/BedrockAgentRuntime.d.ts +14 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +55 -2
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +51 -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 +1093 -125
- 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 +490 -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
|
@@ -652,11 +652,94 @@ export interface FilterAttribute {
|
|
|
652
652
|
key: string | undefined;
|
|
653
653
|
value: __DocumentType | undefined;
|
|
654
654
|
}
|
|
655
|
+
export declare const AttributeType: {
|
|
656
|
+
readonly BOOLEAN: "BOOLEAN";
|
|
657
|
+
readonly NUMBER: "NUMBER";
|
|
658
|
+
readonly STRING: "STRING";
|
|
659
|
+
readonly STRING_LIST: "STRING_LIST";
|
|
660
|
+
};
|
|
661
|
+
export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
|
|
662
|
+
export interface MetadataAttributeSchema {
|
|
663
|
+
key: string | undefined;
|
|
664
|
+
type: AttributeType | undefined;
|
|
665
|
+
description: string | undefined;
|
|
666
|
+
}
|
|
667
|
+
export interface ImplicitFilterConfiguration {
|
|
668
|
+
metadataAttributes: MetadataAttributeSchema[] | undefined;
|
|
669
|
+
modelArn: string | undefined;
|
|
670
|
+
}
|
|
655
671
|
export declare const SearchType: {
|
|
656
672
|
readonly HYBRID: "HYBRID";
|
|
657
673
|
readonly SEMANTIC: "SEMANTIC";
|
|
658
674
|
};
|
|
659
675
|
export type SearchType = (typeof SearchType)[keyof typeof SearchType];
|
|
676
|
+
export declare const RerankingMetadataSelectionMode: {
|
|
677
|
+
readonly ALL: "ALL";
|
|
678
|
+
readonly SELECTIVE: "SELECTIVE";
|
|
679
|
+
};
|
|
680
|
+
export type RerankingMetadataSelectionMode =
|
|
681
|
+
(typeof RerankingMetadataSelectionMode)[keyof typeof RerankingMetadataSelectionMode];
|
|
682
|
+
export interface FieldForReranking {
|
|
683
|
+
fieldName: string | undefined;
|
|
684
|
+
}
|
|
685
|
+
export type RerankingMetadataSelectiveModeConfiguration =
|
|
686
|
+
| RerankingMetadataSelectiveModeConfiguration.FieldsToExcludeMember
|
|
687
|
+
| RerankingMetadataSelectiveModeConfiguration.FieldsToIncludeMember
|
|
688
|
+
| RerankingMetadataSelectiveModeConfiguration.$UnknownMember;
|
|
689
|
+
export declare namespace RerankingMetadataSelectiveModeConfiguration {
|
|
690
|
+
interface FieldsToIncludeMember {
|
|
691
|
+
fieldsToInclude: FieldForReranking[];
|
|
692
|
+
fieldsToExclude?: never;
|
|
693
|
+
$unknown?: never;
|
|
694
|
+
}
|
|
695
|
+
interface FieldsToExcludeMember {
|
|
696
|
+
fieldsToInclude?: never;
|
|
697
|
+
fieldsToExclude: FieldForReranking[];
|
|
698
|
+
$unknown?: never;
|
|
699
|
+
}
|
|
700
|
+
interface $UnknownMember {
|
|
701
|
+
fieldsToInclude?: never;
|
|
702
|
+
fieldsToExclude?: never;
|
|
703
|
+
$unknown: [string, any];
|
|
704
|
+
}
|
|
705
|
+
interface Visitor<T> {
|
|
706
|
+
fieldsToInclude: (value: FieldForReranking[]) => T;
|
|
707
|
+
fieldsToExclude: (value: FieldForReranking[]) => T;
|
|
708
|
+
_: (name: string, value: any) => T;
|
|
709
|
+
}
|
|
710
|
+
const visit: <T>(
|
|
711
|
+
value: RerankingMetadataSelectiveModeConfiguration,
|
|
712
|
+
visitor: Visitor<T>
|
|
713
|
+
) => T;
|
|
714
|
+
}
|
|
715
|
+
export interface MetadataConfigurationForReranking {
|
|
716
|
+
selectionMode: RerankingMetadataSelectionMode | undefined;
|
|
717
|
+
selectiveModeConfiguration?:
|
|
718
|
+
| RerankingMetadataSelectiveModeConfiguration
|
|
719
|
+
| undefined;
|
|
720
|
+
}
|
|
721
|
+
export interface VectorSearchBedrockRerankingModelConfiguration {
|
|
722
|
+
modelArn: string | undefined;
|
|
723
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
724
|
+
}
|
|
725
|
+
export interface VectorSearchBedrockRerankingConfiguration {
|
|
726
|
+
modelConfiguration:
|
|
727
|
+
| VectorSearchBedrockRerankingModelConfiguration
|
|
728
|
+
| undefined;
|
|
729
|
+
numberOfRerankedResults?: number | undefined;
|
|
730
|
+
metadataConfiguration?: MetadataConfigurationForReranking | undefined;
|
|
731
|
+
}
|
|
732
|
+
export declare const VectorSearchRerankingConfigurationType: {
|
|
733
|
+
readonly BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL";
|
|
734
|
+
};
|
|
735
|
+
export type VectorSearchRerankingConfigurationType =
|
|
736
|
+
(typeof VectorSearchRerankingConfigurationType)[keyof typeof VectorSearchRerankingConfigurationType];
|
|
737
|
+
export interface VectorSearchRerankingConfiguration {
|
|
738
|
+
type: VectorSearchRerankingConfigurationType | undefined;
|
|
739
|
+
bedrockRerankingConfiguration?:
|
|
740
|
+
| VectorSearchBedrockRerankingConfiguration
|
|
741
|
+
| undefined;
|
|
742
|
+
}
|
|
660
743
|
export declare const ConfirmationState: {
|
|
661
744
|
readonly CONFIRM: "CONFIRM";
|
|
662
745
|
readonly DENY: "DENY";
|
|
@@ -714,6 +797,10 @@ export declare namespace InvocationResultMember {
|
|
|
714
797
|
}
|
|
715
798
|
const visit: <T>(value: InvocationResultMember, visitor: Visitor<T>) => T;
|
|
716
799
|
}
|
|
800
|
+
export interface StreamingConfigurations {
|
|
801
|
+
streamFinalResponse?: boolean | undefined;
|
|
802
|
+
applyGuardrailInterval?: number | undefined;
|
|
803
|
+
}
|
|
717
804
|
export interface Span {
|
|
718
805
|
start?: number | undefined;
|
|
719
806
|
end?: number | undefined;
|
|
@@ -731,6 +818,9 @@ export interface RetrievalResultContent {
|
|
|
731
818
|
export interface RetrievalResultConfluenceLocation {
|
|
732
819
|
url?: string | undefined;
|
|
733
820
|
}
|
|
821
|
+
export interface RetrievalResultCustomDocumentLocation {
|
|
822
|
+
id?: string | undefined;
|
|
823
|
+
}
|
|
734
824
|
export interface RetrievalResultS3Location {
|
|
735
825
|
uri?: string | undefined;
|
|
736
826
|
}
|
|
@@ -742,6 +832,7 @@ export interface RetrievalResultSharePointLocation {
|
|
|
742
832
|
}
|
|
743
833
|
export declare const RetrievalResultLocationType: {
|
|
744
834
|
readonly CONFLUENCE: "CONFLUENCE";
|
|
835
|
+
readonly CUSTOM: "CUSTOM";
|
|
745
836
|
readonly S3: "S3";
|
|
746
837
|
readonly SALESFORCE: "SALESFORCE";
|
|
747
838
|
readonly SHAREPOINT: "SHAREPOINT";
|
|
@@ -759,6 +850,7 @@ export interface RetrievalResultLocation {
|
|
|
759
850
|
confluenceLocation?: RetrievalResultConfluenceLocation | undefined;
|
|
760
851
|
salesforceLocation?: RetrievalResultSalesforceLocation | undefined;
|
|
761
852
|
sharePointLocation?: RetrievalResultSharePointLocation | undefined;
|
|
853
|
+
customDocumentLocation?: RetrievalResultCustomDocumentLocation | undefined;
|
|
762
854
|
}
|
|
763
855
|
export interface RetrievedReference {
|
|
764
856
|
content?: RetrievalResultContent | undefined;
|
|
@@ -845,6 +937,13 @@ export interface ReturnControlPayload {
|
|
|
845
937
|
invocationInputs?: InvocationInputMember[] | undefined;
|
|
846
938
|
invocationId?: string | undefined;
|
|
847
939
|
}
|
|
940
|
+
export interface CustomOrchestrationTraceEvent {
|
|
941
|
+
text?: string | undefined;
|
|
942
|
+
}
|
|
943
|
+
export interface CustomOrchestrationTrace {
|
|
944
|
+
traceId?: string | undefined;
|
|
945
|
+
event?: CustomOrchestrationTraceEvent | undefined;
|
|
946
|
+
}
|
|
848
947
|
export interface FailureTrace {
|
|
849
948
|
traceId?: string | undefined;
|
|
850
949
|
failureReason?: string | undefined;
|
|
@@ -1247,6 +1346,7 @@ export declare namespace PreProcessingTrace {
|
|
|
1247
1346
|
const visit: <T>(value: PreProcessingTrace, visitor: Visitor<T>) => T;
|
|
1248
1347
|
}
|
|
1249
1348
|
export type Trace =
|
|
1349
|
+
| Trace.CustomOrchestrationTraceMember
|
|
1250
1350
|
| Trace.FailureTraceMember
|
|
1251
1351
|
| Trace.GuardrailTraceMember
|
|
1252
1352
|
| Trace.OrchestrationTraceMember
|
|
@@ -1260,6 +1360,7 @@ export declare namespace Trace {
|
|
|
1260
1360
|
orchestrationTrace?: never;
|
|
1261
1361
|
postProcessingTrace?: never;
|
|
1262
1362
|
failureTrace?: never;
|
|
1363
|
+
customOrchestrationTrace?: never;
|
|
1263
1364
|
$unknown?: never;
|
|
1264
1365
|
}
|
|
1265
1366
|
interface PreProcessingTraceMember {
|
|
@@ -1268,6 +1369,7 @@ export declare namespace Trace {
|
|
|
1268
1369
|
orchestrationTrace?: never;
|
|
1269
1370
|
postProcessingTrace?: never;
|
|
1270
1371
|
failureTrace?: never;
|
|
1372
|
+
customOrchestrationTrace?: never;
|
|
1271
1373
|
$unknown?: never;
|
|
1272
1374
|
}
|
|
1273
1375
|
interface OrchestrationTraceMember {
|
|
@@ -1276,6 +1378,7 @@ export declare namespace Trace {
|
|
|
1276
1378
|
orchestrationTrace: OrchestrationTrace;
|
|
1277
1379
|
postProcessingTrace?: never;
|
|
1278
1380
|
failureTrace?: never;
|
|
1381
|
+
customOrchestrationTrace?: never;
|
|
1279
1382
|
$unknown?: never;
|
|
1280
1383
|
}
|
|
1281
1384
|
interface PostProcessingTraceMember {
|
|
@@ -1284,6 +1387,7 @@ export declare namespace Trace {
|
|
|
1284
1387
|
orchestrationTrace?: never;
|
|
1285
1388
|
postProcessingTrace: PostProcessingTrace;
|
|
1286
1389
|
failureTrace?: never;
|
|
1390
|
+
customOrchestrationTrace?: never;
|
|
1287
1391
|
$unknown?: never;
|
|
1288
1392
|
}
|
|
1289
1393
|
interface FailureTraceMember {
|
|
@@ -1292,6 +1396,16 @@ export declare namespace Trace {
|
|
|
1292
1396
|
orchestrationTrace?: never;
|
|
1293
1397
|
postProcessingTrace?: never;
|
|
1294
1398
|
failureTrace: FailureTrace;
|
|
1399
|
+
customOrchestrationTrace?: never;
|
|
1400
|
+
$unknown?: never;
|
|
1401
|
+
}
|
|
1402
|
+
interface CustomOrchestrationTraceMember {
|
|
1403
|
+
guardrailTrace?: never;
|
|
1404
|
+
preProcessingTrace?: never;
|
|
1405
|
+
orchestrationTrace?: never;
|
|
1406
|
+
postProcessingTrace?: never;
|
|
1407
|
+
failureTrace?: never;
|
|
1408
|
+
customOrchestrationTrace: CustomOrchestrationTrace;
|
|
1295
1409
|
$unknown?: never;
|
|
1296
1410
|
}
|
|
1297
1411
|
interface $UnknownMember {
|
|
@@ -1300,6 +1414,7 @@ export declare namespace Trace {
|
|
|
1300
1414
|
orchestrationTrace?: never;
|
|
1301
1415
|
postProcessingTrace?: never;
|
|
1302
1416
|
failureTrace?: never;
|
|
1417
|
+
customOrchestrationTrace?: never;
|
|
1303
1418
|
$unknown: [string, any];
|
|
1304
1419
|
}
|
|
1305
1420
|
interface Visitor<T> {
|
|
@@ -1308,6 +1423,7 @@ export declare namespace Trace {
|
|
|
1308
1423
|
orchestrationTrace: (value: OrchestrationTrace) => T;
|
|
1309
1424
|
postProcessingTrace: (value: PostProcessingTrace) => T;
|
|
1310
1425
|
failureTrace: (value: FailureTrace) => T;
|
|
1426
|
+
customOrchestrationTrace: (value: CustomOrchestrationTrace) => T;
|
|
1311
1427
|
_: (name: string, value: any) => T;
|
|
1312
1428
|
}
|
|
1313
1429
|
const visit: <T>(value: Trace, visitor: Visitor<T>) => T;
|
|
@@ -2109,6 +2225,70 @@ export declare namespace OptimizedPromptStream {
|
|
|
2109
2225
|
export interface OptimizePromptResponse {
|
|
2110
2226
|
optimizedPrompt: AsyncIterable<OptimizedPromptStream> | undefined;
|
|
2111
2227
|
}
|
|
2228
|
+
export interface RerankTextDocument {
|
|
2229
|
+
text?: string | undefined;
|
|
2230
|
+
}
|
|
2231
|
+
export declare const RerankQueryContentType: {
|
|
2232
|
+
readonly TEXT: "TEXT";
|
|
2233
|
+
};
|
|
2234
|
+
export type RerankQueryContentType =
|
|
2235
|
+
(typeof RerankQueryContentType)[keyof typeof RerankQueryContentType];
|
|
2236
|
+
export interface RerankQuery {
|
|
2237
|
+
type: RerankQueryContentType | undefined;
|
|
2238
|
+
textQuery: RerankTextDocument | undefined;
|
|
2239
|
+
}
|
|
2240
|
+
export interface BedrockRerankingModelConfiguration {
|
|
2241
|
+
modelArn: string | undefined;
|
|
2242
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
2243
|
+
}
|
|
2244
|
+
export interface BedrockRerankingConfiguration {
|
|
2245
|
+
numberOfResults?: number | undefined;
|
|
2246
|
+
modelConfiguration: BedrockRerankingModelConfiguration | undefined;
|
|
2247
|
+
}
|
|
2248
|
+
export declare const RerankingConfigurationType: {
|
|
2249
|
+
readonly BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL";
|
|
2250
|
+
};
|
|
2251
|
+
export type RerankingConfigurationType =
|
|
2252
|
+
(typeof RerankingConfigurationType)[keyof typeof RerankingConfigurationType];
|
|
2253
|
+
export interface RerankingConfiguration {
|
|
2254
|
+
type: RerankingConfigurationType | undefined;
|
|
2255
|
+
bedrockRerankingConfiguration: BedrockRerankingConfiguration | undefined;
|
|
2256
|
+
}
|
|
2257
|
+
export declare const RerankDocumentType: {
|
|
2258
|
+
readonly JSON: "JSON";
|
|
2259
|
+
readonly TEXT: "TEXT";
|
|
2260
|
+
};
|
|
2261
|
+
export type RerankDocumentType =
|
|
2262
|
+
(typeof RerankDocumentType)[keyof typeof RerankDocumentType];
|
|
2263
|
+
export interface RerankDocument {
|
|
2264
|
+
type: RerankDocumentType | undefined;
|
|
2265
|
+
textDocument?: RerankTextDocument | undefined;
|
|
2266
|
+
jsonDocument?: __DocumentType | undefined;
|
|
2267
|
+
}
|
|
2268
|
+
export declare const RerankSourceType: {
|
|
2269
|
+
readonly INLINE: "INLINE";
|
|
2270
|
+
};
|
|
2271
|
+
export type RerankSourceType =
|
|
2272
|
+
(typeof RerankSourceType)[keyof typeof RerankSourceType];
|
|
2273
|
+
export interface RerankSource {
|
|
2274
|
+
type: RerankSourceType | undefined;
|
|
2275
|
+
inlineDocumentSource: RerankDocument | undefined;
|
|
2276
|
+
}
|
|
2277
|
+
export interface RerankRequest {
|
|
2278
|
+
queries: RerankQuery[] | undefined;
|
|
2279
|
+
sources: RerankSource[] | undefined;
|
|
2280
|
+
rerankingConfiguration: RerankingConfiguration | undefined;
|
|
2281
|
+
nextToken?: string | undefined;
|
|
2282
|
+
}
|
|
2283
|
+
export interface RerankResult {
|
|
2284
|
+
index: number | undefined;
|
|
2285
|
+
relevanceScore: number | undefined;
|
|
2286
|
+
document?: RerankDocument | undefined;
|
|
2287
|
+
}
|
|
2288
|
+
export interface RerankResponse {
|
|
2289
|
+
results: RerankResult[] | undefined;
|
|
2290
|
+
nextToken?: string | undefined;
|
|
2291
|
+
}
|
|
2112
2292
|
export interface RetrieveAndGenerateInput {
|
|
2113
2293
|
text: string | undefined;
|
|
2114
2294
|
}
|
|
@@ -2204,6 +2384,249 @@ export interface RetrieveAndGenerateResponse {
|
|
|
2204
2384
|
citations?: Citation[] | undefined;
|
|
2205
2385
|
guardrailAction?: GuadrailAction | undefined;
|
|
2206
2386
|
}
|
|
2387
|
+
export interface CitationEvent {
|
|
2388
|
+
citation?: Citation | undefined;
|
|
2389
|
+
}
|
|
2390
|
+
export interface GuardrailEvent {
|
|
2391
|
+
action?: GuadrailAction | undefined;
|
|
2392
|
+
}
|
|
2393
|
+
export interface RetrieveAndGenerateOutputEvent {
|
|
2394
|
+
text: string | undefined;
|
|
2395
|
+
}
|
|
2396
|
+
export type RetrieveAndGenerateStreamResponseOutput =
|
|
2397
|
+
| RetrieveAndGenerateStreamResponseOutput.AccessDeniedExceptionMember
|
|
2398
|
+
| RetrieveAndGenerateStreamResponseOutput.BadGatewayExceptionMember
|
|
2399
|
+
| RetrieveAndGenerateStreamResponseOutput.CitationMember
|
|
2400
|
+
| RetrieveAndGenerateStreamResponseOutput.ConflictExceptionMember
|
|
2401
|
+
| RetrieveAndGenerateStreamResponseOutput.DependencyFailedExceptionMember
|
|
2402
|
+
| RetrieveAndGenerateStreamResponseOutput.GuardrailMember
|
|
2403
|
+
| RetrieveAndGenerateStreamResponseOutput.InternalServerExceptionMember
|
|
2404
|
+
| RetrieveAndGenerateStreamResponseOutput.OutputMember
|
|
2405
|
+
| RetrieveAndGenerateStreamResponseOutput.ResourceNotFoundExceptionMember
|
|
2406
|
+
| RetrieveAndGenerateStreamResponseOutput.ServiceQuotaExceededExceptionMember
|
|
2407
|
+
| RetrieveAndGenerateStreamResponseOutput.ThrottlingExceptionMember
|
|
2408
|
+
| RetrieveAndGenerateStreamResponseOutput.ValidationExceptionMember
|
|
2409
|
+
| RetrieveAndGenerateStreamResponseOutput.$UnknownMember;
|
|
2410
|
+
export declare namespace RetrieveAndGenerateStreamResponseOutput {
|
|
2411
|
+
interface OutputMember {
|
|
2412
|
+
output: RetrieveAndGenerateOutputEvent;
|
|
2413
|
+
citation?: never;
|
|
2414
|
+
guardrail?: never;
|
|
2415
|
+
internalServerException?: never;
|
|
2416
|
+
validationException?: never;
|
|
2417
|
+
resourceNotFoundException?: never;
|
|
2418
|
+
serviceQuotaExceededException?: never;
|
|
2419
|
+
throttlingException?: never;
|
|
2420
|
+
accessDeniedException?: never;
|
|
2421
|
+
conflictException?: never;
|
|
2422
|
+
dependencyFailedException?: never;
|
|
2423
|
+
badGatewayException?: never;
|
|
2424
|
+
$unknown?: never;
|
|
2425
|
+
}
|
|
2426
|
+
interface CitationMember {
|
|
2427
|
+
output?: never;
|
|
2428
|
+
citation: CitationEvent;
|
|
2429
|
+
guardrail?: never;
|
|
2430
|
+
internalServerException?: never;
|
|
2431
|
+
validationException?: never;
|
|
2432
|
+
resourceNotFoundException?: never;
|
|
2433
|
+
serviceQuotaExceededException?: never;
|
|
2434
|
+
throttlingException?: never;
|
|
2435
|
+
accessDeniedException?: never;
|
|
2436
|
+
conflictException?: never;
|
|
2437
|
+
dependencyFailedException?: never;
|
|
2438
|
+
badGatewayException?: never;
|
|
2439
|
+
$unknown?: never;
|
|
2440
|
+
}
|
|
2441
|
+
interface GuardrailMember {
|
|
2442
|
+
output?: never;
|
|
2443
|
+
citation?: never;
|
|
2444
|
+
guardrail: GuardrailEvent;
|
|
2445
|
+
internalServerException?: never;
|
|
2446
|
+
validationException?: never;
|
|
2447
|
+
resourceNotFoundException?: never;
|
|
2448
|
+
serviceQuotaExceededException?: never;
|
|
2449
|
+
throttlingException?: never;
|
|
2450
|
+
accessDeniedException?: never;
|
|
2451
|
+
conflictException?: never;
|
|
2452
|
+
dependencyFailedException?: never;
|
|
2453
|
+
badGatewayException?: never;
|
|
2454
|
+
$unknown?: never;
|
|
2455
|
+
}
|
|
2456
|
+
interface InternalServerExceptionMember {
|
|
2457
|
+
output?: never;
|
|
2458
|
+
citation?: never;
|
|
2459
|
+
guardrail?: never;
|
|
2460
|
+
internalServerException: InternalServerException;
|
|
2461
|
+
validationException?: never;
|
|
2462
|
+
resourceNotFoundException?: never;
|
|
2463
|
+
serviceQuotaExceededException?: never;
|
|
2464
|
+
throttlingException?: never;
|
|
2465
|
+
accessDeniedException?: never;
|
|
2466
|
+
conflictException?: never;
|
|
2467
|
+
dependencyFailedException?: never;
|
|
2468
|
+
badGatewayException?: never;
|
|
2469
|
+
$unknown?: never;
|
|
2470
|
+
}
|
|
2471
|
+
interface ValidationExceptionMember {
|
|
2472
|
+
output?: never;
|
|
2473
|
+
citation?: never;
|
|
2474
|
+
guardrail?: never;
|
|
2475
|
+
internalServerException?: never;
|
|
2476
|
+
validationException: ValidationException;
|
|
2477
|
+
resourceNotFoundException?: never;
|
|
2478
|
+
serviceQuotaExceededException?: never;
|
|
2479
|
+
throttlingException?: never;
|
|
2480
|
+
accessDeniedException?: never;
|
|
2481
|
+
conflictException?: never;
|
|
2482
|
+
dependencyFailedException?: never;
|
|
2483
|
+
badGatewayException?: never;
|
|
2484
|
+
$unknown?: never;
|
|
2485
|
+
}
|
|
2486
|
+
interface ResourceNotFoundExceptionMember {
|
|
2487
|
+
output?: never;
|
|
2488
|
+
citation?: never;
|
|
2489
|
+
guardrail?: never;
|
|
2490
|
+
internalServerException?: never;
|
|
2491
|
+
validationException?: never;
|
|
2492
|
+
resourceNotFoundException: ResourceNotFoundException;
|
|
2493
|
+
serviceQuotaExceededException?: never;
|
|
2494
|
+
throttlingException?: never;
|
|
2495
|
+
accessDeniedException?: never;
|
|
2496
|
+
conflictException?: never;
|
|
2497
|
+
dependencyFailedException?: never;
|
|
2498
|
+
badGatewayException?: never;
|
|
2499
|
+
$unknown?: never;
|
|
2500
|
+
}
|
|
2501
|
+
interface ServiceQuotaExceededExceptionMember {
|
|
2502
|
+
output?: never;
|
|
2503
|
+
citation?: never;
|
|
2504
|
+
guardrail?: never;
|
|
2505
|
+
internalServerException?: never;
|
|
2506
|
+
validationException?: never;
|
|
2507
|
+
resourceNotFoundException?: never;
|
|
2508
|
+
serviceQuotaExceededException: ServiceQuotaExceededException;
|
|
2509
|
+
throttlingException?: never;
|
|
2510
|
+
accessDeniedException?: never;
|
|
2511
|
+
conflictException?: never;
|
|
2512
|
+
dependencyFailedException?: never;
|
|
2513
|
+
badGatewayException?: never;
|
|
2514
|
+
$unknown?: never;
|
|
2515
|
+
}
|
|
2516
|
+
interface ThrottlingExceptionMember {
|
|
2517
|
+
output?: never;
|
|
2518
|
+
citation?: never;
|
|
2519
|
+
guardrail?: never;
|
|
2520
|
+
internalServerException?: never;
|
|
2521
|
+
validationException?: never;
|
|
2522
|
+
resourceNotFoundException?: never;
|
|
2523
|
+
serviceQuotaExceededException?: never;
|
|
2524
|
+
throttlingException: ThrottlingException;
|
|
2525
|
+
accessDeniedException?: never;
|
|
2526
|
+
conflictException?: never;
|
|
2527
|
+
dependencyFailedException?: never;
|
|
2528
|
+
badGatewayException?: never;
|
|
2529
|
+
$unknown?: never;
|
|
2530
|
+
}
|
|
2531
|
+
interface AccessDeniedExceptionMember {
|
|
2532
|
+
output?: never;
|
|
2533
|
+
citation?: never;
|
|
2534
|
+
guardrail?: never;
|
|
2535
|
+
internalServerException?: never;
|
|
2536
|
+
validationException?: never;
|
|
2537
|
+
resourceNotFoundException?: never;
|
|
2538
|
+
serviceQuotaExceededException?: never;
|
|
2539
|
+
throttlingException?: never;
|
|
2540
|
+
accessDeniedException: AccessDeniedException;
|
|
2541
|
+
conflictException?: never;
|
|
2542
|
+
dependencyFailedException?: never;
|
|
2543
|
+
badGatewayException?: never;
|
|
2544
|
+
$unknown?: never;
|
|
2545
|
+
}
|
|
2546
|
+
interface ConflictExceptionMember {
|
|
2547
|
+
output?: never;
|
|
2548
|
+
citation?: never;
|
|
2549
|
+
guardrail?: never;
|
|
2550
|
+
internalServerException?: never;
|
|
2551
|
+
validationException?: never;
|
|
2552
|
+
resourceNotFoundException?: never;
|
|
2553
|
+
serviceQuotaExceededException?: never;
|
|
2554
|
+
throttlingException?: never;
|
|
2555
|
+
accessDeniedException?: never;
|
|
2556
|
+
conflictException: ConflictException;
|
|
2557
|
+
dependencyFailedException?: never;
|
|
2558
|
+
badGatewayException?: never;
|
|
2559
|
+
$unknown?: never;
|
|
2560
|
+
}
|
|
2561
|
+
interface DependencyFailedExceptionMember {
|
|
2562
|
+
output?: never;
|
|
2563
|
+
citation?: never;
|
|
2564
|
+
guardrail?: never;
|
|
2565
|
+
internalServerException?: never;
|
|
2566
|
+
validationException?: never;
|
|
2567
|
+
resourceNotFoundException?: never;
|
|
2568
|
+
serviceQuotaExceededException?: never;
|
|
2569
|
+
throttlingException?: never;
|
|
2570
|
+
accessDeniedException?: never;
|
|
2571
|
+
conflictException?: never;
|
|
2572
|
+
dependencyFailedException: DependencyFailedException;
|
|
2573
|
+
badGatewayException?: never;
|
|
2574
|
+
$unknown?: never;
|
|
2575
|
+
}
|
|
2576
|
+
interface BadGatewayExceptionMember {
|
|
2577
|
+
output?: never;
|
|
2578
|
+
citation?: never;
|
|
2579
|
+
guardrail?: never;
|
|
2580
|
+
internalServerException?: never;
|
|
2581
|
+
validationException?: never;
|
|
2582
|
+
resourceNotFoundException?: never;
|
|
2583
|
+
serviceQuotaExceededException?: never;
|
|
2584
|
+
throttlingException?: never;
|
|
2585
|
+
accessDeniedException?: never;
|
|
2586
|
+
conflictException?: never;
|
|
2587
|
+
dependencyFailedException?: never;
|
|
2588
|
+
badGatewayException: BadGatewayException;
|
|
2589
|
+
$unknown?: never;
|
|
2590
|
+
}
|
|
2591
|
+
interface $UnknownMember {
|
|
2592
|
+
output?: never;
|
|
2593
|
+
citation?: never;
|
|
2594
|
+
guardrail?: never;
|
|
2595
|
+
internalServerException?: never;
|
|
2596
|
+
validationException?: never;
|
|
2597
|
+
resourceNotFoundException?: never;
|
|
2598
|
+
serviceQuotaExceededException?: never;
|
|
2599
|
+
throttlingException?: never;
|
|
2600
|
+
accessDeniedException?: never;
|
|
2601
|
+
conflictException?: never;
|
|
2602
|
+
dependencyFailedException?: never;
|
|
2603
|
+
badGatewayException?: never;
|
|
2604
|
+
$unknown: [string, any];
|
|
2605
|
+
}
|
|
2606
|
+
interface Visitor<T> {
|
|
2607
|
+
output: (value: RetrieveAndGenerateOutputEvent) => T;
|
|
2608
|
+
citation: (value: CitationEvent) => T;
|
|
2609
|
+
guardrail: (value: GuardrailEvent) => T;
|
|
2610
|
+
internalServerException: (value: InternalServerException) => T;
|
|
2611
|
+
validationException: (value: ValidationException) => T;
|
|
2612
|
+
resourceNotFoundException: (value: ResourceNotFoundException) => T;
|
|
2613
|
+
serviceQuotaExceededException: (value: ServiceQuotaExceededException) => T;
|
|
2614
|
+
throttlingException: (value: ThrottlingException) => T;
|
|
2615
|
+
accessDeniedException: (value: AccessDeniedException) => T;
|
|
2616
|
+
conflictException: (value: ConflictException) => T;
|
|
2617
|
+
dependencyFailedException: (value: DependencyFailedException) => T;
|
|
2618
|
+
badGatewayException: (value: BadGatewayException) => T;
|
|
2619
|
+
_: (name: string, value: any) => T;
|
|
2620
|
+
}
|
|
2621
|
+
const visit: <T>(
|
|
2622
|
+
value: RetrieveAndGenerateStreamResponseOutput,
|
|
2623
|
+
visitor: Visitor<T>
|
|
2624
|
+
) => T;
|
|
2625
|
+
}
|
|
2626
|
+
export interface RetrieveAndGenerateStreamResponse {
|
|
2627
|
+
stream: AsyncIterable<RetrieveAndGenerateStreamResponseOutput> | undefined;
|
|
2628
|
+
sessionId: string | undefined;
|
|
2629
|
+
}
|
|
2207
2630
|
export interface KnowledgeBaseQuery {
|
|
2208
2631
|
text: string | undefined;
|
|
2209
2632
|
}
|
|
@@ -2215,6 +2638,7 @@ export interface KnowledgeBaseRetrievalResult {
|
|
|
2215
2638
|
}
|
|
2216
2639
|
export interface RetrieveResponse {
|
|
2217
2640
|
retrievalResults: KnowledgeBaseRetrievalResult[] | undefined;
|
|
2641
|
+
guardrailAction?: GuadrailAction | undefined;
|
|
2218
2642
|
nextToken?: string | undefined;
|
|
2219
2643
|
}
|
|
2220
2644
|
export type RetrievalFilter =
|
|
@@ -2479,6 +2903,8 @@ export interface KnowledgeBaseVectorSearchConfiguration {
|
|
|
2479
2903
|
numberOfResults?: number | undefined;
|
|
2480
2904
|
overrideSearchType?: SearchType | undefined;
|
|
2481
2905
|
filter?: RetrievalFilter | undefined;
|
|
2906
|
+
rerankingConfiguration?: VectorSearchRerankingConfiguration | undefined;
|
|
2907
|
+
implicitFilterConfiguration?: ImplicitFilterConfiguration | undefined;
|
|
2482
2908
|
}
|
|
2483
2909
|
export interface KnowledgeBaseRetrievalConfiguration {
|
|
2484
2910
|
vectorSearchConfiguration: KnowledgeBaseVectorSearchConfiguration | undefined;
|
|
@@ -2503,6 +2929,7 @@ export interface RetrieveRequest {
|
|
|
2503
2929
|
knowledgeBaseId: string | undefined;
|
|
2504
2930
|
retrievalQuery: KnowledgeBaseQuery | undefined;
|
|
2505
2931
|
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined;
|
|
2932
|
+
guardrailConfiguration?: GuardrailConfiguration | undefined;
|
|
2506
2933
|
nextToken?: string | undefined;
|
|
2507
2934
|
}
|
|
2508
2935
|
export interface RetrieveAndGenerateConfiguration {
|
|
@@ -2537,6 +2964,14 @@ export interface RetrieveAndGenerateRequest {
|
|
|
2537
2964
|
| undefined;
|
|
2538
2965
|
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined;
|
|
2539
2966
|
}
|
|
2967
|
+
export interface RetrieveAndGenerateStreamRequest {
|
|
2968
|
+
sessionId?: string | undefined;
|
|
2969
|
+
input: RetrieveAndGenerateInput | undefined;
|
|
2970
|
+
retrieveAndGenerateConfiguration?:
|
|
2971
|
+
| RetrieveAndGenerateConfiguration
|
|
2972
|
+
| undefined;
|
|
2973
|
+
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined;
|
|
2974
|
+
}
|
|
2540
2975
|
export interface SessionState {
|
|
2541
2976
|
sessionAttributes?: Record<string, string> | undefined;
|
|
2542
2977
|
promptSessionAttributes?: Record<string, string> | undefined;
|
|
@@ -2554,6 +2989,7 @@ export interface InvokeAgentRequest {
|
|
|
2554
2989
|
enableTrace?: boolean | undefined;
|
|
2555
2990
|
inputText?: string | undefined;
|
|
2556
2991
|
memoryId?: string | undefined;
|
|
2992
|
+
streamingConfigurations?: StreamingConfigurations | undefined;
|
|
2557
2993
|
}
|
|
2558
2994
|
export declare const ActionGroupInvocationInputFilterSensitiveLog: (
|
|
2559
2995
|
obj: ActionGroupInvocationInput
|
|
@@ -2620,6 +3056,24 @@ export declare const ByteContentFileFilterSensitiveLog: (
|
|
|
2620
3056
|
) => any;
|
|
2621
3057
|
export declare const FileSourceFilterSensitiveLog: (obj: FileSource) => any;
|
|
2622
3058
|
export declare const InputFileFilterSensitiveLog: (obj: InputFile) => any;
|
|
3059
|
+
export declare const MetadataAttributeSchemaFilterSensitiveLog: (
|
|
3060
|
+
obj: MetadataAttributeSchema
|
|
3061
|
+
) => any;
|
|
3062
|
+
export declare const ImplicitFilterConfigurationFilterSensitiveLog: (
|
|
3063
|
+
obj: ImplicitFilterConfiguration
|
|
3064
|
+
) => any;
|
|
3065
|
+
export declare const RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog: (
|
|
3066
|
+
obj: RerankingMetadataSelectiveModeConfiguration
|
|
3067
|
+
) => any;
|
|
3068
|
+
export declare const MetadataConfigurationForRerankingFilterSensitiveLog: (
|
|
3069
|
+
obj: MetadataConfigurationForReranking
|
|
3070
|
+
) => any;
|
|
3071
|
+
export declare const VectorSearchBedrockRerankingConfigurationFilterSensitiveLog: (
|
|
3072
|
+
obj: VectorSearchBedrockRerankingConfiguration
|
|
3073
|
+
) => any;
|
|
3074
|
+
export declare const VectorSearchRerankingConfigurationFilterSensitiveLog: (
|
|
3075
|
+
obj: VectorSearchRerankingConfiguration
|
|
3076
|
+
) => any;
|
|
2623
3077
|
export declare const ApiResultFilterSensitiveLog: (obj: ApiResult) => any;
|
|
2624
3078
|
export declare const InvocationResultMemberFilterSensitiveLog: (
|
|
2625
3079
|
obj: InvocationResultMember
|
|
@@ -2653,6 +3107,12 @@ export declare const InvocationInputMemberFilterSensitiveLog: (
|
|
|
2653
3107
|
export declare const ReturnControlPayloadFilterSensitiveLog: (
|
|
2654
3108
|
obj: ReturnControlPayload
|
|
2655
3109
|
) => any;
|
|
3110
|
+
export declare const CustomOrchestrationTraceEventFilterSensitiveLog: (
|
|
3111
|
+
obj: CustomOrchestrationTraceEvent
|
|
3112
|
+
) => any;
|
|
3113
|
+
export declare const CustomOrchestrationTraceFilterSensitiveLog: (
|
|
3114
|
+
obj: CustomOrchestrationTrace
|
|
3115
|
+
) => any;
|
|
2656
3116
|
export declare const FailureTraceFilterSensitiveLog: (obj: FailureTrace) => any;
|
|
2657
3117
|
export declare const GuardrailContentFilterFilterSensitiveLog: (
|
|
2658
3118
|
obj: GuardrailContentFilter
|
|
@@ -2792,6 +3252,21 @@ export declare const OptimizedPromptStreamFilterSensitiveLog: (
|
|
|
2792
3252
|
export declare const OptimizePromptResponseFilterSensitiveLog: (
|
|
2793
3253
|
obj: OptimizePromptResponse
|
|
2794
3254
|
) => any;
|
|
3255
|
+
export declare const RerankTextDocumentFilterSensitiveLog: (
|
|
3256
|
+
obj: RerankTextDocument
|
|
3257
|
+
) => any;
|
|
3258
|
+
export declare const RerankQueryFilterSensitiveLog: (obj: RerankQuery) => any;
|
|
3259
|
+
export declare const RerankDocumentFilterSensitiveLog: (
|
|
3260
|
+
obj: RerankDocument
|
|
3261
|
+
) => any;
|
|
3262
|
+
export declare const RerankSourceFilterSensitiveLog: (obj: RerankSource) => any;
|
|
3263
|
+
export declare const RerankRequestFilterSensitiveLog: (
|
|
3264
|
+
obj: RerankRequest
|
|
3265
|
+
) => any;
|
|
3266
|
+
export declare const RerankResultFilterSensitiveLog: (obj: RerankResult) => any;
|
|
3267
|
+
export declare const RerankResponseFilterSensitiveLog: (
|
|
3268
|
+
obj: RerankResponse
|
|
3269
|
+
) => any;
|
|
2795
3270
|
export declare const RetrieveAndGenerateInputFilterSensitiveLog: (
|
|
2796
3271
|
obj: RetrieveAndGenerateInput
|
|
2797
3272
|
) => any;
|
|
@@ -2822,6 +3297,18 @@ export declare const RetrieveAndGenerateOutputFilterSensitiveLog: (
|
|
|
2822
3297
|
export declare const RetrieveAndGenerateResponseFilterSensitiveLog: (
|
|
2823
3298
|
obj: RetrieveAndGenerateResponse
|
|
2824
3299
|
) => any;
|
|
3300
|
+
export declare const CitationEventFilterSensitiveLog: (
|
|
3301
|
+
obj: CitationEvent
|
|
3302
|
+
) => any;
|
|
3303
|
+
export declare const RetrieveAndGenerateOutputEventFilterSensitiveLog: (
|
|
3304
|
+
obj: RetrieveAndGenerateOutputEvent
|
|
3305
|
+
) => any;
|
|
3306
|
+
export declare const RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog: (
|
|
3307
|
+
obj: RetrieveAndGenerateStreamResponseOutput
|
|
3308
|
+
) => any;
|
|
3309
|
+
export declare const RetrieveAndGenerateStreamResponseFilterSensitiveLog: (
|
|
3310
|
+
obj: RetrieveAndGenerateStreamResponse
|
|
3311
|
+
) => any;
|
|
2825
3312
|
export declare const KnowledgeBaseQueryFilterSensitiveLog: (
|
|
2826
3313
|
obj: KnowledgeBaseQuery
|
|
2827
3314
|
) => any;
|
|
@@ -2861,6 +3348,9 @@ export declare const InvokeInlineAgentRequestFilterSensitiveLog: (
|
|
|
2861
3348
|
export declare const RetrieveAndGenerateRequestFilterSensitiveLog: (
|
|
2862
3349
|
obj: RetrieveAndGenerateRequest
|
|
2863
3350
|
) => any;
|
|
3351
|
+
export declare const RetrieveAndGenerateStreamRequestFilterSensitiveLog: (
|
|
3352
|
+
obj: RetrieveAndGenerateStreamRequest
|
|
3353
|
+
) => any;
|
|
2864
3354
|
export declare const SessionStateFilterSensitiveLog: (obj: SessionState) => any;
|
|
2865
3355
|
export declare const InvokeAgentRequestFilterSensitiveLog: (
|
|
2866
3356
|
obj: InvokeAgentRequest
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Paginator } from "@smithy/types";
|
|
2
|
+
import {
|
|
3
|
+
RerankCommandInput,
|
|
4
|
+
RerankCommandOutput,
|
|
5
|
+
} from "../commands/RerankCommand";
|
|
6
|
+
import { BedrockAgentRuntimePaginationConfiguration } from "./Interfaces";
|
|
7
|
+
export declare const paginateRerank: (
|
|
8
|
+
config: BedrockAgentRuntimePaginationConfiguration,
|
|
9
|
+
input: RerankCommandInput,
|
|
10
|
+
...rest: any[]
|
|
11
|
+
) => Paginator<RerankCommandOutput>;
|