@aws-sdk/client-bedrock-agent-runtime 3.701.0 → 3.705.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 +791 -66
- 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 +345 -48
- package/dist-es/pagination/RerankPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +277 -3
- package/dist-types/BedrockAgentRuntime.d.ts +14 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +396 -22
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +376 -21
- 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 +1713 -404
- 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 +764 -110
- 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
|
@@ -86,6 +86,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
86
86
|
* },
|
|
87
87
|
* httpStatusCode: Number("int"),
|
|
88
88
|
* responseState: "FAILURE" || "REPROMPT",
|
|
89
|
+
* agentId: "STRING_VALUE",
|
|
89
90
|
* },
|
|
90
91
|
* functionResult: { // FunctionResult
|
|
91
92
|
* actionGroup: "STRING_VALUE", // required
|
|
@@ -97,6 +98,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
97
98
|
* },
|
|
98
99
|
* },
|
|
99
100
|
* responseState: "FAILURE" || "REPROMPT",
|
|
101
|
+
* agentId: "STRING_VALUE",
|
|
100
102
|
* },
|
|
101
103
|
* },
|
|
102
104
|
* ],
|
|
@@ -215,6 +217,43 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
215
217
|
* "<RetrievalFilter>",
|
|
216
218
|
* ],
|
|
217
219
|
* },
|
|
220
|
+
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
|
|
221
|
+
* type: "BEDROCK_RERANKING_MODEL", // required
|
|
222
|
+
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
|
|
223
|
+
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
|
|
224
|
+
* modelArn: "STRING_VALUE", // required
|
|
225
|
+
* additionalModelRequestFields: { // AdditionalModelRequestFields
|
|
226
|
+
* "<keys>": "DOCUMENT_VALUE",
|
|
227
|
+
* },
|
|
228
|
+
* },
|
|
229
|
+
* numberOfRerankedResults: Number("int"),
|
|
230
|
+
* metadataConfiguration: { // MetadataConfigurationForReranking
|
|
231
|
+
* selectionMode: "SELECTIVE" || "ALL", // required
|
|
232
|
+
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
|
|
233
|
+
* fieldsToInclude: [ // FieldsForReranking
|
|
234
|
+
* { // FieldForReranking
|
|
235
|
+
* fieldName: "STRING_VALUE", // required
|
|
236
|
+
* },
|
|
237
|
+
* ],
|
|
238
|
+
* fieldsToExclude: [
|
|
239
|
+
* {
|
|
240
|
+
* fieldName: "STRING_VALUE", // required
|
|
241
|
+
* },
|
|
242
|
+
* ],
|
|
243
|
+
* },
|
|
244
|
+
* },
|
|
245
|
+
* },
|
|
246
|
+
* },
|
|
247
|
+
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
|
|
248
|
+
* metadataAttributes: [ // MetadataAttributeSchemaList // required
|
|
249
|
+
* { // MetadataAttributeSchema
|
|
250
|
+
* key: "STRING_VALUE", // required
|
|
251
|
+
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
|
|
252
|
+
* description: "STRING_VALUE", // required
|
|
253
|
+
* },
|
|
254
|
+
* ],
|
|
255
|
+
* modelArn: "STRING_VALUE", // required
|
|
256
|
+
* },
|
|
218
257
|
* },
|
|
219
258
|
* },
|
|
220
259
|
* },
|
|
@@ -269,7 +308,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
269
308
|
* // text: "STRING_VALUE", // required
|
|
270
309
|
* // },
|
|
271
310
|
* // location: { // RetrievalResultLocation
|
|
272
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
311
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
273
312
|
* // s3Location: { // RetrievalResultS3Location
|
|
274
313
|
* // uri: "STRING_VALUE",
|
|
275
314
|
* // },
|
|
@@ -285,6 +324,9 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
285
324
|
* // sharePointLocation: { // RetrievalResultSharePointLocation
|
|
286
325
|
* // url: "STRING_VALUE",
|
|
287
326
|
* // },
|
|
327
|
+
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
|
|
328
|
+
* // id: "STRING_VALUE",
|
|
329
|
+
* // },
|
|
288
330
|
* // },
|
|
289
331
|
* // metadata: { // RetrievalResultMetadata
|
|
290
332
|
* // "<keys>": "DOCUMENT_VALUE",
|
|
@@ -427,6 +469,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
427
469
|
* // ],
|
|
428
470
|
* // },
|
|
429
471
|
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
472
|
+
* // foundationModel: "STRING_VALUE",
|
|
430
473
|
* // },
|
|
431
474
|
* // modelInvocationOutput: { // PreProcessingModelInvocationOutput
|
|
432
475
|
* // traceId: "STRING_VALUE",
|
|
@@ -452,7 +495,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
452
495
|
* // },
|
|
453
496
|
* // invocationInput: { // InvocationInput
|
|
454
497
|
* // traceId: "STRING_VALUE",
|
|
455
|
-
* // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER",
|
|
498
|
+
* // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER" || "AGENT_COLLABORATOR",
|
|
456
499
|
* // actionGroupInvocationInput: { // ActionGroupInvocationInput
|
|
457
500
|
* // actionGroupName: "STRING_VALUE",
|
|
458
501
|
* // verb: "STRING_VALUE",
|
|
@@ -489,13 +532,107 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
489
532
|
* // "STRING_VALUE",
|
|
490
533
|
* // ],
|
|
491
534
|
* // },
|
|
535
|
+
* // agentCollaboratorInvocationInput: { // AgentCollaboratorInvocationInput
|
|
536
|
+
* // agentCollaboratorName: "STRING_VALUE",
|
|
537
|
+
* // agentCollaboratorAliasArn: "STRING_VALUE",
|
|
538
|
+
* // input: { // AgentCollaboratorInputPayload
|
|
539
|
+
* // type: "TEXT" || "RETURN_CONTROL",
|
|
540
|
+
* // text: "STRING_VALUE",
|
|
541
|
+
* // returnControlResults: { // ReturnControlResults
|
|
542
|
+
* // invocationId: "STRING_VALUE",
|
|
543
|
+
* // returnControlInvocationResults: [ // ReturnControlInvocationResults
|
|
544
|
+
* // { // InvocationResultMember Union: only one key present
|
|
545
|
+
* // apiResult: { // ApiResult
|
|
546
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
547
|
+
* // httpMethod: "STRING_VALUE",
|
|
548
|
+
* // apiPath: "STRING_VALUE",
|
|
549
|
+
* // confirmationState: "CONFIRM" || "DENY",
|
|
550
|
+
* // responseBody: { // ResponseBody
|
|
551
|
+
* // "<keys>": { // ContentBody
|
|
552
|
+
* // body: "STRING_VALUE",
|
|
553
|
+
* // },
|
|
554
|
+
* // },
|
|
555
|
+
* // httpStatusCode: Number("int"),
|
|
556
|
+
* // responseState: "FAILURE" || "REPROMPT",
|
|
557
|
+
* // agentId: "STRING_VALUE",
|
|
558
|
+
* // },
|
|
559
|
+
* // functionResult: { // FunctionResult
|
|
560
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
561
|
+
* // confirmationState: "CONFIRM" || "DENY",
|
|
562
|
+
* // function: "STRING_VALUE",
|
|
563
|
+
* // responseBody: {
|
|
564
|
+
* // "<keys>": {
|
|
565
|
+
* // body: "STRING_VALUE",
|
|
566
|
+
* // },
|
|
567
|
+
* // },
|
|
568
|
+
* // responseState: "FAILURE" || "REPROMPT",
|
|
569
|
+
* // agentId: "STRING_VALUE",
|
|
570
|
+
* // },
|
|
571
|
+
* // },
|
|
572
|
+
* // ],
|
|
573
|
+
* // },
|
|
574
|
+
* // },
|
|
575
|
+
* // },
|
|
492
576
|
* // },
|
|
493
577
|
* // observation: { // Observation
|
|
494
578
|
* // traceId: "STRING_VALUE",
|
|
495
|
-
* // type: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT",
|
|
579
|
+
* // type: "ACTION_GROUP" || "AGENT_COLLABORATOR" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT",
|
|
496
580
|
* // actionGroupInvocationOutput: { // ActionGroupInvocationOutput
|
|
497
581
|
* // text: "STRING_VALUE",
|
|
498
582
|
* // },
|
|
583
|
+
* // agentCollaboratorInvocationOutput: { // AgentCollaboratorInvocationOutput
|
|
584
|
+
* // agentCollaboratorName: "STRING_VALUE",
|
|
585
|
+
* // agentCollaboratorAliasArn: "STRING_VALUE",
|
|
586
|
+
* // output: { // AgentCollaboratorOutputPayload
|
|
587
|
+
* // type: "TEXT" || "RETURN_CONTROL",
|
|
588
|
+
* // text: "STRING_VALUE",
|
|
589
|
+
* // returnControlPayload: { // ReturnControlPayload
|
|
590
|
+
* // invocationInputs: [ // InvocationInputs
|
|
591
|
+
* // { // InvocationInputMember Union: only one key present
|
|
592
|
+
* // apiInvocationInput: { // ApiInvocationInput
|
|
593
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
594
|
+
* // httpMethod: "STRING_VALUE",
|
|
595
|
+
* // apiPath: "STRING_VALUE",
|
|
596
|
+
* // parameters: [ // ApiParameters
|
|
597
|
+
* // { // ApiParameter
|
|
598
|
+
* // name: "STRING_VALUE",
|
|
599
|
+
* // type: "STRING_VALUE",
|
|
600
|
+
* // value: "STRING_VALUE",
|
|
601
|
+
* // },
|
|
602
|
+
* // ],
|
|
603
|
+
* // requestBody: { // ApiRequestBody
|
|
604
|
+
* // content: { // ApiContentMap
|
|
605
|
+
* // "<keys>": { // PropertyParameters
|
|
606
|
+
* // properties: [ // ParameterList
|
|
607
|
+
* // "<Parameter>",
|
|
608
|
+
* // ],
|
|
609
|
+
* // },
|
|
610
|
+
* // },
|
|
611
|
+
* // },
|
|
612
|
+
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
|
|
613
|
+
* // agentId: "STRING_VALUE",
|
|
614
|
+
* // collaboratorName: "STRING_VALUE",
|
|
615
|
+
* // },
|
|
616
|
+
* // functionInvocationInput: { // FunctionInvocationInput
|
|
617
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
618
|
+
* // parameters: [ // FunctionParameters
|
|
619
|
+
* // { // FunctionParameter
|
|
620
|
+
* // name: "STRING_VALUE",
|
|
621
|
+
* // type: "STRING_VALUE",
|
|
622
|
+
* // value: "STRING_VALUE",
|
|
623
|
+
* // },
|
|
624
|
+
* // ],
|
|
625
|
+
* // function: "STRING_VALUE",
|
|
626
|
+
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
|
|
627
|
+
* // agentId: "STRING_VALUE",
|
|
628
|
+
* // collaboratorName: "STRING_VALUE",
|
|
629
|
+
* // },
|
|
630
|
+
* // },
|
|
631
|
+
* // ],
|
|
632
|
+
* // invocationId: "STRING_VALUE",
|
|
633
|
+
* // },
|
|
634
|
+
* // },
|
|
635
|
+
* // },
|
|
499
636
|
* // knowledgeBaseLookupOutput: { // KnowledgeBaseLookupOutput
|
|
500
637
|
* // retrievedReferences: [
|
|
501
638
|
* // {
|
|
@@ -503,7 +640,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
503
640
|
* // text: "STRING_VALUE", // required
|
|
504
641
|
* // },
|
|
505
642
|
* // location: {
|
|
506
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
643
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
507
644
|
* // s3Location: {
|
|
508
645
|
* // uri: "STRING_VALUE",
|
|
509
646
|
* // },
|
|
@@ -519,6 +656,9 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
519
656
|
* // sharePointLocation: {
|
|
520
657
|
* // url: "STRING_VALUE",
|
|
521
658
|
* // },
|
|
659
|
+
* // customDocumentLocation: {
|
|
660
|
+
* // id: "STRING_VALUE",
|
|
661
|
+
* // },
|
|
522
662
|
* // },
|
|
523
663
|
* // metadata: {
|
|
524
664
|
* // "<keys>": "DOCUMENT_VALUE",
|
|
@@ -558,6 +698,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
558
698
|
* // ],
|
|
559
699
|
* // },
|
|
560
700
|
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
701
|
+
* // foundationModel: "STRING_VALUE",
|
|
561
702
|
* // },
|
|
562
703
|
* // modelInvocationOutput: { // OrchestrationModelInvocationOutput
|
|
563
704
|
* // traceId: "STRING_VALUE",
|
|
@@ -589,6 +730,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
589
730
|
* // ],
|
|
590
731
|
* // },
|
|
591
732
|
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
733
|
+
* // foundationModel: "STRING_VALUE",
|
|
592
734
|
* // },
|
|
593
735
|
* // modelInvocationOutput: { // PostProcessingModelInvocationOutput
|
|
594
736
|
* // traceId: "STRING_VALUE",
|
|
@@ -606,6 +748,219 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
606
748
|
* // },
|
|
607
749
|
* // },
|
|
608
750
|
* // },
|
|
751
|
+
* // routingClassifierTrace: { // RoutingClassifierTrace Union: only one key present
|
|
752
|
+
* // invocationInput: {
|
|
753
|
+
* // traceId: "STRING_VALUE",
|
|
754
|
+
* // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER" || "AGENT_COLLABORATOR",
|
|
755
|
+
* // actionGroupInvocationInput: {
|
|
756
|
+
* // actionGroupName: "STRING_VALUE",
|
|
757
|
+
* // verb: "STRING_VALUE",
|
|
758
|
+
* // apiPath: "STRING_VALUE",
|
|
759
|
+
* // parameters: [
|
|
760
|
+
* // "<Parameter>",
|
|
761
|
+
* // ],
|
|
762
|
+
* // requestBody: {
|
|
763
|
+
* // content: {
|
|
764
|
+
* // "<keys>": [
|
|
765
|
+
* // "<Parameter>",
|
|
766
|
+
* // ],
|
|
767
|
+
* // },
|
|
768
|
+
* // },
|
|
769
|
+
* // function: "STRING_VALUE",
|
|
770
|
+
* // executionType: "LAMBDA" || "RETURN_CONTROL",
|
|
771
|
+
* // invocationId: "STRING_VALUE",
|
|
772
|
+
* // },
|
|
773
|
+
* // knowledgeBaseLookupInput: {
|
|
774
|
+
* // text: "STRING_VALUE",
|
|
775
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
776
|
+
* // },
|
|
777
|
+
* // codeInterpreterInvocationInput: {
|
|
778
|
+
* // code: "STRING_VALUE",
|
|
779
|
+
* // files: [
|
|
780
|
+
* // "STRING_VALUE",
|
|
781
|
+
* // ],
|
|
782
|
+
* // },
|
|
783
|
+
* // agentCollaboratorInvocationInput: {
|
|
784
|
+
* // agentCollaboratorName: "STRING_VALUE",
|
|
785
|
+
* // agentCollaboratorAliasArn: "STRING_VALUE",
|
|
786
|
+
* // input: {
|
|
787
|
+
* // type: "TEXT" || "RETURN_CONTROL",
|
|
788
|
+
* // text: "STRING_VALUE",
|
|
789
|
+
* // returnControlResults: {
|
|
790
|
+
* // invocationId: "STRING_VALUE",
|
|
791
|
+
* // returnControlInvocationResults: [
|
|
792
|
+
* // {// Union: only one key present
|
|
793
|
+
* // apiResult: {
|
|
794
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
795
|
+
* // httpMethod: "STRING_VALUE",
|
|
796
|
+
* // apiPath: "STRING_VALUE",
|
|
797
|
+
* // confirmationState: "CONFIRM" || "DENY",
|
|
798
|
+
* // responseBody: {
|
|
799
|
+
* // "<keys>": {
|
|
800
|
+
* // body: "STRING_VALUE",
|
|
801
|
+
* // },
|
|
802
|
+
* // },
|
|
803
|
+
* // httpStatusCode: Number("int"),
|
|
804
|
+
* // responseState: "FAILURE" || "REPROMPT",
|
|
805
|
+
* // agentId: "STRING_VALUE",
|
|
806
|
+
* // },
|
|
807
|
+
* // functionResult: {
|
|
808
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
809
|
+
* // confirmationState: "CONFIRM" || "DENY",
|
|
810
|
+
* // function: "STRING_VALUE",
|
|
811
|
+
* // responseBody: {
|
|
812
|
+
* // "<keys>": {
|
|
813
|
+
* // body: "STRING_VALUE",
|
|
814
|
+
* // },
|
|
815
|
+
* // },
|
|
816
|
+
* // responseState: "FAILURE" || "REPROMPT",
|
|
817
|
+
* // agentId: "STRING_VALUE",
|
|
818
|
+
* // },
|
|
819
|
+
* // },
|
|
820
|
+
* // ],
|
|
821
|
+
* // },
|
|
822
|
+
* // },
|
|
823
|
+
* // },
|
|
824
|
+
* // },
|
|
825
|
+
* // observation: {
|
|
826
|
+
* // traceId: "STRING_VALUE",
|
|
827
|
+
* // type: "ACTION_GROUP" || "AGENT_COLLABORATOR" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT",
|
|
828
|
+
* // actionGroupInvocationOutput: {
|
|
829
|
+
* // text: "STRING_VALUE",
|
|
830
|
+
* // },
|
|
831
|
+
* // agentCollaboratorInvocationOutput: {
|
|
832
|
+
* // agentCollaboratorName: "STRING_VALUE",
|
|
833
|
+
* // agentCollaboratorAliasArn: "STRING_VALUE",
|
|
834
|
+
* // output: {
|
|
835
|
+
* // type: "TEXT" || "RETURN_CONTROL",
|
|
836
|
+
* // text: "STRING_VALUE",
|
|
837
|
+
* // returnControlPayload: {
|
|
838
|
+
* // invocationInputs: [
|
|
839
|
+
* // {// Union: only one key present
|
|
840
|
+
* // apiInvocationInput: {
|
|
841
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
842
|
+
* // httpMethod: "STRING_VALUE",
|
|
843
|
+
* // apiPath: "STRING_VALUE",
|
|
844
|
+
* // parameters: [
|
|
845
|
+
* // {
|
|
846
|
+
* // name: "STRING_VALUE",
|
|
847
|
+
* // type: "STRING_VALUE",
|
|
848
|
+
* // value: "STRING_VALUE",
|
|
849
|
+
* // },
|
|
850
|
+
* // ],
|
|
851
|
+
* // requestBody: {
|
|
852
|
+
* // content: {
|
|
853
|
+
* // "<keys>": {
|
|
854
|
+
* // properties: [
|
|
855
|
+
* // "<Parameter>",
|
|
856
|
+
* // ],
|
|
857
|
+
* // },
|
|
858
|
+
* // },
|
|
859
|
+
* // },
|
|
860
|
+
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
|
|
861
|
+
* // agentId: "STRING_VALUE",
|
|
862
|
+
* // collaboratorName: "STRING_VALUE",
|
|
863
|
+
* // },
|
|
864
|
+
* // functionInvocationInput: {
|
|
865
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
866
|
+
* // parameters: [
|
|
867
|
+
* // {
|
|
868
|
+
* // name: "STRING_VALUE",
|
|
869
|
+
* // type: "STRING_VALUE",
|
|
870
|
+
* // value: "STRING_VALUE",
|
|
871
|
+
* // },
|
|
872
|
+
* // ],
|
|
873
|
+
* // function: "STRING_VALUE",
|
|
874
|
+
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
|
|
875
|
+
* // agentId: "STRING_VALUE",
|
|
876
|
+
* // collaboratorName: "STRING_VALUE",
|
|
877
|
+
* // },
|
|
878
|
+
* // },
|
|
879
|
+
* // ],
|
|
880
|
+
* // invocationId: "STRING_VALUE",
|
|
881
|
+
* // },
|
|
882
|
+
* // },
|
|
883
|
+
* // },
|
|
884
|
+
* // knowledgeBaseLookupOutput: {
|
|
885
|
+
* // retrievedReferences: [
|
|
886
|
+
* // {
|
|
887
|
+
* // content: {
|
|
888
|
+
* // text: "STRING_VALUE", // required
|
|
889
|
+
* // },
|
|
890
|
+
* // location: {
|
|
891
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
892
|
+
* // s3Location: {
|
|
893
|
+
* // uri: "STRING_VALUE",
|
|
894
|
+
* // },
|
|
895
|
+
* // webLocation: {
|
|
896
|
+
* // url: "STRING_VALUE",
|
|
897
|
+
* // },
|
|
898
|
+
* // confluenceLocation: {
|
|
899
|
+
* // url: "STRING_VALUE",
|
|
900
|
+
* // },
|
|
901
|
+
* // salesforceLocation: {
|
|
902
|
+
* // url: "STRING_VALUE",
|
|
903
|
+
* // },
|
|
904
|
+
* // sharePointLocation: {
|
|
905
|
+
* // url: "STRING_VALUE",
|
|
906
|
+
* // },
|
|
907
|
+
* // customDocumentLocation: {
|
|
908
|
+
* // id: "STRING_VALUE",
|
|
909
|
+
* // },
|
|
910
|
+
* // },
|
|
911
|
+
* // metadata: {
|
|
912
|
+
* // "<keys>": "DOCUMENT_VALUE",
|
|
913
|
+
* // },
|
|
914
|
+
* // },
|
|
915
|
+
* // ],
|
|
916
|
+
* // },
|
|
917
|
+
* // finalResponse: {
|
|
918
|
+
* // text: "STRING_VALUE",
|
|
919
|
+
* // },
|
|
920
|
+
* // repromptResponse: {
|
|
921
|
+
* // text: "STRING_VALUE",
|
|
922
|
+
* // source: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "PARSER",
|
|
923
|
+
* // },
|
|
924
|
+
* // codeInterpreterInvocationOutput: {
|
|
925
|
+
* // executionOutput: "STRING_VALUE",
|
|
926
|
+
* // executionError: "STRING_VALUE",
|
|
927
|
+
* // files: [
|
|
928
|
+
* // "STRING_VALUE",
|
|
929
|
+
* // ],
|
|
930
|
+
* // executionTimeout: true || false,
|
|
931
|
+
* // },
|
|
932
|
+
* // },
|
|
933
|
+
* // modelInvocationInput: {
|
|
934
|
+
* // traceId: "STRING_VALUE",
|
|
935
|
+
* // text: "STRING_VALUE",
|
|
936
|
+
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
|
|
937
|
+
* // overrideLambda: "STRING_VALUE",
|
|
938
|
+
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
939
|
+
* // inferenceConfiguration: {
|
|
940
|
+
* // temperature: Number("float"),
|
|
941
|
+
* // topP: Number("float"),
|
|
942
|
+
* // topK: Number("int"),
|
|
943
|
+
* // maximumLength: Number("int"),
|
|
944
|
+
* // stopSequences: [
|
|
945
|
+
* // "STRING_VALUE",
|
|
946
|
+
* // ],
|
|
947
|
+
* // },
|
|
948
|
+
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
949
|
+
* // foundationModel: "STRING_VALUE",
|
|
950
|
+
* // },
|
|
951
|
+
* // modelInvocationOutput: { // RoutingClassifierModelInvocationOutput
|
|
952
|
+
* // traceId: "STRING_VALUE",
|
|
953
|
+
* // rawResponse: {
|
|
954
|
+
* // content: "STRING_VALUE",
|
|
955
|
+
* // },
|
|
956
|
+
* // metadata: {
|
|
957
|
+
* // usage: {
|
|
958
|
+
* // inputTokens: Number("int"),
|
|
959
|
+
* // outputTokens: Number("int"),
|
|
960
|
+
* // },
|
|
961
|
+
* // },
|
|
962
|
+
* // },
|
|
963
|
+
* // },
|
|
609
964
|
* // failureTrace: { // FailureTrace
|
|
610
965
|
* // traceId: "STRING_VALUE",
|
|
611
966
|
* // failureReason: "STRING_VALUE",
|
|
@@ -619,38 +974,36 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
619
974
|
* // },
|
|
620
975
|
* // },
|
|
621
976
|
* // returnControl: { // InlineAgentReturnControlPayload
|
|
622
|
-
* // invocationInputs: [
|
|
623
|
-
* // {
|
|
624
|
-
* // apiInvocationInput: {
|
|
977
|
+
* // invocationInputs: [
|
|
978
|
+
* // {// Union: only one key present
|
|
979
|
+
* // apiInvocationInput: {
|
|
625
980
|
* // actionGroup: "STRING_VALUE", // required
|
|
626
981
|
* // httpMethod: "STRING_VALUE",
|
|
627
982
|
* // apiPath: "STRING_VALUE",
|
|
628
|
-
* // parameters: [
|
|
629
|
-
* // {
|
|
983
|
+
* // parameters: [
|
|
984
|
+
* // {
|
|
630
985
|
* // name: "STRING_VALUE",
|
|
631
986
|
* // type: "STRING_VALUE",
|
|
632
987
|
* // value: "STRING_VALUE",
|
|
633
988
|
* // },
|
|
634
989
|
* // ],
|
|
635
|
-
* // requestBody: {
|
|
636
|
-
* // content: {
|
|
637
|
-
* // "<keys>": {
|
|
638
|
-
* // properties: [
|
|
639
|
-
* //
|
|
640
|
-
* // name: "STRING_VALUE",
|
|
641
|
-
* // type: "STRING_VALUE",
|
|
642
|
-
* // value: "STRING_VALUE",
|
|
643
|
-
* // },
|
|
990
|
+
* // requestBody: {
|
|
991
|
+
* // content: {
|
|
992
|
+
* // "<keys>": {
|
|
993
|
+
* // properties: [
|
|
994
|
+
* // "<Parameter>",
|
|
644
995
|
* // ],
|
|
645
996
|
* // },
|
|
646
997
|
* // },
|
|
647
998
|
* // },
|
|
648
999
|
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
|
|
1000
|
+
* // agentId: "STRING_VALUE",
|
|
1001
|
+
* // collaboratorName: "STRING_VALUE",
|
|
649
1002
|
* // },
|
|
650
|
-
* // functionInvocationInput: {
|
|
1003
|
+
* // functionInvocationInput: {
|
|
651
1004
|
* // actionGroup: "STRING_VALUE", // required
|
|
652
|
-
* // parameters: [
|
|
653
|
-
* // {
|
|
1005
|
+
* // parameters: [
|
|
1006
|
+
* // {
|
|
654
1007
|
* // name: "STRING_VALUE",
|
|
655
1008
|
* // type: "STRING_VALUE",
|
|
656
1009
|
* // value: "STRING_VALUE",
|
|
@@ -658,6 +1011,8 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
658
1011
|
* // ],
|
|
659
1012
|
* // function: "STRING_VALUE",
|
|
660
1013
|
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
|
|
1014
|
+
* // agentId: "STRING_VALUE",
|
|
1015
|
+
* // collaboratorName: "STRING_VALUE",
|
|
661
1016
|
* // },
|
|
662
1017
|
* // },
|
|
663
1018
|
* // ],
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentRuntimeClient";
|
|
4
|
+
import { RerankRequest, RerankResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link RerankCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface RerankCommandInput extends RerankRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link RerankCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface RerankCommandOutput extends RerankResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const RerankCommand_base: {
|
|
25
|
+
new (input: RerankCommandInput): import("@smithy/smithy-client").CommandImpl<RerankCommandInput, RerankCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: RerankCommandInput): import("@smithy/smithy-client").CommandImpl<RerankCommandInput, RerankCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Reranks the relevance of sources based on queries. 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>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { BedrockAgentRuntimeClient, RerankCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import
|
|
35
|
+
* // const { BedrockAgentRuntimeClient, RerankCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import
|
|
36
|
+
* const client = new BedrockAgentRuntimeClient(config);
|
|
37
|
+
* const input = { // RerankRequest
|
|
38
|
+
* queries: [ // RerankQueriesList // required
|
|
39
|
+
* { // RerankQuery
|
|
40
|
+
* type: "TEXT", // required
|
|
41
|
+
* textQuery: { // RerankTextDocument
|
|
42
|
+
* text: "STRING_VALUE",
|
|
43
|
+
* },
|
|
44
|
+
* },
|
|
45
|
+
* ],
|
|
46
|
+
* sources: [ // RerankSourcesList // required
|
|
47
|
+
* { // RerankSource
|
|
48
|
+
* type: "INLINE", // required
|
|
49
|
+
* inlineDocumentSource: { // RerankDocument
|
|
50
|
+
* type: "TEXT" || "JSON", // required
|
|
51
|
+
* textDocument: {
|
|
52
|
+
* text: "STRING_VALUE",
|
|
53
|
+
* },
|
|
54
|
+
* jsonDocument: "DOCUMENT_VALUE",
|
|
55
|
+
* },
|
|
56
|
+
* },
|
|
57
|
+
* ],
|
|
58
|
+
* rerankingConfiguration: { // RerankingConfiguration
|
|
59
|
+
* type: "BEDROCK_RERANKING_MODEL", // required
|
|
60
|
+
* bedrockRerankingConfiguration: { // BedrockRerankingConfiguration
|
|
61
|
+
* numberOfResults: Number("int"),
|
|
62
|
+
* modelConfiguration: { // BedrockRerankingModelConfiguration
|
|
63
|
+
* modelArn: "STRING_VALUE", // required
|
|
64
|
+
* additionalModelRequestFields: { // AdditionalModelRequestFields
|
|
65
|
+
* "<keys>": "DOCUMENT_VALUE",
|
|
66
|
+
* },
|
|
67
|
+
* },
|
|
68
|
+
* },
|
|
69
|
+
* },
|
|
70
|
+
* nextToken: "STRING_VALUE",
|
|
71
|
+
* };
|
|
72
|
+
* const command = new RerankCommand(input);
|
|
73
|
+
* const response = await client.send(command);
|
|
74
|
+
* // { // RerankResponse
|
|
75
|
+
* // results: [ // RerankResultsList // required
|
|
76
|
+
* // { // RerankResult
|
|
77
|
+
* // index: Number("int"), // required
|
|
78
|
+
* // relevanceScore: Number("float"), // required
|
|
79
|
+
* // document: { // RerankDocument
|
|
80
|
+
* // type: "TEXT" || "JSON", // required
|
|
81
|
+
* // textDocument: { // RerankTextDocument
|
|
82
|
+
* // text: "STRING_VALUE",
|
|
83
|
+
* // },
|
|
84
|
+
* // jsonDocument: "DOCUMENT_VALUE",
|
|
85
|
+
* // },
|
|
86
|
+
* // },
|
|
87
|
+
* // ],
|
|
88
|
+
* // nextToken: "STRING_VALUE",
|
|
89
|
+
* // };
|
|
90
|
+
*
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @param RerankCommandInput - {@link RerankCommandInput}
|
|
94
|
+
* @returns {@link RerankCommandOutput}
|
|
95
|
+
* @see {@link RerankCommandInput} for command's `input` shape.
|
|
96
|
+
* @see {@link RerankCommandOutput} for command's `response` shape.
|
|
97
|
+
* @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
100
|
+
* <p>The request is denied because of missing access permissions. Check your permissions and retry your request.</p>
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link BadGatewayException} (server fault)
|
|
103
|
+
* <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link ConflictException} (client fault)
|
|
106
|
+
* <p>There was a conflict performing an operation. Resolve the conflict and retry your request.</p>
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link DependencyFailedException} (client fault)
|
|
109
|
+
* <p>There was an issue with a dependency. Check the resource configurations and retry the request.</p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link InternalServerException} (server fault)
|
|
112
|
+
* <p>An internal server error occurred. Retry your request.</p>
|
|
113
|
+
*
|
|
114
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
115
|
+
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
|
|
116
|
+
*
|
|
117
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
118
|
+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
121
|
+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link ValidationException} (client fault)
|
|
124
|
+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link BedrockAgentRuntimeServiceException}
|
|
127
|
+
* <p>Base exception class for all service exceptions from BedrockAgentRuntime service.</p>
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
export declare class RerankCommand extends RerankCommand_base {
|
|
132
|
+
/** @internal type navigation helper, not in runtime. */
|
|
133
|
+
protected static __types: {
|
|
134
|
+
api: {
|
|
135
|
+
input: RerankRequest;
|
|
136
|
+
output: RerankResponse;
|
|
137
|
+
};
|
|
138
|
+
sdk: {
|
|
139
|
+
input: RerankCommandInput;
|
|
140
|
+
output: RerankCommandOutput;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
}
|