File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Properties for a Bedrock Agent.
13
13
- [ actionGroups] ( bedrock.AgentProps.md#actiongroups )
14
14
- [ aliasName] ( bedrock.AgentProps.md#aliasname )
15
15
- [ description] ( bedrock.AgentProps.md#description )
16
+ - [ enableUserInput] ( bedrock.AgentProps.md#enableuserinput )
16
17
- [ encryptionKey] ( bedrock.AgentProps.md#encryptionkey )
17
18
- [ foundationModel] ( bedrock.AgentProps.md#foundationmodel )
18
19
- [ idleSessionTTL] ( bedrock.AgentProps.md#idlesessionttl )
@@ -67,6 +68,22 @@ A description of the agent.
67
68
68
69
___
69
70
71
+ ### enableUserInput
72
+
73
+ • ` Optional ` ` Readonly ` ** enableUserInput** : ` boolean `
74
+
75
+ Select whether the agent can prompt additional
76
+ information from the user when it does not have
77
+ enough information to respond to an utterance
78
+
79
+ ** ` Default ` **
80
+
81
+ ``` ts
82
+ - False
83
+ ```
84
+
85
+ ___
86
+
70
87
### encryptionKey
71
88
72
89
• ` Optional ` ` Readonly ` ** encryptionKey** : ` IKey `
Original file line number Diff line number Diff line change @@ -235,6 +235,16 @@ export interface AgentProps {
235
235
*/
236
236
readonly actionGroups ?: AgentActionGroup [ ] ;
237
237
238
+
239
+ /**
240
+ * Select whether the agent can prompt additional
241
+ * information from the user when it does not have
242
+ * enough information to respond to an utterance
243
+ *
244
+ * @default - False
245
+ */
246
+ readonly enableUserInput ?: boolean ;
247
+
238
248
/**
239
249
* How long sessions should be kept open for the agent.
240
250
*
@@ -444,6 +454,15 @@ export class Agent extends Construct {
444
454
if ( props . actionGroups ) {
445
455
this . addActionGroups ( props . actionGroups ) ;
446
456
}
457
+ // To allow your agent to request the user for additional information
458
+ // when trying to complete a task , add this action group
459
+ if ( props . enableUserInput ) {
460
+ this . addActionGroup ( new AgentActionGroup ( this , 'userInputEnabledActionGroup' , {
461
+ actionGroupName : 'UserInputAction' ,
462
+ parentActionGroupSignature : 'AMAZON.UserInput' ,
463
+ actionGroupState : 'ENABLED' ,
464
+ } ) ) ;
465
+ }
447
466
}
448
467
449
468
You can’t perform that action at this time.
0 commit comments