paulpierre / RasaGPT

💬 RasaGPT is the first headless LLM chatbot platform built on top of Rasa and Langchain. Built w/ Rasa, FastAPI, Langchain, LlamaIndex, SQLModel, pgvector, ngrok, telegram
https://rasagpt.dev
MIT License
2.32k stars 224 forks source link

response error #7

Open vicmcorrea opened 1 year ago

vicmcorrea commented 1 year ago

Hey I'm running the containers on a MacOS, I got all containers running but getting no answer from bot. In the logs it shows a post response but then I get a rasa webhook response: failed.

Any ideas?

paulpierre commented 1 year ago

so the FastAPI webhook endpoint is receiving the webhook from Telegram, but FastAPI is returning "failed" in the logs? could you check to make sure:

  1. the API is running and responding with an HTTP ok http://localhost:8888/health
  2. ensure Rasa's API is running and received the webhook from FastAPI
  3. ensure that the Rasa action server is subsequently triggered
  4. ensure that your ngrok tunnel matches what is configured in telegram. you can query the telegram API here https://api.telegram.org/bot/getWebhookInfo

if 1,2 and 3 work and 4 is a mismatch. stop the services via make stop .. kill the tunnel via the ngrok dashboard, wait until there are no tunnels, and start again.

let me know if this works 👍

OmidH commented 1 year ago

Hi @paulpierre your instructions does not fix the issue. What I observed is: only some of the messages will be delivered eventhough in the logs no errors are shown

[🤖 RasaGPT API webhook]
Posting data: {"update_id": "443945783", "message": {"message_id": 30, "from": {"id": 1074170XXX, "is_bot": false, "first_name": "___", "last_name": "___", "username": "XXX", "language_code": "en"}, "chat": {"id": 1074170312, "first_name": "___", "last_name": "___", "username": "XXX", "type": "private"}, "date": 1683817093, "text": "Hallo", "meta": {"response": "Hallo! Wie kann ich Ihnen helfen?", "tags": ["greeting"], "is_escalate": false, "session_id": "0ad98f57-XXX4-47af-8d4c-b6f178ec9173"}}}
[🤖 RasaGPT API webhook]
Rasa webhook response: success
OmidH commented 1 year ago

I took a deeper look into this issue and found this out that it seems to be an issue with rasa.core.policies.rule policy. A response to the user ist sent by There is a rule for the next action 'action_gpt_fallback' and a Predicted next action 'action_ apt_ fallback' with confidence 1.00 and no response is sent when the policy returns There is no applicable rule. and Predicted next action 'action_default_fallback' with confidence 0.30.

I'm new to rasa, will try to look further into it. But just fyi if you are faster ;-)

Debug

vicmcorrea commented 1 year ago

when checking if ngrok tunnel matches, 4 is a mismatch but even after killing the ngrok tunnel and starting again it still come up with a mismatch.

n_pp { "description" : "Not Found", "error_code" : 404, "ok" : false }

akisayaka commented 1 year ago

I found that when the intent is judged as 'greet', users cannot get response from Telegram. when the intent is judged as 'out_of_scope', users can get response from Telegram.

rasa_core log when can get response from telegram: rasa.core.processor - Received user message 'About Pepe Corp' with intent '{'name': 'out_of_scope', 'confidence': 0.9581602811813354}' and entities '[]'

rasa_core log when cannot get response from telegram: rasa.core.processor - Received user message 'Tell me about Pepe Corp' with intent '{'name': 'greet', 'confidence': 0.9222689867019653}' and entities '[]'

image

shanumas commented 1 year ago

@akisayaka

I face the same problem. "when the intent is judged as 'out_of_scope', users can get response from Telegram".

Did you get it fixed ?

tienhung36 commented 9 months ago

Have you fixed that issues yet?

sofa566 commented 8 months ago

i get same problem. do have solution anyone?