@aws-sdk/client-bedrock-agent-runtime 3.701.0 → 3.703.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist-cjs/index.js +530 -3
- package/dist-es/BedrockAgentRuntime.js +4 -0
- package/dist-es/commands/RerankCommand.js +23 -0
- package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +27 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +180 -0
- package/dist-es/pagination/RerankPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +231 -0
- package/dist-types/BedrockAgentRuntime.d.ts +14 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +45 -2
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +45 -2
- package/dist-types/commands/RerankCommand.d.ts +143 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +42 -2
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +371 -0
- package/dist-types/commands/RetrieveCommand.d.ts +46 -1
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +1038 -166
- package/dist-types/pagination/RerankPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +34 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/RerankCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +455 -0
- package/dist-types/ts3.4/pagination/RerankPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +1 -1
|
@@ -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
|
*/
|
|
@@ -178,6 +178,43 @@ declare const InvokeAgentCommand_base: {
|
|
|
178
178
|
* "<RetrievalFilter>",
|
|
179
179
|
* ],
|
|
180
180
|
* },
|
|
181
|
+
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
|
|
182
|
+
* type: "BEDROCK_RERANKING_MODEL", // required
|
|
183
|
+
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
|
|
184
|
+
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
|
|
185
|
+
* modelArn: "STRING_VALUE", // required
|
|
186
|
+
* additionalModelRequestFields: { // AdditionalModelRequestFields
|
|
187
|
+
* "<keys>": "DOCUMENT_VALUE",
|
|
188
|
+
* },
|
|
189
|
+
* },
|
|
190
|
+
* numberOfRerankedResults: Number("int"),
|
|
191
|
+
* metadataConfiguration: { // MetadataConfigurationForReranking
|
|
192
|
+
* selectionMode: "SELECTIVE" || "ALL", // required
|
|
193
|
+
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
|
|
194
|
+
* fieldsToInclude: [ // FieldsForReranking
|
|
195
|
+
* { // FieldForReranking
|
|
196
|
+
* fieldName: "STRING_VALUE", // required
|
|
197
|
+
* },
|
|
198
|
+
* ],
|
|
199
|
+
* fieldsToExclude: [
|
|
200
|
+
* {
|
|
201
|
+
* fieldName: "STRING_VALUE", // required
|
|
202
|
+
* },
|
|
203
|
+
* ],
|
|
204
|
+
* },
|
|
205
|
+
* },
|
|
206
|
+
* },
|
|
207
|
+
* },
|
|
208
|
+
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
|
|
209
|
+
* metadataAttributes: [ // MetadataAttributeSchemaList // required
|
|
210
|
+
* { // MetadataAttributeSchema
|
|
211
|
+
* key: "STRING_VALUE", // required
|
|
212
|
+
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
|
|
213
|
+
* description: "STRING_VALUE", // required
|
|
214
|
+
* },
|
|
215
|
+
* ],
|
|
216
|
+
* modelArn: "STRING_VALUE", // required
|
|
217
|
+
* },
|
|
181
218
|
* },
|
|
182
219
|
* },
|
|
183
220
|
* },
|
|
@@ -219,7 +256,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
219
256
|
* // text: "STRING_VALUE", // required
|
|
220
257
|
* // },
|
|
221
258
|
* // location: { // RetrievalResultLocation
|
|
222
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
259
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
223
260
|
* // s3Location: { // RetrievalResultS3Location
|
|
224
261
|
* // uri: "STRING_VALUE",
|
|
225
262
|
* // },
|
|
@@ -235,6 +272,9 @@ declare const InvokeAgentCommand_base: {
|
|
|
235
272
|
* // sharePointLocation: { // RetrievalResultSharePointLocation
|
|
236
273
|
* // url: "STRING_VALUE",
|
|
237
274
|
* // },
|
|
275
|
+
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
|
|
276
|
+
* // id: "STRING_VALUE",
|
|
277
|
+
* // },
|
|
238
278
|
* // },
|
|
239
279
|
* // metadata: { // RetrievalResultMetadata
|
|
240
280
|
* // "<keys>": "DOCUMENT_VALUE",
|
|
@@ -453,7 +493,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
453
493
|
* // text: "STRING_VALUE", // required
|
|
454
494
|
* // },
|
|
455
495
|
* // location: {
|
|
456
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
496
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
457
497
|
* // s3Location: {
|
|
458
498
|
* // uri: "STRING_VALUE",
|
|
459
499
|
* // },
|
|
@@ -469,6 +509,9 @@ declare const InvokeAgentCommand_base: {
|
|
|
469
509
|
* // sharePointLocation: {
|
|
470
510
|
* // url: "STRING_VALUE",
|
|
471
511
|
* // },
|
|
512
|
+
* // customDocumentLocation: {
|
|
513
|
+
* // id: "STRING_VALUE",
|
|
514
|
+
* // },
|
|
472
515
|
* // },
|
|
473
516
|
* // metadata: {
|
|
474
517
|
* // "<keys>": "DOCUMENT_VALUE",
|
|
@@ -215,6 +215,43 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
215
215
|
* "<RetrievalFilter>",
|
|
216
216
|
* ],
|
|
217
217
|
* },
|
|
218
|
+
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
|
|
219
|
+
* type: "BEDROCK_RERANKING_MODEL", // required
|
|
220
|
+
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
|
|
221
|
+
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
|
|
222
|
+
* modelArn: "STRING_VALUE", // required
|
|
223
|
+
* additionalModelRequestFields: { // AdditionalModelRequestFields
|
|
224
|
+
* "<keys>": "DOCUMENT_VALUE",
|
|
225
|
+
* },
|
|
226
|
+
* },
|
|
227
|
+
* numberOfRerankedResults: Number("int"),
|
|
228
|
+
* metadataConfiguration: { // MetadataConfigurationForReranking
|
|
229
|
+
* selectionMode: "SELECTIVE" || "ALL", // required
|
|
230
|
+
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
|
|
231
|
+
* fieldsToInclude: [ // FieldsForReranking
|
|
232
|
+
* { // FieldForReranking
|
|
233
|
+
* fieldName: "STRING_VALUE", // required
|
|
234
|
+
* },
|
|
235
|
+
* ],
|
|
236
|
+
* fieldsToExclude: [
|
|
237
|
+
* {
|
|
238
|
+
* fieldName: "STRING_VALUE", // required
|
|
239
|
+
* },
|
|
240
|
+
* ],
|
|
241
|
+
* },
|
|
242
|
+
* },
|
|
243
|
+
* },
|
|
244
|
+
* },
|
|
245
|
+
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
|
|
246
|
+
* metadataAttributes: [ // MetadataAttributeSchemaList // required
|
|
247
|
+
* { // MetadataAttributeSchema
|
|
248
|
+
* key: "STRING_VALUE", // required
|
|
249
|
+
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
|
|
250
|
+
* description: "STRING_VALUE", // required
|
|
251
|
+
* },
|
|
252
|
+
* ],
|
|
253
|
+
* modelArn: "STRING_VALUE", // required
|
|
254
|
+
* },
|
|
218
255
|
* },
|
|
219
256
|
* },
|
|
220
257
|
* },
|
|
@@ -269,7 +306,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
269
306
|
* // text: "STRING_VALUE", // required
|
|
270
307
|
* // },
|
|
271
308
|
* // location: { // RetrievalResultLocation
|
|
272
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
309
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
273
310
|
* // s3Location: { // RetrievalResultS3Location
|
|
274
311
|
* // uri: "STRING_VALUE",
|
|
275
312
|
* // },
|
|
@@ -285,6 +322,9 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
285
322
|
* // sharePointLocation: { // RetrievalResultSharePointLocation
|
|
286
323
|
* // url: "STRING_VALUE",
|
|
287
324
|
* // },
|
|
325
|
+
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
|
|
326
|
+
* // id: "STRING_VALUE",
|
|
327
|
+
* // },
|
|
288
328
|
* // },
|
|
289
329
|
* // metadata: { // RetrievalResultMetadata
|
|
290
330
|
* // "<keys>": "DOCUMENT_VALUE",
|
|
@@ -503,7 +543,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
503
543
|
* // text: "STRING_VALUE", // required
|
|
504
544
|
* // },
|
|
505
545
|
* // location: {
|
|
506
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
546
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
507
547
|
* // s3Location: {
|
|
508
548
|
* // uri: "STRING_VALUE",
|
|
509
549
|
* // },
|
|
@@ -519,6 +559,9 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
519
559
|
* // sharePointLocation: {
|
|
520
560
|
* // url: "STRING_VALUE",
|
|
521
561
|
* // },
|
|
562
|
+
* // customDocumentLocation: {
|
|
563
|
+
* // id: "STRING_VALUE",
|
|
564
|
+
* // },
|
|
522
565
|
* // },
|
|
523
566
|
* // metadata: {
|
|
524
567
|
* // "<keys>": "DOCUMENT_VALUE",
|
|
@@ -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
|
+
}
|
|
@@ -100,6 +100,43 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
100
100
|
* "<RetrievalFilter>",
|
|
101
101
|
* ],
|
|
102
102
|
* },
|
|
103
|
+
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
|
|
104
|
+
* type: "BEDROCK_RERANKING_MODEL", // required
|
|
105
|
+
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
|
|
106
|
+
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
|
|
107
|
+
* modelArn: "STRING_VALUE", // required
|
|
108
|
+
* additionalModelRequestFields: { // AdditionalModelRequestFields
|
|
109
|
+
* "<keys>": "DOCUMENT_VALUE",
|
|
110
|
+
* },
|
|
111
|
+
* },
|
|
112
|
+
* numberOfRerankedResults: Number("int"),
|
|
113
|
+
* metadataConfiguration: { // MetadataConfigurationForReranking
|
|
114
|
+
* selectionMode: "SELECTIVE" || "ALL", // required
|
|
115
|
+
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
|
|
116
|
+
* fieldsToInclude: [ // FieldsForReranking
|
|
117
|
+
* { // FieldForReranking
|
|
118
|
+
* fieldName: "STRING_VALUE", // required
|
|
119
|
+
* },
|
|
120
|
+
* ],
|
|
121
|
+
* fieldsToExclude: [
|
|
122
|
+
* {
|
|
123
|
+
* fieldName: "STRING_VALUE", // required
|
|
124
|
+
* },
|
|
125
|
+
* ],
|
|
126
|
+
* },
|
|
127
|
+
* },
|
|
128
|
+
* },
|
|
129
|
+
* },
|
|
130
|
+
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
|
|
131
|
+
* metadataAttributes: [ // MetadataAttributeSchemaList // required
|
|
132
|
+
* { // MetadataAttributeSchema
|
|
133
|
+
* key: "STRING_VALUE", // required
|
|
134
|
+
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
|
|
135
|
+
* description: "STRING_VALUE", // required
|
|
136
|
+
* },
|
|
137
|
+
* ],
|
|
138
|
+
* modelArn: "STRING_VALUE", // required
|
|
139
|
+
* },
|
|
103
140
|
* },
|
|
104
141
|
* },
|
|
105
142
|
* generationConfiguration: { // GenerationConfiguration
|
|
@@ -120,7 +157,7 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
120
157
|
* ],
|
|
121
158
|
* },
|
|
122
159
|
* },
|
|
123
|
-
* additionalModelRequestFields: {
|
|
160
|
+
* additionalModelRequestFields: {
|
|
124
161
|
* "<keys>": "DOCUMENT_VALUE",
|
|
125
162
|
* },
|
|
126
163
|
* },
|
|
@@ -213,7 +250,7 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
213
250
|
* // text: "STRING_VALUE", // required
|
|
214
251
|
* // },
|
|
215
252
|
* // location: { // RetrievalResultLocation
|
|
216
|
-
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
|
|
253
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
|
|
217
254
|
* // s3Location: { // RetrievalResultS3Location
|
|
218
255
|
* // uri: "STRING_VALUE",
|
|
219
256
|
* // },
|
|
@@ -229,6 +266,9 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
229
266
|
* // sharePointLocation: { // RetrievalResultSharePointLocation
|
|
230
267
|
* // url: "STRING_VALUE",
|
|
231
268
|
* // },
|
|
269
|
+
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
|
|
270
|
+
* // id: "STRING_VALUE",
|
|
271
|
+
* // },
|
|
232
272
|
* // },
|
|
233
273
|
* // metadata: { // RetrievalResultMetadata
|
|
234
274
|
* // "<keys>": "DOCUMENT_VALUE",
|