Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,18 +37,10 @@ def handle_update():
|
|
| 37 |
|
| 38 |
if message_text:
|
| 39 |
try:
|
| 40 |
-
#
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
if response.status_code == 200:
|
| 45 |
-
response_text = response.json().get('response', 'Sorry, I cannot process this request.')
|
| 46 |
-
else:
|
| 47 |
-
response_text = 'Error occurred while processing your request.'
|
| 48 |
-
await bot_send_message(chat_id, response_text)
|
| 49 |
-
|
| 50 |
-
asyncio.run(forward_message())
|
| 51 |
-
logger.info(f"Response sent to chat_id {chat_id}")
|
| 52 |
|
| 53 |
except Exception as e:
|
| 54 |
logger.error(f"Error during processing: {e}")
|
|
|
|
| 37 |
|
| 38 |
if message_text:
|
| 39 |
try:
|
| 40 |
+
# Send a static response
|
| 41 |
+
static_response = "This is a static response for testing purposes."
|
| 42 |
+
asyncio.run(bot_send_message(chat_id, static_response))
|
| 43 |
+
logger.info(f"Static response sent to chat_id {chat_id}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
except Exception as e:
|
| 46 |
logger.error(f"Error during processing: {e}")
|