Skip to main content

CoCo(Conversational Components) SDK for using components in Rasa

Project description

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

These are the setup steps to get multi-turn capabilities for CoCo actions

in your rasa bot config.yml

policy:
  - name: "coco_rasa.CoCoMappingPolicy"

in domain.yml

slots:
  active_component:
    type: text

triggering actions (and CoCo actions :) )

  1. MappingPolicy

    config.yml:

    policies:
    - name: MappingPolicy
    

    domain.yml

    intents:
    - greet:
        triggers: namer_vp3
    - someotherintent
    
  2. 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

Project details


Release history Release notifications

This version

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for coco-rasa, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size coco_rasa-0.0.1-py3-none-any.whl (5.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size coco-rasa-0.0.1.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page