GithubHelp home page GithubHelp logo

writetosudeepto / gintaa-chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rasahq/retail-demo

0.0 0.0 0.0 90 KB

Rasa's retail starter pack

License: GNU General Public License v3.0

Python 100.00%

gintaa-chatbot's Introduction

Retail Example Bot

This is a sample retail bot to help provide starter content, examples of how to implement particular features, and sample use cases. Built using Rasa 2.3.1

Install dependencies

Run:

pip install -r requirements.txt

Run the bot

Use rasa train to train a model.

Then, to run, first set up your action server in one terminal window:

rasa run actions

In another window, run the duckling server (for entity extraction):

docker run -p 8000:8000 rasa/duckling

Then talk to your bot by running:

rasa shell --debug

Note that --debug mode will produce a lot of output meant to help you understand how the bot is working under the hood. To simply talk to the bot, you can remove this flag.

Overview of the files

data/stories.yml - contains stories

data/nlu.yml - contains NLU training data

data/rules.yml - contains the rules upon which the bot responds to queries

actions/actions.py - contains custom action/api code

domain.yml - the domain file, including bot response templates

config.yml - training configurations for the NLU pipeline and policy ensemble

tests/test_stories.yml - end-to-end test stories

Things you can ask the bot

  1. Check the status of an order
  2. Return an item
  3. Cancel an item
  4. Search a product inventory for shoes
  5. Subscribe to product updates

The bot can handle switching forms and cancelling a form, but not resuming a form after switching yet.

The main flows have the bot retrieving or changing information in a SQLite database (the file example.db). You can use initialize.db to change the data that exists in this file.

For the purposes of illustration, the bot has orders for the following email addresses:

And these are the shoes that should show as in stock (size, color):

inventory = [(7, 'blue'),
             (8, 'blue'),
             (9, 'blue'),
             (10, 'blue'),
             (11, 'blue'),
             (12, 'blue'),
             (7, 'black'),
             (8, 'black'),
             (9, 'black'),
             (10, 'black')
            ]

Testing the bot

You can test the bot on test conversations by running rasa test. This will run end-to-end testing on the conversations in tests/test_stories.yml.

Note that if duckling isn't running when you do this, you'll see some failures.

Rasa X Deployment

To deploy this bot, it is highly recommended to make use of the one line deploy script for Rasa X. As part of the deployment, you'll need to set up git integration to pull in your data and configurations, and build or pull an action server image.

Action Server Image

You will need to have docker installed in order to build the action server image. If you haven't made any changes to the action code, you can also use the public image on Dockerhub instead of building it yourself.

It is recommended to use an automated CI/CD process to keep your action server up to date in a production environment.

๐ŸŽ License

Licensed under the GNU General Public License v3. Copyright 2021 Rasa Technologies GmbH. Copy of the license. Licensees may convey the work under this license. There is no warranty for the work.

gintaa-chatbot's People

Contributors

desmarchris avatar sirneij avatar b-quachtran avatar hsm207 avatar kedz avatar ancalita avatar samsucik avatar smitesh-sutaria avatar tttthomasssss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.