Skip to content

1millionbot/rasa-migration-df

Repository files navigation

Dialogflow to Rasa Migration Tool

Overview

The script is a tool for migrating chatbot data from Dialogflow to Rasa 3, specifically handling intents and entities by converting JSON files from Dialogflow into YAML files for Rasa.

Usage

Follow these steps to migrate your Dialogflow chatbot to Rasa:

1. Prepare Dialogflow Files

Export your Dialogflow agent and place the agent.json, package.json, along with the entities and intents folders in the dialogflow directory.

2. Initialize Rasa Project

Run the command rasa init to initialize a new Rasa project in the rasa folder. This folder will be the destination for the migration output (Rasa files).

3. Modify Domain Configuration

Ensure the rasa/domain.yml reflects desired session configuration immediately after the version line, as shown below:

version: "3.1"
session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

intents:
  - greet

4. Clean Stories File

The rasa/stories.yml should start empty to avoid warnings during training:

version: "3.1"

stories:

5. Execute Migration Script

Run the migration script with the command: $ python DialogRasaMigrator.py

6. Update Configuration

Review and adjust the rasa/config.yml as necessary for your project's needs.

7. Train Your Rasa Model

Navigate to Rasa project directory and execute rasa train to generate model.

8. Troubleshooting

Refer to TroubleshootingDialogflowToRasa.pdf for common errors and warnings.

Project Structure:

Dialogflow-to-Rasa-Migration-Tool/
│
├── dialogflow/
│   ├── agent.json            # Dialogflow agent configuration
│   ├── package.json          # Dialogflow package information
│   ├── intents/              # Directory containing Dialogflow intent files
│   │   └── [intent files]    # JSON files for each intent
│   └── entities/             # Directory containing Dialogflow entity files
│       └── [entity files]    # JSON files for each entity
│
├── rasa/
│   ├── actions/              # Custom actions for Rasa
│   ├── data/                 # Rasa training data
│   │   ├── nlu.yml           
│   │   ├── rules.yml
│   │   ├── stories.yml       
│   │   └── synonyms.yml      # Synonyms file is generated by script
│   │       
│   ├── config.yml            # Rasa configuration file
│   ├── credentials.yml       # Rasa credentials file
│   ├── domain.yml            # Rasa domain file
│   └── endpoints.yml         # Configuration of Rasa endpoints
│
├── DialogRasaMigrator.py     # Main migration script
└── README.md                 # Project README file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages