All Projects → Dustyposa → rasa_ch_faq

Dustyposa / rasa_ch_faq

Licence: MIT license
用 rasa 实现 rasa demo 机器人,有一些惊奇的功能,faq,图谱,多轮等

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to rasa ch faq

Scribble
Efficient multi-effects text renderer for GameMaker Studio 2.3.1
Stars: ✭ 123 (-21.15%)
Mutual labels:  dialogue
Convlab 2
ConvLab-2: An Open-Source Toolkit for Building, Evaluating, and Diagnosing Dialogue Systems
Stars: ✭ 196 (+25.64%)
Mutual labels:  dialogue
Probabilistic-RNN-DA-Classifier
Probabilistic Dialogue Act Classification for the Switchboard Corpus using an LSTM model
Stars: ✭ 22 (-85.9%)
Mutual labels:  dialogue
Tod Bert
Pre-Trained Models for ToD-BERT
Stars: ✭ 143 (-8.33%)
Mutual labels:  dialogue
Tgen
Statistical NLG for spoken dialogue systems
Stars: ✭ 179 (+14.74%)
Mutual labels:  dialogue
Whiskers
A Visual Dialogue Editor made using the Godot Engine
Stars: ✭ 229 (+46.79%)
Mutual labels:  dialogue
Botml
Powerful markup language for modern chatbots.
Stars: ✭ 98 (-37.18%)
Mutual labels:  dialogue
rasa-docker-arm
Rasa Docker image for ARMv7. Runs on a Raspberry Pi.
Stars: ✭ 19 (-87.82%)
Mutual labels:  rasa
Anyq
FAQ-based Question Answering System
Stars: ✭ 2,336 (+1397.44%)
Mutual labels:  dialogue
rasa bot example
This is an example rasa chatbot implementation that can be connected to your Facebook page.
Stars: ✭ 14 (-91.03%)
Mutual labels:  rasa
Dstc7 End To End Conversation Modeling
Grounded conversational dataset for end-to-end conversational AI (official DSTC7 data)
Stars: ✭ 141 (-9.62%)
Mutual labels:  dialogue
Deeputteranceaggregation
Modeling Multi-turn Conversation with Deep Utterance Aggregation (COLING 2018)
Stars: ✭ 171 (+9.62%)
Mutual labels:  dialogue
ConDigSum
Code for EMNLP 2021 paper "Topic-Aware Contrastive Learning for Abstractive Dialogue Summarization"
Stars: ✭ 62 (-60.26%)
Mutual labels:  dialogue
Dialogue.moe
Stars: ✭ 127 (-18.59%)
Mutual labels:  dialogue
rasa-chatbot
Sample chatbot with rasa stack
Stars: ✭ 29 (-81.41%)
Mutual labels:  rasa
C3
Investigating Prior Knowledge for Challenging Chinese Machine Reading Comprehension
Stars: ✭ 101 (-35.26%)
Mutual labels:  dialogue
Dialogue
Node based dialogue system
Stars: ✭ 207 (+32.69%)
Mutual labels:  dialogue
Chatbot-Training-Corpus
总结了一些可以用作聊天机器人训练实作的文字语聊,包含中英文不同语言
Stars: ✭ 117 (-25%)
Mutual labels:  dialogue
app rasa chat bot
a stateless chat bot to perform natural language queries against the App Store top charts
Stars: ✭ 20 (-87.18%)
Mutual labels:  rasa
Dialogue-Corpus
No description or website provided.
Stars: ✭ 27 (-82.69%)
Mutual labels:  dialogue

rasa_ch_bot

RASA 实现 RASA Bot 后端。 能够回答关于 RASA 的问题,以及一些例子。 欢迎大家多提 RASA 相关的问题,或者想看的示例,我会补充在这里。

前端地址: 这里

功能更新

  • [2021-08-04] 增加 onnx + 量化(用于提高特征提取的速度)的 feature 提取组件 # 一些注意事项
  • [2021-06-24] 增加知图谱的接入(放在GRAPH分支了)
  • [2021-06-01] 增加文本纠错 pipeline (由于 demo 较慢,默认未开启,如何开启?)
  • [2021-05-20] AlbertFeaturizer (在dev分支)
  • [2021-05-13] 增加按钮 demo
  • [2021-05-11] 支持查看 BTC 行情
  • [2021-05-08] 支持 吸猫\狗\狐狸。支持 根据图片搜索动漫出处。
  • [2021-05-06] 支持 找饭店 demo。
  • [2021-04-13] 实现追问demo,实现细节

部分功能展示

FAQ

grtKwF.gif

天气查询及BTC查询功能

grtGS1.gif

吸动物

grt2m8.gif

搜动漫

grtUeO.gif

知识图谱

RQE8gA.gif

支持的问题列表

请参见: 问题列举

一些配置

分词使用的 bert, 自定义了 tokenizers

如何运行

由于使用了 bert_chinese, 所以 需要下载 bert_chinese 模型。 并放到 pre_models 文件夹中,重命名为 tf_model.h5 命令执行:

curl -L https://www.flyai.com/m/bert-base-chinese-tf_model.h5 -o pre_models/tf_model.h5
rasa train

一些文件说明

run.py  # 相当于运行 rasa run
train.py  # == rasa train
run_action_server.py  # == rasa run actions
load_model.py   # 直接加载并运行模型,与 server 无关。(需要先训练好一个模型) 

一些工具

back_translation.py  # 回译脚本
# 使用方式
python back_translation.py 需要回译的文本

ONNX注意事项

1. 使用说明

config 更改为:

  - name: compoments.nlu.featurizer.lm_featurizer.OnnxLanguageModelFeaturizer
    cache_dir: ./tmp
    model_name: bert
    model_weights: pre_models
    onnx: false  # 是否开启 onnx
    quantize: true  # 是否使用量化

下载 torch 的模型

curl -L https://www.flyai.com/m/bert-base-chinese-pytorch_model.bin -o pre_models/pytorch_model.bin

2. 依赖安装

pip install torch==1.9.0 transformers==4.8.2 onnx==1.9.0 onnxruntime==1.8.0 onnxruntime-tools==1.7.0 psutil==5.8.0

3. 一些注释

  1. 速度能提升多少, 可以参考这篇文章
  2. 量化后 速度有额外提升,但是效果可能会变差,需要根据语料调整
  3. 如何测试效果并查看结果
rasa train nlu && rasa test nlu
cat results/intent_errors.json
  1. 为什么没有用 tensorflow 用来做 onnx 尝试多次,都失败了,暂时未找到解决办法(输入的纬度不匹配),如果有人成功了,可以告诉我!!感谢!!!🙏

我要直接看答案!!!

从零开始搭建机器人

1. 下载项目并进入

git clone https://github.com/Dustyposa/rasa_ch_faq.git 
cd rasa_ch_faq

2. 安装依赖

pip install -r requirements.txt
curl -L https://www.flyai.com/m/bert-base-chinese-tf_model.h5 -o pre_models/tf_model.h5
rasa train

ps: 注意 python 版本 37+

3. 训练模型

rasa train

4. 运行机器人

需要开两个 shell/iterm 第一个:

rasa shell

第二个:

rasa run actions

然后就可以在第一个 shell 窗口对话了

从 1 开始搭建机器人

这个是干啥的?如果第一个你已经会了,我们加点前端展示的,效果参看这里

1. 下载前端项目并进入

git clone -#-depth 1 https://github.com/Dustyposa/rasa_bot_front
cd rasa_bot_front

2. 启动前端

参照文档

3. 启动 rasa

同样是两个 shell/iterm,第一个命令稍有不同:

rasa run --cors "*"

第二个:

rasa run actions
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].