Initial Trained Data

This commit is contained in:
Pratyush Desai 2021-10-20 17:59:59 +05:30
parent 5b835c0bf5
commit 8608648b1d
Signed by: pratyush
GPG Key ID: DBA5BB7505946FAD
13 changed files with 225 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.pythonPath": "venv/bin/python"
}

0
actions/__init__.py Normal file
View File

27
actions/actions.py Normal file
View File

@ -0,0 +1,27 @@
# This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions
# This is a simple example for a custom action which utters "Hello World!"
# from typing import Any, Text, Dict, List
#
# from rasa_sdk import Action, Tracker
# from rasa_sdk.executor import CollectingDispatcher
#
#
# class ActionHelloWorld(Action):
#
# def name(self) -> Text:
# return "action_hello_world"
#
# def run(self, dispatcher: CollectingDispatcher,
# tracker: Tracker,
# domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
#
# dispatcher.utter_message(text="Hello World!")
#
# return []

22
config.yml Normal file
View File

@ -0,0 +1,22 @@
language: en
pipeline:
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: "char_wb"
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
policies:
- name: MemoizationPolicy
- name: RulePolicy
- name: TEDPolicy
max_history: 5
epochs: 100

33
credentials.yml Normal file
View File

@ -0,0 +1,33 @@
# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/messaging-and-voice-channels
rest:
# # you don't need to provide anything here - this channel doesn't
# # require any credentials
#facebook:
# verify: "<verify>"
# secret: "<your secret>"
# page-access-token: "<your page access token>"
#slack:
# slack_token: "<your slack token>"
# slack_channel: "<the slack channel>"
# slack_signing_secret: "<your slack signing secret>"
#socketio:
# user_message_evt: <event name for user message>
# bot_message_evt: <event name for bot messages>
# session_persistence: <true/false>
#mattermost:
# url: "https://<mattermost instance>/api/v4"
# token: "<bot token>"
# webhook_url: "<callback URL>"
# This entry is needed if you are using Rasa X. The entry represents credentials
# for the Rasa X "channel", i.e. Talk to your bot and Share with guest testers.
rasa:
url: "http://localhost:5002/api"

23
data/nlu.yml Normal file
View File

@ -0,0 +1,23 @@
nlu:
- intent: greet
examples: |
- Hi
- Hey!
- Hello
- Hallo
- Good day
- Good morning
- intent: signup
examples: |
- I want to get an account
- I want to sign up
- Can you sign me up for an account?
- How do I sign up?
- intent: inform
examples: |
- My email is example@example.com
- random@example.com
- Please send it to anything@example.com
- Email is something@example.com

14
data/rules.yml Normal file
View File

@ -0,0 +1,14 @@
rules:
- rule: activate signup form
steps:
- intent: signup
- action: signup_form
- active_loop: signup_form
- rule: submit form
condition:
- active_loop: signup_form
steps:
- action: signup_form
- active_loop: null
- action: utter_signedup

8
data/stories.yml Normal file
View File

@ -0,0 +1,8 @@
stories:
- story: greet and signup
steps:
- intent: greet
- action: utter_greet
- intent: signup
- action: signup_form
- active_loop: signup_form

34
domain.yml Normal file
View File

@ -0,0 +1,34 @@
version: '2.0'
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
intents:
- greet
- inform
- signup
slots:
email:
type: unfeaturized
influence_conversation: false
responses:
utter_greet:
- text: |
Hello! How can I help you?
- text: |
Hi!
utter_ask_email:
- text: |
What is your email address?
utter_signedup:
- text: |
Check your inbox at {email} in order to finish signing up on Liberta Casa!
- text: You're all set! Check your inbox at {email} to confirm your registration.
actions:
- '...'
- utter_greet
- utter_signedup
forms:
signup_form:
required_slots:
email:
- type: from_text

42
endpoints.yml Normal file
View File

@ -0,0 +1,42 @@
# This file contains the different endpoints your bot can use.
# Server where the models are pulled from.
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
#models:
# url: http://my-server.com/models/default_core@latest
# wait_time_between_pulls: 10 # [optional](default: 100)
# Server which runs your custom actions.
# https://rasa.com/docs/rasa/custom-actions
#action_endpoint:
# url: "http://localhost:5055/webhook"
# Tracker store which is used to store the conversations.
# By default the conversations are stored in memory.
# https://rasa.com/docs/rasa/tracker-stores
#tracker_store:
# type: redis
# url: <host of the redis instance, e.g. localhost>
# port: <port of your redis instance, usually 6379>
# db: <number of your database within redis, e.g. 0>
# password: <password used for authentication>
# use_ssl: <whether or not the communication is encrypted, default false>
#tracker_store:
# type: mongod
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
# db: <name of the db within your mongo instance, e.g. rasa>
# username: <username used for authentication>
# password: <password used for authentication>
# Event broker which all conversation events should be streamed to.
# https://rasa.com/docs/rasa/event-brokers
#event_broker:
# url: localhost
# username: username
# password: password
# queue: queue

5
forms.yml Normal file
View File

@ -0,0 +1,5 @@
forms:
signup_form:
required_slots:
email:
- type: from_text

Binary file not shown.

14
responses.yml Normal file
View File

@ -0,0 +1,14 @@
responses:
utter_greet:
- text: |
Hello! How can I help you?
- text: |
Hi!
utter_ask_email:
- text: |
What is your email address?
utter_signedup:
- text: |
Check your inbox at {email} in order to finish signing up on Liberta Casa!
- text: |
You're all set! Check your inbox at {email} to confirm your registration.