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


Download files

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

Source Distribution

coco-rasa-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

coco_rasa-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file coco-rasa-0.0.1.tar.gz.

File metadata

  • Download URL: coco-rasa-0.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.2

File hashes

Hashes for coco-rasa-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0321bdeb9a3ea3daa3dfbfdcb06e75715df53246051ef59275e02334bd0aafde
MD5 68a0c6250baeb7addd8311dd0677a613
BLAKE2b-256 4769c4d7a3dbb9ff6b03bb445867164e889148459fac085ef5d5b47c9df27991

See more details on using hashes here.

File details

Details for the file coco_rasa-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: coco_rasa-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.2

File hashes

Hashes for coco_rasa-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 117c82cf6418b9ff66503ff87e218bff1fda80c65b40e1ecb897545eb9adeade
MD5 dba6ea2644a3788ea967d4620ed3bc99
BLAKE2b-256 af3e52ba086697aa043947053f973ec92069acfd9d7a8f248ca4ccc9a8672191

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page