Skip to main content

require_approval

Function
This function is defined in the approval module.
Decorator to mark a tool as requiring human approval.

Signature

def require_approval(risk_level: RiskLevel) -> Any

Parameters

risk_level
RiskLevel
default:"'high'"
The risk level of the tool (“critical”, “high”, “medium”, “low”)

Returns

Returns
Any
The result of the operation.

Uses

  • APPROVAL_REQUIRED_TOOLS.add
  • is_already_approved
  • func
  • is_yaml_approved
  • mark_approved
  • is_env_auto_approve
  • asyncio.get_running_loop
  • RuntimeError
  • asyncio.run
  • request_approval

Source

View on GitHub

praisonaiagents/approval.py at line 303