标签: rasa

将 Rasa 聊天机器人连接到网络聊天

我试图连接这个网络聊天小部件来拉沙(https://github.com/mrbot-ai/rasa-webchat),但我得到这个错误在我的控制台,也是这个错误在终端上,我运行我连接器脚本。

但是两天前我的连接器中没有这个错误,我也在 Angular angular-chat-widget-rasa 中使用了这个包,但现在即使这个包也无法与 Rasa 连接。

对于网络聊天界面,我将此代码粘贴到我网站的 body 标签内。

<body>
    <div id="webchat">
        <script src="https://storage.googleapis.com/mrbot-cdn/webchat-latest.js"></script>
        <script>
            WebChat.default.init({
                selector: "#webchat",
                initPayload: "/get_started",
                interval: 1000, // 1000 ms between each message
                customData: { "sender": "django" }, // arbitrary custom data. Stay minimal as this will be added to the socket
                socketUrl: "https://localhost:5002",
                title: "Connect",
                subtitle: "The bot which connects people",
                profileAvatar: "https://rasa.com/assets/img/demo/rasa_avatar.png",
                showCloseButton: true,
                fullScreenMode: false,
                hideWhenNotConnected: false,
            })
        </script>
    </div>

</body>
Run Code Online (Sandbox Code Playgroud)

这是我的连接器的代码:

from rasa.core.agent …
Run Code Online (Sandbox Code Playgroud)

python chatbot rasa-nlu rasa-core rasa

4
推荐指数
1
解决办法
2326
查看次数

rasa 核心和 botkit 框架在对话流程方面有什么区别?

我正在使用 rasa 学习机器人开发。我采用了简单的银行系统用例。以下是短流程:

I want to apply for loan
                Home loan   Car Loan   Personal Loan

**User comes again after some days**

                Hey, you inquired about the loan previously, what is the status?
Bought from another bank
                    Which bank?
Axis Bank
                    What interest rate did you buy the loan at?
5%
Run Code Online (Sandbox Code Playgroud)

假设用户问“我想申请贷款”,这样我就可以对意图进行分类并提取实体并相应地回复用户。但是,如果用户说“Axis Bank”,我应该如何跟踪他回答为“Axis Bank”的哪个问题以及我的下一个问题或答案是什么?

我搜索了“如何跟踪对话状态?”

我遇到了 [ https://github.com/RasaHQ/rasa_nlu/issues/303][1]这个链接 因为他们提到

我认为这不应该是 RASA 目标 IMO 的一部分:NLU 本身就是一个非常庞大且复杂的话题。但是你可以使用一个特定的框架,比如 botkit。

但是在 rasa-core 中有一个插槽选项(在对话期间跟踪的信息(例如用户年龄))

在下面的链接中提到 Rasa core 和 Rasa nlu 之间的区别

Rasa核心用于引导对话流程,而Rasa nlu是理解和处理文本以提取信息(实体)

有人可以帮助我了解rasa-core …

bots botkit rasa-nlu rasa-core rasa

3
推荐指数
1
解决办法
2393
查看次数

Rasa超时问题

运行 Rasa 时(在版本 1.3.3、1.3.7、1.3.8 上尝试过),我几乎每次拨打电话时都会遇到此超时异常消息。我正在运行一个简单的程序,该程序可以识别用户何时提供其年龄,并通过操作响应将年龄存储在数据库中:

Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input ->  I am 24 years old
2019-10-10 13:29:33 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /Users/Kami/Documents/rasa/venv/lib/python3.7/site-packages/rasa/core/run.py:123> exception=TimeoutError()>
Traceback (most recent call last):
  File "/Users/Kami/Documents/rasa/venv/lib/python3.7/site-packages/rasa/core/run.py", line 127, in run_cmdline_io
    server_url=constants.DEFAULT_SERVER_FORMAT.format("http", port)
  File "/Users/Kami/Documents/rasa/venv/lib/python3.7/site-packages/rasa/core/channels/console.py", line 138, in record_messages
    async for response in bot_responses:
  File "/Users/Kami/Documents/rasa/venv/lib/python3.7/site-packages/async_generator/_impl.py", line 366, in step
    return await ANextIter(self._it, start_fn, *args)
  File …
Run Code Online (Sandbox Code Playgroud)

lookup terminal timeout rasa-nlu rasa

3
推荐指数
1
解决办法
3116
查看次数

RASA - rasa 运行操作 - 本地主机问题

我正在使用 RASA 大师班 YouTube 频道学习 Rasa。https://www.youtube.com/channel/UCJ0V6493mLvqdiVwOKWBODQ

一切都一直有效,直到进行加载操作为止。每次我在命令提示符中使用 rasa run 操作(两个操作中的第一个)时,程序都会卡住,我必须手动终止它。当我使用 rasa shell --endpoints endpoints.yml 时,机器人可以正常工作,因为当我添加自定义操作时,我不断遇到服务器返回的无法连接到本地主机的情况,如下面的示例所示。问题是我如何解决这个问题。

*请索取更多信息

:在此输入图像描述

我的 actions.py 如下所示:

from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.events import SlotSet



class ActionFacilitySearch(Action):

    def name(self) -> Text:
        return "action_facility_search"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

        facility = tracker.get_slot("facility_type")
        address = "300 Hyde St, San Francisco"
        dispatcher.utter_message("Here is the address of the {}:{}".format(facility, address))

        return …
Run Code Online (Sandbox Code Playgroud)

python rasa-core rasa

3
推荐指数
1
解决办法
7503
查看次数

'rasa' 不是内部或外部命令,也不是可运行的程序或批处理文件

无法运行 rasa init 命令并收到以下错误:'rasa' 不是内部或外部命令,也不是可运行的程序或批处理文件。

我的环境中有以下 RASA 版本:rasa-core 0.13.2 rasa-core-sdk 0.12.2 rasa-nlu 0.14.6 rasa-sdk 1.2.0

rasa-nlu rasa-core rasa

3
推荐指数
2
解决办法
7547
查看次数

离线下载并安装 pip 包

我的工作场所有一台虚拟机,没有互联网连接(也没有 docker 和 git)。我想安装Rasa(它是一个通过Python pip 包安装的聊天机器人)。通常您只需输入:“pip install rasa”。此命令不起作用,因为虚拟机没有互联网连接。

现在,我在我的私人 Linux 笔记本电脑上安装了 Rasa,以创建 Rasa 所需的依赖项的完整列表。如何一次下载所有这些 pip 包?大约有 50 个软件包,手动一步一步下载它们需要花费几个小时。

我的目的是在我的私人笔记本电脑上下载所有必需的 pip 软件包,并将它们(.tar.gz 文件)移动到我工作的 Linux 虚拟机中。之后,我想离线安装所有软件包,这样就不需要互联网连接。

python linux pip package rasa

3
推荐指数
1
解决办法
2万
查看次数

在 rasa 中训练模型后查找表不起作用

我是拉萨的新手。我正在训练一个模型来使用查找表识别某些实体。我在一个句子中有多个实体,我正在尝试提取它们。

nlu.yml

version: "2.0"
nlu:
- intent: intent_1
  examples : |
    - how many deaths were there last year in [Ohio](Filter-State)?
    - death count of [Florida](Filter-State) this year
    - death count of [Texas](Filter-State) this year
    - what's the death count for this quarter in [CA](Filter-State)?
- lookup: Filter-State
  examples: |
    - Alabama
    - AL
    - Alaska
    - AK
    - Arizona
    - AZ
    - Arkansas
    - AR
    - California
    - CA
    - Colorado
    - CO
    - Connecticut
    - CT
    - Delaware …
Run Code Online (Sandbox Code Playgroud)

rasa-nlu rasa-core rasa

3
推荐指数
1
解决办法
1679
查看次数

PIP 安装 rasa-x 需要永远

我正在 Windows 10 上的 Python 3.7 conda 环境中安装 Rasa X。pip版本是 20.3.3。

pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple

它已经持续了5-6个小时,似乎很困惑: 在此处输入图片说明

知道我能做些什么来解决这个问题吗?

python pip miniconda rasa rasa-x

3
推荐指数
2
解决办法
2569
查看次数

AttributeError:模块“pyparsing”没有属性“downcaseTokens”rasa

我在使用 rasa 时遇到问题,因为出现以下错误,我无法跑步或训练或做任何事情。

回溯(最近一次调用最后一次):文件“c:\users\dell\anaconda3\envs\rasanew\lib\runpy.py”,第 193 行,在run_module_as_main“ main ”,mod_spec 中)文件“c:\users\dell\ anaconda3\envs\rasanew\lib\runpy.py”,第 85 行,在run_code exec(code, run_globals) 文件“C:\Users\Dell\anaconda3\envs\rasanew\Scripts\rasa.exe_ main .py”中,行7、在文件“c:\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa_ main .py”中,第118行,在主cmdline_arguments.func(cmdline_arguments)文件“c:\users\dell\ anaconda3\envs\rasanew\lib\site-packages\rasa\cli\scaffold.py”,第 235 行,运行 init_project(args, path) 文件“c:\users\dell\anaconda3\envs\rasanew\lib\site -packages\rasa\cli\scaffold.py”,第 130 行,在 init_project print_train_or_instructions(args, path) 文件“c:\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa\cli\scaffold. py”,第 69 行,在 print_train_or_instructions Training_result = rasa.train(domain, config, Training_files, output) 文件“c:\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa\api.py”中,第 106 行,在 train from rasa.model_training import train_async 文件“c:\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa\model_training.py”中,第 39 行,在 from rasa.core.agent import 中代理文件“c:\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa\core\agent.py”,第 16 行,来自 rasa.core.channels.channel import OutputChannel,UserMessage 文件“c :\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa\core\channels_ init _.py",第 26 行,来自 rasa.core.channels.hangouts import HangoutsInput # noqa: F401 文件 "c :\users\dell\anaconda3\envs\rasanew\lib\site-packages\rasa\core\channels\hangouts.py”,第 9 …

rasa-nlu rasa

3
推荐指数
1
解决办法
5004
查看次数

蟒蛇ujson。错误:无法为使用 PEP 517 且无法直接安装的 ujson 构建轮子

我正在尝试使用 Poetry 在我的 Windows 笔记本电脑上安装 RASA 框架并从源代码构建。使用 pip 对我没有帮助,因为我永远无法安装 Tensorflow 并且它随 RASA 一起提供。

我已经做了什么:

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
$ git clone https://github.com/RasaHQ/rasa.git
$ cd rasa
$ poetry install
Run Code Online (Sandbox Code Playgroud)

当安装到达安装 ujson 的点时,会发生这种情况并且安装停止:

Collecting ujson
  Using cached ujson-2.0.3.tar.gz (7.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: …
Run Code Online (Sandbox Code Playgroud)

python pip pep rasa

2
推荐指数
1
解决办法
8616
查看次数

标签 统计

rasa ×10

rasa-nlu ×6

python ×5

rasa-core ×5

pip ×3

botkit ×1

bots ×1

chatbot ×1

linux ×1

lookup ×1

miniconda ×1

package ×1

pep ×1

rasa-x ×1

terminal ×1

timeout ×1