Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
coco_rasa Update policy docu according to CR. Jan 26, 2020
LICENSE inital version for coco rasa sdk Jan 2, 2020
MANIFEST.in inital version for coco rasa sdk Jan 2, 2020
README.md update readme multi-turn setup Jan 26, 2020
setup.py Make CoCoContextPolicy to work with RASA forms. Jan 26, 2020

README.md

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

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

actions:
    - generic_oneliners_vp3
    - namer_vp3

to enable multi-turn capabilities for CoCo actions

in your rasa bot config.yml

policy:
  - name: "coco_rasa.CoCoContextPolicy"

triggering actions (and CoCo actions)

  • MappingPolicy
# config.yml:
policies:
    - name: MappingPolicy
# domain.yml
intents:
    - greet:
        triggers: namer_vp3
    - someotherintent
  • Fallback policy
# 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.

slots:
  user.firstName:
    type: text
  user.lastName:
    type: text
You can’t perform that action at this time.