Rasa - ClientResponseError: 404, Requested URL / webhook not found

时间:2021-07-23 08:29:18

标签: chatbot rasa-nlu rasa rasa-core

我将 rasa 2.8.0 与 docker 一起使用。我想在意向问候后运行表单“name_form”,但出现以下错误:

<块引用>

DEBUG rasa.core.processor - 以 1.00 的置信度预测下一个动作“name_form”。 调试 rasa.core.actions.forms - 激活表单“name_form”。 DEBUG rasa.core.actions.forms - 无需预先填充所需的插槽进行验证。 调试 rasa.core.actions.forms - 验证用户输入“UserUttered(文本:嘿,意图:问候,use_text_for_featurization:False)”。 调试 rasa.core.actions.forms - 验证提取的插槽:{} 调试 rasa.core.actions.action - 调用操作端点以运行操作“validate_name_form”。 错误 rasa.core.processor - 运行操作“name_form”时遇到异常。Bot 将继续,但操作事件丢失。请检查您的操作服务器的日志以获取更多信息。 回溯(最近一次调用最后一次): 运行中的文件“/usr/local/lib/python3.7/site-packages/rasa/core/actions/action.py”,第 686 行 json=json_body,方法=“post”,超时=DEFAULT_REQUEST_TIMEOUT 文件“/usr/local/lib/python3.7/site-packages/rasa/utils/endpoints.py”,第 155 行,请求 response.status, response.reason, 等待 response.content.read() rasa.utils.endpoints.ClientResponseError: 404, Not Found, body='b'\xe2\x9a\xa0\xef\xb8\x8f 404 \xe2\x80\x94 Not Found\n\n html { font-family: sans -serif }\n h2 { 颜色:#888; }\n .tb-wrapper p { margin: 0 }\n .frame-border { margin: 1rem }\n .frame-line > * { padding: 0.3rem 0.6rem }\n .frame-line { margin-bottom : 0.3rem }\n .frame-code { 字体大小: 16px; padding-left: 4ch }\n .tb-wrapper { border: 1px solid #eee }\n .tb-header { background: #eee;填充:0.3rem;字体粗细:粗体 }\n .frame-descriptor { 背景:#e2eafb;字体大小:14px }\n \n

未找到请求的 URL /webhook\n''

以下内容在我的 endpoints.yml 中:

action_endpoint: url: "http://localhost:5005/webhook"

在前端script.js中,url是:

const rasa_server_url = "http://localhost:5005/webhooks/rest/webhook";

请谁能告诉我哪里出了问题?

2 个答案:

答案 0 :(得分:0)

当您启动动作服务器时,它在哪个端口上?我相信默认值是 5055 而不是 5005,因此如果这是操作服务器所在的端口,您需要确保您的端点位于正确的位置。

答案 1 :(得分:0)

当我使用 docker 运行动作服务器时,我必须在 endpoints.yml 中提供 action_server:5055/webhook 而不是 localhost:5055/webhook。