Files
adk-python/contributing/samples/tool_human_in_the_loop/tools.py
T
2025-08-11 18:09:55 -07:00

22 lines
487 B
Python

from typing import Any
from google.adk.tools.tool_context import ToolContext
def reimburse(purpose: str, amount: float) -> str:
"""Reimburse the amount of money to the employee."""
return {
'status': 'ok',
}
def ask_for_approval(
purpose: str, amount: float, tool_context: ToolContext
) -> dict[str, Any]:
"""Ask for approval for the reimbursement."""
return {
'status': 'pending',
'amount': amount,
'ticketId': 'reimbursement-ticket-001',
}