rasa - rasa webchat : 使用 kubernetes 将 rasa x 和 rasa 开源连接到网站
问题描述
非常感谢 rasa 社区为我提供的所有信息和课程,这些对我帮助很大。然而,有些东西我在任何地方都找不到。这是一种将 rasa 开源部署到自定义网站并将其链接到 rasa x 但使用 kubernetes 的方法,使用 helm 安装和 values.yml 文件。
我尝试创建一个简单的 index.html-website,它集成了 rasa webchat 小部件并链接到 rasa x,如下所示:
<html>
<body> <script>!(function () { let e = document.createElement("script"),
t = document.head || document.getElementsByTagName("head")[0]; (e.src =
"https://cdn.jsdelivr.net/npm/rasa-webchat@1.x.x/lib/index.js"),
// Replace 1.x.x with the version that you want
(e.async = !0),
(e.onload = () => {
window.WebChat.default(
{
initPayload:'/intent_trigger_conversation',
customData: { language: "fr" },
socketUrl: "rasax url",
socketPath: "/socket.io/",
// add other props here
params: { "storage": "session"}
},
null
);
}),
t.insertBefore(e, t.firstChild); })(); </script>
</body>
</html>
然后将其添加到我的 values.yml 文件中:
debugMode: true
app:
# from microk8s build-in registry
name: "localhost:32000/civa-augmented-bot-action-server"
tag: "0.0.1"
nginx:
service:
# connect LoadBalancer directly to VMs' internal IP
# You get this value with: $ hostname -I
externalIPs: [******]
rasax:
# initialUser is the user which is created upon the initial start of Rasa X
initialUser:
# password for the Rasa X user
password: "*********"
# passwordSalt Rasa X uses to salt the user passwords
passwordSalt: "*********"
# token Rasa X accepts as authentication token from other Rasa services
token: "*********"
# jwtSecret which is used to sign the jwtTokens of the users
jwtSecret: "*********"
# tag refers to the Rasa X image tag
tag: "0.42.2"
rasa:
# token Rasa accepts as authentication token from other Rasa services
token: "*********"
# tag refers to the Rasa image tag
tag: "2.8.5-full"
additionalChannelCredentials:
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
rabbitmq:
# rabbitmq settings of the subchart
rabbitmq:
# password which is used for the authentication
password: "*********"
global:
# postgresql: global settings of the postgresql subchart
postgresql:
# postgresqlPassword is the password which is used when the postgresqlUsername equals "postgres"
postgresqlPassword: "*********"
# redis: global settings of the postgresql subchart
redis:
# password to use in case there no external secret was provided
password: "*********"
但是在部署 rasa x 之后
helm --namespace my-namespace install --values values.yml my-release rasa-x/rasa-x
命令,我的网站上没有小部件。
但是当我在 index.html 文件中用我的网站 url替换rasax url并执行
rasa run -m models --enable-api --cors "*"
localy,它可以工作,这意味着我可以在我的托管网站上看到 rasa webchat 小部件并与我的机器人交谈。
如何使 rasa webchat 小部件可在我的网站上访问,并将网站与 rasax 与 Helm 图表部署连接(helm --namespace my-namespace install --values values.yml my-release rasa-x/rasa-x)
有人可以帮帮我吗?
解决方案
推荐阅读
- postgresql - 如何将 pg_dump 的输出恢复为新的表名
- silverstripe - 如何覆盖 SilverStripe 的用户定义表单的模板/视图
- vb6 - 如何从 VB-6 旧应用程序中启动屏幕键盘程序
- javascript - 选项是如何通过 jquery.timeline.js 传递的
- couchdb - 突然更改有 CORS bulkdocs couchDB 错误
- php - 如何使用 bootstrap 和 html 获得良好的视图?
- python - 如何使用 Keras 对字符串列表进行热编码?
- python - Tkinter 小部件都打包在同一个框架中
- javascript - 尝试部署我的后端 Firebase 功能时的承诺错误
- r - 如何从 R 函数中的“...”中的对象创建单独的集合