@@ -2264,6 +2264,116 @@ export interface PromptTemplate {
2264
2264
textPromptTemplate ?: string ;
2265
2265
}
2266
2266
2267
+ /**
2268
+ * <p>Contains the generation configuration of the external source wrapper object.</p>
2269
+ * @public
2270
+ */
2271
+ export interface ExternalSourcesGenerationConfiguration {
2272
+ /**
2273
+ * <p>Contain the textPromptTemplate string for the external source wrapper object.</p>
2274
+ * @public
2275
+ */
2276
+ promptTemplate ?: PromptTemplate ;
2277
+ }
2278
+
2279
+ /**
2280
+ * <p>This property contains the document to chat with, along with its attributes.</p>
2281
+ * @public
2282
+ */
2283
+ export interface ByteContentDoc {
2284
+ /**
2285
+ * <p>The file name of the document contained in the wrapper object.</p>
2286
+ * @public
2287
+ */
2288
+ identifier : string | undefined ;
2289
+
2290
+ /**
2291
+ * <p>The MIME type of the document contained in the wrapper object.</p>
2292
+ * @public
2293
+ */
2294
+ contentType : string | undefined ;
2295
+
2296
+ /**
2297
+ * <p>The byte value of the file to upload, encoded as a Base-64 string.</p>
2298
+ * @public
2299
+ */
2300
+ data : Uint8Array | undefined ;
2301
+ }
2302
+
2303
+ /**
2304
+ * <p>The unique wrapper object of the document from the S3 location.</p>
2305
+ * @public
2306
+ */
2307
+ export interface S3ObjectDoc {
2308
+ /**
2309
+ * <p>The file location of the S3 wrapper object.</p>
2310
+ * @public
2311
+ */
2312
+ uri : string | undefined ;
2313
+ }
2314
+
2315
+ /**
2316
+ * @public
2317
+ * @enum
2318
+ */
2319
+ export const ExternalSourceType = {
2320
+ BYTE_CONTENT : "BYTE_CONTENT" ,
2321
+ S3 : "S3" ,
2322
+ } as const ;
2323
+
2324
+ /**
2325
+ * @public
2326
+ */
2327
+ export type ExternalSourceType = ( typeof ExternalSourceType ) [ keyof typeof ExternalSourceType ] ;
2328
+
2329
+ /**
2330
+ * <p>The unique external source of the content contained in the wrapper object.</p>
2331
+ * @public
2332
+ */
2333
+ export interface ExternalSource {
2334
+ /**
2335
+ * <p>The source type of the external source wrapper object.</p>
2336
+ * @public
2337
+ */
2338
+ sourceType : ExternalSourceType | undefined ;
2339
+
2340
+ /**
2341
+ * <p>The S3 location of the external source wrapper object.</p>
2342
+ * @public
2343
+ */
2344
+ s3Location ?: S3ObjectDoc ;
2345
+
2346
+ /**
2347
+ * <p>The identifier, contentType, and data of the external source wrapper object.</p>
2348
+ * @public
2349
+ */
2350
+ byteContent ?: ByteContentDoc ;
2351
+ }
2352
+
2353
+ /**
2354
+ * <p>The configurations of the external source wrapper object in the retrieveAndGenerate function.</p>
2355
+ * @public
2356
+ */
2357
+ export interface ExternalSourcesRetrieveAndGenerateConfiguration {
2358
+ /**
2359
+ * <p>The modelArn used with the external source wrapper object in the retrieveAndGenerate function.</p>
2360
+ * @public
2361
+ */
2362
+ modelArn : string | undefined ;
2363
+
2364
+ /**
2365
+ * <p>The document used with the external source wrapper object in the retrieveAndGenerate function.</p>
2366
+ * @public
2367
+ */
2368
+ sources : ExternalSource [ ] | undefined ;
2369
+
2370
+ /**
2371
+ * <p>The prompt used with the external source wrapper object with the retrieveAndGenerate function.</p>
2372
+ * @public
2373
+ */
2374
+ generationConfiguration ?: ExternalSourcesGenerationConfiguration ;
2375
+ }
2376
+
2267
2377
/**
2268
2378
* <p>Contains configurations for response generation based on the knowledge base query results.</p>
2269
2379
* <p>This data type is used in the following API operations:</p>
@@ -2329,6 +2439,7 @@ export type SearchType = (typeof SearchType)[keyof typeof SearchType];
2329
2439
* @enum
2330
2440
*/
2331
2441
export const RetrieveAndGenerateType = {
2442
+ EXTERNAL_SOURCES : "EXTERNAL_SOURCES" ,
2332
2443
KNOWLEDGE_BASE : "KNOWLEDGE_BASE" ,
2333
2444
} as const ;
2334
2445
@@ -2913,6 +3024,12 @@ export interface RetrieveAndGenerateConfiguration {
2913
3024
* @public
2914
3025
*/
2915
3026
knowledgeBaseConfiguration ?: KnowledgeBaseRetrieveAndGenerateConfiguration ;
3027
+
3028
+ /**
3029
+ * <p>The configuration used with the external source wrapper object in the retrieveAndGenerate function.</p>
3030
+ * @public
3031
+ */
3032
+ externalSourcesConfiguration ?: ExternalSourcesRetrieveAndGenerateConfiguration ;
2916
3033
}
2917
3034
2918
3035
/**
@@ -3310,6 +3427,46 @@ export const PromptTemplateFilterSensitiveLog = (obj: PromptTemplate): any => ({
3310
3427
...( obj . textPromptTemplate && { textPromptTemplate : SENSITIVE_STRING } ) ,
3311
3428
} ) ;
3312
3429
3430
+ /**
3431
+ * @internal
3432
+ */
3433
+ export const ExternalSourcesGenerationConfigurationFilterSensitiveLog = (
3434
+ obj : ExternalSourcesGenerationConfiguration
3435
+ ) : any => ( {
3436
+ ...obj ,
3437
+ ...( obj . promptTemplate && { promptTemplate : PromptTemplateFilterSensitiveLog ( obj . promptTemplate ) } ) ,
3438
+ } ) ;
3439
+
3440
+ /**
3441
+ * @internal
3442
+ */
3443
+ export const ByteContentDocFilterSensitiveLog = ( obj : ByteContentDoc ) : any => ( {
3444
+ ...obj ,
3445
+ ...( obj . identifier && { identifier : SENSITIVE_STRING } ) ,
3446
+ ...( obj . data && { data : SENSITIVE_STRING } ) ,
3447
+ } ) ;
3448
+
3449
+ /**
3450
+ * @internal
3451
+ */
3452
+ export const ExternalSourceFilterSensitiveLog = ( obj : ExternalSource ) : any => ( {
3453
+ ...obj ,
3454
+ ...( obj . byteContent && { byteContent : ByteContentDocFilterSensitiveLog ( obj . byteContent ) } ) ,
3455
+ } ) ;
3456
+
3457
+ /**
3458
+ * @internal
3459
+ */
3460
+ export const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog = (
3461
+ obj : ExternalSourcesRetrieveAndGenerateConfiguration
3462
+ ) : any => ( {
3463
+ ...obj ,
3464
+ ...( obj . sources && { sources : obj . sources . map ( ( item ) => ExternalSourceFilterSensitiveLog ( item ) ) } ) ,
3465
+ ...( obj . generationConfiguration && {
3466
+ generationConfiguration : ExternalSourcesGenerationConfigurationFilterSensitiveLog ( obj . generationConfiguration ) ,
3467
+ } ) ,
3468
+ } ) ;
3469
+
3313
3470
/**
3314
3471
* @internal
3315
3472
*/
@@ -3435,6 +3592,11 @@ export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj: Retrieve
3435
3592
obj . knowledgeBaseConfiguration
3436
3593
) ,
3437
3594
} ) ,
3595
+ ...( obj . externalSourcesConfiguration && {
3596
+ externalSourcesConfiguration : ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog (
3597
+ obj . externalSourcesConfiguration
3598
+ ) ,
3599
+ } ) ,
3438
3600
} ) ;
3439
3601
3440
3602
/**
0 commit comments