我正在使用rasa开发Telegram机器人,并希望使用ngrok从Webhook接收消息。
设置网络挂钩有效。当我将公共可访问域设置为URL并尝试在电报上运行bot时,没有任何反应。机器人没有回复。
'''
ngrok by @inconshreveable
Session Status online
Session Expires 7 hours, 43 minutes
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://ef87f17b7c55.ngrok.io -> http://mybot.myserver.com:80
Forwarding https://ef87f17b7c55.ngrok.io -> http://mybot.myserver.com:80
Connections ttl opn rt1 rt5 p50 p90
20 0 0.02 0.02 1.01 3.01
'''
当我尝试通过电报运行时,什么也没有出现,并且错误的网关错误也来了。
ngrok的CLI输出:
'''
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
OPTIONS /webhooks/rest/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
POST /webhooks/telegram/webhook 502 Bad Gateway
'''
答案 0 :(得分:0)
控制台上的输出是什么?尝试使用rasa run --debug
运行您的机器人,您应该会得到一些有用的输出,以显示出了问题所在。您的凭据可能有问题