mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 08:26:22 +02:00
mv experimental apps
This commit is contained in:
parent
7f6ece90f8
commit
f722591ccd
53 changed files with 31 additions and 31 deletions
26
apps/experimental/tools_webhook/function_map.py
Normal file
26
apps/experimental/tools_webhook/function_map.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
"""
|
||||
function_map.py
|
||||
|
||||
Defines all the callable functions and a mapping from
|
||||
string names to these functions.
|
||||
"""
|
||||
|
||||
def greet(name: str, message: str):
|
||||
"""Return a greeting string."""
|
||||
return f"{message}, {name}!"
|
||||
|
||||
def add(a: int, b: int):
|
||||
"""Return the sum of two integers."""
|
||||
return a + b
|
||||
|
||||
def get_account_balance(user_id: str):
|
||||
"""Return a mock account balance for the given user_id."""
|
||||
return f"User {user_id} has a balance of $123.45."
|
||||
|
||||
# A configurable mapping from function identifiers to actual Python functions
|
||||
FUNCTIONS_MAP = {
|
||||
"greet": greet,
|
||||
"add": add,
|
||||
"get_account_balance": get_account_balance
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue