@aws-sdk/client-bedrock-agent-runtime 3.535.0 → 3.542.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.
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultEndpointResolver = void 0;
4
- const util_endpoints_1 = require("@smithy/util-endpoints");
4
+ const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
+ const util_endpoints_2 = require("@smithy/util-endpoints");
5
6
  const ruleset_1 = require("./ruleset");
6
7
  const defaultEndpointResolver = (endpointParams, context = {}) => {
7
- return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
8
+ return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
8
9
  endpointParams: endpointParams,
9
10
  logger: context.logger,
10
11
  });
11
12
  };
12
13
  exports.defaultEndpointResolver = defaultEndpointResolver;
14
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
package/dist-cjs/index.js CHANGED
@@ -36,6 +36,7 @@ __export(src_exports, {
36
36
  FailureTraceFilterSensitiveLog: () => FailureTraceFilterSensitiveLog,
37
37
  FinalResponseFilterSensitiveLog: () => FinalResponseFilterSensitiveLog,
38
38
  GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
39
+ GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
39
40
  InternalServerException: () => InternalServerException,
40
41
  InvocationInputFilterSensitiveLog: () => InvocationInputFilterSensitiveLog,
41
42
  InvocationType: () => InvocationType,
@@ -46,6 +47,7 @@ __export(src_exports, {
46
47
  KnowledgeBaseLookupOutputFilterSensitiveLog: () => KnowledgeBaseLookupOutputFilterSensitiveLog,
47
48
  KnowledgeBaseQueryFilterSensitiveLog: () => KnowledgeBaseQueryFilterSensitiveLog,
48
49
  KnowledgeBaseRetrievalResultFilterSensitiveLog: () => KnowledgeBaseRetrievalResultFilterSensitiveLog,
50
+ KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog: () => KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog,
49
51
  ModelInvocationInputFilterSensitiveLog: () => ModelInvocationInputFilterSensitiveLog,
50
52
  ObservationFilterSensitiveLog: () => ObservationFilterSensitiveLog,
51
53
  OrchestrationTrace: () => OrchestrationTrace,
@@ -59,6 +61,7 @@ __export(src_exports, {
59
61
  PreProcessingParsedResponseFilterSensitiveLog: () => PreProcessingParsedResponseFilterSensitiveLog,
60
62
  PreProcessingTrace: () => PreProcessingTrace,
61
63
  PreProcessingTraceFilterSensitiveLog: () => PreProcessingTraceFilterSensitiveLog,
64
+ PromptTemplateFilterSensitiveLog: () => PromptTemplateFilterSensitiveLog,
62
65
  PromptType: () => PromptType,
63
66
  RationaleFilterSensitiveLog: () => RationaleFilterSensitiveLog,
64
67
  RepromptResponseFilterSensitiveLog: () => RepromptResponseFilterSensitiveLog,
@@ -69,6 +72,7 @@ __export(src_exports, {
69
72
  RetrievalResultLocationFilterSensitiveLog: () => RetrievalResultLocationFilterSensitiveLog,
70
73
  RetrievalResultLocationType: () => RetrievalResultLocationType,
71
74
  RetrieveAndGenerateCommand: () => RetrieveAndGenerateCommand,
75
+ RetrieveAndGenerateConfigurationFilterSensitiveLog: () => RetrieveAndGenerateConfigurationFilterSensitiveLog,
72
76
  RetrieveAndGenerateInputFilterSensitiveLog: () => RetrieveAndGenerateInputFilterSensitiveLog,
73
77
  RetrieveAndGenerateOutputFilterSensitiveLog: () => RetrieveAndGenerateOutputFilterSensitiveLog,
74
78
  RetrieveAndGenerateRequestFilterSensitiveLog: () => RetrieveAndGenerateRequestFilterSensitiveLog,
@@ -727,9 +731,36 @@ var InvokeAgentResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
727
731
  var RetrieveAndGenerateInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
728
732
  ...obj
729
733
  }), "RetrieveAndGenerateInputFilterSensitiveLog");
734
+ var PromptTemplateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
735
+ ...obj,
736
+ ...obj.textPromptTemplate && { textPromptTemplate: import_smithy_client.SENSITIVE_STRING }
737
+ }), "PromptTemplateFilterSensitiveLog");
738
+ var GenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
739
+ ...obj,
740
+ ...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
741
+ }), "GenerationConfigurationFilterSensitiveLog");
742
+ var KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
743
+ ...obj,
744
+ ...obj.generationConfiguration && {
745
+ generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration)
746
+ }
747
+ }), "KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog");
748
+ var RetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
749
+ ...obj,
750
+ ...obj.knowledgeBaseConfiguration && {
751
+ knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(
752
+ obj.knowledgeBaseConfiguration
753
+ )
754
+ }
755
+ }), "RetrieveAndGenerateConfigurationFilterSensitiveLog");
730
756
  var RetrieveAndGenerateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
731
757
  ...obj,
732
- ...obj.input && { input: import_smithy_client.SENSITIVE_STRING }
758
+ ...obj.input && { input: import_smithy_client.SENSITIVE_STRING },
759
+ ...obj.retrieveAndGenerateConfiguration && {
760
+ retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog(
761
+ obj.retrieveAndGenerateConfiguration
762
+ )
763
+ }
733
764
  }), "RetrieveAndGenerateRequestFilterSensitiveLog");
734
765
  var RetrieveAndGenerateOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
735
766
  ...obj
@@ -1367,9 +1398,6 @@ var BedrockAgentRuntime = _BedrockAgentRuntime;
1367
1398
  // src/pagination/RetrievePaginator.ts
1368
1399
 
1369
1400
  var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, RetrieveCommand, "nextToken", "nextToken", "");
1370
-
1371
- // src/index.ts
1372
- var import_util_endpoints = require("@aws-sdk/util-endpoints");
1373
1401
  // Annotate the CommonJS export names for ESM import in node:
1374
1402
 
1375
1403
  0 && (module.exports = {
@@ -1436,6 +1464,10 @@ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1436
1464
  ResponseStreamFilterSensitiveLog,
1437
1465
  InvokeAgentResponseFilterSensitiveLog,
1438
1466
  RetrieveAndGenerateInputFilterSensitiveLog,
1467
+ PromptTemplateFilterSensitiveLog,
1468
+ GenerationConfigurationFilterSensitiveLog,
1469
+ KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog,
1470
+ RetrieveAndGenerateConfigurationFilterSensitiveLog,
1439
1471
  RetrieveAndGenerateRequestFilterSensitiveLog,
1440
1472
  RetrieveAndGenerateOutputFilterSensitiveLog,
1441
1473
  RetrieveAndGenerateResponseFilterSensitiveLog,
@@ -1,4 +1,5 @@
1
- import { resolveEndpoint } from "@smithy/util-endpoints";
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, resolveEndpoint } from "@smithy/util-endpoints";
2
3
  import { ruleSet } from "./ruleset";
3
4
  export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
5
  return resolveEndpoint(ruleSet, {
@@ -6,3 +7,4 @@ export const defaultEndpointResolver = (endpointParams, context = {}) => {
6
7
  logger: context.logger,
7
8
  });
8
9
  };
10
+ customEndpointFunctions.aws = awsEndpointFunctions;
package/dist-es/index.js CHANGED
@@ -3,5 +3,4 @@ export * from "./BedrockAgentRuntime";
3
3
  export * from "./commands";
4
4
  export * from "./pagination";
5
5
  export * from "./models";
6
- import "@aws-sdk/util-endpoints";
7
6
  export { BedrockAgentRuntimeServiceException } from "./models/BedrockAgentRuntimeServiceException";
@@ -417,9 +417,32 @@ export const InvokeAgentResponseFilterSensitiveLog = (obj) => ({
417
417
  export const RetrieveAndGenerateInputFilterSensitiveLog = (obj) => ({
418
418
  ...obj,
419
419
  });
420
+ export const PromptTemplateFilterSensitiveLog = (obj) => ({
421
+ ...obj,
422
+ ...(obj.textPromptTemplate && { textPromptTemplate: SENSITIVE_STRING }),
423
+ });
424
+ export const GenerationConfigurationFilterSensitiveLog = (obj) => ({
425
+ ...obj,
426
+ ...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
427
+ });
428
+ export const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
429
+ ...obj,
430
+ ...(obj.generationConfiguration && {
431
+ generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration),
432
+ }),
433
+ });
434
+ export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
435
+ ...obj,
436
+ ...(obj.knowledgeBaseConfiguration && {
437
+ knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.knowledgeBaseConfiguration),
438
+ }),
439
+ });
420
440
  export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
421
441
  ...obj,
422
442
  ...(obj.input && { input: SENSITIVE_STRING }),
443
+ ...(obj.retrieveAndGenerateConfiguration && {
444
+ retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog(obj.retrieveAndGenerateConfiguration),
445
+ }),
423
446
  });
424
447
  export const RetrieveAndGenerateOutputFilterSensitiveLog = (obj) => ({
425
448
  ...obj,
@@ -27,9 +27,6 @@ declare const RetrieveAndGenerateCommand_base: {
27
27
  };
28
28
  /**
29
29
  * <p>Queries a knowledge base and generates responses based on the retrieved results. The response cites up to five sources but only selects the ones that are relevant to the query.</p>
30
- * <note>
31
- * <p>The <code>numberOfResults</code> field is currently unsupported for <code>RetrieveAndGenerate</code>. Don't include it in the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_KnowledgeBaseVectorSearchConfiguration.html">vectorSearchConfiguration</a> object.</p>
32
- * </note>
33
30
  * @example
34
31
  * Use a bare-bones client and the command you need to make an API call.
35
32
  * ```javascript
@@ -52,6 +49,11 @@ declare const RetrieveAndGenerateCommand_base: {
52
49
  * overrideSearchType: "HYBRID" || "SEMANTIC",
53
50
  * },
54
51
  * },
52
+ * generationConfiguration: { // GenerationConfiguration
53
+ * promptTemplate: { // PromptTemplate
54
+ * textPromptTemplate: "STRING_VALUE",
55
+ * },
56
+ * },
55
57
  * },
56
58
  * },
57
59
  * sessionConfiguration: { // RetrieveAndGenerateSessionConfiguration
@@ -11,5 +11,4 @@ export { BedrockAgentRuntimeExtensionConfiguration } from "./extensionConfigurat
11
11
  export * from "./commands";
12
12
  export * from "./pagination";
13
13
  export * from "./models";
14
- import "@aws-sdk/util-endpoints";
15
14
  export { BedrockAgentRuntimeServiceException } from "./models/BedrockAgentRuntimeServiceException";
@@ -145,7 +145,7 @@ export declare class InternalServerException extends __BaseException {
145
145
  constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
146
146
  }
147
147
  /**
148
- * <p>Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html">Lambda function</a> for an action group or pass them when making an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/sessionstate.html">Session context</a>.</p>
148
+ * <p>Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html">Lambda function</a> for an action group or pass them when making an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
149
149
  * @public
150
150
  */
151
151
  export interface SessionState {
@@ -165,7 +165,7 @@ export interface SessionState {
165
165
  */
166
166
  export interface InvokeAgentRequest {
167
167
  /**
168
- * <p>Contains parameters that specify various attributes of the session.</p>
168
+ * <p>Contains parameters that specify various attributes of the session. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
169
169
  * @public
170
170
  */
171
171
  sessionState?: SessionState;
@@ -202,6 +202,17 @@ export interface InvokeAgentRequest {
202
202
  }
203
203
  /**
204
204
  * <p>Contains information about where the text with a citation begins and ends in the generated output.</p>
205
+ * <p>This data type is used in the following API operations:</p>
206
+ * <ul>
207
+ * <li>
208
+ * <p>
209
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>span</code> field</p>
210
+ * </li>
211
+ * <li>
212
+ * <p>
213
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>span</code> field</p>
214
+ * </li>
215
+ * </ul>
205
216
  * @public
206
217
  */
207
218
  export interface Span {
@@ -218,6 +229,17 @@ export interface Span {
218
229
  }
219
230
  /**
220
231
  * <p>Contains the part of the generated text that contains a citation, alongside where it begins and ends.</p>
232
+ * <p>This data type is used in the following API operations:</p>
233
+ * <ul>
234
+ * <li>
235
+ * <p>
236
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>textResponsePart</code> field</p>
237
+ * </li>
238
+ * <li>
239
+ * <p>
240
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>textResponsePart</code> field</p>
241
+ * </li>
242
+ * </ul>
221
243
  * @public
222
244
  */
223
245
  export interface TextResponsePart {
@@ -234,6 +256,17 @@ export interface TextResponsePart {
234
256
  }
235
257
  /**
236
258
  * <p>Contains metadata about a part of the generated response that is accompanied by a citation.</p>
259
+ * <p>This data type is used in the following API operations:</p>
260
+ * <ul>
261
+ * <li>
262
+ * <p>
263
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>generatedResponsePart</code> field</p>
264
+ * </li>
265
+ * <li>
266
+ * <p>
267
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>generatedResponsePart</code> field</p>
268
+ * </li>
269
+ * </ul>
237
270
  * @public
238
271
  */
239
272
  export interface GeneratedResponsePart {
@@ -245,6 +278,21 @@ export interface GeneratedResponsePart {
245
278
  }
246
279
  /**
247
280
  * <p>Contains the cited text from the data source.</p>
281
+ * <p>This data type is used in the following API operations:</p>
282
+ * <ul>
283
+ * <li>
284
+ * <p>
285
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>content</code> field</p>
286
+ * </li>
287
+ * <li>
288
+ * <p>
289
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>content</code> field</p>
290
+ * </li>
291
+ * <li>
292
+ * <p>
293
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>content</code> field</p>
294
+ * </li>
295
+ * </ul>
248
296
  * @public
249
297
  */
250
298
  export interface RetrievalResultContent {
@@ -256,6 +304,21 @@ export interface RetrievalResultContent {
256
304
  }
257
305
  /**
258
306
  * <p>Contains the S3 location of the data source.</p>
307
+ * <p>This data type is used in the following API operations:</p>
308
+ * <ul>
309
+ * <li>
310
+ * <p>
311
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>s3Location</code> field</p>
312
+ * </li>
313
+ * <li>
314
+ * <p>
315
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>s3Location</code> field</p>
316
+ * </li>
317
+ * <li>
318
+ * <p>
319
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>s3Location</code> field</p>
320
+ * </li>
321
+ * </ul>
259
322
  * @public
260
323
  */
261
324
  export interface RetrievalResultS3Location {
@@ -278,6 +341,21 @@ export declare const RetrievalResultLocationType: {
278
341
  export type RetrievalResultLocationType = (typeof RetrievalResultLocationType)[keyof typeof RetrievalResultLocationType];
279
342
  /**
280
343
  * <p>Contains information about the location of the data source.</p>
344
+ * <p>This data type is used in the following API operations:</p>
345
+ * <ul>
346
+ * <li>
347
+ * <p>
348
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>location</code> field</p>
349
+ * </li>
350
+ * <li>
351
+ * <p>
352
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>location</code> field</p>
353
+ * </li>
354
+ * <li>
355
+ * <p>
356
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>locatino</code> field</p>
357
+ * </li>
358
+ * </ul>
281
359
  * @public
282
360
  */
283
361
  export interface RetrievalResultLocation {
@@ -293,7 +371,18 @@ export interface RetrievalResultLocation {
293
371
  s3Location?: RetrievalResultS3Location;
294
372
  }
295
373
  /**
296
- * <p>Contains metadata about a sources cited for the generated response.</p>
374
+ * <p>Contains metadata about a source cited for the generated response.</p>
375
+ * <p>This data type is used in the following API operations:</p>
376
+ * <ul>
377
+ * <li>
378
+ * <p>
379
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>retrievedReferences</code> field</p>
380
+ * </li>
381
+ * <li>
382
+ * <p>
383
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>retrievedReferences</code> field</p>
384
+ * </li>
385
+ * </ul>
297
386
  * @public
298
387
  */
299
388
  export interface RetrievedReference {
@@ -310,6 +399,17 @@ export interface RetrievedReference {
310
399
  }
311
400
  /**
312
401
  * <p>An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.</p>
402
+ * <p>This data type is used in the following API operations:</p>
403
+ * <ul>
404
+ * <li>
405
+ * <p>
406
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>citations</code> field</p>
407
+ * </li>
408
+ * <li>
409
+ * <p>
410
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>citations</code> field</p>
411
+ * </li>
412
+ * </ul>
313
413
  * @public
314
414
  */
315
415
  export interface Citation {
@@ -1327,6 +1427,13 @@ export interface InvokeAgentResponse {
1327
1427
  }
1328
1428
  /**
1329
1429
  * <p>Contains the query made to the knowledge base.</p>
1430
+ * <p>This data type is used in the following API operations:</p>
1431
+ * <ul>
1432
+ * <li>
1433
+ * <p>
1434
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>input</code> field</p>
1435
+ * </li>
1436
+ * </ul>
1330
1437
  * @public
1331
1438
  */
1332
1439
  export interface RetrieveAndGenerateInput {
@@ -1336,6 +1443,57 @@ export interface RetrieveAndGenerateInput {
1336
1443
  */
1337
1444
  text: string | undefined;
1338
1445
  }
1446
+ /**
1447
+ * <p>Contains the template for the prompt that's sent to the model for response generation. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt">Knowledge base prompt templates</a>.</p>
1448
+ * <p>This data type is used in the following API operations:</p>
1449
+ * <ul>
1450
+ * <li>
1451
+ * <p>
1452
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a>
1453
+ * </p>
1454
+ * </li>
1455
+ * </ul>
1456
+ * @public
1457
+ */
1458
+ export interface PromptTemplate {
1459
+ /**
1460
+ * <p>The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.</p>
1461
+ * <p>For more information, see the following resources:</p>
1462
+ * <ul>
1463
+ * <li>
1464
+ * <p>
1465
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt">Knowledge base prompt templates</a>
1466
+ * </p>
1467
+ * </li>
1468
+ * <li>
1469
+ * <p>
1470
+ * <a href="https://docs.anthropic.com/claude/docs/use-xml-tags">Use XML tags with Anthropic Claude models</a>
1471
+ * </p>
1472
+ * </li>
1473
+ * </ul>
1474
+ * @public
1475
+ */
1476
+ textPromptTemplate?: string;
1477
+ }
1478
+ /**
1479
+ * <p>Contains configurations for response generation based on the knowledge base query results.</p>
1480
+ * <p>This data type is used in the following API operations:</p>
1481
+ * <ul>
1482
+ * <li>
1483
+ * <p>
1484
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a>
1485
+ * </p>
1486
+ * </li>
1487
+ * </ul>
1488
+ * @public
1489
+ */
1490
+ export interface GenerationConfiguration {
1491
+ /**
1492
+ * <p>Contains the template for the prompt that's sent to the model for response generation.</p>
1493
+ * @public
1494
+ */
1495
+ promptTemplate?: PromptTemplate;
1496
+ }
1339
1497
  /**
1340
1498
  * @public
1341
1499
  * @enum
@@ -1349,15 +1507,23 @@ export declare const SearchType: {
1349
1507
  */
1350
1508
  export type SearchType = (typeof SearchType)[keyof typeof SearchType];
1351
1509
  /**
1352
- * <p>Configurations for how to carry out the search.</p>
1510
+ * <p>Configurations for how to perform the search query and return results. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
1511
+ * <p>This data type is used in the following API operations:</p>
1512
+ * <ul>
1513
+ * <li>
1514
+ * <p>
1515
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>vectorSearchConfiguration</code> field</p>
1516
+ * </li>
1517
+ * <li>
1518
+ * <p>
1519
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>vectorSearchConfiguration</code> field</p>
1520
+ * </li>
1521
+ * </ul>
1353
1522
  * @public
1354
1523
  */
1355
1524
  export interface KnowledgeBaseVectorSearchConfiguration {
1356
1525
  /**
1357
- * <p>The number of results to return.</p>
1358
- * <note>
1359
- * <p>The <code>numberOfResults</code> field is currently unsupported for <code>RetrieveAndGenerate</code>. Don't include it in this field if you are sending a <code>RetrieveAndGenerate</code> request.</p>
1360
- * </note>
1526
+ * <p>The number of source chunks to retrieve.</p>
1361
1527
  * @public
1362
1528
  */
1363
1529
  numberOfResults?: number;
@@ -1368,31 +1534,40 @@ export interface KnowledgeBaseVectorSearchConfiguration {
1368
1534
  overrideSearchType?: SearchType;
1369
1535
  }
1370
1536
  /**
1371
- * <p>Contains details about how the results should be returned.</p>
1537
+ * <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
1372
1538
  * <p>This data type is used in the following API operations:</p>
1373
1539
  * <ul>
1374
1540
  * <li>
1375
1541
  * <p>
1376
- * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request body</a>
1377
- * </p>
1542
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>retrievalConfiguration</code> field</p>
1378
1543
  * </li>
1379
1544
  * <li>
1380
1545
  * <p>
1381
- * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request body</a>
1382
- * </p>
1546
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>retrievalConfiguration</code> field</p>
1383
1547
  * </li>
1384
1548
  * </ul>
1385
1549
  * @public
1386
1550
  */
1387
1551
  export interface KnowledgeBaseRetrievalConfiguration {
1388
1552
  /**
1389
- * <p>Contains details about how the results from the vector search should be returned.</p>
1553
+ * <p>Contains details about how the results from the vector search should be returned. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
1390
1554
  * @public
1391
1555
  */
1392
1556
  vectorSearchConfiguration: KnowledgeBaseVectorSearchConfiguration | undefined;
1393
1557
  }
1394
1558
  /**
1395
1559
  * <p>Contains details about the resource being queried.</p>
1560
+ * <p>This data type is used in the following API operations:</p>
1561
+ * <ul>
1562
+ * <li>
1563
+ * <p>
1564
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>knowledgeBaseConfiguration</code> field</p>
1565
+ * </li>
1566
+ * <li>
1567
+ * <p>
1568
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>knowledgeBaseConfiguration</code> field</p>
1569
+ * </li>
1570
+ * </ul>
1396
1571
  * @public
1397
1572
  */
1398
1573
  export interface KnowledgeBaseRetrieveAndGenerateConfiguration {
@@ -1411,6 +1586,11 @@ export interface KnowledgeBaseRetrieveAndGenerateConfiguration {
1411
1586
  * @public
1412
1587
  */
1413
1588
  retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration;
1589
+ /**
1590
+ * <p>Contains configurations for response generation based on the knowwledge base query results.</p>
1591
+ * @public
1592
+ */
1593
+ generationConfiguration?: GenerationConfiguration;
1414
1594
  }
1415
1595
  /**
1416
1596
  * @public
@@ -1425,6 +1605,13 @@ export declare const RetrieveAndGenerateType: {
1425
1605
  export type RetrieveAndGenerateType = (typeof RetrieveAndGenerateType)[keyof typeof RetrieveAndGenerateType];
1426
1606
  /**
1427
1607
  * <p>Contains details about the resource being queried.</p>
1608
+ * <p>This data type is used in the following API operations:</p>
1609
+ * <ul>
1610
+ * <li>
1611
+ * <p>
1612
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>retrieveAndGenerateConfiguration</code> field</p>
1613
+ * </li>
1614
+ * </ul>
1428
1615
  * @public
1429
1616
  */
1430
1617
  export interface RetrieveAndGenerateConfiguration {
@@ -1441,6 +1628,13 @@ export interface RetrieveAndGenerateConfiguration {
1441
1628
  }
1442
1629
  /**
1443
1630
  * <p>Contains configuration about the session with the knowledge base.</p>
1631
+ * <p>This data type is used in the following API operations:</p>
1632
+ * <ul>
1633
+ * <li>
1634
+ * <p>
1635
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>sessionConfiguration</code> field</p>
1636
+ * </li>
1637
+ * </ul>
1444
1638
  * @public
1445
1639
  */
1446
1640
  export interface RetrieveAndGenerateSessionConfiguration {
@@ -1460,12 +1654,12 @@ export interface RetrieveAndGenerateRequest {
1460
1654
  */
1461
1655
  sessionId?: string;
1462
1656
  /**
1463
- * <p>Contains the query made to the knowledge base.</p>
1657
+ * <p>Contains the query to be made to the knowledge base.</p>
1464
1658
  * @public
1465
1659
  */
1466
1660
  input: RetrieveAndGenerateInput | undefined;
1467
1661
  /**
1468
- * <p>Contains details about the resource being queried and the foundation model used for generation.</p>
1662
+ * <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
1469
1663
  * @public
1470
1664
  */
1471
1665
  retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration;
@@ -1477,6 +1671,13 @@ export interface RetrieveAndGenerateRequest {
1477
1671
  }
1478
1672
  /**
1479
1673
  * <p>Contains the response generated from querying the knowledge base.</p>
1674
+ * <p>This data type is used in the following API operations:</p>
1675
+ * <ul>
1676
+ * <li>
1677
+ * <p>
1678
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>output</code> field</p>
1679
+ * </li>
1680
+ * </ul>
1480
1681
  * @public
1481
1682
  */
1482
1683
  export interface RetrieveAndGenerateOutput {
@@ -1508,6 +1709,13 @@ export interface RetrieveAndGenerateResponse {
1508
1709
  }
1509
1710
  /**
1510
1711
  * <p>Contains the query made to the knowledge base.</p>
1712
+ * <p>This data type is used in the following API operations:</p>
1713
+ * <ul>
1714
+ * <li>
1715
+ * <p>
1716
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>retrievalQuery</code> field</p>
1717
+ * </li>
1718
+ * </ul>
1511
1719
  * @public
1512
1720
  */
1513
1721
  export interface KnowledgeBaseQuery {
@@ -1527,12 +1735,12 @@ export interface RetrieveRequest {
1527
1735
  */
1528
1736
  knowledgeBaseId: string | undefined;
1529
1737
  /**
1530
- * <p>The query to send the knowledge base.</p>
1738
+ * <p>Contains the query to send the knowledge base.</p>
1531
1739
  * @public
1532
1740
  */
1533
1741
  retrievalQuery: KnowledgeBaseQuery | undefined;
1534
1742
  /**
1535
- * <p>Contains details about how the results should be returned.</p>
1743
+ * <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
1536
1744
  * @public
1537
1745
  */
1538
1746
  retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration;
@@ -1544,6 +1752,13 @@ export interface RetrieveRequest {
1544
1752
  }
1545
1753
  /**
1546
1754
  * <p>Details about a result from querying the knowledge base.</p>
1755
+ * <p>This data type is used in the following API operations:</p>
1756
+ * <ul>
1757
+ * <li>
1758
+ * <p>
1759
+ * <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>retrievalResults</code> field</p>
1760
+ * </li>
1761
+ * </ul>
1547
1762
  * @public
1548
1763
  */
1549
1764
  export interface KnowledgeBaseRetrievalResult {
@@ -1706,6 +1921,22 @@ export declare const InvokeAgentResponseFilterSensitiveLog: (obj: InvokeAgentRes
1706
1921
  * @internal
1707
1922
  */
1708
1923
  export declare const RetrieveAndGenerateInputFilterSensitiveLog: (obj: RetrieveAndGenerateInput) => any;
1924
+ /**
1925
+ * @internal
1926
+ */
1927
+ export declare const PromptTemplateFilterSensitiveLog: (obj: PromptTemplate) => any;
1928
+ /**
1929
+ * @internal
1930
+ */
1931
+ export declare const GenerationConfigurationFilterSensitiveLog: (obj: GenerationConfiguration) => any;
1932
+ /**
1933
+ * @internal
1934
+ */
1935
+ export declare const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog: (obj: KnowledgeBaseRetrieveAndGenerateConfiguration) => any;
1936
+ /**
1937
+ * @internal
1938
+ */
1939
+ export declare const RetrieveAndGenerateConfigurationFilterSensitiveLog: (obj: RetrieveAndGenerateConfiguration) => any;
1709
1940
  /**
1710
1941
  * @internal
1711
1942
  */
@@ -6,5 +6,4 @@ export { BedrockAgentRuntimeExtensionConfiguration } from "./extensionConfigurat
6
6
  export * from "./commands";
7
7
  export * from "./pagination";
8
8
  export * from "./models";
9
- import "@aws-sdk/util-endpoints";
10
9
  export { BedrockAgentRuntimeServiceException } from "./models/BedrockAgentRuntimeServiceException";
@@ -603,6 +603,12 @@ export interface InvokeAgentResponse {
603
603
  export interface RetrieveAndGenerateInput {
604
604
  text: string | undefined;
605
605
  }
606
+ export interface PromptTemplate {
607
+ textPromptTemplate?: string;
608
+ }
609
+ export interface GenerationConfiguration {
610
+ promptTemplate?: PromptTemplate;
611
+ }
606
612
  export declare const SearchType: {
607
613
  readonly HYBRID: "HYBRID";
608
614
  readonly SEMANTIC: "SEMANTIC";
@@ -619,6 +625,7 @@ export interface KnowledgeBaseRetrieveAndGenerateConfiguration {
619
625
  knowledgeBaseId: string | undefined;
620
626
  modelArn: string | undefined;
621
627
  retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration;
628
+ generationConfiguration?: GenerationConfiguration;
622
629
  }
623
630
  export declare const RetrieveAndGenerateType: {
624
631
  readonly KNOWLEDGE_BASE: "KNOWLEDGE_BASE";
@@ -744,6 +751,18 @@ export declare const InvokeAgentResponseFilterSensitiveLog: (
744
751
  export declare const RetrieveAndGenerateInputFilterSensitiveLog: (
745
752
  obj: RetrieveAndGenerateInput
746
753
  ) => any;
754
+ export declare const PromptTemplateFilterSensitiveLog: (
755
+ obj: PromptTemplate
756
+ ) => any;
757
+ export declare const GenerationConfigurationFilterSensitiveLog: (
758
+ obj: GenerationConfiguration
759
+ ) => any;
760
+ export declare const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog: (
761
+ obj: KnowledgeBaseRetrieveAndGenerateConfiguration
762
+ ) => any;
763
+ export declare const RetrieveAndGenerateConfigurationFilterSensitiveLog: (
764
+ obj: RetrieveAndGenerateConfiguration
765
+ ) => any;
747
766
  export declare const RetrieveAndGenerateRequestFilterSensitiveLog: (
748
767
  obj: RetrieveAndGenerateRequest
749
768
  ) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-agent-runtime",
3
3
  "description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.535.0",
4
+ "version": "3.542.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",
@@ -20,16 +20,16 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.535.0",
23
+ "@aws-sdk/client-sts": "3.540.0",
24
24
  "@aws-sdk/core": "3.535.0",
25
- "@aws-sdk/credential-provider-node": "3.535.0",
25
+ "@aws-sdk/credential-provider-node": "3.540.0",
26
26
  "@aws-sdk/middleware-host-header": "3.535.0",
27
27
  "@aws-sdk/middleware-logger": "3.535.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.535.0",
29
- "@aws-sdk/middleware-user-agent": "3.535.0",
29
+ "@aws-sdk/middleware-user-agent": "3.540.0",
30
30
  "@aws-sdk/region-config-resolver": "3.535.0",
31
31
  "@aws-sdk/types": "3.535.0",
32
- "@aws-sdk/util-endpoints": "3.535.0",
32
+ "@aws-sdk/util-endpoints": "3.540.0",
33
33
  "@aws-sdk/util-user-agent-browser": "3.535.0",
34
34
  "@aws-sdk/util-user-agent-node": "3.535.0",
35
35
  "@smithy/config-resolver": "^2.2.0",