from utils import get_account_balance
and use it within that workflow. However, I’m confused about how to pass the context (ctx)
so that I can set ctx.data["user"]["account_balance"] = 1000.
def get_account_balance(account_id: str) -> str: """Useful for looking up an account balance.""" print(f"Looking up account balance for {account_id}") ctx.data["user"]["account_balance"] = 1000 return f"Account {account_id} has a balance of ${ctx.data['user']['account_balance']}"
def account_balance(self, ctx: Context, ev: AccountBalanceEvent) -> AuthenticateEvent | ConciergeEvent: ... def get_account_balance(account_id: str): return actual_get_account_balance(account_id, ctx)