@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.
Files changed (33) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/index.js +791 -66
  3. package/dist-es/BedrockAgentRuntime.js +4 -0
  4. package/dist-es/commands/RerankCommand.js +23 -0
  5. package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +27 -0
  6. package/dist-es/commands/index.js +2 -0
  7. package/dist-es/models/models_0.js +345 -48
  8. package/dist-es/pagination/RerankPaginator.js +4 -0
  9. package/dist-es/pagination/index.js +1 -0
  10. package/dist-es/protocols/Aws_restJson1.js +277 -3
  11. package/dist-types/BedrockAgentRuntime.d.ts +14 -0
  12. package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
  13. package/dist-types/commands/InvokeAgentCommand.d.ts +396 -22
  14. package/dist-types/commands/InvokeInlineAgentCommand.d.ts +376 -21
  15. package/dist-types/commands/RerankCommand.d.ts +143 -0
  16. package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +42 -2
  17. package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +371 -0
  18. package/dist-types/commands/RetrieveCommand.d.ts +46 -1
  19. package/dist-types/commands/index.d.ts +2 -0
  20. package/dist-types/models/models_0.d.ts +1713 -404
  21. package/dist-types/pagination/RerankPaginator.d.ts +7 -0
  22. package/dist-types/pagination/index.d.ts +1 -0
  23. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  24. package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +34 -0
  25. package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +12 -0
  26. package/dist-types/ts3.4/commands/RerankCommand.d.ts +41 -0
  27. package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +51 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  29. package/dist-types/ts3.4/models/models_0.d.ts +764 -110
  30. package/dist-types/ts3.4/pagination/RerankPaginator.d.ts +11 -0
  31. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  32. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  33. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { BedrockAgentRuntimeServiceException as __BaseException } from "../models/BedrockAgentRuntimeServiceException";
5
5
  import { AccessDeniedException, BadGatewayException, ConflictException, DependencyFailedException, FlowInputContent, InternalServerException, ResourceNotFoundException, RetrievalFilter, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_DeleteAgentMemoryCommand = async (input, context) => {
@@ -34,9 +34,10 @@ export const se_GetAgentMemoryCommand = async (input, context) => {
34
34
  };
35
35
  export const se_InvokeAgentCommand = async (input, context) => {
36
36
  const b = rb(input, context);
37
- const headers = {
37
+ const headers = map({}, isSerializableHeaderValue, {
38
38
  "content-type": "application/json",
39
- };
39
+ [_xasa]: input[_sA],
40
+ });
40
41
  b.bp("/agents/{agentId}/agentAliases/{agentAliasId}/sessions/{sessionId}/text");
41
42
  b.p("agentId", () => input.agentId, "{agentId}", false);
42
43
  b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
@@ -108,6 +109,22 @@ export const se_OptimizePromptCommand = async (input, context) => {
108
109
  b.m("POST").h(headers).b(body);
109
110
  return b.build();
110
111
  };
112
+ export const se_RerankCommand = async (input, context) => {
113
+ const b = rb(input, context);
114
+ const headers = {
115
+ "content-type": "application/json",
116
+ };
117
+ b.bp("/rerank");
118
+ let body;
119
+ body = JSON.stringify(take(input, {
120
+ nextToken: [],
121
+ queries: (_) => _json(_),
122
+ rerankingConfiguration: (_) => se_RerankingConfiguration(_, context),
123
+ sources: (_) => se_RerankSourcesList(_, context),
124
+ }));
125
+ b.m("POST").h(headers).b(body);
126
+ return b.build();
127
+ };
111
128
  export const se_RetrieveCommand = async (input, context) => {
112
129
  const b = rb(input, context);
113
130
  const headers = {
@@ -117,6 +134,7 @@ export const se_RetrieveCommand = async (input, context) => {
117
134
  b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
118
135
  let body;
119
136
  body = JSON.stringify(take(input, {
137
+ guardrailConfiguration: (_) => _json(_),
120
138
  nextToken: [],
121
139
  retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
122
140
  retrievalQuery: (_) => _json(_),
@@ -140,6 +158,22 @@ export const se_RetrieveAndGenerateCommand = async (input, context) => {
140
158
  b.m("POST").h(headers).b(body);
141
159
  return b.build();
142
160
  };
161
+ export const se_RetrieveAndGenerateStreamCommand = async (input, context) => {
162
+ const b = rb(input, context);
163
+ const headers = {
164
+ "content-type": "application/json",
165
+ };
166
+ b.bp("/retrieveAndGenerateStream");
167
+ let body;
168
+ body = JSON.stringify(take(input, {
169
+ input: (_) => _json(_),
170
+ retrieveAndGenerateConfiguration: (_) => se_RetrieveAndGenerateConfiguration(_, context),
171
+ sessionConfiguration: (_) => _json(_),
172
+ sessionId: [],
173
+ }));
174
+ b.m("POST").h(headers).b(body);
175
+ return b.build();
176
+ };
143
177
  export const de_DeleteAgentMemoryCommand = async (output, context) => {
144
178
  if (output.statusCode !== 202 && output.statusCode >= 300) {
145
179
  return de_CommandError(output, context);
@@ -214,6 +248,21 @@ export const de_OptimizePromptCommand = async (output, context) => {
214
248
  contents.optimizedPrompt = de_OptimizedPromptStream(data, context);
215
249
  return contents;
216
250
  };
251
+ export const de_RerankCommand = async (output, context) => {
252
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
253
+ return de_CommandError(output, context);
254
+ }
255
+ const contents = map({
256
+ $metadata: deserializeMetadata(output),
257
+ });
258
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
259
+ const doc = take(data, {
260
+ nextToken: __expectString,
261
+ results: (_) => de_RerankResultsList(_, context),
262
+ });
263
+ Object.assign(contents, doc);
264
+ return contents;
265
+ };
217
266
  export const de_RetrieveCommand = async (output, context) => {
218
267
  if (output.statusCode !== 200 && output.statusCode >= 300) {
219
268
  return de_CommandError(output, context);
@@ -223,6 +272,7 @@ export const de_RetrieveCommand = async (output, context) => {
223
272
  });
224
273
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
225
274
  const doc = take(data, {
275
+ guardrailAction: __expectString,
226
276
  nextToken: __expectString,
227
277
  retrievalResults: (_) => de_KnowledgeBaseRetrievalResults(_, context),
228
278
  });
@@ -246,6 +296,18 @@ export const de_RetrieveAndGenerateCommand = async (output, context) => {
246
296
  Object.assign(contents, doc);
247
297
  return contents;
248
298
  };
299
+ export const de_RetrieveAndGenerateStreamCommand = async (output, context) => {
300
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
301
+ return de_CommandError(output, context);
302
+ }
303
+ const contents = map({
304
+ $metadata: deserializeMetadata(output),
305
+ [_sI]: [, output.headers[_xabkbsi]],
306
+ });
307
+ const data = output.body;
308
+ contents.stream = de_RetrieveAndGenerateStreamResponseOutput(data, context);
309
+ return contents;
310
+ };
249
311
  const de_CommandError = async (output, context) => {
250
312
  const parsedOutput = {
251
313
  ...output,
@@ -659,6 +721,71 @@ const de_ResponseStream = (output, context) => {
659
721
  return { $unknown: output };
660
722
  });
661
723
  };
724
+ const de_RetrieveAndGenerateStreamResponseOutput = (output, context) => {
725
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
726
+ if (event["output"] != null) {
727
+ return {
728
+ output: await de_RetrieveAndGenerateOutputEvent_event(event["output"], context),
729
+ };
730
+ }
731
+ if (event["citation"] != null) {
732
+ return {
733
+ citation: await de_CitationEvent_event(event["citation"], context),
734
+ };
735
+ }
736
+ if (event["guardrail"] != null) {
737
+ return {
738
+ guardrail: await de_GuardrailEvent_event(event["guardrail"], context),
739
+ };
740
+ }
741
+ if (event["internalServerException"] != null) {
742
+ return {
743
+ internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
744
+ };
745
+ }
746
+ if (event["validationException"] != null) {
747
+ return {
748
+ validationException: await de_ValidationException_event(event["validationException"], context),
749
+ };
750
+ }
751
+ if (event["resourceNotFoundException"] != null) {
752
+ return {
753
+ resourceNotFoundException: await de_ResourceNotFoundException_event(event["resourceNotFoundException"], context),
754
+ };
755
+ }
756
+ if (event["serviceQuotaExceededException"] != null) {
757
+ return {
758
+ serviceQuotaExceededException: await de_ServiceQuotaExceededException_event(event["serviceQuotaExceededException"], context),
759
+ };
760
+ }
761
+ if (event["throttlingException"] != null) {
762
+ return {
763
+ throttlingException: await de_ThrottlingException_event(event["throttlingException"], context),
764
+ };
765
+ }
766
+ if (event["accessDeniedException"] != null) {
767
+ return {
768
+ accessDeniedException: await de_AccessDeniedException_event(event["accessDeniedException"], context),
769
+ };
770
+ }
771
+ if (event["conflictException"] != null) {
772
+ return {
773
+ conflictException: await de_ConflictException_event(event["conflictException"], context),
774
+ };
775
+ }
776
+ if (event["dependencyFailedException"] != null) {
777
+ return {
778
+ dependencyFailedException: await de_DependencyFailedException_event(event["dependencyFailedException"], context),
779
+ };
780
+ }
781
+ if (event["badGatewayException"] != null) {
782
+ return {
783
+ badGatewayException: await de_BadGatewayException_event(event["badGatewayException"], context),
784
+ };
785
+ }
786
+ return { $unknown: output };
787
+ });
788
+ };
662
789
  const de_AccessDeniedException_event = async (output, context) => {
663
790
  const parsedOutput = {
664
791
  ...output,
@@ -679,6 +806,12 @@ const de_BadGatewayException_event = async (output, context) => {
679
806
  };
680
807
  return de_BadGatewayExceptionRes(parsedOutput, context);
681
808
  };
809
+ const de_CitationEvent_event = async (output, context) => {
810
+ const contents = {};
811
+ const data = await parseBody(output.body, context);
812
+ Object.assign(contents, de_CitationEvent(data, context));
813
+ return contents;
814
+ };
682
815
  const de_ConflictException_event = async (output, context) => {
683
816
  const parsedOutput = {
684
817
  ...output,
@@ -717,6 +850,12 @@ const de_FlowTraceEvent_event = async (output, context) => {
717
850
  Object.assign(contents, de_FlowTraceEvent(data, context));
718
851
  return contents;
719
852
  };
853
+ const de_GuardrailEvent_event = async (output, context) => {
854
+ const contents = {};
855
+ const data = await parseBody(output.body, context);
856
+ Object.assign(contents, _json(data));
857
+ return contents;
858
+ };
720
859
  const de_InlineAgentFilePart_event = async (output, context) => {
721
860
  const contents = {};
722
861
  const data = await parseBody(output.body, context);
@@ -767,6 +906,12 @@ const de_ResourceNotFoundException_event = async (output, context) => {
767
906
  };
768
907
  return de_ResourceNotFoundExceptionRes(parsedOutput, context);
769
908
  };
909
+ const de_RetrieveAndGenerateOutputEvent_event = async (output, context) => {
910
+ const contents = {};
911
+ const data = await parseBody(output.body, context);
912
+ Object.assign(contents, _json(data));
913
+ return contents;
914
+ };
770
915
  const de_ReturnControlPayload_event = async (output, context) => {
771
916
  const contents = {};
772
917
  const data = await parseBody(output.body, context);
@@ -812,6 +957,18 @@ const se_AdditionalModelRequestFields = (input, context) => {
812
957
  const se_AdditionalModelRequestFieldsValue = (input, context) => {
813
958
  return input;
814
959
  };
960
+ const se_BedrockRerankingConfiguration = (input, context) => {
961
+ return take(input, {
962
+ modelConfiguration: (_) => se_BedrockRerankingModelConfiguration(_, context),
963
+ numberOfResults: [],
964
+ });
965
+ };
966
+ const se_BedrockRerankingModelConfiguration = (input, context) => {
967
+ return take(input, {
968
+ additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
969
+ modelArn: [],
970
+ });
971
+ };
815
972
  const se_ByteContentDoc = (input, context) => {
816
973
  return take(input, {
817
974
  contentType: [],
@@ -979,8 +1136,10 @@ const se_KnowledgeBases = (input, context) => {
979
1136
  const se_KnowledgeBaseVectorSearchConfiguration = (input, context) => {
980
1137
  return take(input, {
981
1138
  filter: (_) => se_RetrievalFilter(_, context),
1139
+ implicitFilterConfiguration: _json,
982
1140
  numberOfResults: [],
983
1141
  overrideSearchType: [],
1142
+ rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context),
984
1143
  });
985
1144
  };
986
1145
  const se_OrchestrationConfiguration = (input, context) => {
@@ -1014,6 +1173,32 @@ const se_PromptOverrideConfiguration = (input, context) => {
1014
1173
  promptConfigurations: (_) => se_PromptConfigurations(_, context),
1015
1174
  });
1016
1175
  };
1176
+ const se_RerankDocument = (input, context) => {
1177
+ return take(input, {
1178
+ jsonDocument: (_) => se_Document(_, context),
1179
+ textDocument: _json,
1180
+ type: [],
1181
+ });
1182
+ };
1183
+ const se_RerankingConfiguration = (input, context) => {
1184
+ return take(input, {
1185
+ bedrockRerankingConfiguration: (_) => se_BedrockRerankingConfiguration(_, context),
1186
+ type: [],
1187
+ });
1188
+ };
1189
+ const se_RerankSource = (input, context) => {
1190
+ return take(input, {
1191
+ inlineDocumentSource: (_) => se_RerankDocument(_, context),
1192
+ type: [],
1193
+ });
1194
+ };
1195
+ const se_RerankSourcesList = (input, context) => {
1196
+ return input
1197
+ .filter((e) => e != null)
1198
+ .map((entry) => {
1199
+ return se_RerankSource(entry, context);
1200
+ });
1201
+ };
1017
1202
  const se_RetrievalFilter = (input, context) => {
1018
1203
  return RetrievalFilter.visit(input, {
1019
1204
  andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
@@ -1048,6 +1233,7 @@ const se_RetrieveAndGenerateConfiguration = (input, context) => {
1048
1233
  };
1049
1234
  const se_SessionState = (input, context) => {
1050
1235
  return take(input, {
1236
+ conversationHistory: _json,
1051
1237
  files: (_) => se_InputFiles(_, context),
1052
1238
  invocationId: [],
1053
1239
  knowledgeBaseConfigurations: (_) => se_KnowledgeBaseConfigurations(_, context),
@@ -1064,9 +1250,35 @@ const se_TextInferenceConfig = (input, context) => {
1064
1250
  topP: __serializeFloat,
1065
1251
  });
1066
1252
  };
1253
+ const se_VectorSearchBedrockRerankingConfiguration = (input, context) => {
1254
+ return take(input, {
1255
+ metadataConfiguration: _json,
1256
+ modelConfiguration: (_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context),
1257
+ numberOfRerankedResults: [],
1258
+ });
1259
+ };
1260
+ const se_VectorSearchBedrockRerankingModelConfiguration = (input, context) => {
1261
+ return take(input, {
1262
+ additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
1263
+ modelArn: [],
1264
+ });
1265
+ };
1266
+ const se_VectorSearchRerankingConfiguration = (input, context) => {
1267
+ return take(input, {
1268
+ bedrockRerankingConfiguration: (_) => se_VectorSearchBedrockRerankingConfiguration(_, context),
1269
+ type: [],
1270
+ });
1271
+ };
1067
1272
  const se_Document = (input, context) => {
1068
1273
  return input;
1069
1274
  };
1275
+ const de_AgentCollaboratorInvocationOutput = (output, context) => {
1276
+ return take(output, {
1277
+ agentCollaboratorAliasArn: __expectString,
1278
+ agentCollaboratorName: __expectString,
1279
+ output: _json,
1280
+ });
1281
+ };
1070
1282
  const de_Attribution = (output, context) => {
1071
1283
  return take(output, {
1072
1284
  citations: (_) => de_Citations(_, context),
@@ -1078,6 +1290,11 @@ const de_Citation = (output, context) => {
1078
1290
  retrievedReferences: (_) => de_RetrievedReferences(_, context),
1079
1291
  });
1080
1292
  };
1293
+ const de_CitationEvent = (output, context) => {
1294
+ return take(output, {
1295
+ citation: (_) => de_Citation(_, context),
1296
+ });
1297
+ };
1081
1298
  const de_Citations = (output, context) => {
1082
1299
  const retVal = (output || [])
1083
1300
  .filter((e) => e != null)
@@ -1268,6 +1485,7 @@ const de_MemorySessionSummary = (output, context) => {
1268
1485
  };
1269
1486
  const de_ModelInvocationInput = (output, context) => {
1270
1487
  return take(output, {
1488
+ foundationModel: __expectString,
1271
1489
  inferenceConfiguration: (_) => de_InferenceConfiguration(_, context),
1272
1490
  overrideLambda: __expectString,
1273
1491
  parserMode: __expectString,
@@ -1280,6 +1498,7 @@ const de_ModelInvocationInput = (output, context) => {
1280
1498
  const de_Observation = (output, context) => {
1281
1499
  return take(output, {
1282
1500
  actionGroupInvocationOutput: _json,
1501
+ agentCollaboratorInvocationOutput: (_) => de_AgentCollaboratorInvocationOutput(_, context),
1283
1502
  codeInterpreterInvocationOutput: _json,
1284
1503
  finalResponse: _json,
1285
1504
  knowledgeBaseLookupOutput: (_) => de_KnowledgeBaseLookupOutput(_, context),
@@ -1363,6 +1582,28 @@ const de_PreProcessingTrace = (output, context) => {
1363
1582
  }
1364
1583
  return { $unknown: Object.entries(output)[0] };
1365
1584
  };
1585
+ const de_RerankDocument = (output, context) => {
1586
+ return take(output, {
1587
+ jsonDocument: (_) => de_Document(_, context),
1588
+ textDocument: _json,
1589
+ type: __expectString,
1590
+ });
1591
+ };
1592
+ const de_RerankResult = (output, context) => {
1593
+ return take(output, {
1594
+ document: (_) => de_RerankDocument(_, context),
1595
+ index: __expectInt32,
1596
+ relevanceScore: __limitedParseFloat32,
1597
+ });
1598
+ };
1599
+ const de_RerankResultsList = (output, context) => {
1600
+ const retVal = (output || [])
1601
+ .filter((e) => e != null)
1602
+ .map((entry) => {
1603
+ return de_RerankResult(entry, context);
1604
+ });
1605
+ return retVal;
1606
+ };
1366
1607
  const de_RetrievalResultMetadata = (output, context) => {
1367
1608
  return Object.entries(output).reduce((acc, [key, value]) => {
1368
1609
  if (value === null) {
@@ -1390,6 +1631,29 @@ const de_RetrievedReferences = (output, context) => {
1390
1631
  });
1391
1632
  return retVal;
1392
1633
  };
1634
+ const de_RoutingClassifierTrace = (output, context) => {
1635
+ if (output.invocationInput != null) {
1636
+ return {
1637
+ invocationInput: _json(output.invocationInput),
1638
+ };
1639
+ }
1640
+ if (output.modelInvocationInput != null) {
1641
+ return {
1642
+ modelInvocationInput: de_ModelInvocationInput(output.modelInvocationInput, context),
1643
+ };
1644
+ }
1645
+ if (output.modelInvocationOutput != null) {
1646
+ return {
1647
+ modelInvocationOutput: _json(output.modelInvocationOutput),
1648
+ };
1649
+ }
1650
+ if (output.observation != null) {
1651
+ return {
1652
+ observation: de_Observation(output.observation, context),
1653
+ };
1654
+ }
1655
+ return { $unknown: Object.entries(output)[0] };
1656
+ };
1393
1657
  const de_Trace = (output, context) => {
1394
1658
  if (output.customOrchestrationTrace != null) {
1395
1659
  return {
@@ -1421,6 +1685,11 @@ const de_Trace = (output, context) => {
1421
1685
  preProcessingTrace: de_PreProcessingTrace(__expectUnion(output.preProcessingTrace), context),
1422
1686
  };
1423
1687
  }
1688
+ if (output.routingClassifierTrace != null) {
1689
+ return {
1690
+ routingClassifierTrace: de_RoutingClassifierTrace(__expectUnion(output.routingClassifierTrace), context),
1691
+ };
1692
+ }
1424
1693
  return { $unknown: Object.entries(output)[0] };
1425
1694
  };
1426
1695
  const de_TracePart = (output, context) => {
@@ -1428,6 +1697,8 @@ const de_TracePart = (output, context) => {
1428
1697
  agentAliasId: __expectString,
1429
1698
  agentId: __expectString,
1430
1699
  agentVersion: __expectString,
1700
+ callerChain: _json,
1701
+ collaboratorName: __expectString,
1431
1702
  sessionId: __expectString,
1432
1703
  trace: (_) => de_Trace(__expectUnion(_), context),
1433
1704
  });
@@ -1447,7 +1718,10 @@ const _mI = "memoryId";
1447
1718
  const _mIa = "maxItems";
1448
1719
  const _mT = "memoryType";
1449
1720
  const _nT = "nextToken";
1721
+ const _sA = "sourceArn";
1450
1722
  const _sI = "sessionId";
1451
1723
  const _xabact = "x-amzn-bedrock-agent-content-type";
1452
1724
  const _xabami = "x-amz-bedrock-agent-memory-id";
1453
1725
  const _xabasi = "x-amz-bedrock-agent-session-id";
1726
+ const _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id";
1727
+ const _xasa = "x-amz-source-arn";
@@ -6,7 +6,9 @@ import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/In
6
6
  import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
7
7
  import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
8
8
  import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
9
+ import { RerankCommandInput, RerankCommandOutput } from "./commands/RerankCommand";
9
10
  import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
11
+ import { RetrieveAndGenerateStreamCommandInput, RetrieveAndGenerateStreamCommandOutput } from "./commands/RetrieveAndGenerateStreamCommand";
10
12
  import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
11
13
  export interface BedrockAgentRuntime {
12
14
  /**
@@ -45,6 +47,12 @@ export interface BedrockAgentRuntime {
45
47
  optimizePrompt(args: OptimizePromptCommandInput, options?: __HttpHandlerOptions): Promise<OptimizePromptCommandOutput>;
46
48
  optimizePrompt(args: OptimizePromptCommandInput, cb: (err: any, data?: OptimizePromptCommandOutput) => void): void;
47
49
  optimizePrompt(args: OptimizePromptCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: OptimizePromptCommandOutput) => void): void;
50
+ /**
51
+ * @see {@link RerankCommand}
52
+ */
53
+ rerank(args: RerankCommandInput, options?: __HttpHandlerOptions): Promise<RerankCommandOutput>;
54
+ rerank(args: RerankCommandInput, cb: (err: any, data?: RerankCommandOutput) => void): void;
55
+ rerank(args: RerankCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RerankCommandOutput) => void): void;
48
56
  /**
49
57
  * @see {@link RetrieveCommand}
50
58
  */
@@ -57,6 +65,12 @@ export interface BedrockAgentRuntime {
57
65
  retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, options?: __HttpHandlerOptions): Promise<RetrieveAndGenerateCommandOutput>;
58
66
  retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, cb: (err: any, data?: RetrieveAndGenerateCommandOutput) => void): void;
59
67
  retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveAndGenerateCommandOutput) => void): void;
68
+ /**
69
+ * @see {@link RetrieveAndGenerateStreamCommand}
70
+ */
71
+ retrieveAndGenerateStream(args: RetrieveAndGenerateStreamCommandInput, options?: __HttpHandlerOptions): Promise<RetrieveAndGenerateStreamCommandOutput>;
72
+ retrieveAndGenerateStream(args: RetrieveAndGenerateStreamCommandInput, cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void): void;
73
+ retrieveAndGenerateStream(args: RetrieveAndGenerateStreamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void): void;
60
74
  }
61
75
  /**
62
76
  * <p>Contains APIs related to model invocation and querying of knowledge bases.</p>
@@ -14,7 +14,9 @@ import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/In
14
14
  import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
15
15
  import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
16
16
  import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
17
+ import { RerankCommandInput, RerankCommandOutput } from "./commands/RerankCommand";
17
18
  import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
19
+ import { RetrieveAndGenerateStreamCommandInput, RetrieveAndGenerateStreamCommandOutput } from "./commands/RetrieveAndGenerateStreamCommand";
18
20
  import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
19
21
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
20
22
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
@@ -22,11 +24,11 @@ export { __Client };
22
24
  /**
23
25
  * @public
24
26
  */
25
- export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RetrieveAndGenerateCommandInput | RetrieveCommandInput;
27
+ export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RerankCommandInput | RetrieveAndGenerateCommandInput | RetrieveAndGenerateStreamCommandInput | RetrieveCommandInput;
26
28
  /**
27
29
  * @public
28
30
  */
29
- export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveCommandOutput;
31
+ export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RerankCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveAndGenerateStreamCommandOutput | RetrieveCommandOutput;
30
32
  /**
31
33
  * @public
32
34
  */