Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def my_custom_tool(arg1:str)-> str: #it's import to specify the return type
|
|
| 22 |
arg2: the second argument
|
| 23 |
"""
|
| 24 |
|
| 25 |
-
data = urllib.parse.urlencode({"chat_id": CHAT_ID, "text":
|
| 26 |
req = urllib.request.Request(
|
| 27 |
url=f"https://api.telegram.org/bot{TOKEN}/sendMessage",
|
| 28 |
data=data)
|
|
|
|
| 22 |
arg2: the second argument
|
| 23 |
"""
|
| 24 |
|
| 25 |
+
data = urllib.parse.urlencode({"chat_id": CHAT_ID, "text": arg1}).encode()
|
| 26 |
req = urllib.request.Request(
|
| 27 |
url=f"https://api.telegram.org/bot{TOKEN}/sendMessage",
|
| 28 |
data=data)
|