Metadata-Version: 2.1
Name: coco-rasa
Version: 0.0.1
Summary: CoCo(Conversational Components) SDK for using components in Rasa
Home-page: https://github.com/conversationalcomponents/coco-rasa
Author: Chen Buskilla
Author-email: chen@buskilla.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: coco-sdk
Requires-Dist: rasa


# 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
```

#### These are the setup steps to get multi-turn capabilities for CoCo actions
in your rasa bot config.yml
```yaml
policy:
  - name: "coco_rasa.CoCoMappingPolicy"
```

in domain.yml
```yaml
slots:
  active_component:
    type: text
```

#### triggering actions (and CoCo actions :) )
1. MappingPolicy

    config.yml:
    ```yaml
    policies:
    - name: MappingPolicy
    ```

    domain.yml
    ```yaml
    intents:
    - greet:
        triggers: namer_vp3
    - someotherintent
    ```
2. Fallback policy

    config.yaml
    ```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
```

