Skip to main content

Create a Rasa form from a YAML file

Project description

Rasa MetaForm

Build Status PyPI version Supported Python Versions Code style: black

Rasa MetForm is a small extension of Rasa's rasa-sdk which introduces a MetaFormAction, an extended FormAction. Read more in a blog post.

Problem statement

Forms

Creating Forms in Rasa requires defining a class for each form, inheriting from FormAction, specifying few methods, as well as in domain.yml, with matching slots and templates.

Ideal

Form would be specified in a single, human-readable, easy to edit file. From this file we would populate domain.yml with all the necessary instances of forms, slots and templates, as well as define a new FormAction class, which will implement all the necessary methods, including name, required_slots (following the logic in the form file), slot_mappings, all validate_{slot} and submit.

Proposal

MetaFormAction allows to create classes from a YAML file and populates the domain with all the needed information.

Installation

The easiest way to install the package is through PyPI.

pip install rasa-metaform

However you might find it more useful to clone the repository and edit the MetaFormAction class for your form(s). We will extend the functionality with additional validation methods.

Form YAML file

See the sample.yml for an example form YAML file.

License

Licensed under the Apache License, Version 2.0. Copyright 2019 Magnet S Coop. Copy of the license.

A list of the Licenses of the dependencies of the project can be found at the bottom of the Libraries Summary.

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

rasa_metaform-0.2.7.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file rasa_metaform-0.2.7.tar.gz.

File metadata

  • Download URL: rasa_metaform-0.2.7.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for rasa_metaform-0.2.7.tar.gz
Algorithm Hash digest
SHA256 258dbab7889fde86782f371f0ddd42717962ff8636d25b5f7ca1c46c68bace7f
MD5 ad71df81fbaef678cc31a6a27b77b7ea
BLAKE2b-256 3dfb8331be53ff42738005bca23a5e7c13a478729813ac158e2021961ecad2a3

See more details on using hashes here.

Supported by

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