https://github.com/conversationalcomponents/coco-rasa
https://github.com/conversationalcomponents/coco-rasa
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/conversationalcomponents/coco-rasa
- Owner: ConversationalComponents
- License: mit
- Created: 2020-01-02T15:04:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T09:43:51.000Z (about 6 years ago)
- Last Synced: 2026-01-05T20:21:53.824Z (3 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Toolkit to work with components in rasa
### Installation (We recommend using a virtualenv):
```
pip install coco-rasa
```
### Setup:
#### Setting up CoCo actions
in actions.py
```python
from coco_rasa import GenericCoCoAction
class OneLiners(GenericCoCoAction):
# component name is the component_id from CoCo marketplace
component_name = "generic_oneliners_vp3"
class Namer(GenericCoCoAction):
component_name = "namer_vp3"
```
in domain.yml
```yaml
actions:
- generic_oneliners_vp3
- namer_vp3
```
#### to enable multi-turn capabilities for CoCo actions
in your rasa bot config.yml
```yaml
policy:
- name: "coco_rasa.CoCoContextPolicy"
```
#### triggering actions (and CoCo actions)
* MappingPolicy
``` yaml
# config.yml:
policies:
- name: MappingPolicy
```
```yaml
# domain.yml
intents:
- greet:
triggers: namer_vp3
- someotherintent
```
* Fallback policy
``` yaml
# config.yaml
policies:
- name: "FallbackPolicy"
nlu_threshold: 0.4
core_threshold: 0.3
fallback_action_name: "generic_oneliners_vp3"
```
#### using context transfer
in domain.yml declare the keys you want the use(from CoCo context transfer protocol). data will be transferred automatically between components.
```yaml
slots:
user.firstName:
type: text
user.lastName:
type: text
```