Make sure your host has docker service installed.
- Make sure you've built the rasa3-for-botfront docker image already.
- Build the botfront docker image.
git clone https://github.com/djypanda/botfront-for-rasa3.git
cd botfront-for-rasa3
docker build . -t bf-for-rasa3:v0.1
If your building process exit on OOM error, just increase the docker service resource memory(e.g. 8G), and try again.
This container can use 5944M memory in total.
#16 0.350 If it aborts with an out-of-memory (OOM) or ‘non-zero exit code 137’ error message,
- Create the project root directory.
If you haven't setup the dev environment, you should install botfront
module: npm install -g botfront
Create the project somewhere not in the source code tree.
botfront init
- Modity configuration in the project directory.
- edit
.botfront/docker-compose-template.yml
version: "3.0" | version: "3.9" |
botfront: image: botfront/botfront |
botfront: image: bf-for-rasa3:v0.1 |
rasa: build: context: ./rasa args: RASA_IMAGE: ${IMAGES_CURRENT_RASA} ... volumes: - ./models/:/app/models |
rasa: image: rasa3-for-bf:v0.1 ... volumes: - ./models/:/app/models - ./config/:/app/config |
- edit
.botfront/botfront.yml
images:
default:
botfront: 'bf-for-rasa3:v0.1'
rasa: 'rasa3-for-bf:v0.1'
duckling: 'botfront/duckling:latest'
mongo: 'mongo:6.0.1'
actions: 'rasa/rasa-sdk:3.2.1'
current:
botfront: 'bf-for-rasa3:v0.1'
rasa: 'rasa3-for-bf:v0.1'
duckling: 'botfront/duckling:latest'
mongo: 'mongo:6.0.1'
actions: 'rasa/rasa-sdk:3.2.1'
- Start services.
botfront up
NOTE - After the first run you can use docker-compose up [-d]
to start those services either.
- Setup chitchat project
-
Create a chat project, follow the link below:
-
rasa need a trained nlu module to startup (They don't have one in the init project root/models folder)
- !!! Copy a dummy one from
demo_project/models
- !!! Copy a dummy one from
-
This step is critical,
botfront set-projects chitchat-5v7YtAmFF
(Change to your project name).
- Open http://localhost:8888/ in browser.
First time it will take a quite long time to download meteor.js
- Setup the zh language
In 'nlu' menu -> 'Settings' tab:
Update the pipeline with below text:
pipeline:
- name: SpacyNLP
model: zh_core_web_md
- name: SpacyTokenizer
- name: SpacyEntityExtractor
- name: SpacyFeaturizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
constrain_similarities: true
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
-
Train exampes, after train finished, click the chat icon(at right bottom), talk to your chatbot!
-
That's all, have fun!
- Botfront is a Meteor app, so the first step is to install Meteor
- Then clone this repo and install the dependencies:
git clone https://github.com/djypanda/botfront-for-rasa3.git
cd botfront-for-rasa3/botfront
meteor npm install
- Install the CLI from the source code:
# if you installed Botfront from npm uninstall it.
npm uninstall -g botfront
# Install the cli from the source code
cd cli && npm link
Botfront needs to be connected to other services, especially Rasa.
-
Create a Botfront project with
botfront init
(somewhere else, not in the repo) Make sure your host has docker service installed. 'botfront init' command will create a instance project directory and download pre-build docker images in which comes with rasa2. -
Start your project with
botfront up -e botfront -e rasa
. This will run all services except the Botfront app and rasa since you are going to run it with Meteor and rasa 3 locally and mannually. -
Make sure you started rasa3 service (rasa3-for-botfront, the modified version).
-
Go back to the botfront checkout
cd botfront-for-rasa3/botfront
and run Botfront withmeteor npm run start:docker-compose.dev
. Botfront will be available at http://localhost:3000 so open your browser and happy editing 😸
The ultimate target of this copy is to decouple the botfront and rasa, let botfront only do the editing work, and keep rasa as untoucned as possible!
- Removed multi-language support in one rasa instance. This this also suggested officially to be achieved multi-instances.
- Add chinese as default language.
- Temporary removed Gazette feature and some other features that need rasa to change the code inside nlu module.
- Commented Story Behaviour
- Action can be edited in botfront
- Change the train payload from json (deprecated!) to yaml format
- Make the botfront cli work for this repo
- TBA.