| License | Version | ||
| Github Actions | Coverage | ||
| Supported versions | Wheel | ||
| Status | Downloads |
rasam
Rasa Improved
Usage
Installation
pip install rasam
Rasa config.yml
importers:
- name: rasam.PlaceholderImporter
fake_data_count: 10 # default value is 1
pipeline:
- name: rasam.RegexEntityExtractor
- name: rasam.URLEntityExtractor
Rasa nlu.yml
PlaceholderImporter
The PlaceholderImporter removes the need to write unnecessary information (eg. name, address, numbers, etc.) and helps focus on writing test data.
Using {} placeholder
nlu:
- intent: tell_name
examples: |
- My name is {name}
- I am {name} and he is {name}
Using @ placeholder
nlu:
- intent: tell_address
examples: |
- I live in @address
- I stay at @address and @address
Mixing {} and @ placeholders
It is possible to mix both {} and @ placeholders but it is recommended to use only one style for consistency.
Available placeholders
- any (if you need just any data)
- integer
- decimal
- number
- name
- first_name
- last_name
- text
- word
- paragraph
- uri
- url
- local_uri
- date
- time
- month
- day
- timezone
- company
- license_plate
- address
- city
- country
- user_agent
- password
- user_name
- file_path
Rasam decorators
Rasa relies too heavily on classes to define objects like actions, forms, etc. Rasam aims to remove these Rasa boilerplates to make writing chatbots easier.
@action decorator
The @action decorator converts function into an Action class.
Here is an example of how we can write custom classes in Rasa:
class ActionHelloWorld(Action):
def name(self) -> Text:
return "action_hello_world"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
dispatcher.utter_message(text="Hello World!")
return []
The above code can be simplified using Rasam's @action decorator.
from rasam import action
@action
def action_hello_world(
self: Action, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]
) -> List[Dict[Text, Any]]:
dispatcher.utter_message(text="Hello World!")
return []
Author
Metadata
Release files for rasam 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rasam-0.5.2.tar.gz | 8.0 kB | Without provenance | Details for rasam-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rasam-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for rasam-0.5.2-py3-none-any.whl |
Total release size: 15.8 kB
Release files / rasam-0.5.2.tar.gz
| Download URL | rasam-0.5.2.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
289dbe1d83ecb9217c5b82ee045c8239a02a02e8db49aaf718389d3629c59bbc
|
|
BLAKE2b-256 checksum How to use checksums |
08902ffb197c21babc3ef4d8830aa55777791aab3dae78060abe8158b203e859
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure
|
Release files / rasam-0.5.2-py3-none-any.whl
| Download URL | rasam-0.5.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86403ffd7dad802a53914bae5d7bd21305b98d3dc5077b9678af073ef6feaf3a
|
|
BLAKE2b-256 checksum How to use checksums |
6093e423baf1e451b7abc8cebfd265f0005201577df11877e784ee8fc254f0a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure
|
Security for rasam 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.