我看到 Rasa NLU 使用 MITIE 和 spaCy,但谁能解释一下他们如何使用它以及背后的算法?
我想用至少两种语言或多语言聊天机器人制作一个基于 rasa 的聊天机器人。谁能告诉我可能的制作方法。
我正在按照以下链接在我的系统上安装 RASA:https : //github.com/RasaHQ/rasa 但不幸的是,在尝试安装依赖项或以下任何用 Makefile 编写的诗歌命令时,
$poetry run
$poetry install
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
虚拟环境设置似乎存在一些问题,但不知道如何解决。以下是堆栈跟踪:
$ make install
poetry run python -m pip install -U 'pip<20'
The virtual environment found in /home/kamaldeep/.cache/pypoetry/virtualenvs/rasa-LHgLSZoI-py3.6 seems to be broken.
Recreating virtualenv rasa-LHgLSZoI-py3.6 in /home/kamaldeep/.cache/pypoetry/virtualenvs/rasa-LHgLSZoI-py3.6
[CalledProcessError]
Command '['/home/kamaldeep/.cache/pypoetry/virtualenvs/rasa-LHgLSZoI-py3.6/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Makefile:43: recipe for target 'install' failed
make: *** [install] Error 1
Run Code Online (Sandbox Code Playgroud) 我是 rasa 框架的新手。我开始开发一个简单的聊天机器人,并为我的聊天机器人创建了三个插槽。所以我的机器人需要识别当前位置并将其保存在插槽中。我的当前位置是从对话中获取的,我可以将其保存到故事中的插槽中。
但是后来我有一个自定义操作,可以从 API 调用中查找天气天气,我需要将天气状态和湿度保存在相关插槽中。
class ActionSomeRespThree(Action):
def name(self) -> Text:
return "action_some_resp_three"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
cityName = tracker.get_slot('city')
Run Code Online (Sandbox Code Playgroud) 如果您关注这篇文章https://blog.rasa.com/how-to-build-a-voice-assistant-with-open-source-rasa-and-mozilla-tools/
它会让您从以下位置下载一个 80MB 的文件:
https://drive.google.com/drive/folders/1GU8WGix98WrR3ayjoiirmmbLUZzwg4n0
被称为best_model.pth.tar
并使用https://github.com/mozilla/TTS
你会听到“sara”的声音(非常令人印象深刻)
是否还有其他带有其他预训练声音的 best_model.pth.tar 文件?类似于 CSS 主题,您可以下载一些或免费、付费或非常好的主题,我们是否在某处有预先训练的 TTS 模型目录?
我正在 dockerizing rasa 应用程序,这Dockerfile是
FROM python:3.7.6
RUN apt-get update && apt-get install -y --no-install-recommends build-essential curl
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY entrypoint.sh .
COPY src/ .
EXPOSE 5005
ENTRYPOINT ["/app/entrypoint.sh"]
Run Code Online (Sandbox Code Playgroud)
的内容entrypoint.sh是
#!/bin/sh
exec "$@"
Run Code Online (Sandbox Code Playgroud)
并且requirements.txt文件有
rasa==1.10.14
Run Code Online (Sandbox Code Playgroud)
我使用rasa initdocker 内部src目录之外的命令启动了一个 rasa 应用程序,并将所有内容复制到 docker 中。
现在当我运行 rasa 时使用
docker build -t image .
docker run -it image rasa run
Run Code Online (Sandbox Code Playgroud)
它给出了以下错误
2020-10-15 19:38:00 INFO root - Starting …Run Code Online (Sandbox Code Playgroud) 我在Windows上的虚拟环境中安装了rasa。但是,当我尝试检查 rasa 是否安装时,它显示一个错误:
ImportError: cannot import name 'CLOSED' from 'websockets.connection'
我已经重新安装了rasa,并安装了websockets。但仍然收到错误。
Python版本是3.10.2
谁能帮我解决这个问题?
我需要在 RASA 中添加语音到文本功能,用户可以使用语音提问,机器人将通过聊天回答他。有谁知道我该如何在 RASA 中做到这一点?因为我的前端将是一个 Android 应用程序。请告诉我该怎么做。
提前致谢。
我在安装 Spacy 时遇到以下错误。
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))
Run Code Online (Sandbox Code Playgroud)
我正在运行的命令: python -m spacy download en_core_web_md