0
0
Agentic_aiml~10 mins

Human approval workflows in Agentic Ai - Interactive Code Practice

Choose your learning style8 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to send a request for human approval.

Agentic_ai
approval_request = HumanApprovalRequest([1]='Please review this action')
Drag options to blanks, or click blank then click option'
Amessage
Bcontent
Ctext
Dprompt
Attempts:
3 left
2fill in blank
medium

Complete the code to check if the human approved the request.

Agentic_ai
if approval_response.[1]():
    print('Approved')
else:
    print('Denied')
Drag options to blanks, or click blank then click option'
Aapproved
Bis_approved
Ccheck_approval
Dget_approval
Attempts:
3 left
3fill in blank
hard

Fix the error in the code to wait for human approval asynchronously.

Agentic_ai
approval_response = await approval_request.[1]()
Drag options to blanks, or click blank then click option'
Asend
Bget_response
Crequest
Dwait_for_response
Attempts:
3 left
4fill in blank
hard

Fill both blanks to create a dictionary of approval status for each task.

Agentic_ai
approval_status = {task: response.[1]() for task, response in responses.items() if not response.[2]()}
Drag options to blanks, or click blank then click option'
Ais_approved
Bis_pending
Dis_denied
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to build a summary report of human approvals.

Agentic_ai
summary = [1]([2] for [3] in approval_responses if [3].is_approved())
Drag options to blanks, or click blank then click option'
Asum
B1
Cresponse
Dlen
Attempts:
3 left