@aws-sdk/client-bedrock-agent-runtime 3.1111.0 → 3.1112.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/dist-cjs/index.js +173 -70
- package/dist-es/models/enums.js +18 -0
- package/dist-es/schemas/schemas_0.js +145 -69
- package/dist-types/commands/AgenticRetrieveStreamCommand.d.ts +44 -2
- package/dist-types/commands/CreateSessionCommand.d.ts +1 -2
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +1 -2
- package/dist-types/commands/RetrieveCommand.d.ts +1 -2
- package/dist-types/models/enums.d.ts +76 -0
- package/dist-types/models/models_0.d.ts +267 -410
- package/dist-types/models/models_1.d.ts +418 -2
- package/dist-types/schemas/schemas_0.d.ts +8 -0
- package/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +1 -2
- package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +1 -2
- package/dist-types/ts3.4/models/enums.d.ts +22 -0
- package/dist-types/ts3.4/models/models_0.d.ts +115 -261
- package/dist-types/ts3.4/models/models_1.d.ts +280 -1
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentType as __DocumentType } from "@smithy/types";
|
|
2
|
-
import type { ActionGroupSignature, ActionInvocationType, AgenticRetrieveRerankingConfigurationType, AgenticRetrieveRerankingModelType, AgenticRetrieveStatus, AgenticRetrieveStep, AgenticRetrieveType, AttributeType, ConfirmationState, ConversationRole, CreationMode, CustomControlMethod, DocumentAclMemberRelation, DocumentAclMembershipType, DocumentOutputFormat, ExecutionType, ExternalSourceType, FileSourceType, FileUseCase, FlowCompletionReason, FlowControlNodeType, FlowErrorCode, FlowExecutionErrorType, FlowExecutionEventType, FlowExecutionStatus, FlowNodeInputCategory, FlowNodeIODataType, FoundationModelConfigurationType, FoundationModelType, GeneratedQueryType, GuadrailAction, GuardrailAction, GuardrailContentFilterConfidence, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailManagedWordType, GuardrailPiiEntityType, GuardrailSensitiveInformationPolicyAction, GuardrailTopicPolicyAction, GuardrailTopicType, GuardrailWordPolicyAction, ImageInputFormat,
|
|
2
|
+
import type { ActionGroupSignature, ActionInvocationType, AgenticRetrieveMemoryMetadataFilterOperator, AgenticRetrieveMemoryPersistenceMode, AgenticRetrieveRerankingConfigurationType, AgenticRetrieveRerankingModelType, AgenticRetrieveStatus, AgenticRetrieveStep, AgenticRetrieveType, AttributeType, ConfirmationState, ConversationRole, CreationMode, CustomControlMethod, DocumentAclMemberRelation, DocumentAclMembershipType, DocumentOutputFormat, ExecutionType, ExternalSourceType, FileSourceType, FileUseCase, FlowCompletionReason, FlowControlNodeType, FlowErrorCode, FlowExecutionErrorType, FlowExecutionEventType, FlowExecutionStatus, FlowNodeInputCategory, FlowNodeIODataType, FoundationModelConfigurationType, FoundationModelType, GeneratedQueryType, GuadrailAction, GuardrailAction, GuardrailContentFilterConfidence, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailManagedWordType, GuardrailPiiEntityType, GuardrailSensitiveInformationPolicyAction, GuardrailTopicPolicyAction, GuardrailTopicType, GuardrailWordPolicyAction, ImageInputFormat, InputQueryType, InvocationType, ManagedSearchRerankingConfigurationType, MemoryType, NodeErrorCode, NodeType, ParameterType, PayloadType, PerformanceConfigLatency, PromptState, PromptType, QueryTransformationMode, QueryTransformationType, RelayConversationHistory, RequireConfirmation, RerankDocumentType, RerankingConfigurationType, RerankingMetadataSelectionMode, RerankQueryContentType, RerankSourceType, ResponseState, RetrievalResultContentColumnType, RetrievalResultContentType, RetrievalResultLocationType, Source, TextToSqlConfigurationType, Type, VectorSearchRerankingConfigurationType } from "./enums";
|
|
3
3
|
import type { AccessDeniedException, BadGatewayException, ConflictException, DependencyFailedException, InternalServerException, ModelNotReadyException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException } from "./errors";
|
|
4
4
|
/**
|
|
5
5
|
* <p> Contains details about the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. </p>
|
|
@@ -916,6 +916,37 @@ export interface AgenticRetrieveMessageContent {
|
|
|
916
916
|
*/
|
|
917
917
|
text?: string | undefined;
|
|
918
918
|
}
|
|
919
|
+
/**
|
|
920
|
+
* <p>A long-term memory retrieval that the agent chose to perform. The record reports the query and the namespace. The corresponding Retrieval step reports the results.</p>
|
|
921
|
+
* @public
|
|
922
|
+
*/
|
|
923
|
+
export interface AgenticRetrieveMemoryRetrieveDetails {
|
|
924
|
+
/**
|
|
925
|
+
* <p>The query that the agent composed.</p>
|
|
926
|
+
* @public
|
|
927
|
+
*/
|
|
928
|
+
inputQuery: AgenticRetrieveMessageContent | undefined;
|
|
929
|
+
/**
|
|
930
|
+
* <p>The identifier of the AgentCore Memory resource retrieved from.</p>
|
|
931
|
+
* @public
|
|
932
|
+
*/
|
|
933
|
+
memoryId: string | undefined;
|
|
934
|
+
/**
|
|
935
|
+
* <p>The namespace prefix retrieved from, as supplied in the request. This field is present when the request specified namespace.</p>
|
|
936
|
+
* @public
|
|
937
|
+
*/
|
|
938
|
+
namespace?: string | undefined;
|
|
939
|
+
/**
|
|
940
|
+
* <p>The parent namespace retrieved from hierarchically, as supplied in the request. This field is present when the request specified namespacePath.</p>
|
|
941
|
+
* @public
|
|
942
|
+
*/
|
|
943
|
+
namespacePath?: string | undefined;
|
|
944
|
+
/**
|
|
945
|
+
* <p>The extraction strategy that restricted retrieval, if the request specified one.</p>
|
|
946
|
+
* @public
|
|
947
|
+
*/
|
|
948
|
+
strategyId?: string | undefined;
|
|
949
|
+
}
|
|
919
950
|
/**
|
|
920
951
|
* <p>Details of a retrieve action including the query and target retrievers.</p>
|
|
921
952
|
* @public
|
|
@@ -947,6 +978,11 @@ export interface AgenticRetrieveAction {
|
|
|
947
978
|
* @public
|
|
948
979
|
*/
|
|
949
980
|
fullDocumentExpansion?: AgenticRetrieveFullDocExpansionDetails | undefined;
|
|
981
|
+
/**
|
|
982
|
+
* <p>The details of a long-term memory retrieval that the agent chose to perform.</p>
|
|
983
|
+
* @public
|
|
984
|
+
*/
|
|
985
|
+
memoryRetrieve?: AgenticRetrieveMemoryRetrieveDetails | undefined;
|
|
950
986
|
}
|
|
951
987
|
/**
|
|
952
988
|
* <p>Configuration for a Bedrock guardrail applied during agentic retrieval.</p>
|
|
@@ -1156,6 +1192,236 @@ export interface AgenticRetrieveGuardrailWarning {
|
|
|
1156
1192
|
*/
|
|
1157
1193
|
message?: string | undefined;
|
|
1158
1194
|
}
|
|
1195
|
+
/**
|
|
1196
|
+
* <p>The left operand of a metadata filter expression. Set exactly one member.</p>
|
|
1197
|
+
* @public
|
|
1198
|
+
*/
|
|
1199
|
+
export type AgenticRetrieveMemoryMetadataFilterLeft = AgenticRetrieveMemoryMetadataFilterLeft.MetadataKeyMember | AgenticRetrieveMemoryMetadataFilterLeft.$UnknownMember;
|
|
1200
|
+
/**
|
|
1201
|
+
* @public
|
|
1202
|
+
*/
|
|
1203
|
+
export declare namespace AgenticRetrieveMemoryMetadataFilterLeft {
|
|
1204
|
+
/**
|
|
1205
|
+
* <p>The metadata key to filter on.</p>
|
|
1206
|
+
* @public
|
|
1207
|
+
*/
|
|
1208
|
+
interface MetadataKeyMember {
|
|
1209
|
+
metadataKey: string;
|
|
1210
|
+
$unknown?: never;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @public
|
|
1214
|
+
*/
|
|
1215
|
+
interface $UnknownMember {
|
|
1216
|
+
metadataKey?: never;
|
|
1217
|
+
$unknown: [string, any];
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* @deprecated unused in schema-serde mode.
|
|
1221
|
+
*
|
|
1222
|
+
*/
|
|
1223
|
+
interface Visitor<T> {
|
|
1224
|
+
metadataKey: (value: string) => T;
|
|
1225
|
+
_: (name: string, value: any) => T;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* <p>A metadata value that a filter expression compares against. Set exactly one member.</p>
|
|
1230
|
+
* @public
|
|
1231
|
+
*/
|
|
1232
|
+
export type AgenticRetrieveMemoryMetadataValue = AgenticRetrieveMemoryMetadataValue.DateTimeValueMember | AgenticRetrieveMemoryMetadataValue.NumberValueMember | AgenticRetrieveMemoryMetadataValue.StringListValueMember | AgenticRetrieveMemoryMetadataValue.StringValueMember | AgenticRetrieveMemoryMetadataValue.$UnknownMember;
|
|
1233
|
+
/**
|
|
1234
|
+
* @public
|
|
1235
|
+
*/
|
|
1236
|
+
export declare namespace AgenticRetrieveMemoryMetadataValue {
|
|
1237
|
+
/**
|
|
1238
|
+
* <p>A string value.</p>
|
|
1239
|
+
* @public
|
|
1240
|
+
*/
|
|
1241
|
+
interface StringValueMember {
|
|
1242
|
+
stringValue: string;
|
|
1243
|
+
numberValue?: never;
|
|
1244
|
+
stringListValue?: never;
|
|
1245
|
+
dateTimeValue?: never;
|
|
1246
|
+
$unknown?: never;
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* <p>A numeric value.</p>
|
|
1250
|
+
* @public
|
|
1251
|
+
*/
|
|
1252
|
+
interface NumberValueMember {
|
|
1253
|
+
stringValue?: never;
|
|
1254
|
+
numberValue: number;
|
|
1255
|
+
stringListValue?: never;
|
|
1256
|
+
dateTimeValue?: never;
|
|
1257
|
+
$unknown?: never;
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* <p>A list of string values.</p>
|
|
1261
|
+
* @public
|
|
1262
|
+
*/
|
|
1263
|
+
interface StringListValueMember {
|
|
1264
|
+
stringValue?: never;
|
|
1265
|
+
numberValue?: never;
|
|
1266
|
+
stringListValue: string[];
|
|
1267
|
+
dateTimeValue?: never;
|
|
1268
|
+
$unknown?: never;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* <p>A timestamp value in ISO 8601 UTC format.</p>
|
|
1272
|
+
* @public
|
|
1273
|
+
*/
|
|
1274
|
+
interface DateTimeValueMember {
|
|
1275
|
+
stringValue?: never;
|
|
1276
|
+
numberValue?: never;
|
|
1277
|
+
stringListValue?: never;
|
|
1278
|
+
dateTimeValue: Date;
|
|
1279
|
+
$unknown?: never;
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* @public
|
|
1283
|
+
*/
|
|
1284
|
+
interface $UnknownMember {
|
|
1285
|
+
stringValue?: never;
|
|
1286
|
+
numberValue?: never;
|
|
1287
|
+
stringListValue?: never;
|
|
1288
|
+
dateTimeValue?: never;
|
|
1289
|
+
$unknown: [string, any];
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* @deprecated unused in schema-serde mode.
|
|
1293
|
+
*
|
|
1294
|
+
*/
|
|
1295
|
+
interface Visitor<T> {
|
|
1296
|
+
stringValue: (value: string) => T;
|
|
1297
|
+
numberValue: (value: number) => T;
|
|
1298
|
+
stringListValue: (value: string[]) => T;
|
|
1299
|
+
dateTimeValue: (value: Date) => T;
|
|
1300
|
+
_: (name: string, value: any) => T;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* <p>The right operand of a metadata filter expression. Set exactly one member.</p>
|
|
1305
|
+
* @public
|
|
1306
|
+
*/
|
|
1307
|
+
export type AgenticRetrieveMemoryMetadataFilterRight = AgenticRetrieveMemoryMetadataFilterRight.MetadataValueMember | AgenticRetrieveMemoryMetadataFilterRight.$UnknownMember;
|
|
1308
|
+
/**
|
|
1309
|
+
* @public
|
|
1310
|
+
*/
|
|
1311
|
+
export declare namespace AgenticRetrieveMemoryMetadataFilterRight {
|
|
1312
|
+
/**
|
|
1313
|
+
* <p>The value to compare the metadata key against.</p>
|
|
1314
|
+
* @public
|
|
1315
|
+
*/
|
|
1316
|
+
interface MetadataValueMember {
|
|
1317
|
+
metadataValue: AgenticRetrieveMemoryMetadataValue;
|
|
1318
|
+
$unknown?: never;
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* @public
|
|
1322
|
+
*/
|
|
1323
|
+
interface $UnknownMember {
|
|
1324
|
+
metadataValue?: never;
|
|
1325
|
+
$unknown: [string, any];
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* @deprecated unused in schema-serde mode.
|
|
1329
|
+
*
|
|
1330
|
+
*/
|
|
1331
|
+
interface Visitor<T> {
|
|
1332
|
+
metadataValue: (value: AgenticRetrieveMemoryMetadataValue) => T;
|
|
1333
|
+
_: (name: string, value: any) => T;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* <p>A metadata filter expression, in the form accepted by the AgentCore Memory RetrieveMemoryRecords operation. The expression has a left operand that names the metadata key, an operator, and a right operand. For the EXISTS and NOT_EXISTS operators, omit the right operand.</p>
|
|
1338
|
+
* @public
|
|
1339
|
+
*/
|
|
1340
|
+
export interface AgenticRetrieveMemoryMetadataFilter {
|
|
1341
|
+
/**
|
|
1342
|
+
* <p>The metadata key that the expression evaluates.</p>
|
|
1343
|
+
* @public
|
|
1344
|
+
*/
|
|
1345
|
+
left: AgenticRetrieveMemoryMetadataFilterLeft | undefined;
|
|
1346
|
+
/**
|
|
1347
|
+
* <p>The relationship that the metadata key and value must have for a memory record to match.</p>
|
|
1348
|
+
* @public
|
|
1349
|
+
*/
|
|
1350
|
+
operator: AgenticRetrieveMemoryMetadataFilterOperator | undefined;
|
|
1351
|
+
/**
|
|
1352
|
+
* <p>The value that the expression compares the metadata key against. Supply this value for every operator except EXISTS and NOT_EXISTS.</p>
|
|
1353
|
+
* @public
|
|
1354
|
+
*/
|
|
1355
|
+
right?: AgenticRetrieveMemoryMetadataFilterRight | undefined;
|
|
1356
|
+
}
|
|
1357
|
+
/**
|
|
1358
|
+
* <p>The long-term memory namespace that the agent might retrieve memory records from, and the filters applied to that retrieval. You must specify either namespace or namespacePath.</p>
|
|
1359
|
+
* @public
|
|
1360
|
+
*/
|
|
1361
|
+
export interface AgenticRetrieveMemoryRetrievalConfig {
|
|
1362
|
+
/**
|
|
1363
|
+
* <p>The namespace prefix to filter memory records by. The agent retrieves memory records in namespaces that start with the provided prefix. You must specify either namespace or namespacePath.</p>
|
|
1364
|
+
* @public
|
|
1365
|
+
*/
|
|
1366
|
+
namespace?: string | undefined;
|
|
1367
|
+
/**
|
|
1368
|
+
* <p>The parent namespace to use for hierarchical retrievals. The agent retrieves all memory records whose namespace falls under the same parent hierarchy. You must specify either namespace or namespacePath.</p>
|
|
1369
|
+
* @public
|
|
1370
|
+
*/
|
|
1371
|
+
namespacePath?: string | undefined;
|
|
1372
|
+
/**
|
|
1373
|
+
* <p>The extraction strategy ID that restricts retrieval to memory records produced by a single strategy. Omit this parameter to retrieve records from every strategy on the memory resource.</p>
|
|
1374
|
+
* @public
|
|
1375
|
+
*/
|
|
1376
|
+
strategyId?: string | undefined;
|
|
1377
|
+
/**
|
|
1378
|
+
* <p>The metadata filter expressions that restrict retrieval to matching memory records. You can specify a maximum of 5 expressions.</p>
|
|
1379
|
+
* @public
|
|
1380
|
+
*/
|
|
1381
|
+
metadataFilters?: AgenticRetrieveMemoryMetadataFilter[] | undefined;
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* <p>The short-term memory session that this retrieval reads from and writes to.</p>
|
|
1385
|
+
* @public
|
|
1386
|
+
*/
|
|
1387
|
+
export interface AgenticRetrieveMemorySessionBinding {
|
|
1388
|
+
/**
|
|
1389
|
+
* <p>The identifier of the end user or agent that the session belongs to. This identifier scopes session history so that one actor's history is never returned for another. You are responsible for sending the correct actor value.</p>
|
|
1390
|
+
* @public
|
|
1391
|
+
*/
|
|
1392
|
+
actorId: string | undefined;
|
|
1393
|
+
/**
|
|
1394
|
+
* <p>The identifier of the session to restore and continue. You are responsible for sending the correct session value.</p>
|
|
1395
|
+
* @public
|
|
1396
|
+
*/
|
|
1397
|
+
sessionId: string | undefined;
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* <p>Specifies an AgentCore Memory resource and how this retrieval uses it. Set sessionBinding to restore and continue a session. Set retrievalConfigs to let the agent retrieve from long-term memory. You must specify at least one of the two.</p>
|
|
1401
|
+
* @public
|
|
1402
|
+
*/
|
|
1403
|
+
export interface AgenticRetrieveMemoryConfiguration {
|
|
1404
|
+
/**
|
|
1405
|
+
* <p>The identifier of the AgentCore Memory resource to use. The resource must exist in your account and be in the ACTIVE state.</p>
|
|
1406
|
+
* @public
|
|
1407
|
+
*/
|
|
1408
|
+
memoryId: string | undefined;
|
|
1409
|
+
/**
|
|
1410
|
+
* <p>The short-term memory session whose history is restored for this retrieval. To persist the agent-generated answer to the session, omit persistenceMode or set it to DEFAULT. To leave the session unchanged, set persistenceMode to NONE. Supply session history through the existing messages parameter or through short-term memory, but not both.</p>
|
|
1411
|
+
* @public
|
|
1412
|
+
*/
|
|
1413
|
+
sessionBinding?: AgenticRetrieveMemorySessionBinding | undefined;
|
|
1414
|
+
/**
|
|
1415
|
+
* <p>Specifies the long-term memory configuration the agent can retrieve from. The agent decides whether to retrieve and composes its own query. This field currently accepts at most one entry.</p>
|
|
1416
|
+
* @public
|
|
1417
|
+
*/
|
|
1418
|
+
retrievalConfigs?: AgenticRetrieveMemoryRetrievalConfig[] | undefined;
|
|
1419
|
+
/**
|
|
1420
|
+
* <p>Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set. Valid values:</p> <ul> <li> <p> <code>DEFAULT</code> (default) – Specifies that the question and the agent-generated answer are persisted to the session as a single event. This value requires generateResponse to be true.</p> </li> <li> <p> <code>NONE</code> – Specifies that the session is left unchanged.</p> </li> </ul>
|
|
1421
|
+
* @public
|
|
1422
|
+
*/
|
|
1423
|
+
persistenceMode?: AgenticRetrieveMemoryPersistenceMode | undefined;
|
|
1424
|
+
}
|
|
1159
1425
|
/**
|
|
1160
1426
|
* <p>A message in the agentic retrieval conversation.</p>
|
|
1161
1427
|
* @public
|
|
@@ -8000,412 +8266,3 @@ export interface GuardrailEvent {
|
|
|
8000
8266
|
*/
|
|
8001
8267
|
action?: GuadrailAction | undefined;
|
|
8002
8268
|
}
|
|
8003
|
-
/**
|
|
8004
|
-
* <p>A retrieve and generate output event.</p>
|
|
8005
|
-
* @public
|
|
8006
|
-
*/
|
|
8007
|
-
export interface RetrieveAndGenerateOutputEvent {
|
|
8008
|
-
/**
|
|
8009
|
-
* <p>A text response.</p>
|
|
8010
|
-
* @public
|
|
8011
|
-
*/
|
|
8012
|
-
text: string | undefined;
|
|
8013
|
-
}
|
|
8014
|
-
/**
|
|
8015
|
-
* <p>A retrieve and generate stream response output.</p>
|
|
8016
|
-
* @public
|
|
8017
|
-
*/
|
|
8018
|
-
export type RetrieveAndGenerateStreamResponseOutput = RetrieveAndGenerateStreamResponseOutput.AccessDeniedExceptionMember | RetrieveAndGenerateStreamResponseOutput.BadGatewayExceptionMember | RetrieveAndGenerateStreamResponseOutput.CitationMember | RetrieveAndGenerateStreamResponseOutput.ConflictExceptionMember | RetrieveAndGenerateStreamResponseOutput.DependencyFailedExceptionMember | RetrieveAndGenerateStreamResponseOutput.GuardrailMember | RetrieveAndGenerateStreamResponseOutput.InternalServerExceptionMember | RetrieveAndGenerateStreamResponseOutput.OutputMember | RetrieveAndGenerateStreamResponseOutput.ResourceNotFoundExceptionMember | RetrieveAndGenerateStreamResponseOutput.ServiceQuotaExceededExceptionMember | RetrieveAndGenerateStreamResponseOutput.ThrottlingExceptionMember | RetrieveAndGenerateStreamResponseOutput.ValidationExceptionMember | RetrieveAndGenerateStreamResponseOutput.$UnknownMember;
|
|
8019
|
-
/**
|
|
8020
|
-
* @public
|
|
8021
|
-
*/
|
|
8022
|
-
export declare namespace RetrieveAndGenerateStreamResponseOutput {
|
|
8023
|
-
/**
|
|
8024
|
-
* <p>An output event.</p>
|
|
8025
|
-
* @public
|
|
8026
|
-
*/
|
|
8027
|
-
interface OutputMember {
|
|
8028
|
-
output: RetrieveAndGenerateOutputEvent;
|
|
8029
|
-
citation?: never;
|
|
8030
|
-
guardrail?: never;
|
|
8031
|
-
internalServerException?: never;
|
|
8032
|
-
validationException?: never;
|
|
8033
|
-
resourceNotFoundException?: never;
|
|
8034
|
-
serviceQuotaExceededException?: never;
|
|
8035
|
-
throttlingException?: never;
|
|
8036
|
-
accessDeniedException?: never;
|
|
8037
|
-
conflictException?: never;
|
|
8038
|
-
dependencyFailedException?: never;
|
|
8039
|
-
badGatewayException?: never;
|
|
8040
|
-
$unknown?: never;
|
|
8041
|
-
}
|
|
8042
|
-
/**
|
|
8043
|
-
* <p>A citation event.</p>
|
|
8044
|
-
* @public
|
|
8045
|
-
*/
|
|
8046
|
-
interface CitationMember {
|
|
8047
|
-
output?: never;
|
|
8048
|
-
citation: CitationEvent;
|
|
8049
|
-
guardrail?: never;
|
|
8050
|
-
internalServerException?: never;
|
|
8051
|
-
validationException?: never;
|
|
8052
|
-
resourceNotFoundException?: never;
|
|
8053
|
-
serviceQuotaExceededException?: never;
|
|
8054
|
-
throttlingException?: never;
|
|
8055
|
-
accessDeniedException?: never;
|
|
8056
|
-
conflictException?: never;
|
|
8057
|
-
dependencyFailedException?: never;
|
|
8058
|
-
badGatewayException?: never;
|
|
8059
|
-
$unknown?: never;
|
|
8060
|
-
}
|
|
8061
|
-
/**
|
|
8062
|
-
* <p>A guardrail event.</p>
|
|
8063
|
-
* @public
|
|
8064
|
-
*/
|
|
8065
|
-
interface GuardrailMember {
|
|
8066
|
-
output?: never;
|
|
8067
|
-
citation?: never;
|
|
8068
|
-
guardrail: GuardrailEvent;
|
|
8069
|
-
internalServerException?: never;
|
|
8070
|
-
validationException?: never;
|
|
8071
|
-
resourceNotFoundException?: never;
|
|
8072
|
-
serviceQuotaExceededException?: never;
|
|
8073
|
-
throttlingException?: never;
|
|
8074
|
-
accessDeniedException?: never;
|
|
8075
|
-
conflictException?: never;
|
|
8076
|
-
dependencyFailedException?: never;
|
|
8077
|
-
badGatewayException?: never;
|
|
8078
|
-
$unknown?: never;
|
|
8079
|
-
}
|
|
8080
|
-
/**
|
|
8081
|
-
* <p>An internal server error occurred. Retry your request.</p>
|
|
8082
|
-
* @public
|
|
8083
|
-
*/
|
|
8084
|
-
interface InternalServerExceptionMember {
|
|
8085
|
-
output?: never;
|
|
8086
|
-
citation?: never;
|
|
8087
|
-
guardrail?: never;
|
|
8088
|
-
internalServerException: InternalServerException;
|
|
8089
|
-
validationException?: never;
|
|
8090
|
-
resourceNotFoundException?: never;
|
|
8091
|
-
serviceQuotaExceededException?: never;
|
|
8092
|
-
throttlingException?: never;
|
|
8093
|
-
accessDeniedException?: never;
|
|
8094
|
-
conflictException?: never;
|
|
8095
|
-
dependencyFailedException?: never;
|
|
8096
|
-
badGatewayException?: never;
|
|
8097
|
-
$unknown?: never;
|
|
8098
|
-
}
|
|
8099
|
-
/**
|
|
8100
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide.</p>
|
|
8101
|
-
* @public
|
|
8102
|
-
*/
|
|
8103
|
-
interface ValidationExceptionMember {
|
|
8104
|
-
output?: never;
|
|
8105
|
-
citation?: never;
|
|
8106
|
-
guardrail?: never;
|
|
8107
|
-
internalServerException?: never;
|
|
8108
|
-
validationException: ValidationException;
|
|
8109
|
-
resourceNotFoundException?: never;
|
|
8110
|
-
serviceQuotaExceededException?: never;
|
|
8111
|
-
throttlingException?: never;
|
|
8112
|
-
accessDeniedException?: never;
|
|
8113
|
-
conflictException?: never;
|
|
8114
|
-
dependencyFailedException?: never;
|
|
8115
|
-
badGatewayException?: never;
|
|
8116
|
-
$unknown?: never;
|
|
8117
|
-
}
|
|
8118
|
-
/**
|
|
8119
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide.</p>
|
|
8120
|
-
* @public
|
|
8121
|
-
*/
|
|
8122
|
-
interface ResourceNotFoundExceptionMember {
|
|
8123
|
-
output?: never;
|
|
8124
|
-
citation?: never;
|
|
8125
|
-
guardrail?: never;
|
|
8126
|
-
internalServerException?: never;
|
|
8127
|
-
validationException?: never;
|
|
8128
|
-
resourceNotFoundException: ResourceNotFoundException;
|
|
8129
|
-
serviceQuotaExceededException?: never;
|
|
8130
|
-
throttlingException?: never;
|
|
8131
|
-
accessDeniedException?: never;
|
|
8132
|
-
conflictException?: never;
|
|
8133
|
-
dependencyFailedException?: never;
|
|
8134
|
-
badGatewayException?: never;
|
|
8135
|
-
$unknown?: never;
|
|
8136
|
-
}
|
|
8137
|
-
/**
|
|
8138
|
-
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
8139
|
-
* @public
|
|
8140
|
-
*/
|
|
8141
|
-
interface ServiceQuotaExceededExceptionMember {
|
|
8142
|
-
output?: never;
|
|
8143
|
-
citation?: never;
|
|
8144
|
-
guardrail?: never;
|
|
8145
|
-
internalServerException?: never;
|
|
8146
|
-
validationException?: never;
|
|
8147
|
-
resourceNotFoundException?: never;
|
|
8148
|
-
serviceQuotaExceededException: ServiceQuotaExceededException;
|
|
8149
|
-
throttlingException?: never;
|
|
8150
|
-
accessDeniedException?: never;
|
|
8151
|
-
conflictException?: never;
|
|
8152
|
-
dependencyFailedException?: never;
|
|
8153
|
-
badGatewayException?: never;
|
|
8154
|
-
$unknown?: never;
|
|
8155
|
-
}
|
|
8156
|
-
/**
|
|
8157
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide.</p>
|
|
8158
|
-
* @public
|
|
8159
|
-
*/
|
|
8160
|
-
interface ThrottlingExceptionMember {
|
|
8161
|
-
output?: never;
|
|
8162
|
-
citation?: never;
|
|
8163
|
-
guardrail?: never;
|
|
8164
|
-
internalServerException?: never;
|
|
8165
|
-
validationException?: never;
|
|
8166
|
-
resourceNotFoundException?: never;
|
|
8167
|
-
serviceQuotaExceededException?: never;
|
|
8168
|
-
throttlingException: ThrottlingException;
|
|
8169
|
-
accessDeniedException?: never;
|
|
8170
|
-
conflictException?: never;
|
|
8171
|
-
dependencyFailedException?: never;
|
|
8172
|
-
badGatewayException?: never;
|
|
8173
|
-
$unknown?: never;
|
|
8174
|
-
}
|
|
8175
|
-
/**
|
|
8176
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide.</p>
|
|
8177
|
-
* @public
|
|
8178
|
-
*/
|
|
8179
|
-
interface AccessDeniedExceptionMember {
|
|
8180
|
-
output?: never;
|
|
8181
|
-
citation?: never;
|
|
8182
|
-
guardrail?: never;
|
|
8183
|
-
internalServerException?: never;
|
|
8184
|
-
validationException?: never;
|
|
8185
|
-
resourceNotFoundException?: never;
|
|
8186
|
-
serviceQuotaExceededException?: never;
|
|
8187
|
-
throttlingException?: never;
|
|
8188
|
-
accessDeniedException: AccessDeniedException;
|
|
8189
|
-
conflictException?: never;
|
|
8190
|
-
dependencyFailedException?: never;
|
|
8191
|
-
badGatewayException?: never;
|
|
8192
|
-
$unknown?: never;
|
|
8193
|
-
}
|
|
8194
|
-
/**
|
|
8195
|
-
* <p>Error occurred because of a conflict while performing an operation.</p>
|
|
8196
|
-
* @public
|
|
8197
|
-
*/
|
|
8198
|
-
interface ConflictExceptionMember {
|
|
8199
|
-
output?: never;
|
|
8200
|
-
citation?: never;
|
|
8201
|
-
guardrail?: never;
|
|
8202
|
-
internalServerException?: never;
|
|
8203
|
-
validationException?: never;
|
|
8204
|
-
resourceNotFoundException?: never;
|
|
8205
|
-
serviceQuotaExceededException?: never;
|
|
8206
|
-
throttlingException?: never;
|
|
8207
|
-
accessDeniedException?: never;
|
|
8208
|
-
conflictException: ConflictException;
|
|
8209
|
-
dependencyFailedException?: never;
|
|
8210
|
-
badGatewayException?: never;
|
|
8211
|
-
$unknown?: never;
|
|
8212
|
-
}
|
|
8213
|
-
/**
|
|
8214
|
-
* <p>The request failed due to a dependency error.</p>
|
|
8215
|
-
* @public
|
|
8216
|
-
*/
|
|
8217
|
-
interface DependencyFailedExceptionMember {
|
|
8218
|
-
output?: never;
|
|
8219
|
-
citation?: never;
|
|
8220
|
-
guardrail?: never;
|
|
8221
|
-
internalServerException?: never;
|
|
8222
|
-
validationException?: never;
|
|
8223
|
-
resourceNotFoundException?: never;
|
|
8224
|
-
serviceQuotaExceededException?: never;
|
|
8225
|
-
throttlingException?: never;
|
|
8226
|
-
accessDeniedException?: never;
|
|
8227
|
-
conflictException?: never;
|
|
8228
|
-
dependencyFailedException: DependencyFailedException;
|
|
8229
|
-
badGatewayException?: never;
|
|
8230
|
-
$unknown?: never;
|
|
8231
|
-
}
|
|
8232
|
-
/**
|
|
8233
|
-
* <p>The request failed due to a bad gateway error.</p>
|
|
8234
|
-
* @public
|
|
8235
|
-
*/
|
|
8236
|
-
interface BadGatewayExceptionMember {
|
|
8237
|
-
output?: never;
|
|
8238
|
-
citation?: never;
|
|
8239
|
-
guardrail?: never;
|
|
8240
|
-
internalServerException?: never;
|
|
8241
|
-
validationException?: never;
|
|
8242
|
-
resourceNotFoundException?: never;
|
|
8243
|
-
serviceQuotaExceededException?: never;
|
|
8244
|
-
throttlingException?: never;
|
|
8245
|
-
accessDeniedException?: never;
|
|
8246
|
-
conflictException?: never;
|
|
8247
|
-
dependencyFailedException?: never;
|
|
8248
|
-
badGatewayException: BadGatewayException;
|
|
8249
|
-
$unknown?: never;
|
|
8250
|
-
}
|
|
8251
|
-
/**
|
|
8252
|
-
* @public
|
|
8253
|
-
*/
|
|
8254
|
-
interface $UnknownMember {
|
|
8255
|
-
output?: never;
|
|
8256
|
-
citation?: never;
|
|
8257
|
-
guardrail?: never;
|
|
8258
|
-
internalServerException?: never;
|
|
8259
|
-
validationException?: never;
|
|
8260
|
-
resourceNotFoundException?: never;
|
|
8261
|
-
serviceQuotaExceededException?: never;
|
|
8262
|
-
throttlingException?: never;
|
|
8263
|
-
accessDeniedException?: never;
|
|
8264
|
-
conflictException?: never;
|
|
8265
|
-
dependencyFailedException?: never;
|
|
8266
|
-
badGatewayException?: never;
|
|
8267
|
-
$unknown: [string, any];
|
|
8268
|
-
}
|
|
8269
|
-
/**
|
|
8270
|
-
* @deprecated unused in schema-serde mode.
|
|
8271
|
-
*
|
|
8272
|
-
*/
|
|
8273
|
-
interface Visitor<T> {
|
|
8274
|
-
output: (value: RetrieveAndGenerateOutputEvent) => T;
|
|
8275
|
-
citation: (value: CitationEvent) => T;
|
|
8276
|
-
guardrail: (value: GuardrailEvent) => T;
|
|
8277
|
-
internalServerException: (value: InternalServerException) => T;
|
|
8278
|
-
validationException: (value: ValidationException) => T;
|
|
8279
|
-
resourceNotFoundException: (value: ResourceNotFoundException) => T;
|
|
8280
|
-
serviceQuotaExceededException: (value: ServiceQuotaExceededException) => T;
|
|
8281
|
-
throttlingException: (value: ThrottlingException) => T;
|
|
8282
|
-
accessDeniedException: (value: AccessDeniedException) => T;
|
|
8283
|
-
conflictException: (value: ConflictException) => T;
|
|
8284
|
-
dependencyFailedException: (value: DependencyFailedException) => T;
|
|
8285
|
-
badGatewayException: (value: BadGatewayException) => T;
|
|
8286
|
-
_: (name: string, value: any) => T;
|
|
8287
|
-
}
|
|
8288
|
-
}
|
|
8289
|
-
/**
|
|
8290
|
-
* @public
|
|
8291
|
-
*/
|
|
8292
|
-
export interface RetrieveAndGenerateStreamResponse {
|
|
8293
|
-
/**
|
|
8294
|
-
* <p>A stream of events from the model.</p>
|
|
8295
|
-
* @public
|
|
8296
|
-
*/
|
|
8297
|
-
stream: AsyncIterable<RetrieveAndGenerateStreamResponseOutput> | undefined;
|
|
8298
|
-
/**
|
|
8299
|
-
* <p>The session ID.</p>
|
|
8300
|
-
* @public
|
|
8301
|
-
*/
|
|
8302
|
-
sessionId: string | undefined;
|
|
8303
|
-
}
|
|
8304
|
-
/**
|
|
8305
|
-
* <p>Contains the image data for multimodal knowledge base queries, including format and content.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <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>image</code> field</p> </li> </ul>
|
|
8306
|
-
* @public
|
|
8307
|
-
*/
|
|
8308
|
-
export interface InputImage {
|
|
8309
|
-
/**
|
|
8310
|
-
* <p>The format of the input image. Supported formats include png, gif, jpeg, and webp.</p>
|
|
8311
|
-
* @public
|
|
8312
|
-
*/
|
|
8313
|
-
format: InputImageFormat | undefined;
|
|
8314
|
-
/**
|
|
8315
|
-
* <p>The base64-encoded image data for inline image content. Maximum size is 5MB.</p>
|
|
8316
|
-
* @public
|
|
8317
|
-
*/
|
|
8318
|
-
inlineContent: Uint8Array | undefined;
|
|
8319
|
-
}
|
|
8320
|
-
/**
|
|
8321
|
-
* <p>Contains the query made to the knowledge base.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <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> </li> </ul>
|
|
8322
|
-
* @public
|
|
8323
|
-
*/
|
|
8324
|
-
export interface KnowledgeBaseQuery {
|
|
8325
|
-
/**
|
|
8326
|
-
* <p>The type of query being performed.</p>
|
|
8327
|
-
* @public
|
|
8328
|
-
*/
|
|
8329
|
-
type?: KnowledgeBaseQueryType | undefined;
|
|
8330
|
-
/**
|
|
8331
|
-
* <p>The text of the query made to the knowledge base.</p>
|
|
8332
|
-
* @public
|
|
8333
|
-
*/
|
|
8334
|
-
text?: string | undefined;
|
|
8335
|
-
/**
|
|
8336
|
-
* <p>An image to include in the knowledge base query for multimodal retrieval.</p>
|
|
8337
|
-
* @public
|
|
8338
|
-
*/
|
|
8339
|
-
image?: InputImage | undefined;
|
|
8340
|
-
}
|
|
8341
|
-
/**
|
|
8342
|
-
* <p>Details about a result from querying the knowledge base.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <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> </li> </ul>
|
|
8343
|
-
* @public
|
|
8344
|
-
*/
|
|
8345
|
-
export interface KnowledgeBaseRetrievalResult {
|
|
8346
|
-
/**
|
|
8347
|
-
* <p>Contains information about the content of the chunk.</p>
|
|
8348
|
-
* @public
|
|
8349
|
-
*/
|
|
8350
|
-
content: RetrievalResultContent | undefined;
|
|
8351
|
-
/**
|
|
8352
|
-
* <p>Contains information about the location of the data source.</p>
|
|
8353
|
-
* @public
|
|
8354
|
-
*/
|
|
8355
|
-
location?: RetrievalResultLocation | undefined;
|
|
8356
|
-
/**
|
|
8357
|
-
* <p>The level of relevance of the result to the query.</p>
|
|
8358
|
-
* @public
|
|
8359
|
-
*/
|
|
8360
|
-
score?: number | undefined;
|
|
8361
|
-
/**
|
|
8362
|
-
* <p>Contains metadata attributes and their values for the file in the data source. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata">Metadata and filtering</a>.</p>
|
|
8363
|
-
* @public
|
|
8364
|
-
*/
|
|
8365
|
-
metadata?: Record<string, __DocumentType> | undefined;
|
|
8366
|
-
/**
|
|
8367
|
-
* <p>The unique identifier of the document. Use with <code>GetDocumentContent</code> to retrieve the full document.</p>
|
|
8368
|
-
* @public
|
|
8369
|
-
*/
|
|
8370
|
-
documentId?: string | undefined;
|
|
8371
|
-
}
|
|
8372
|
-
/**
|
|
8373
|
-
* @public
|
|
8374
|
-
*/
|
|
8375
|
-
export interface RetrieveResponse {
|
|
8376
|
-
/**
|
|
8377
|
-
* <p>A list of results from querying the knowledge base.</p>
|
|
8378
|
-
* @public
|
|
8379
|
-
*/
|
|
8380
|
-
retrievalResults: KnowledgeBaseRetrievalResult[] | undefined;
|
|
8381
|
-
/**
|
|
8382
|
-
* <p>Specifies if there is a guardrail intervention in the response.</p>
|
|
8383
|
-
* @public
|
|
8384
|
-
*/
|
|
8385
|
-
guardrailAction?: GuadrailAction | undefined;
|
|
8386
|
-
/**
|
|
8387
|
-
* <p>If there are more results than can fit in the response, the response returns a <code>nextToken</code>. Use this token in the <code>nextToken</code> field of another request to retrieve the next batch of results.</p>
|
|
8388
|
-
* @public
|
|
8389
|
-
*/
|
|
8390
|
-
nextToken?: string | undefined;
|
|
8391
|
-
}
|
|
8392
|
-
/**
|
|
8393
|
-
* @public
|
|
8394
|
-
*/
|
|
8395
|
-
export interface CreateSessionRequest {
|
|
8396
|
-
/**
|
|
8397
|
-
* <p>A map of key-value pairs containing attributes to be persisted across the session. For example, the user's ID, their language preference, and the type of device they are using.</p>
|
|
8398
|
-
* @public
|
|
8399
|
-
*/
|
|
8400
|
-
sessionMetadata?: Record<string, string> | undefined;
|
|
8401
|
-
/**
|
|
8402
|
-
* <p>The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data. The user or role creating the session must have permission to use the key. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html">Amazon Bedrock session encryption</a>. </p>
|
|
8403
|
-
* @public
|
|
8404
|
-
*/
|
|
8405
|
-
encryptionKeyArn?: string | undefined;
|
|
8406
|
-
/**
|
|
8407
|
-
* <p>Specify the key-value pairs for the tags that you want to attach to the session.</p>
|
|
8408
|
-
* @public
|
|
8409
|
-
*/
|
|
8410
|
-
tags?: Record<string, string> | undefined;
|
|
8411
|
-
}
|