@@ -1325,13 +1325,19 @@ export interface FlowInput {
1325
1325
* <p>The name of the output from the flow input node that begins the prompt flow.</p>
1326
1326
* @public
1327
1327
*/
1328
- nodeOutputName : string | undefined ;
1328
+ nodeOutputName ? : string | undefined ;
1329
1329
1330
1330
/**
1331
1331
* <p>Contains information about an input into the prompt flow.</p>
1332
1332
* @public
1333
1333
*/
1334
1334
content : FlowInputContent | undefined ;
1335
+
1336
+ /**
1337
+ * <p>The name of the input from the flow input node.</p>
1338
+ * @public
1339
+ */
1340
+ nodeInputName ?: string | undefined ;
1335
1341
}
1336
1342
1337
1343
/**
@@ -1405,13 +1411,20 @@ export interface InvokeFlowRequest {
1405
1411
* @public
1406
1412
*/
1407
1413
modelPerformanceConfiguration ?: ModelPerformanceConfiguration | undefined ;
1414
+
1415
+ /**
1416
+ * <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you. </p>
1417
+ * @public
1418
+ */
1419
+ executionId ?: string | undefined ;
1408
1420
}
1409
1421
1410
1422
/**
1411
1423
* @public
1412
1424
* @enum
1413
1425
*/
1414
1426
export const FlowCompletionReason = {
1427
+ INPUT_REQUIRED : "INPUT_REQUIRED" ,
1415
1428
SUCCESS : "SUCCESS" ,
1416
1429
} as const ;
1417
1430
@@ -1433,17 +1446,19 @@ export interface FlowCompletionEvent {
1433
1446
}
1434
1447
1435
1448
/**
1436
- * <p>Contains information about the content in an output from prompt flow invocation .</p>
1449
+ * <p>The content structure containing input information for multi-turn flow interactions .</p>
1437
1450
* @public
1438
1451
*/
1439
- export type FlowOutputContent = FlowOutputContent . DocumentMember | FlowOutputContent . $UnknownMember ;
1452
+ export type FlowMultiTurnInputContent =
1453
+ | FlowMultiTurnInputContent . DocumentMember
1454
+ | FlowMultiTurnInputContent . $UnknownMember ;
1440
1455
1441
1456
/**
1442
1457
* @public
1443
1458
*/
1444
- export namespace FlowOutputContent {
1459
+ export namespace FlowMultiTurnInputContent {
1445
1460
/**
1446
- * <p>The content in the output .</p>
1461
+ * <p>The requested additional input to send back to the multi-turn flow node .</p>
1447
1462
* @public
1448
1463
*/
1449
1464
export interface DocumentMember {
@@ -1464,7 +1479,7 @@ export namespace FlowOutputContent {
1464
1479
_ : ( name : string , value : any ) => T ;
1465
1480
}
1466
1481
1467
- export const visit = < T > ( value : FlowOutputContent , visitor : Visitor < T > ) : T => {
1482
+ export const visit = < T > ( value : FlowMultiTurnInputContent , visitor : Visitor < T > ) : T => {
1468
1483
if ( value . document !== undefined ) return visitor . document ( value . document ) ;
1469
1484
return visitor . _ ( value . $unknown [ 0 ] , value . $unknown [ 1 ] ) ;
1470
1485
} ;
@@ -1489,6 +1504,68 @@ export const NodeType = {
1489
1504
*/
1490
1505
export type NodeType = ( typeof NodeType ) [ keyof typeof NodeType ] ;
1491
1506
1507
+ /**
1508
+ * <p>Response object from the flow multi-turn node requesting additional information.</p>
1509
+ * @public
1510
+ */
1511
+ export interface FlowMultiTurnInputRequestEvent {
1512
+ /**
1513
+ * <p>The name of the node in the flow that is requesting the input.</p>
1514
+ * @public
1515
+ */
1516
+ nodeName : string | undefined ;
1517
+
1518
+ /**
1519
+ * <p>The type of the node in the flow that is requesting the input.</p>
1520
+ * @public
1521
+ */
1522
+ nodeType : NodeType | undefined ;
1523
+
1524
+ /**
1525
+ * <p>The content payload containing the input request details for the multi-turn interaction.</p>
1526
+ * @public
1527
+ */
1528
+ content : FlowMultiTurnInputContent | undefined ;
1529
+ }
1530
+
1531
+ /**
1532
+ * <p>Contains information about the content in an output from prompt flow invocation.</p>
1533
+ * @public
1534
+ */
1535
+ export type FlowOutputContent = FlowOutputContent . DocumentMember | FlowOutputContent . $UnknownMember ;
1536
+
1537
+ /**
1538
+ * @public
1539
+ */
1540
+ export namespace FlowOutputContent {
1541
+ /**
1542
+ * <p>The content in the output.</p>
1543
+ * @public
1544
+ */
1545
+ export interface DocumentMember {
1546
+ document : __DocumentType ;
1547
+ $unknown ?: never ;
1548
+ }
1549
+
1550
+ /**
1551
+ * @public
1552
+ */
1553
+ export interface $UnknownMember {
1554
+ document ?: never ;
1555
+ $unknown : [ string , any ] ;
1556
+ }
1557
+
1558
+ export interface Visitor < T > {
1559
+ document : ( value : __DocumentType ) => T ;
1560
+ _ : ( name : string , value : any ) => T ;
1561
+ }
1562
+
1563
+ export const visit = < T > ( value : FlowOutputContent , visitor : Visitor < T > ) : T => {
1564
+ if ( value . document !== undefined ) return visitor . document ( value . document ) ;
1565
+ return visitor . _ ( value . $unknown [ 0 ] , value . $unknown [ 1 ] ) ;
1566
+ } ;
1567
+ }
1568
+
1492
1569
/**
1493
1570
* <p>Contains information about an output from prompt flow invoction.</p>
1494
1571
* @public
@@ -1888,6 +1965,7 @@ export type FlowResponseStream =
1888
1965
| FlowResponseStream . ConflictExceptionMember
1889
1966
| FlowResponseStream . DependencyFailedExceptionMember
1890
1967
| FlowResponseStream . FlowCompletionEventMember
1968
+ | FlowResponseStream . FlowMultiTurnInputRequestEventMember
1891
1969
| FlowResponseStream . FlowOutputEventMember
1892
1970
| FlowResponseStream . FlowTraceEventMember
1893
1971
| FlowResponseStream . InternalServerExceptionMember
@@ -1918,6 +1996,7 @@ export namespace FlowResponseStream {
1918
1996
conflictException ?: never ;
1919
1997
dependencyFailedException ?: never ;
1920
1998
badGatewayException ?: never ;
1999
+ flowMultiTurnInputRequestEvent ?: never ;
1921
2000
$unknown ?: never ;
1922
2001
}
1923
2002
@@ -1938,6 +2017,7 @@ export namespace FlowResponseStream {
1938
2017
conflictException ?: never ;
1939
2018
dependencyFailedException ?: never ;
1940
2019
badGatewayException ?: never ;
2020
+ flowMultiTurnInputRequestEvent ?: never ;
1941
2021
$unknown ?: never ;
1942
2022
}
1943
2023
@@ -1958,6 +2038,7 @@ export namespace FlowResponseStream {
1958
2038
conflictException ?: never ;
1959
2039
dependencyFailedException ?: never ;
1960
2040
badGatewayException ?: never ;
2041
+ flowMultiTurnInputRequestEvent ?: never ;
1961
2042
$unknown ?: never ;
1962
2043
}
1963
2044
@@ -1978,6 +2059,7 @@ export namespace FlowResponseStream {
1978
2059
conflictException ?: never ;
1979
2060
dependencyFailedException ?: never ;
1980
2061
badGatewayException ?: never ;
2062
+ flowMultiTurnInputRequestEvent ?: never ;
1981
2063
$unknown ?: never ;
1982
2064
}
1983
2065
@@ -1998,6 +2080,7 @@ export namespace FlowResponseStream {
1998
2080
conflictException ?: never ;
1999
2081
dependencyFailedException ?: never ;
2000
2082
badGatewayException ?: never ;
2083
+ flowMultiTurnInputRequestEvent ?: never ;
2001
2084
$unknown ?: never ;
2002
2085
}
2003
2086
@@ -2018,6 +2101,7 @@ export namespace FlowResponseStream {
2018
2101
conflictException ?: never ;
2019
2102
dependencyFailedException ?: never ;
2020
2103
badGatewayException ?: never ;
2104
+ flowMultiTurnInputRequestEvent ?: never ;
2021
2105
$unknown ?: never ;
2022
2106
}
2023
2107
@@ -2038,6 +2122,7 @@ export namespace FlowResponseStream {
2038
2122
conflictException ?: never ;
2039
2123
dependencyFailedException ?: never ;
2040
2124
badGatewayException ?: never ;
2125
+ flowMultiTurnInputRequestEvent ?: never ;
2041
2126
$unknown ?: never ;
2042
2127
}
2043
2128
@@ -2058,6 +2143,7 @@ export namespace FlowResponseStream {
2058
2143
conflictException ?: never ;
2059
2144
dependencyFailedException ?: never ;
2060
2145
badGatewayException ?: never ;
2146
+ flowMultiTurnInputRequestEvent ?: never ;
2061
2147
$unknown ?: never ;
2062
2148
}
2063
2149
@@ -2078,6 +2164,7 @@ export namespace FlowResponseStream {
2078
2164
conflictException ?: never ;
2079
2165
dependencyFailedException ?: never ;
2080
2166
badGatewayException ?: never ;
2167
+ flowMultiTurnInputRequestEvent ?: never ;
2081
2168
$unknown ?: never ;
2082
2169
}
2083
2170
@@ -2098,6 +2185,7 @@ export namespace FlowResponseStream {
2098
2185
conflictException : ConflictException ;
2099
2186
dependencyFailedException ?: never ;
2100
2187
badGatewayException ?: never ;
2188
+ flowMultiTurnInputRequestEvent ?: never ;
2101
2189
$unknown ?: never ;
2102
2190
}
2103
2191
@@ -2118,6 +2206,7 @@ export namespace FlowResponseStream {
2118
2206
conflictException ?: never ;
2119
2207
dependencyFailedException : DependencyFailedException ;
2120
2208
badGatewayException ?: never ;
2209
+ flowMultiTurnInputRequestEvent ?: never ;
2121
2210
$unknown ?: never ;
2122
2211
}
2123
2212
@@ -2138,6 +2227,28 @@ export namespace FlowResponseStream {
2138
2227
conflictException ?: never ;
2139
2228
dependencyFailedException ?: never ;
2140
2229
badGatewayException : BadGatewayException ;
2230
+ flowMultiTurnInputRequestEvent ?: never ;
2231
+ $unknown ?: never ;
2232
+ }
2233
+
2234
+ /**
2235
+ * <p>The event stream containing the multi-turn input request information from the flow.</p>
2236
+ * @public
2237
+ */
2238
+ export interface FlowMultiTurnInputRequestEventMember {
2239
+ flowOutputEvent ?: never ;
2240
+ flowCompletionEvent ?: never ;
2241
+ flowTraceEvent ?: never ;
2242
+ internalServerException ?: never ;
2243
+ validationException ?: never ;
2244
+ resourceNotFoundException ?: never ;
2245
+ serviceQuotaExceededException ?: never ;
2246
+ throttlingException ?: never ;
2247
+ accessDeniedException ?: never ;
2248
+ conflictException ?: never ;
2249
+ dependencyFailedException ?: never ;
2250
+ badGatewayException ?: never ;
2251
+ flowMultiTurnInputRequestEvent : FlowMultiTurnInputRequestEvent ;
2141
2252
$unknown ?: never ;
2142
2253
}
2143
2254
@@ -2157,6 +2268,7 @@ export namespace FlowResponseStream {
2157
2268
conflictException ?: never ;
2158
2269
dependencyFailedException ?: never ;
2159
2270
badGatewayException ?: never ;
2271
+ flowMultiTurnInputRequestEvent ?: never ;
2160
2272
$unknown : [ string , any ] ;
2161
2273
}
2162
2274
@@ -2173,6 +2285,7 @@ export namespace FlowResponseStream {
2173
2285
conflictException : ( value : ConflictException ) => T ;
2174
2286
dependencyFailedException : ( value : DependencyFailedException ) => T ;
2175
2287
badGatewayException : ( value : BadGatewayException ) => T ;
2288
+ flowMultiTurnInputRequestEvent : ( value : FlowMultiTurnInputRequestEvent ) => T ;
2176
2289
_ : ( name : string , value : any ) => T ;
2177
2290
}
2178
2291
@@ -2193,6 +2306,8 @@ export namespace FlowResponseStream {
2193
2306
if ( value . dependencyFailedException !== undefined )
2194
2307
return visitor . dependencyFailedException ( value . dependencyFailedException ) ;
2195
2308
if ( value . badGatewayException !== undefined ) return visitor . badGatewayException ( value . badGatewayException ) ;
2309
+ if ( value . flowMultiTurnInputRequestEvent !== undefined )
2310
+ return visitor . flowMultiTurnInputRequestEvent ( value . flowMultiTurnInputRequestEvent ) ;
2196
2311
return visitor . _ ( value . $unknown [ 0 ] , value . $unknown [ 1 ] ) ;
2197
2312
} ;
2198
2313
}
@@ -2206,6 +2321,12 @@ export interface InvokeFlowResponse {
2206
2321
* @public
2207
2322
*/
2208
2323
responseStream : AsyncIterable < FlowResponseStream > | undefined ;
2324
+
2325
+ /**
2326
+ * <p>The unique identifier for the current flow execution.</p>
2327
+ * @public
2328
+ */
2329
+ executionId ?: string | undefined ;
2209
2330
}
2210
2331
2211
2332
/**
@@ -9045,6 +9166,14 @@ export const FlowCompletionEventFilterSensitiveLog = (obj: FlowCompletionEvent):
9045
9166
...obj ,
9046
9167
} ) ;
9047
9168
9169
+ /**
9170
+ * @internal
9171
+ */
9172
+ export const FlowMultiTurnInputRequestEventFilterSensitiveLog = ( obj : FlowMultiTurnInputRequestEvent ) : any => ( {
9173
+ ...obj ,
9174
+ ...( obj . content && { content : obj . content } ) ,
9175
+ } ) ;
9176
+
9048
9177
/**
9049
9178
* @internal
9050
9179
*/
@@ -9143,6 +9272,7 @@ export const FlowResponseStreamFilterSensitiveLog = (obj: FlowResponseStream): a
9143
9272
if ( obj . conflictException !== undefined ) return { conflictException : obj . conflictException } ;
9144
9273
if ( obj . dependencyFailedException !== undefined ) return { dependencyFailedException : obj . dependencyFailedException } ;
9145
9274
if ( obj . badGatewayException !== undefined ) return { badGatewayException : obj . badGatewayException } ;
9275
+ if ( obj . flowMultiTurnInputRequestEvent !== undefined ) return { flowMultiTurnInputRequestEvent : SENSITIVE_STRING } ;
9146
9276
if ( obj . $unknown !== undefined ) return { [ obj . $unknown [ 0 ] ] : "UNKNOWN" } ;
9147
9277
} ;
9148
9278
0 commit comments