Aleksandr Maiorov commited on
Commit
cc178d7
·
1 Parent(s): 419ab5e
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -96,8 +96,8 @@ def generate_response(prompt: str) -> Optional[str]:
96
  except Exception as e:
97
  logger.error(f"Ошибка обработки сообщения: {str(e)}")
98
 
99
- def send_to_telegram(message):
100
- url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage"
101
  payload = {
102
  "chat_id": '719751843',
103
  "text": message
@@ -108,7 +108,7 @@ def send_to_telegram(message):
108
 
109
  @app.get("/")
110
  async def root():
111
- send_to_telegram('aaaaaaaaaaa')
112
  return {"message": "Hello World"}
113
 
114
  @app.post("/webhook")
 
96
  except Exception as e:
97
  logger.error(f"Ошибка обработки сообщения: {str(e)}")
98
 
99
+ async def send_to_telegram(message):
100
+ url = f"https://api.telegram.org/bot7517190315:AAE4TAhZm4ybTEPGe_KOYajFxHttNOqUtaY/sendMessage"
101
  payload = {
102
  "chat_id": '719751843',
103
  "text": message
 
108
 
109
  @app.get("/")
110
  async def root():
111
+ await send_to_telegram('aaaaaaaaaaa')
112
  return {"message": "Hello World"}
113
 
114
  @app.post("/webhook")