Skip to main content

A framework for turn-taking interactions

Project description

README

PyPI version Build Status Coverage Status Downloads

A framework for turn-taking interactions.

Example

This is from example.py, using the terminal interface, and demonstrates several things:

  • A plan-based structure that uses graphs to direct content flow

  • Textual variation, including ordered variation in for the pschology questions

  • Writing user input to a database

  • Reading from the database to populate text

  • Error checking through tests that are run on data input, including automatically displaying an error message, if the user gives an invalid input

  • Confirmation of valid user input, which is achieved by specifying a boolean argument when creating the message

  • The use of a generic interface class that is extended to make this interaction display on the terminal

    =====================
    Hola
     0. Hi
    >>> 0
    =====================
    What's your name?
    >>> AJ
    =====================
    'AJ', right?
     0. Yes
     1. No
    >>> 1
    =====================
    What's your name?
    >>> Audrow
    =====================
    'Audrow', right?
     0. Yes
     1. No
    >>> 0
    =====================
    Alright, Audrow, how old are you?
    >>> 1000
    =====================
    Enter a number between 0 and 200
     0. Okay
     1. Oops
    >>> 0
    =====================
    Alright, Audrow, how old are you?
    >>> 27
    =====================
    How are you?
     0. Good
     1. Okay
     2. Bad
    >>> 0
    =====================
    How do you feel about the following statement? 'I am the life of the party'
     0. Strongly agree
     1. Agree
     2. Neutral
     3. disagree
     4. Strongly disagree
    >>> 1
    =====================
    How do you feel about the following statement? 'I am always prepared'
     0. Strongly agree
     1. Agree
     2. Neutral
     3. disagree
     4. Strongly disagree
    >>> 1
    =====================
    How do you feel about the following statement? 'I get stressed out easily'
     0. Strongly agree
     1. Agree
     2. Neutral
     3. disagree
     4. Strongly disagree
    >>> 3
    =====================
    Bye
     0. Bye
     1. See ya!
    >>> 1
    =========================
    Currently in the database
    {'answers': ['Agree',
                 'Agree',
                 'disagree'],
     'question_idx': 3,
     'user_age': 27.0,
     'user_name': 'Audrow'}
    

Setup

Option 1: Clone the repository

Best if you want to modify or view the code - note that you can do the following inside of a virtual environment

git clone https://github.com/robotpt/interaction-engine

An easy way to setup the repository with its dependencies and with your Python path is to use pip.

pip install -e interaction-engine

Tests can be run with the following commands.

cd interaction-engine
python3 -m unittest

Option 2: Use Pip

Best if you just want to use it

python3 -m pip install interaction_engine

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

interaction-engine-0.0.6.tar.gz (13.3 kB view details)

Uploaded Source

File details

Details for the file interaction-engine-0.0.6.tar.gz.

File metadata

  • Download URL: interaction-engine-0.0.6.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for interaction-engine-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ff2bbeee9dd538bb68ba901c3023b4ef1f6d509b0e554027dba7fdebd8a76e6f
MD5 5f7ff9279ae29696698eb2b7fbdbd278
BLAKE2b-256 a5c55738ad006fbf32d1dd12968900b07c2b9bd88b6649f39fa6bb333ee183f8

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