File tree 1 file changed +4
-5
lines changed
examples/event_sources/src
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
@event_source (data_class = BedrockAgentEvent )
9
9
def lambda_handler (event : BedrockAgentEvent , context : LambdaContext ) -> dict :
10
10
input_text = event .input_text
11
- action = event .action_groups [0 ]
12
11
13
- logger .info (f"Bedrock Agent { action .action_group } invoked with input" , input_text = input_text )
12
+ logger .info (f"Bedrock Agent { event .action_group } invoked with input" , input_text = input_text )
14
13
15
14
return {
16
15
"message_version" : "1.0" ,
17
16
"responses" : [
18
17
{
19
- "action_group" : action .action_group ,
20
- "api_path" : action .api_path ,
21
- "http_method" : action .http_method ,
18
+ "action_group" : event .action_group ,
19
+ "api_path" : event .api_path ,
20
+ "http_method" : event .http_method ,
22
21
"http_status_code" : 200 ,
23
22
"response_body" : {"application/json" : {"body" : "This is the response" }},
24
23
},
You can’t perform that action at this time.
0 commit comments