Skip to main content

Dialogflow to Rasa > 3.0 agent converter.

Project description

Dialog2Rasa Converter

Build Status PyPI version Python Versions License

About dialog2rasa

Easily convert Dialogflow agents to Rasa format for Rasa version 3+. This tool automates the migration to Rasa, converting Dialogflow exports into Rasa YAML format.

For a detailed architecture flow of the Dialogflow to Rasa conversion process, see the Conversion Process Diagram.

Installation

Install dialog2rasa with:

pip install dialog2rasa

For more details, visit PyPI.

Usage

Export your Dialogflow agent (details here), unzip it, and then, convert it to Rasa format with:

dialog2rasa -p path/to/extracted/dialogflow/export -l language_code

Command Details

  • -p PATH: Path to the Dialogflow export’s extracted folder.
  • -l LANGUAGE: Language code (e.g., 'en' for English), defaults to 'de' (German).

The conversion output is saved in /output/[LANGUAGE_CODE] within the Dialogflow agent’s directory, with [LANGUAGE_CODE] being the actual language code used.

Output File Format

For detailed insights into how our output data is structured, visit our documentation here.

Features and Limitations

  • Features: Converts intents, entities, and utterances to Rasa YAML.
  • Limitations:
    • As Rasa doesn't natively support compound entities, this converter introduces a workaround by generating a pseudo-YAML file, prefixed with __compound_, which allows users to define their handling strategy.
    • It consolidates entities that share a single synonym into a lookup table, while also treating entities with multiple synonyms as synonyms within Rasa.
    • The output NLU YAML file is named after the agent, facilitating project integration by placing it within an nlu folder.

Note: See test/mockup-agent and its reference output here to understand these limitations.

Contributing

Your feedback and contributions are appreciated to enhance this tool. Report bugs or suggest features via issues or pull requests.

Testing

The package includes automated tests (see .github/workflows/python-publish.yml here) in a Continuous Integration workflow with PyPi. Contribute by writing tests with pytest for your code changes to maintain functionality and reliability.

License

Licensed under the Apache 2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dialog2rasa-0.1.16.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

dialog2rasa-0.1.16-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page