Spaces:
No application file
No application file
Commit ·
ace17bf
1
Parent(s): 0d74878
RASA Update my Repository
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- 1_projeto_rasa/Readme_Steps_for_this_project.md +28 -0
- 1_projeto_rasa/actions/__init__.py +0 -0
- 1_projeto_rasa/actions/actions.py +27 -0
- 1_projeto_rasa/config.yml +50 -0
- 1_projeto_rasa/credentials.yml +33 -0
- 1_projeto_rasa/data/nlu.yml +98 -0
- 1_projeto_rasa/data/rules.yml +13 -0
- 1_projeto_rasa/data/stories.yml +35 -0
- 1_projeto_rasa/domain.yml +38 -0
- 1_projeto_rasa/endpoints.yml +42 -0
- 1_projeto_rasa/print_rasa.png +0 -0
- 1_projeto_rasa/tests/test_stories.yml +91 -0
- 2_projeto_rasa/Readme_Steps_for_this_project.md +40 -0
- 2_projeto_rasa/actions/__init__.py +0 -0
- 2_projeto_rasa/actions/actions.py +27 -0
- 2_projeto_rasa/config.yml +61 -0
- 2_projeto_rasa/config_BERT.yml +62 -0
- 2_projeto_rasa/credentials.yml +33 -0
- 2_projeto_rasa/data/nlu.yml +324 -0
- 2_projeto_rasa/data/rules.yml +14 -0
- 2_projeto_rasa/data/stories.yml +25 -0
- 2_projeto_rasa/domain.yml +118 -0
- 2_projeto_rasa/endpoints.yml +44 -0
- 2_projeto_rasa/models/20231018-161031-obsolete-cap.tar.gz +3 -0
- 2_projeto_rasa/tests/test_stories.yml +91 -0
- 3_projeto_rasa/Readme_Steps_for_this_project.md +40 -0
- 3_projeto_rasa/actions/__init__.py +0 -0
- 3_projeto_rasa/actions/actions.py +27 -0
- 3_projeto_rasa/config.yml +51 -0
- 3_projeto_rasa/credentials.yml +33 -0
- 3_projeto_rasa/data/nlu.yml +40 -0
- 3_projeto_rasa/data/rules.yml +13 -0
- 3_projeto_rasa/data/stories.yml +34 -0
- 3_projeto_rasa/domain.yml +53 -0
- 3_projeto_rasa/endpoints.yml +42 -0
- 3_projeto_rasa/tests/test_stories.yml +91 -0
- 4_projeto_rasa_DOCKER/.config/rasa/global.yml +4 -0
- 4_projeto_rasa_DOCKER/Dockerfile +20 -0
- 4_projeto_rasa_DOCKER/actions/__init__.py +0 -0
- 4_projeto_rasa_DOCKER/actions/actions.py +27 -0
- 4_projeto_rasa_DOCKER/config.yml +61 -0
- 4_projeto_rasa_DOCKER/credentials.yml +33 -0
- 4_projeto_rasa_DOCKER/data/nlu.yml +157 -0
- 4_projeto_rasa_DOCKER/data/rules.yml +33 -0
- 4_projeto_rasa_DOCKER/data/stories.yml +26 -0
- 4_projeto_rasa_DOCKER/docker-compose.yml +10 -0
- 4_projeto_rasa_DOCKER/domain.yml +118 -0
- 4_projeto_rasa_DOCKER/endpoints.yml +44 -0
- 4_projeto_rasa_DOCKER/readme_Docker.md +33 -0
- 4_projeto_rasa_DOCKER/requirements.txt +176 -0
1_projeto_rasa/Readme_Steps_for_this_project.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# <h1 align="center">Tutorial básico do `rasa`</h1>
|
| 2 |
+
|
| 3 |
+
<font color="yellow">Data Scientist.: Dr.Eddy Giusepe Chirinos Isidro</font>
|
| 4 |
+
|
| 5 |
+
Os primeiros passos para este projeto básico, são:
|
| 6 |
+
|
| 7 |
+
Instalamos o rasa, assim:
|
| 8 |
+
|
| 9 |
+
* $ pip install rasa[full]
|
| 10 |
+
|
| 11 |
+
O seguinte comando irá trazer todos os arquivos do rasa:
|
| 12 |
+
* $ rasa init
|
| 13 |
+
|
| 14 |
+
Fazendo aquelas pequenas customizações (Eddy_1, Eddy_2, etc ), passamos a treinar nosso
|
| 15 |
+
nosso modelo, assim:
|
| 16 |
+
|
| 17 |
+
* $ rasa train
|
| 18 |
+
|
| 19 |
+
Depois de train o modelo, podemos passar o seguinte comando para interagir com o Bot, assim:
|
| 20 |
+
|
| 21 |
+
* $ rasa shell
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
<font color="red">OBS:</font>
|
| 25 |
+
|
| 26 |
+
Você pode usar o seguinte comando em alguma página web (eu ainda não usei isso):
|
| 27 |
+
|
| 28 |
+
* $ rasa run --enable-api --cors "*"
|
1_projeto_rasa/actions/__init__.py
ADDED
|
File without changes
|
1_projeto_rasa/actions/actions.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This files contains your custom actions which can be used to run
|
| 2 |
+
# custom Python code.
|
| 3 |
+
#
|
| 4 |
+
# See this guide on how to implement these action:
|
| 5 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# This is a simple example for a custom action which utters "Hello World!"
|
| 9 |
+
|
| 10 |
+
# from typing import Any, Text, Dict, List
|
| 11 |
+
#
|
| 12 |
+
# from rasa_sdk import Action, Tracker
|
| 13 |
+
# from rasa_sdk.executor import CollectingDispatcher
|
| 14 |
+
#
|
| 15 |
+
#
|
| 16 |
+
# class ActionHelloWorld(Action):
|
| 17 |
+
#
|
| 18 |
+
# def name(self) -> Text:
|
| 19 |
+
# return "action_hello_world"
|
| 20 |
+
#
|
| 21 |
+
# def run(self, dispatcher: CollectingDispatcher,
|
| 22 |
+
# tracker: Tracker,
|
| 23 |
+
# domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
|
| 24 |
+
#
|
| 25 |
+
# dispatcher.utter_message(text="Hello World!")
|
| 26 |
+
#
|
| 27 |
+
# return []
|
1_projeto_rasa/config.yml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The config recipe.
|
| 2 |
+
# https://rasa.com/docs/rasa/model-configuration/
|
| 3 |
+
recipe: default.v1
|
| 4 |
+
|
| 5 |
+
# The assistant project unique identifier
|
| 6 |
+
# This default value must be replaced with a unique assistant name within your deployment
|
| 7 |
+
assistant_id: 20231010-203208-bold-gymnast
|
| 8 |
+
|
| 9 |
+
# Configuration for Rasa NLU.
|
| 10 |
+
# https://rasa.com/docs/rasa/nlu/components/
|
| 11 |
+
language: en
|
| 12 |
+
|
| 13 |
+
pipeline:
|
| 14 |
+
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
|
| 15 |
+
# # If you'd like to customize it, uncomment and adjust the pipeline.
|
| 16 |
+
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
|
| 17 |
+
# - name: WhitespaceTokenizer
|
| 18 |
+
# - name: RegexFeaturizer
|
| 19 |
+
# - name: LexicalSyntacticFeaturizer
|
| 20 |
+
# - name: CountVectorsFeaturizer
|
| 21 |
+
# - name: CountVectorsFeaturizer
|
| 22 |
+
# analyzer: char_wb
|
| 23 |
+
# min_ngram: 1
|
| 24 |
+
# max_ngram: 4
|
| 25 |
+
# - name: DIETClassifier
|
| 26 |
+
# epochs: 100
|
| 27 |
+
# constrain_similarities: true
|
| 28 |
+
# - name: EntitySynonymMapper
|
| 29 |
+
# - name: ResponseSelector
|
| 30 |
+
# epochs: 100
|
| 31 |
+
# constrain_similarities: true
|
| 32 |
+
# - name: FallbackClassifier
|
| 33 |
+
# threshold: 0.3
|
| 34 |
+
# ambiguity_threshold: 0.1
|
| 35 |
+
|
| 36 |
+
# Configuration for Rasa Core.
|
| 37 |
+
# https://rasa.com/docs/rasa/core/policies/
|
| 38 |
+
policies: null
|
| 39 |
+
# # No configuration for policies was provided. The following default policies were used to train your model.
|
| 40 |
+
# # If you'd like to customize them, uncomment and adjust the policies.
|
| 41 |
+
# # See https://rasa.com/docs/rasa/policies for more information.
|
| 42 |
+
# - name: MemoizationPolicy
|
| 43 |
+
# - name: RulePolicy
|
| 44 |
+
# - name: UnexpecTEDIntentPolicy
|
| 45 |
+
# max_history: 5
|
| 46 |
+
# epochs: 100
|
| 47 |
+
# - name: TEDPolicy
|
| 48 |
+
# max_history: 5
|
| 49 |
+
# epochs: 100
|
| 50 |
+
# constrain_similarities: true
|
1_projeto_rasa/credentials.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the credentials for the voice & chat platforms
|
| 2 |
+
# which your bot is using.
|
| 3 |
+
# https://rasa.com/docs/rasa/messaging-and-voice-channels
|
| 4 |
+
|
| 5 |
+
rest:
|
| 6 |
+
# # you don't need to provide anything here - this channel doesn't
|
| 7 |
+
# # require any credentials
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
#facebook:
|
| 11 |
+
# verify: "<verify>"
|
| 12 |
+
# secret: "<your secret>"
|
| 13 |
+
# page-access-token: "<your page access token>"
|
| 14 |
+
|
| 15 |
+
#slack:
|
| 16 |
+
# slack_token: "<your slack token>"
|
| 17 |
+
# slack_channel: "<the slack channel>"
|
| 18 |
+
# slack_signing_secret: "<your slack signing secret>"
|
| 19 |
+
|
| 20 |
+
socketio:
|
| 21 |
+
user_message_evt: user_uttered
|
| 22 |
+
bot_message_evt: bot_uttered
|
| 23 |
+
session_persistence: true #<true/false>
|
| 24 |
+
|
| 25 |
+
#mattermost:
|
| 26 |
+
# url: "https://<mattermost instance>/api/v4"
|
| 27 |
+
# token: "<bot token>"
|
| 28 |
+
# webhook_url: "<callback URL>"
|
| 29 |
+
|
| 30 |
+
# This entry is needed if you are using Rasa Enterprise. The entry represents credentials
|
| 31 |
+
# for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
|
| 32 |
+
rasa:
|
| 33 |
+
url: "http://localhost:5002/api"
|
1_projeto_rasa/data/nlu.yml
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
nlu:
|
| 4 |
+
- intent: greet
|
| 5 |
+
examples: |
|
| 6 |
+
- hey
|
| 7 |
+
- hello
|
| 8 |
+
- hi
|
| 9 |
+
- hello there
|
| 10 |
+
- good morning
|
| 11 |
+
- good evening
|
| 12 |
+
- moin
|
| 13 |
+
- hey there
|
| 14 |
+
- let's go
|
| 15 |
+
- hey dude
|
| 16 |
+
- goodmorning
|
| 17 |
+
- goodevening
|
| 18 |
+
- good afternoon
|
| 19 |
+
|
| 20 |
+
- intent: weather # Eddy_2
|
| 21 |
+
examples: |
|
| 22 |
+
- how is the weather today?
|
| 23 |
+
- what is the weather
|
| 24 |
+
- tell me the weather
|
| 25 |
+
- weather0
|
| 26 |
+
|
| 27 |
+
- intent: goodbye
|
| 28 |
+
examples: |
|
| 29 |
+
- cu
|
| 30 |
+
- good by
|
| 31 |
+
- cee you later
|
| 32 |
+
- good night
|
| 33 |
+
- bye
|
| 34 |
+
- goodbye
|
| 35 |
+
- have a nice day
|
| 36 |
+
- see you around
|
| 37 |
+
- bye bye
|
| 38 |
+
- see you later
|
| 39 |
+
|
| 40 |
+
- intent: affirm
|
| 41 |
+
examples: |
|
| 42 |
+
- yes
|
| 43 |
+
- y
|
| 44 |
+
- indeed
|
| 45 |
+
- of course
|
| 46 |
+
- that sounds good
|
| 47 |
+
- correct
|
| 48 |
+
|
| 49 |
+
- intent: deny
|
| 50 |
+
examples: |
|
| 51 |
+
- no
|
| 52 |
+
- n
|
| 53 |
+
- never
|
| 54 |
+
- I don't think so
|
| 55 |
+
- don't like that
|
| 56 |
+
- no way
|
| 57 |
+
- not really
|
| 58 |
+
|
| 59 |
+
- intent: mood_great
|
| 60 |
+
examples: |
|
| 61 |
+
- perfect
|
| 62 |
+
- great
|
| 63 |
+
- amazing
|
| 64 |
+
- feeling like a king
|
| 65 |
+
- wonderful
|
| 66 |
+
- I am feeling very good
|
| 67 |
+
- I am great
|
| 68 |
+
- I am amazing
|
| 69 |
+
- I am going to save the world
|
| 70 |
+
- super stoked
|
| 71 |
+
- extremely good
|
| 72 |
+
- so so perfect
|
| 73 |
+
- so good
|
| 74 |
+
- so perfect
|
| 75 |
+
|
| 76 |
+
- intent: mood_unhappy
|
| 77 |
+
examples: |
|
| 78 |
+
- my day was horrible
|
| 79 |
+
- I am sad
|
| 80 |
+
- I don't feel very well
|
| 81 |
+
- I am disappointed
|
| 82 |
+
- super sad
|
| 83 |
+
- I'm so sad
|
| 84 |
+
- sad
|
| 85 |
+
- very sad
|
| 86 |
+
- unhappy
|
| 87 |
+
- not good
|
| 88 |
+
- not very good
|
| 89 |
+
- extremly sad
|
| 90 |
+
- so saad
|
| 91 |
+
- so sad
|
| 92 |
+
|
| 93 |
+
- intent: bot_challenge
|
| 94 |
+
examples: |
|
| 95 |
+
- are you a bot?
|
| 96 |
+
- are you a human?
|
| 97 |
+
- am I talking to a bot?
|
| 98 |
+
- am I talking to a human?
|
1_projeto_rasa/data/rules.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
rules:
|
| 4 |
+
|
| 5 |
+
- rule: Say goodbye anytime the user says goodbye
|
| 6 |
+
steps:
|
| 7 |
+
- intent: goodbye
|
| 8 |
+
- action: utter_goodbye
|
| 9 |
+
|
| 10 |
+
- rule: Say 'I am a bot' anytime the user challenges
|
| 11 |
+
steps:
|
| 12 |
+
- intent: bot_challenge
|
| 13 |
+
- action: utter_iamabot
|
1_projeto_rasa/data/stories.yml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
stories:
|
| 4 |
+
|
| 5 |
+
- story: happy path
|
| 6 |
+
steps:
|
| 7 |
+
- intent: greet
|
| 8 |
+
- action: utter_greet
|
| 9 |
+
- intent: mood_great
|
| 10 |
+
- action: utter_happy
|
| 11 |
+
|
| 12 |
+
- story: tell weather # Eddy_3
|
| 13 |
+
steps:
|
| 14 |
+
- intent: weather
|
| 15 |
+
- action: utter_weather
|
| 16 |
+
|
| 17 |
+
- story: sad path 1
|
| 18 |
+
steps:
|
| 19 |
+
- intent: greet
|
| 20 |
+
- action: utter_greet
|
| 21 |
+
- intent: mood_unhappy
|
| 22 |
+
- action: utter_cheer_up
|
| 23 |
+
- action: utter_did_that_help
|
| 24 |
+
- intent: affirm
|
| 25 |
+
- action: utter_happy
|
| 26 |
+
|
| 27 |
+
- story: sad path 2
|
| 28 |
+
steps:
|
| 29 |
+
- intent: greet
|
| 30 |
+
- action: utter_greet
|
| 31 |
+
- intent: mood_unhappy
|
| 32 |
+
- action: utter_cheer_up
|
| 33 |
+
- action: utter_did_that_help
|
| 34 |
+
- intent: deny
|
| 35 |
+
- action: utter_goodbye
|
1_projeto_rasa/domain.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
intents:
|
| 4 |
+
- greet
|
| 5 |
+
- goodbye
|
| 6 |
+
- affirm
|
| 7 |
+
- deny
|
| 8 |
+
- mood_great
|
| 9 |
+
- mood_unhappy
|
| 10 |
+
- bot_challenge
|
| 11 |
+
- weather # Eddy_1
|
| 12 |
+
|
| 13 |
+
responses:
|
| 14 |
+
utter_weather: # Eddy_4
|
| 15 |
+
- text: "The weather is great today"
|
| 16 |
+
|
| 17 |
+
utter_greet:
|
| 18 |
+
- text: "Hey! How are you?"
|
| 19 |
+
|
| 20 |
+
utter_cheer_up:
|
| 21 |
+
- text: "Here is something to cheer you up:"
|
| 22 |
+
image: "https://i.imgur.com/nGF1K8f.jpg"
|
| 23 |
+
|
| 24 |
+
utter_did_that_help:
|
| 25 |
+
- text: "Did that help you?"
|
| 26 |
+
|
| 27 |
+
utter_happy:
|
| 28 |
+
- text: "Great, carry on!"
|
| 29 |
+
|
| 30 |
+
utter_goodbye:
|
| 31 |
+
- text: "Bye"
|
| 32 |
+
|
| 33 |
+
utter_iamabot:
|
| 34 |
+
- text: "I am a bot Eddy, powered by Rasa."
|
| 35 |
+
|
| 36 |
+
session_config:
|
| 37 |
+
session_expiration_time: 60
|
| 38 |
+
carry_over_slots_to_new_session: true
|
1_projeto_rasa/endpoints.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the different endpoints your bot can use.
|
| 2 |
+
|
| 3 |
+
# Server where the models are pulled from.
|
| 4 |
+
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
|
| 5 |
+
|
| 6 |
+
#models:
|
| 7 |
+
# url: http://my-server.com/models/default_core@latest
|
| 8 |
+
# wait_time_between_pulls: 10 # [optional](default: 100)
|
| 9 |
+
|
| 10 |
+
# Server which runs your custom actions.
|
| 11 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 12 |
+
|
| 13 |
+
#action_endpoint:
|
| 14 |
+
# url: "http://localhost:5055/webhook"
|
| 15 |
+
|
| 16 |
+
# Tracker store which is used to store the conversations.
|
| 17 |
+
# By default the conversations are stored in memory.
|
| 18 |
+
# https://rasa.com/docs/rasa/tracker-stores
|
| 19 |
+
|
| 20 |
+
#tracker_store:
|
| 21 |
+
# type: redis
|
| 22 |
+
# url: <host of the redis instance, e.g. localhost>
|
| 23 |
+
# port: <port of your redis instance, usually 6379>
|
| 24 |
+
# db: <number of your database within redis, e.g. 0>
|
| 25 |
+
# password: <password used for authentication>
|
| 26 |
+
# use_ssl: <whether or not the communication is encrypted, default false>
|
| 27 |
+
|
| 28 |
+
#tracker_store:
|
| 29 |
+
# type: mongod
|
| 30 |
+
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
|
| 31 |
+
# db: <name of the db within your mongo instance, e.g. rasa>
|
| 32 |
+
# username: <username used for authentication>
|
| 33 |
+
# password: <password used for authentication>
|
| 34 |
+
|
| 35 |
+
# Event broker which all conversation events should be streamed to.
|
| 36 |
+
# https://rasa.com/docs/rasa/event-brokers
|
| 37 |
+
|
| 38 |
+
#event_broker:
|
| 39 |
+
# url: localhost
|
| 40 |
+
# username: username
|
| 41 |
+
# password: password
|
| 42 |
+
# queue: queue
|
1_projeto_rasa/print_rasa.png
ADDED
|
1_projeto_rasa/tests/test_stories.yml
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### This file contains tests to evaluate that your bot behaves as expected.
|
| 2 |
+
#### If you want to learn more, please see the docs: https://rasa.com/docs/rasa/testing-your-assistant
|
| 3 |
+
|
| 4 |
+
stories:
|
| 5 |
+
- story: happy path 1
|
| 6 |
+
steps:
|
| 7 |
+
- user: |
|
| 8 |
+
hello there!
|
| 9 |
+
intent: greet
|
| 10 |
+
- action: utter_greet
|
| 11 |
+
- user: |
|
| 12 |
+
amazing
|
| 13 |
+
intent: mood_great
|
| 14 |
+
- action: utter_happy
|
| 15 |
+
|
| 16 |
+
- story: happy path 2
|
| 17 |
+
steps:
|
| 18 |
+
- user: |
|
| 19 |
+
hello there!
|
| 20 |
+
intent: greet
|
| 21 |
+
- action: utter_greet
|
| 22 |
+
- user: |
|
| 23 |
+
amazing
|
| 24 |
+
intent: mood_great
|
| 25 |
+
- action: utter_happy
|
| 26 |
+
- user: |
|
| 27 |
+
bye-bye!
|
| 28 |
+
intent: goodbye
|
| 29 |
+
- action: utter_goodbye
|
| 30 |
+
|
| 31 |
+
- story: sad path 1
|
| 32 |
+
steps:
|
| 33 |
+
- user: |
|
| 34 |
+
hello
|
| 35 |
+
intent: greet
|
| 36 |
+
- action: utter_greet
|
| 37 |
+
- user: |
|
| 38 |
+
not good
|
| 39 |
+
intent: mood_unhappy
|
| 40 |
+
- action: utter_cheer_up
|
| 41 |
+
- action: utter_did_that_help
|
| 42 |
+
- user: |
|
| 43 |
+
yes
|
| 44 |
+
intent: affirm
|
| 45 |
+
- action: utter_happy
|
| 46 |
+
|
| 47 |
+
- story: sad path 2
|
| 48 |
+
steps:
|
| 49 |
+
- user: |
|
| 50 |
+
hello
|
| 51 |
+
intent: greet
|
| 52 |
+
- action: utter_greet
|
| 53 |
+
- user: |
|
| 54 |
+
not good
|
| 55 |
+
intent: mood_unhappy
|
| 56 |
+
- action: utter_cheer_up
|
| 57 |
+
- action: utter_did_that_help
|
| 58 |
+
- user: |
|
| 59 |
+
not really
|
| 60 |
+
intent: deny
|
| 61 |
+
- action: utter_goodbye
|
| 62 |
+
|
| 63 |
+
- story: sad path 3
|
| 64 |
+
steps:
|
| 65 |
+
- user: |
|
| 66 |
+
hi
|
| 67 |
+
intent: greet
|
| 68 |
+
- action: utter_greet
|
| 69 |
+
- user: |
|
| 70 |
+
very terrible
|
| 71 |
+
intent: mood_unhappy
|
| 72 |
+
- action: utter_cheer_up
|
| 73 |
+
- action: utter_did_that_help
|
| 74 |
+
- user: |
|
| 75 |
+
no
|
| 76 |
+
intent: deny
|
| 77 |
+
- action: utter_goodbye
|
| 78 |
+
|
| 79 |
+
- story: say goodbye
|
| 80 |
+
steps:
|
| 81 |
+
- user: |
|
| 82 |
+
bye-bye!
|
| 83 |
+
intent: goodbye
|
| 84 |
+
- action: utter_goodbye
|
| 85 |
+
|
| 86 |
+
- story: bot challenge
|
| 87 |
+
steps:
|
| 88 |
+
- user: |
|
| 89 |
+
are you a bot?
|
| 90 |
+
intent: bot_challenge
|
| 91 |
+
- action: utter_iamabot
|
2_projeto_rasa/Readme_Steps_for_this_project.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# <h1 align="center">Tutorial básico do `rasa`</h1>
|
| 2 |
+
|
| 3 |
+
<font color="yellow">Data Scientist.: Dr.Eddy Giusepe Chirinos Isidro</font>
|
| 4 |
+
|
| 5 |
+
Os primeiros passos para este projeto básico, são:
|
| 6 |
+
|
| 7 |
+
Instalamos o rasa, assim:
|
| 8 |
+
|
| 9 |
+
* $ pip install rasa[full]
|
| 10 |
+
|
| 11 |
+
O seguinte comando irá trazer todos os arquivos do rasa:
|
| 12 |
+
* $ rasa init
|
| 13 |
+
|
| 14 |
+
Antes de treinar nosso Bot, uma boa prática é verificar se há alguma inconsistência nas histórias e regras, assim:
|
| 15 |
+
|
| 16 |
+
* $ rasa data validate
|
| 17 |
+
|
| 18 |
+
Para criar exemplos de treinamento:
|
| 19 |
+
|
| 20 |
+
* $ rasa interactive
|
| 21 |
+
|
| 22 |
+
Fazendo aquelas pequenas customizações, passamos a treinar nosso modelo, assim:
|
| 23 |
+
|
| 24 |
+
* $ rasa train
|
| 25 |
+
|
| 26 |
+
ou (adicionando nome do Modelo)
|
| 27 |
+
|
| 28 |
+
* $ rasa train --fixed-model-name contact_bot_Eddy
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
Depois de treinar o modelo, podemos passar o seguinte comando para interagir, na CLI, com o Bot, assim:
|
| 32 |
+
|
| 33 |
+
* $ rasa shell
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
<font color="red">OBS:</font>
|
| 37 |
+
|
| 38 |
+
Você pode usar o seguinte comando em alguma página web (eu ainda não usei isso):
|
| 39 |
+
|
| 40 |
+
* $ rasa run --enable-api --cors "*"
|
2_projeto_rasa/actions/__init__.py
ADDED
|
File without changes
|
2_projeto_rasa/actions/actions.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This files contains your custom actions which can be used to run
|
| 2 |
+
# custom Python code.
|
| 3 |
+
#
|
| 4 |
+
# See this guide on how to implement these action:
|
| 5 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# This is a simple example for a custom action which utters "Hello World!"
|
| 9 |
+
|
| 10 |
+
# from typing import Any, Text, Dict, List
|
| 11 |
+
#
|
| 12 |
+
# from rasa_sdk import Action, Tracker
|
| 13 |
+
# from rasa_sdk.executor import CollectingDispatcher
|
| 14 |
+
#
|
| 15 |
+
#
|
| 16 |
+
# class ActionHelloWorld(Action):
|
| 17 |
+
#
|
| 18 |
+
# def name(self) -> Text:
|
| 19 |
+
# return "action_hello_world"
|
| 20 |
+
#
|
| 21 |
+
# def run(self, dispatcher: CollectingDispatcher,
|
| 22 |
+
# tracker: Tracker,
|
| 23 |
+
# domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
|
| 24 |
+
#
|
| 25 |
+
# dispatcher.utter_message(text="Hello World!")
|
| 26 |
+
#
|
| 27 |
+
# return []
|
2_projeto_rasa/config.yml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The config recipe.
|
| 2 |
+
# https://rasa.com/docs/rasa/model-configuration/
|
| 3 |
+
recipe: default.v1
|
| 4 |
+
|
| 5 |
+
# The assistant project unique identifier
|
| 6 |
+
# This default value must be replaced with a unique assistant name within your deployment
|
| 7 |
+
assistant_id: 20231010-203208-bold-gymnast
|
| 8 |
+
|
| 9 |
+
# Configuration for Rasa NLU.
|
| 10 |
+
# https://rasa.com/docs/rasa/nlu/components/
|
| 11 |
+
language: pt
|
| 12 |
+
|
| 13 |
+
pipeline:
|
| 14 |
+
- name: "SpacyNLP"
|
| 15 |
+
model: "pt_core_news_lg"
|
| 16 |
+
case_sensitive: false
|
| 17 |
+
- name: SpacyTokenizer
|
| 18 |
+
- name: SpacyFeaturizer
|
| 19 |
+
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
|
| 20 |
+
# # If you'd like to customize it, uncomment and adjust the pipeline.
|
| 21 |
+
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
|
| 22 |
+
#- name: WhitespaceTokenizer
|
| 23 |
+
- name: RegexFeaturizer
|
| 24 |
+
"case_sensitive": false
|
| 25 |
+
"use_word_boundaries": true
|
| 26 |
+
- name: LexicalSyntacticFeaturizer
|
| 27 |
+
#- name: CountVectorsFeaturizer
|
| 28 |
+
- name: CountVectorsFeaturizer
|
| 29 |
+
analyzer: char_wb
|
| 30 |
+
min_ngram: 1
|
| 31 |
+
max_ngram: 4
|
| 32 |
+
- name: DIETClassifier
|
| 33 |
+
epochs: 1000
|
| 34 |
+
constrain_similarities: true
|
| 35 |
+
- name: EntitySynonymMapper
|
| 36 |
+
- name: ResponseSelector
|
| 37 |
+
epochs: 500
|
| 38 |
+
constrain_similarities: true
|
| 39 |
+
# Use a classe de intenção nlu_fallback se outras confidences de intenção forem inferiores a "threshold" (padrão 0,3)
|
| 40 |
+
# ou não mais distantes que "ambiguity_threshold" (padrão 0,1).
|
| 41 |
+
- name: FallbackClassifier
|
| 42 |
+
threshold: 0.85
|
| 43 |
+
ambiguity_threshold: 0.1
|
| 44 |
+
|
| 45 |
+
# Configuration for Rasa Core.
|
| 46 |
+
# https://rasa.com/docs/rasa/core/policies/
|
| 47 |
+
policies:
|
| 48 |
+
# # No configuration for policies was provided. The following default policies were used to train your model.
|
| 49 |
+
# # If you'd like to customize them, uncomment and adjust the policies.
|
| 50 |
+
# # See https://rasa.com/docs/rasa/policies for more information.
|
| 51 |
+
- name: MemoizationPolicy
|
| 52 |
+
- name: RulePolicy
|
| 53 |
+
- name: UnexpecTEDIntentPolicy
|
| 54 |
+
max_history: 5
|
| 55 |
+
epochs: 300
|
| 56 |
+
- name: TEDPolicy
|
| 57 |
+
max_history: 5
|
| 58 |
+
epochs: 300
|
| 59 |
+
constrain_similarities: true
|
| 60 |
+
entity_recognition: false
|
| 61 |
+
#tensorboard_log_directory: ./results/
|
2_projeto_rasa/config_BERT.yml
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The config recipe.
|
| 2 |
+
# https://rasa.com/docs/rasa/model-configuration/
|
| 3 |
+
recipe: default.v1
|
| 4 |
+
|
| 5 |
+
# The assistant project unique identifier
|
| 6 |
+
# This default value must be replaced with a unique assistant name within your deployment
|
| 7 |
+
assistant_id: 20231010-203208-bold-gymnast
|
| 8 |
+
|
| 9 |
+
# Configuration for Rasa NLU.
|
| 10 |
+
# https://rasa.com/docs/rasa/nlu/components/
|
| 11 |
+
language: pt
|
| 12 |
+
|
| 13 |
+
pipeline:
|
| 14 |
+
# - name: "SpacyNLP"
|
| 15 |
+
# model: "pt_core_news_lg"
|
| 16 |
+
# case_insensitive: true
|
| 17 |
+
#- name: LanguageModelTokenizer
|
| 18 |
+
- name: WhitespaceTokenizer
|
| 19 |
+
- name: LanguageModelFeaturizer
|
| 20 |
+
model_weights: "rasa/LaBSE"
|
| 21 |
+
model_name: "bert"
|
| 22 |
+
cache_dir: null #/home/eddygiusepe/1_Eddy_Giusepe/6_REPO_HuggingFace/studying_rasa/2_projeto_rasa/HF_model
|
| 23 |
+
|
| 24 |
+
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
|
| 25 |
+
# # If you'd like to customize it, uncomment and adjust the pipeline.
|
| 26 |
+
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
|
| 27 |
+
#- name: WhitespaceTokenizer
|
| 28 |
+
- name: RegexFeaturizer
|
| 29 |
+
"case_sensitive": False
|
| 30 |
+
"use_word_boundaries": True
|
| 31 |
+
- name: LexicalSyntacticFeaturizer
|
| 32 |
+
#- name: CountVectorsFeaturizer
|
| 33 |
+
- name: CountVectorsFeaturizer
|
| 34 |
+
analyzer: word #char_wb
|
| 35 |
+
#min_ngram: 1
|
| 36 |
+
#max_ngram: 4
|
| 37 |
+
- name: DIETClassifier
|
| 38 |
+
epochs: 1000
|
| 39 |
+
constrain_similarities: true
|
| 40 |
+
- name: EntitySynonymMapper
|
| 41 |
+
- name: ResponseSelector
|
| 42 |
+
epochs: 500
|
| 43 |
+
constrain_similarities: true
|
| 44 |
+
# - name: FallbackClassifier
|
| 45 |
+
# threshold: 0.3
|
| 46 |
+
# ambiguity_threshold: 0.1
|
| 47 |
+
|
| 48 |
+
# Configuration for Rasa Core.
|
| 49 |
+
# https://rasa.com/docs/rasa/core/policies/
|
| 50 |
+
policies:
|
| 51 |
+
# # No configuration for policies was provided. The following default policies were used to train your model.
|
| 52 |
+
# # If you'd like to customize them, uncomment and adjust the policies.
|
| 53 |
+
# # See https://rasa.com/docs/rasa/policies for more information.
|
| 54 |
+
- name: MemoizationPolicy
|
| 55 |
+
- name: RulePolicy
|
| 56 |
+
- name: UnexpecTEDIntentPolicy
|
| 57 |
+
max_history: 5
|
| 58 |
+
epochs: 100
|
| 59 |
+
# - name: TEDPolicy
|
| 60 |
+
# max_history: 5
|
| 61 |
+
# epochs: 100
|
| 62 |
+
# constrain_similarities: true
|
2_projeto_rasa/credentials.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the credentials for the voice & chat platforms
|
| 2 |
+
# which your bot is using.
|
| 3 |
+
# https://rasa.com/docs/rasa/messaging-and-voice-channels
|
| 4 |
+
|
| 5 |
+
rest:
|
| 6 |
+
# # you don't need to provide anything here - this channel doesn't
|
| 7 |
+
# # require any credentials
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
#facebook:
|
| 11 |
+
# verify: "<verify>"
|
| 12 |
+
# secret: "<your secret>"
|
| 13 |
+
# page-access-token: "<your page access token>"
|
| 14 |
+
|
| 15 |
+
#slack:
|
| 16 |
+
# slack_token: "<your slack token>"
|
| 17 |
+
# slack_channel: "<the slack channel>"
|
| 18 |
+
# slack_signing_secret: "<your slack signing secret>"
|
| 19 |
+
|
| 20 |
+
#socketio:
|
| 21 |
+
# user_message_evt: <event name for user message>
|
| 22 |
+
# bot_message_evt: <event name for bot messages>
|
| 23 |
+
# session_persistence: <true/false>
|
| 24 |
+
|
| 25 |
+
#mattermost:
|
| 26 |
+
# url: "https://<mattermost instance>/api/v4"
|
| 27 |
+
# token: "<bot token>"
|
| 28 |
+
# webhook_url: "<callback URL>"
|
| 29 |
+
|
| 30 |
+
# This entry is needed if you are using Rasa Enterprise. The entry represents credentials
|
| 31 |
+
# for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
|
| 32 |
+
rasa:
|
| 33 |
+
url: "http://localhost:5002/api"
|
2_projeto_rasa/data/nlu.yml
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
nlu:
|
| 3 |
+
- intent: saudacao
|
| 4 |
+
examples: |
|
| 5 |
+
- Olá
|
| 6 |
+
- Hello
|
| 7 |
+
- Oi
|
| 8 |
+
- Tudo bem com você?
|
| 9 |
+
- Bom dia
|
| 10 |
+
- Boa tarde
|
| 11 |
+
- Boa noite
|
| 12 |
+
- Como vai?
|
| 13 |
+
- Tudo tranquilo?
|
| 14 |
+
- Alô
|
| 15 |
+
- Salve
|
| 16 |
+
- E aí
|
| 17 |
+
- Coé
|
| 18 |
+
- Como vão as coisas?
|
| 19 |
+
- Opa
|
| 20 |
+
- Como tá, meu chapa?
|
| 21 |
+
- Tranquilidade?
|
| 22 |
+
- Firmeza?
|
| 23 |
+
- Suave?
|
| 24 |
+
- Como você está?
|
| 25 |
+
- Eae
|
| 26 |
+
- Tudo certo?
|
| 27 |
+
- Como está?
|
| 28 |
+
- Suave irmão?
|
| 29 |
+
- Tudo na paz?
|
| 30 |
+
- Tudo em cima?
|
| 31 |
+
- Fala truta
|
| 32 |
+
- Oi, tudo bem?
|
| 33 |
+
- E aí, beleza?
|
| 34 |
+
- Tudo joia?
|
| 35 |
+
- Tudo bom?
|
| 36 |
+
- Fala aí!
|
| 37 |
+
- E aí, meu amigo?
|
| 38 |
+
- Tudo em ordem?
|
| 39 |
+
- E aí, tudo de boa?
|
| 40 |
+
- Como você está, meu camarada?
|
| 41 |
+
- E aí, mano?
|
| 42 |
+
- Tudo de boa?
|
| 43 |
+
- Ei, beleza?
|
| 44 |
+
- Ei, qual é a boa?
|
| 45 |
+
- Tudo tranquilo, véi?
|
| 46 |
+
- Como você tá, meu chapa?
|
| 47 |
+
- Ei, como tá a fita?
|
| 48 |
+
- Tudo no sapatinho?
|
| 49 |
+
- Tudo nos trinques?
|
| 50 |
+
- fala parceiro!
|
| 51 |
+
- Fala maninho!
|
| 52 |
+
- Boa tarde!
|
| 53 |
+
- Olá, preciso da sua ajuda
|
| 54 |
+
- Oi, preciso uma dica
|
| 55 |
+
- opa campeão
|
| 56 |
+
|
| 57 |
+
- intent: finalizar
|
| 58 |
+
examples: |
|
| 59 |
+
- Tchau
|
| 60 |
+
- Até mais
|
| 61 |
+
- Adeus
|
| 62 |
+
- Bye
|
| 63 |
+
- Até breve
|
| 64 |
+
- Era só isso
|
| 65 |
+
- Depois nos falamos
|
| 66 |
+
- Foi ótimo falar com você
|
| 67 |
+
- Fui
|
| 68 |
+
- Tudo de bom pra você
|
| 69 |
+
- Inté
|
| 70 |
+
- Cuide-se
|
| 71 |
+
- Tenha um dia maravilhoso
|
| 72 |
+
- Até a próxima
|
| 73 |
+
- Peace out
|
| 74 |
+
- Falou
|
| 75 |
+
- Depois eu volto
|
| 76 |
+
- Au revoir
|
| 77 |
+
- Até depois
|
| 78 |
+
- Nos falamos em breve
|
| 79 |
+
- Tchauzinho
|
| 80 |
+
- Abraços
|
| 81 |
+
- Sucesso!
|
| 82 |
+
- Se cuida
|
| 83 |
+
- Tchau por enquanto
|
| 84 |
+
- Adeus por agora
|
| 85 |
+
- Volto logo
|
| 86 |
+
- Até logo
|
| 87 |
+
- Beleza!
|
| 88 |
+
- Tô saindo
|
| 89 |
+
- Tô de boa
|
| 90 |
+
- É nóis
|
| 91 |
+
- É noix
|
| 92 |
+
- Vou nessa, valeu!
|
| 93 |
+
- Tamo junto
|
| 94 |
+
- É isso aí, meu chapa
|
| 95 |
+
- Bora lá
|
| 96 |
+
- Tamo aí
|
| 97 |
+
- Partiu
|
| 98 |
+
- Tchauzim
|
| 99 |
+
- Até a próxima, parceiro
|
| 100 |
+
- Tchau, meus consagrados
|
| 101 |
+
- Fica na paz
|
| 102 |
+
- Tenha um bom dia
|
| 103 |
+
- Tenha uma boa tarde
|
| 104 |
+
- Tenha uma boa noite
|
| 105 |
+
- falou
|
| 106 |
+
- valeu, falou
|
| 107 |
+
- tchau
|
| 108 |
+
- fui
|
| 109 |
+
- blz. falou
|
| 110 |
+
- até mais
|
| 111 |
+
|
| 112 |
+
- intent: agradecimento
|
| 113 |
+
examples: |
|
| 114 |
+
- Obrigado
|
| 115 |
+
- Valeu
|
| 116 |
+
- Show
|
| 117 |
+
- Beleza
|
| 118 |
+
- Maravilha
|
| 119 |
+
- Ótimo
|
| 120 |
+
- Perfeito
|
| 121 |
+
- Fechou
|
| 122 |
+
- Tranquilo
|
| 123 |
+
- Agradeço muito
|
| 124 |
+
- Grato
|
| 125 |
+
- Aprecio muito
|
| 126 |
+
- Muito obrigado!
|
| 127 |
+
- Agradecido!
|
| 128 |
+
- Obrigadão!
|
| 129 |
+
- Você é demais!
|
| 130 |
+
- Fico muito grato!
|
| 131 |
+
- Não tenho palavras!
|
| 132 |
+
- Agradeço de coração!
|
| 133 |
+
- Valeu mesmo!
|
| 134 |
+
- Sensacional!
|
| 135 |
+
- Não sei como te agradecer!
|
| 136 |
+
- Estou muito agradecido!
|
| 137 |
+
- Valeu, mano!
|
| 138 |
+
- Tamo junto, bro!
|
| 139 |
+
- Muito show, parceiro!
|
| 140 |
+
- Massa demais!
|
| 141 |
+
- Você é top, cara!
|
| 142 |
+
- Show de bola!
|
| 143 |
+
- Me salvou, véi!
|
| 144 |
+
- Mandou bem, brother!
|
| 145 |
+
- Arrasou, irmão!
|
| 146 |
+
- Sensa, mermão!
|
| 147 |
+
- Valeu horrores!
|
| 148 |
+
- Beleza, obrigado pela atenção!
|
| 149 |
+
- Você me ajudou muito, obrigado!
|
| 150 |
+
- Bom, obrigado por ser atencioso!
|
| 151 |
+
- Ajudou muito, obrigado!
|
| 152 |
+
- valeu pela ajuda
|
| 153 |
+
- valeu cara
|
| 154 |
+
|
| 155 |
+
- intent: out_of_scope
|
| 156 |
+
examples: |
|
| 157 |
+
- Quem é o presidente do Brasil?
|
| 158 |
+
- Qual o partido político comanda o Brasil?
|
| 159 |
+
- Qual a cotação do Euro?
|
| 160 |
+
- Sabe o resultado do jobo do Botafogo x São Paulo?
|
| 161 |
+
- Vai chover ou fazer sol hoje?
|
| 162 |
+
- Que dia da semana é hoje?
|
| 163 |
+
- Estou precisando de dinheiro, você me empresta?
|
| 164 |
+
- Qual o nome do governador do Rio de Janeiro?
|
| 165 |
+
- Onde posso encontrar uma cerveja gelada?
|
| 166 |
+
- Quero pedir comida
|
| 167 |
+
- Quanto é 2 + 2?
|
| 168 |
+
- Quem -e o presidente dos EUA?
|
| 169 |
+
- como faço pão?
|
| 170 |
+
- como posso comprar um caderno?
|
| 171 |
+
- como posso fazer um bolo?
|
| 172 |
+
- Quem foi Albert Einstein?
|
| 173 |
+
- Como posso adquirir um carro?
|
| 174 |
+
- O que é uma ditadura?
|
| 175 |
+
- Qual é o telefone da Detran do DF?
|
| 176 |
+
- Qual é o telefone de atendimento da SES DF?
|
| 177 |
+
- Como posso participar dessas promoções?
|
| 178 |
+
- Qual são os requisitos para participar dessas bolsas?
|
| 179 |
+
- Qual é o horário de atendimento?
|
| 180 |
+
- Qual é o significado da vida?
|
| 181 |
+
- Quais são as promoções dos supermercados?
|
| 182 |
+
- Tem atendimento todos os dias?
|
| 183 |
+
- Quanto é o valor da gasolina hoje em dia?
|
| 184 |
+
- Quanto trabalho é dedicado para essa tarefa?
|
| 185 |
+
- Como posso conseguir atendimento nesse lugar?
|
| 186 |
+
- Quais são as vantagens desses estudos?
|
| 187 |
+
- Que é racismo?
|
| 188 |
+
- ditadura
|
| 189 |
+
- comunismo?
|
| 190 |
+
- para essa tarefa?
|
| 191 |
+
- corajoso
|
| 192 |
+
- quanto ta o dolar?
|
| 193 |
+
- onde vc mora?
|
| 194 |
+
- quem é vc?
|
| 195 |
+
- onde vc ta?
|
| 196 |
+
- onde tem um salgado bom?
|
| 197 |
+
- quem é antonio jorge?
|
| 198 |
+
- onde fica o hospital mais proximo?
|
| 199 |
+
- qual o melhor computador?
|
| 200 |
+
- siri ou alexa?
|
| 201 |
+
- onde fica a farmacia mais proxima?
|
| 202 |
+
- qual app é o melhor?
|
| 203 |
+
- android ou ios?
|
| 204 |
+
- ps4 ou xbox?
|
| 205 |
+
- onde tem um medico aqui perto?
|
| 206 |
+
- quem é carlos freitas?
|
| 207 |
+
- como fazer um bolo?
|
| 208 |
+
- quem foi pelé?
|
| 209 |
+
- onde fazer tatuagem?
|
| 210 |
+
- quando a rainha elisabeth II morreu?
|
| 211 |
+
- quando a central it foi fundada?
|
| 212 |
+
- quando o brasil foi descoberto?
|
| 213 |
+
- quem sou eu?
|
| 214 |
+
- quando tem voo para os estados unidos?
|
| 215 |
+
- como aprender a programar?
|
| 216 |
+
- marque um medico para mim
|
| 217 |
+
- quanto custa uma viagem pro Ceará?
|
| 218 |
+
- Me conte uma piada!
|
| 219 |
+
- Qual é o sentido da vida?
|
| 220 |
+
- Quanto é 1 dividido por 0?
|
| 221 |
+
- Você acredita em alienígenas?
|
| 222 |
+
- Quem ganharia em uma luta, Superman ou Batman?
|
| 223 |
+
- O que é o amor?
|
| 224 |
+
- Você é um robô?
|
| 225 |
+
- Qual é o segredo da felicidade?
|
| 226 |
+
- Você pode fazer uma música?"
|
| 227 |
+
- Quem é o melhor jogador de futebol de todos os tempos?
|
| 228 |
+
- Você é inteligente?
|
| 229 |
+
- Você pode me ajudar a ganhar na loteria?
|
| 230 |
+
- Você gosta de filmes de ficção científica?
|
| 231 |
+
- Você pode me dar uma receita de bolo?
|
| 232 |
+
- O que você acha de inteligência artificial?
|
| 233 |
+
- Você pode me ajudar com meu dever de casa?
|
| 234 |
+
- Você sabe alguma língua estrangeira?
|
| 235 |
+
- Qual é o seu signo?
|
| 236 |
+
- Você assiste televisão?
|
| 237 |
+
- Já leu um livro?
|
| 238 |
+
- Acredita em fantasmas?
|
| 239 |
+
- Pode me dizer um segredo?
|
| 240 |
+
- Qual é o sentido da liberdade?
|
| 241 |
+
- Qual é o melhor lugar para viajar nas férias?
|
| 242 |
+
- Sabe tocar algum instrumento musical?
|
| 243 |
+
- Tem irmãos ou irmãs?
|
| 244 |
+
- O que você faria se ganhasse na loteria?
|
| 245 |
+
- Qual é o filme mais engraçado que você já viu?
|
| 246 |
+
- Gosta de esportes?
|
| 247 |
+
- Conhece alguma história de terror?
|
| 248 |
+
- Qual é o seu animal de estimação favorito?
|
| 249 |
+
- Sabe dançar?
|
| 250 |
+
- Qual é o seu prato de comida preferido?
|
| 251 |
+
- Já viajou para o espaço?
|
| 252 |
+
- O que você acha de viagens no tempo?
|
| 253 |
+
- Qual é o seu super-herói favorito?
|
| 254 |
+
- Acredita em vida em outros planetas?
|
| 255 |
+
- Pode me recomendar um livro?
|
| 256 |
+
- Você conhece algum truque de mágica?
|
| 257 |
+
- O que você faria se fosse invisível por um dia?
|
| 258 |
+
- Sapato
|
| 259 |
+
- Maçã
|
| 260 |
+
- Verde
|
| 261 |
+
- Rir
|
| 262 |
+
- Gato preto
|
| 263 |
+
- Lua cheia
|
| 264 |
+
- Nadar
|
| 265 |
+
- Fome
|
| 266 |
+
- Sorriso
|
| 267 |
+
- Montanha
|
| 268 |
+
- Música alta
|
| 269 |
+
- Inverno
|
| 270 |
+
- Livro vermelho
|
| 271 |
+
- Correr rápido
|
| 272 |
+
- Feliz
|
| 273 |
+
- Chuva leve
|
| 274 |
+
- Sonho grande
|
| 275 |
+
- Café quente
|
| 276 |
+
- Abraço apertado
|
| 277 |
+
- Mar calmo
|
| 278 |
+
- Pipa de papel
|
| 279 |
+
- Sapato azul
|
| 280 |
+
- Bola de futebol
|
| 281 |
+
- Dançar na chuva
|
| 282 |
+
- Café quente agora
|
| 283 |
+
- Livro de aventura
|
| 284 |
+
- Comer pizza grande
|
| 285 |
+
- Dia ensolarado amanhã
|
| 286 |
+
- Andar de bicicleta
|
| 287 |
+
- Música alta festa
|
| 288 |
+
- Praia no verão
|
| 289 |
+
- Estrelas no céu
|
| 290 |
+
- Trabalho em equipe
|
| 291 |
+
- Filme de ação
|
| 292 |
+
- Cão no parque
|
| 293 |
+
- Cantar no chuveiro
|
| 294 |
+
- Comer chocolate escuro
|
| 295 |
+
- Chuva forte hoje
|
| 296 |
+
- Correr pela manhã
|
| 297 |
+
- Pintura a óleo famosa
|
| 298 |
+
- Qual é o melhor lugar para viajar nas férias de verão?
|
| 299 |
+
- Conte-me sobre a história da Revolução Francesa.
|
| 300 |
+
- Como posso fazer um molho de tomate caseiro?
|
| 301 |
+
- Explique a teoria da relatividade de Einstein.
|
| 302 |
+
- Diga-me as etapas para criar um site responsivo.
|
| 303 |
+
- Qual é a receita de um coquetel de margarita clássico?
|
| 304 |
+
- Como posso configurar uma rede Wi-Fi segura em casa?
|
| 305 |
+
- Quais são os benefícios do yoga para a saúde?
|
| 306 |
+
- Como faço para planejar uma festa de aniversário memorável?
|
| 307 |
+
- O que é inteligência artificial e como funciona?
|
| 308 |
+
- Quais são os principais destinos turísticos da Europa?
|
| 309 |
+
- Explique a teoria da evolução de Charles Darwin.
|
| 310 |
+
- Como posso cultivar um jardim de vegetais em casa?
|
| 311 |
+
- O que são energias renováveis e por que são importantes?
|
| 312 |
+
- Quais são as técnicas de meditação mais eficazes?
|
| 313 |
+
- Qual é a diferença entre uma dieta cetogênica e uma dieta paleolítica?
|
| 314 |
+
- Quais são as etapas para criar um plano de negócios sólido?
|
| 315 |
+
- Como posso melhorar minhas habilidades de comunicação interpessoal?
|
| 316 |
+
- Explique o processo de fermentação na produção de cerveja.
|
| 317 |
+
- Como posso otimizar meu site para mecanismos de busca (SEO)?
|
| 318 |
+
- quem é o ministro da saude?
|
| 319 |
+
- quem foi o campeão?
|
| 320 |
+
- qual time foi campeão?
|
| 321 |
+
- vacina
|
| 322 |
+
- qual a música mais tocada no mundo?
|
| 323 |
+
- onde posso fazer natação?
|
| 324 |
+
- onde tem vacina em ceilandia?
|
2_projeto_rasa/data/rules.yml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
rules:
|
| 4 |
+
|
| 5 |
+
- rule: Desejar finalizar
|
| 6 |
+
steps:
|
| 7 |
+
- intent: finalizar
|
| 8 |
+
- action: utter_finalizar
|
| 9 |
+
|
| 10 |
+
- rule: out-of-scope #Se não expressa intenção de 'saudacao' ou 'finalizar' ou agradecimento, então é fora do escopo # out-of-scope
|
| 11 |
+
steps:
|
| 12 |
+
- intent: out_of_scope
|
| 13 |
+
- action: utter_out_of_scope
|
| 14 |
+
|
2_projeto_rasa/data/stories.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
stories:
|
| 4 |
+
|
| 5 |
+
- story: saudacao
|
| 6 |
+
steps:
|
| 7 |
+
- intent: saudacao
|
| 8 |
+
- action: utter_saudacao
|
| 9 |
+
- action: utter_disponivel
|
| 10 |
+
|
| 11 |
+
- story: agradecimento
|
| 12 |
+
steps:
|
| 13 |
+
- intent: agradecimento
|
| 14 |
+
- action: utter_agradecimento
|
| 15 |
+
- action: utter_disponivel
|
| 16 |
+
|
| 17 |
+
- story: finalizar atendimento
|
| 18 |
+
steps:
|
| 19 |
+
- intent: finalizar
|
| 20 |
+
- action: utter_finalizar
|
| 21 |
+
|
| 22 |
+
- story: out_of_scope
|
| 23 |
+
steps:
|
| 24 |
+
- intent: out_of_scope
|
| 25 |
+
- action: utter_out_of_scope
|
2_projeto_rasa/domain.yml
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '3.1'
|
| 2 |
+
intents:
|
| 3 |
+
- agradecimento
|
| 4 |
+
- finalizar
|
| 5 |
+
- out_of_scope
|
| 6 |
+
- saudacao
|
| 7 |
+
responses:
|
| 8 |
+
utter_saudacao:
|
| 9 |
+
- text: Seja bem vindo(a) ao atendimento AOQT!
|
| 10 |
+
- text: Bem vindo(a) ao atendimento AOQT!
|
| 11 |
+
- text: Seja bem-vindo(a)!
|
| 12 |
+
- text: Olá! É um prazer tê-lo(a) aqui no atendimento AOQT.
|
| 13 |
+
- text: Espero que esteja tendo um ótimo dia.
|
| 14 |
+
- text: Olá! É ótimo tê-lo(a) conosco.
|
| 15 |
+
utter_finalizar:
|
| 16 |
+
- text: |-
|
| 17 |
+
Agradecemos seu contato e esperamos revê-lo(a) brevemente!
|
| 18 |
+
Equipe AOQT.
|
| 19 |
+
- text: |-
|
| 20 |
+
Até breve!
|
| 21 |
+
Equipe AOQT.
|
| 22 |
+
- text: |-
|
| 23 |
+
Obrigado pelo contato!
|
| 24 |
+
Até breve - Equipe AOQT.
|
| 25 |
+
- text: |-
|
| 26 |
+
Espero lhe ver novamente!
|
| 27 |
+
Equipe AOQT.
|
| 28 |
+
- text: |-
|
| 29 |
+
Fico feliz em ajudar!
|
| 30 |
+
Equipe AOQT.
|
| 31 |
+
- text: Há algo mais que eu possa fazer por você?
|
| 32 |
+
- text: |-
|
| 33 |
+
Tenha um excelente dia!
|
| 34 |
+
Equipe AOQT.
|
| 35 |
+
- text: |-
|
| 36 |
+
Caso surja outra dúvida, não hesite em me contatar novamente!
|
| 37 |
+
Equipe AOQT.
|
| 38 |
+
- text: |-
|
| 39 |
+
Até mais! Se precisar de alguma coisa, estou aqui.
|
| 40 |
+
Equipe AOQT.
|
| 41 |
+
- text: |-
|
| 42 |
+
Até a próxima! Estou sempre à disposição.
|
| 43 |
+
Equipe AOQT.
|
| 44 |
+
- text: |-
|
| 45 |
+
Que bom saber! Se surgir alguma dúvida, é só perguntar.
|
| 46 |
+
Equipe AOQT.
|
| 47 |
+
- text: |-
|
| 48 |
+
Estou aqui para qualquer coisa que você precisar.
|
| 49 |
+
Equipe AOQT.
|
| 50 |
+
- text: |-
|
| 51 |
+
Estou à disposição, é só chamar.
|
| 52 |
+
Equipe AOQT.
|
| 53 |
+
- text: |-
|
| 54 |
+
Até mais! Se precisar de ajuda, estou por aqui.
|
| 55 |
+
Equipe AOQT.
|
| 56 |
+
- text: |-
|
| 57 |
+
Até a próxima! Estou sempre aqui.
|
| 58 |
+
Equipe AOQT.
|
| 59 |
+
utter_agradecimento:
|
| 60 |
+
- text: Disponha!
|
| 61 |
+
- text: Estou aqui para atendê-lo!
|
| 62 |
+
- text: Você é muito gentil!
|
| 63 |
+
- text: Não seja por isso.
|
| 64 |
+
- text: Conte comigo!
|
| 65 |
+
- text: É um prazer poder ser útil!
|
| 66 |
+
- text: Fico feliz em ter ajudado, sempre que precisar, estou aqui!
|
| 67 |
+
- text: Estou aqui para proporcionar a melhor experiência possível, obrigado pela sua mensagem!
|
| 68 |
+
- text: Fico feliz que tenha gostado do serviço, é sempre um prazer ajudar!
|
| 69 |
+
- text: Fico contente por ter sido útil, conte comigo sempre que precisar!
|
| 70 |
+
- text: É um prazer oferecer suporte excepcional, obrigado por escolher nossos serviços!
|
| 71 |
+
- text: De nada! Estou sempre aqui para ajudar.
|
| 72 |
+
- text: Não há de quê. Estou à disposição para auxiliar sempre que precisar.
|
| 73 |
+
- text: Obrigado(a) pelo seu agradecimento! É um prazer ajudar.
|
| 74 |
+
- text: Estou feliz por poder ajudar. Conte comigo!
|
| 75 |
+
- text: Foi um prazer poder ser útil. Estou à sua disposição.
|
| 76 |
+
- text: Fico contente por ter sido útil. Se precisar de mais alguma coisa, é só pedir!
|
| 77 |
+
utter_disponivel:
|
| 78 |
+
- text: Como posso ajudar?
|
| 79 |
+
- text: O que posso fazer por você?
|
| 80 |
+
- text: Estou à sua disposição!
|
| 81 |
+
- text: Será um prazer ajuda-lo(a).
|
| 82 |
+
- text: Como posso lhe ser útil?
|
| 83 |
+
- text: Caso tenha alguma dúvida, ficarei feliz em responde-la.
|
| 84 |
+
- text: Em que posso auxiliar hoje?
|
| 85 |
+
- text: Estou aqui para ajudar. Como posso ser útil?
|
| 86 |
+
- text: Fique à vontade para me fazer perguntas.
|
| 87 |
+
- text: Como posso tornar o seu dia mais fácil?
|
| 88 |
+
- text: Estou pronto para responder às suas perguntas.
|
| 89 |
+
- text: Qualquer coisa que você precisar, estou à disposição.
|
| 90 |
+
- text: Não hesite em me chamar se precisar de ajuda.
|
| 91 |
+
- text: Estou disponível para esclarecer suas dúvidas.
|
| 92 |
+
- text: Estou esperando suas perguntas. Como posso ajudar?
|
| 93 |
+
- text: Estou aqui para responder a qualquer dúvida que você tenha.
|
| 94 |
+
- text: Se você tiver alguma pergunta, não hesite em perguntar.
|
| 95 |
+
- text: Quais são as suas dúvidas? Estou pronto para responder.
|
| 96 |
+
- text: Como posso ajudar hoje?
|
| 97 |
+
- text: Em que posso lhe ser útil?
|
| 98 |
+
- text: Com o que gostaria de minha ajuda?
|
| 99 |
+
- text: Em que posso ajudar?
|
| 100 |
+
- text: Como posso ajudar você hoje?
|
| 101 |
+
- text: Em que posso ajudar nesse maravilhoso dia?
|
| 102 |
+
- text: Como posso ajudar hoje?
|
| 103 |
+
- text: Estou aqui para ajudar. Em que posso ser útil?
|
| 104 |
+
- text: Com o que gostaria da minha ajuda?
|
| 105 |
+
- text: Como posso ser útil a você hoje?
|
| 106 |
+
- text: Em que posso ser útil?
|
| 107 |
+
- text: Como posso tornar o seu dia mais fácil hoje?
|
| 108 |
+
- text: Em que posso ajudar inesse maravilhoso dia?
|
| 109 |
+
utter_out_of_scope:
|
| 110 |
+
- text: Não sei
|
| 111 |
+
session_config:
|
| 112 |
+
session_expiration_time: 60
|
| 113 |
+
carry_over_slots_to_new_session: true
|
| 114 |
+
actions:
|
| 115 |
+
- utter_out_of_scope
|
| 116 |
+
- utter_agradecimento
|
| 117 |
+
- utter_disponivel
|
| 118 |
+
- utter_saudacao
|
2_projeto_rasa/endpoints.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the different endpoints your bot can use.
|
| 2 |
+
|
| 3 |
+
# Server where the models are pulled from.
|
| 4 |
+
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
|
| 5 |
+
|
| 6 |
+
#models:
|
| 7 |
+
# url: http://my-server.com/models/default_core@latest
|
| 8 |
+
# wait_time_between_pulls: 10 # [optional](default: 100)
|
| 9 |
+
|
| 10 |
+
# Server which runs your custom actions.
|
| 11 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 12 |
+
|
| 13 |
+
#action_endpoint:
|
| 14 |
+
# url: "http://localhost:5055/webhook"
|
| 15 |
+
|
| 16 |
+
# Tracker store which is used to store the conversations.
|
| 17 |
+
# By default the conversations are stored in memory.
|
| 18 |
+
# https://rasa.com/docs/rasa/tracker-stores
|
| 19 |
+
|
| 20 |
+
#tracker_store:
|
| 21 |
+
# type: redis
|
| 22 |
+
# url: <host of the redis instance, e.g. localhost>
|
| 23 |
+
# port: <port of your redis instance, usually 6379>
|
| 24 |
+
# db: <number of your database within redis, e.g. 0>
|
| 25 |
+
# password: <password used for authentication>
|
| 26 |
+
# use_ssl: <whether or not the communication is encrypted, default false>
|
| 27 |
+
|
| 28 |
+
rest:
|
| 29 |
+
|
| 30 |
+
#tracker_store:
|
| 31 |
+
# type: mongod
|
| 32 |
+
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
|
| 33 |
+
# db: <name of the db within your mongo instance, e.g. rasa>
|
| 34 |
+
# username: <username used for authentication>
|
| 35 |
+
# password: <password used for authentication>
|
| 36 |
+
|
| 37 |
+
# Event broker which all conversation events should be streamed to.
|
| 38 |
+
# https://rasa.com/docs/rasa/event-brokers
|
| 39 |
+
|
| 40 |
+
#event_broker:
|
| 41 |
+
# url: localhost
|
| 42 |
+
# username: username
|
| 43 |
+
# password: password
|
| 44 |
+
# queue: queue
|
2_projeto_rasa/models/20231018-161031-obsolete-cap.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6178a4985a19b03710cdea78b7ee0725a8ff610e22dc3e0ab97dcf3ceeab7a8
|
| 3 |
+
size 33756645
|
2_projeto_rasa/tests/test_stories.yml
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### This file contains tests to evaluate that your bot behaves as expected.
|
| 2 |
+
#### If you want to learn more, please see the docs: https://rasa.com/docs/rasa/testing-your-assistant
|
| 3 |
+
|
| 4 |
+
stories:
|
| 5 |
+
- story: happy path 1
|
| 6 |
+
steps:
|
| 7 |
+
- user: |
|
| 8 |
+
hello there!
|
| 9 |
+
intent: greet
|
| 10 |
+
- action: utter_greet
|
| 11 |
+
- user: |
|
| 12 |
+
amazing
|
| 13 |
+
intent: mood_great
|
| 14 |
+
- action: utter_happy
|
| 15 |
+
|
| 16 |
+
- story: happy path 2
|
| 17 |
+
steps:
|
| 18 |
+
- user: |
|
| 19 |
+
hello there!
|
| 20 |
+
intent: greet
|
| 21 |
+
- action: utter_greet
|
| 22 |
+
- user: |
|
| 23 |
+
amazing
|
| 24 |
+
intent: mood_great
|
| 25 |
+
- action: utter_happy
|
| 26 |
+
- user: |
|
| 27 |
+
bye-bye!
|
| 28 |
+
intent: goodbye
|
| 29 |
+
- action: utter_goodbye
|
| 30 |
+
|
| 31 |
+
- story: sad path 1
|
| 32 |
+
steps:
|
| 33 |
+
- user: |
|
| 34 |
+
hello
|
| 35 |
+
intent: greet
|
| 36 |
+
- action: utter_greet
|
| 37 |
+
- user: |
|
| 38 |
+
not good
|
| 39 |
+
intent: mood_unhappy
|
| 40 |
+
- action: utter_cheer_up
|
| 41 |
+
- action: utter_did_that_help
|
| 42 |
+
- user: |
|
| 43 |
+
yes
|
| 44 |
+
intent: affirm
|
| 45 |
+
- action: utter_happy
|
| 46 |
+
|
| 47 |
+
- story: sad path 2
|
| 48 |
+
steps:
|
| 49 |
+
- user: |
|
| 50 |
+
hello
|
| 51 |
+
intent: greet
|
| 52 |
+
- action: utter_greet
|
| 53 |
+
- user: |
|
| 54 |
+
not good
|
| 55 |
+
intent: mood_unhappy
|
| 56 |
+
- action: utter_cheer_up
|
| 57 |
+
- action: utter_did_that_help
|
| 58 |
+
- user: |
|
| 59 |
+
not really
|
| 60 |
+
intent: deny
|
| 61 |
+
- action: utter_goodbye
|
| 62 |
+
|
| 63 |
+
- story: sad path 3
|
| 64 |
+
steps:
|
| 65 |
+
- user: |
|
| 66 |
+
hi
|
| 67 |
+
intent: greet
|
| 68 |
+
- action: utter_greet
|
| 69 |
+
- user: |
|
| 70 |
+
very terrible
|
| 71 |
+
intent: mood_unhappy
|
| 72 |
+
- action: utter_cheer_up
|
| 73 |
+
- action: utter_did_that_help
|
| 74 |
+
- user: |
|
| 75 |
+
no
|
| 76 |
+
intent: deny
|
| 77 |
+
- action: utter_goodbye
|
| 78 |
+
|
| 79 |
+
- story: say goodbye
|
| 80 |
+
steps:
|
| 81 |
+
- user: |
|
| 82 |
+
bye-bye!
|
| 83 |
+
intent: goodbye
|
| 84 |
+
- action: utter_goodbye
|
| 85 |
+
|
| 86 |
+
- story: bot challenge
|
| 87 |
+
steps:
|
| 88 |
+
- user: |
|
| 89 |
+
are you a bot?
|
| 90 |
+
intent: bot_challenge
|
| 91 |
+
- action: utter_iamabot
|
3_projeto_rasa/Readme_Steps_for_this_project.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# <h1 align="center">Tutorial básico do `rasa`</h1>
|
| 2 |
+
|
| 3 |
+
<font color="yellow">Data Scientist.: Dr.Eddy Giusepe Chirinos Isidro</font>
|
| 4 |
+
|
| 5 |
+
Os primeiros passos para este projeto básico, são:
|
| 6 |
+
|
| 7 |
+
Instalamos o rasa, assim:
|
| 8 |
+
|
| 9 |
+
* $ pip install rasa[full]
|
| 10 |
+
|
| 11 |
+
O seguinte comando irá trazer todos os arquivos do rasa:
|
| 12 |
+
* $ rasa init
|
| 13 |
+
|
| 14 |
+
Antes de treinar nosso Bot, uma boa prática é verificar se há alguma inconsistência nas histórias e regras, assim:
|
| 15 |
+
|
| 16 |
+
* $ rasa data validate
|
| 17 |
+
|
| 18 |
+
Para criar exemplos de treinamento:
|
| 19 |
+
|
| 20 |
+
* $ rasa interactive
|
| 21 |
+
|
| 22 |
+
Fazendo aquelas pequenas customizações, passamos a treinar nosso modelo, assim:
|
| 23 |
+
|
| 24 |
+
* $ rasa train
|
| 25 |
+
|
| 26 |
+
ou (adicionando nome do Modelo)
|
| 27 |
+
|
| 28 |
+
* $ rasa train --fixed-model-name contact_bot_Eddy
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
Depois de treinar o modelo, podemos passar o seguinte comando para interagir, na CLI, com o Bot, assim:
|
| 32 |
+
|
| 33 |
+
* $ rasa shell
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
<font color="red">OBS:</font>
|
| 37 |
+
|
| 38 |
+
Você pode usar o seguinte comando em alguma página web (eu ainda não usei isso):
|
| 39 |
+
|
| 40 |
+
* $ rasa run --enable-api --cors "*"
|
3_projeto_rasa/actions/__init__.py
ADDED
|
File without changes
|
3_projeto_rasa/actions/actions.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This files contains your custom actions which can be used to run
|
| 2 |
+
# custom Python code.
|
| 3 |
+
#
|
| 4 |
+
# See this guide on how to implement these action:
|
| 5 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# This is a simple example for a custom action which utters "Hello World!"
|
| 9 |
+
|
| 10 |
+
# from typing import Any, Text, Dict, List
|
| 11 |
+
#
|
| 12 |
+
# from rasa_sdk import Action, Tracker
|
| 13 |
+
# from rasa_sdk.executor import CollectingDispatcher
|
| 14 |
+
#
|
| 15 |
+
#
|
| 16 |
+
# class ActionHelloWorld(Action):
|
| 17 |
+
#
|
| 18 |
+
# def name(self) -> Text:
|
| 19 |
+
# return "action_hello_world"
|
| 20 |
+
#
|
| 21 |
+
# def run(self, dispatcher: CollectingDispatcher,
|
| 22 |
+
# tracker: Tracker,
|
| 23 |
+
# domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
|
| 24 |
+
#
|
| 25 |
+
# dispatcher.utter_message(text="Hello World!")
|
| 26 |
+
#
|
| 27 |
+
# return []
|
3_projeto_rasa/config.yml
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The config recipe.
|
| 2 |
+
# https://rasa.com/docs/rasa/model-configuration/
|
| 3 |
+
recipe: default.v1
|
| 4 |
+
|
| 5 |
+
# The assistant project unique identifier
|
| 6 |
+
# This default value must be replaced with a unique assistant name within your deployment
|
| 7 |
+
assistant_id: 20231011-235503-vertical-system
|
| 8 |
+
|
| 9 |
+
# Configuration for Rasa NLU.
|
| 10 |
+
# https://rasa.com/docs/rasa/nlu/components/
|
| 11 |
+
language: pt #en
|
| 12 |
+
|
| 13 |
+
pipeline:
|
| 14 |
+
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
|
| 15 |
+
# # If you'd like to customize it, uncomment and adjust the pipeline.
|
| 16 |
+
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
|
| 17 |
+
- name: WhitespaceTokenizer
|
| 18 |
+
- name: RegexFeaturizer
|
| 19 |
+
- name: LexicalSyntacticFeaturizer
|
| 20 |
+
- name: CountVectorsFeaturizer
|
| 21 |
+
- name: CountVectorsFeaturizer
|
| 22 |
+
analyzer: char_wb
|
| 23 |
+
min_ngram: 1
|
| 24 |
+
max_ngram: 4
|
| 25 |
+
lowercase: true
|
| 26 |
+
- name: DIETClassifier
|
| 27 |
+
epochs: 1000
|
| 28 |
+
constrain_similarities: true
|
| 29 |
+
- name: EntitySynonymMapper
|
| 30 |
+
- name: ResponseSelector
|
| 31 |
+
epochs: 500
|
| 32 |
+
constrain_similarities: true
|
| 33 |
+
- name: FallbackClassifier
|
| 34 |
+
threshold: 0.3
|
| 35 |
+
ambiguity_threshold: 0.1
|
| 36 |
+
|
| 37 |
+
# Configuration for Rasa Core.
|
| 38 |
+
# https://rasa.com/docs/rasa/core/policies/
|
| 39 |
+
policies:
|
| 40 |
+
# # No configuration for policies was provided. The following default policies were used to train your model.
|
| 41 |
+
# # If you'd like to customize them, uncomment and adjust the policies.
|
| 42 |
+
# # See https://rasa.com/docs/rasa/policies for more information.
|
| 43 |
+
- name: MemoizationPolicy
|
| 44 |
+
- name: RulePolicy
|
| 45 |
+
- name: UnexpecTEDIntentPolicy
|
| 46 |
+
max_history: 5
|
| 47 |
+
epochs: 100
|
| 48 |
+
- name: TEDPolicy
|
| 49 |
+
max_history: 5
|
| 50 |
+
epochs: 100
|
| 51 |
+
constrain_similarities: true
|
3_projeto_rasa/credentials.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the credentials for the voice & chat platforms
|
| 2 |
+
# which your bot is using.
|
| 3 |
+
# https://rasa.com/docs/rasa/messaging-and-voice-channels
|
| 4 |
+
|
| 5 |
+
rest:
|
| 6 |
+
# # you don't need to provide anything here - this channel doesn't
|
| 7 |
+
# # require any credentials
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
#facebook:
|
| 11 |
+
# verify: "<verify>"
|
| 12 |
+
# secret: "<your secret>"
|
| 13 |
+
# page-access-token: "<your page access token>"
|
| 14 |
+
|
| 15 |
+
#slack:
|
| 16 |
+
# slack_token: "<your slack token>"
|
| 17 |
+
# slack_channel: "<the slack channel>"
|
| 18 |
+
# slack_signing_secret: "<your slack signing secret>"
|
| 19 |
+
|
| 20 |
+
#socketio:
|
| 21 |
+
# user_message_evt: <event name for user message>
|
| 22 |
+
# bot_message_evt: <event name for bot messages>
|
| 23 |
+
# session_persistence: <true/false>
|
| 24 |
+
|
| 25 |
+
#mattermost:
|
| 26 |
+
# url: "https://<mattermost instance>/api/v4"
|
| 27 |
+
# token: "<bot token>"
|
| 28 |
+
# webhook_url: "<callback URL>"
|
| 29 |
+
|
| 30 |
+
# This entry is needed if you are using Rasa Enterprise. The entry represents credentials
|
| 31 |
+
# for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
|
| 32 |
+
rasa:
|
| 33 |
+
url: "http://localhost:5002/api"
|
3_projeto_rasa/data/nlu.yml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
nlu:
|
| 4 |
+
- intent: supply_contact_info
|
| 5 |
+
examples: |
|
| 6 |
+
- Meu nome é [John](name). Meu email é [john@gmail.com](email)
|
| 7 |
+
- nome: [David](name) email: [david@email.com](email)
|
| 8 |
+
- Sim, claro. Eu sou [Bárbara](name). Meu e-mail é [barbara@email.com](email).
|
| 9 |
+
- [Susan](name), [susan@email.com](email)
|
| 10 |
+
- Claro. Eu sou [Fred](name). Meu e-mail é [fred@email.com](email).
|
| 11 |
+
|
| 12 |
+
- intent: greet
|
| 13 |
+
examples: |
|
| 14 |
+
- ei
|
| 15 |
+
- olá
|
| 16 |
+
- oi
|
| 17 |
+
- bom dia
|
| 18 |
+
- boa noite
|
| 19 |
+
- vamos
|
| 20 |
+
- ei cara
|
| 21 |
+
- boa tarde
|
| 22 |
+
|
| 23 |
+
- intent: goodbye
|
| 24 |
+
examples: |
|
| 25 |
+
- Até!
|
| 26 |
+
- te vejo mais tarde
|
| 27 |
+
- tchau
|
| 28 |
+
- adeus
|
| 29 |
+
- tenha um bom dia
|
| 30 |
+
- Vejo você por aí
|
| 31 |
+
- Bye Bye
|
| 32 |
+
- até mais
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
- intent: bot_challenge
|
| 36 |
+
examples: |
|
| 37 |
+
- Você é um robô?
|
| 38 |
+
- Você é um humano?
|
| 39 |
+
- estou falando com um bot?
|
| 40 |
+
- estou falando com um humano?
|
3_projeto_rasa/data/rules.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
rules:
|
| 4 |
+
|
| 5 |
+
- rule: Diga adeus sempre que o usuário se despedir
|
| 6 |
+
steps:
|
| 7 |
+
- intent: goodbye
|
| 8 |
+
- action: utter_goodbye
|
| 9 |
+
|
| 10 |
+
- rule: Diga 'Eu sou um bot' sempre que o usuário desafiar
|
| 11 |
+
steps:
|
| 12 |
+
- intent: bot_challenge
|
| 13 |
+
- action: utter_iamabot
|
3_projeto_rasa/data/stories.yml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
stories:
|
| 4 |
+
- story: O usuário fornece informações do cliente
|
| 5 |
+
steps:
|
| 6 |
+
- intent: greet
|
| 7 |
+
- action: utter_ask_for_contact_info
|
| 8 |
+
- intent: supply_contact_info
|
| 9 |
+
entities:
|
| 10 |
+
- name
|
| 11 |
+
- email
|
| 12 |
+
- action: utter_acknowledge_provided_info
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
# - story: sad path 1
|
| 17 |
+
# steps:
|
| 18 |
+
# - intent: greet
|
| 19 |
+
# - action: utter_greet
|
| 20 |
+
# - intent: mood_unhappy
|
| 21 |
+
# - action: utter_cheer_up
|
| 22 |
+
# - action: utter_did_that_help
|
| 23 |
+
# - intent: affirm
|
| 24 |
+
# - action: utter_happy
|
| 25 |
+
|
| 26 |
+
# - story: sad path 2
|
| 27 |
+
# steps:
|
| 28 |
+
# - intent: greet
|
| 29 |
+
# - action: utter_greet
|
| 30 |
+
# - intent: mood_unhappy
|
| 31 |
+
# - action: utter_cheer_up
|
| 32 |
+
# - action: utter_did_that_help
|
| 33 |
+
# - intent: deny
|
| 34 |
+
# - action: utter_goodbye
|
3_projeto_rasa/domain.yml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
intents:
|
| 4 |
+
- supply_contact_info
|
| 5 |
+
- greet
|
| 6 |
+
- goodbye
|
| 7 |
+
- bot_challenge
|
| 8 |
+
|
| 9 |
+
entities:
|
| 10 |
+
- name
|
| 11 |
+
- email
|
| 12 |
+
|
| 13 |
+
slots:
|
| 14 |
+
name:
|
| 15 |
+
type: text
|
| 16 |
+
influence_conversation: true
|
| 17 |
+
mappings:
|
| 18 |
+
- type: from_entity
|
| 19 |
+
entity: name
|
| 20 |
+
email:
|
| 21 |
+
type: text
|
| 22 |
+
influence_conversation: true
|
| 23 |
+
mappings:
|
| 24 |
+
- type: from_entity
|
| 25 |
+
entity: email
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
responses:
|
| 29 |
+
utter_ask_for_contact_info:
|
| 30 |
+
- text: "Olá! Você poderia fornecer suas informações de contato?"
|
| 31 |
+
|
| 32 |
+
utter_acknowledge_provided_info:
|
| 33 |
+
- text: "Obrigado {name}! por fornecer suas informações!"
|
| 34 |
+
|
| 35 |
+
# utter_cheer_up:
|
| 36 |
+
# - text: "Here is something to cheer you up:"
|
| 37 |
+
# image: "https://i.imgur.com/nGF1K8f.jpg"
|
| 38 |
+
|
| 39 |
+
# utter_did_that_help:
|
| 40 |
+
# - text: "Did that help you?"
|
| 41 |
+
|
| 42 |
+
# utter_happy:
|
| 43 |
+
# - text: "Great, carry on!"
|
| 44 |
+
|
| 45 |
+
utter_goodbye:
|
| 46 |
+
- text: "Tchau"
|
| 47 |
+
|
| 48 |
+
utter_iamabot:
|
| 49 |
+
- text: "Eu sou um bot Eddy, desenvolvido por Rasa."
|
| 50 |
+
|
| 51 |
+
# session_config:
|
| 52 |
+
# session_expiration_time: 60
|
| 53 |
+
# carry_over_slots_to_new_session: true
|
3_projeto_rasa/endpoints.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the different endpoints your bot can use.
|
| 2 |
+
|
| 3 |
+
# Server where the models are pulled from.
|
| 4 |
+
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
|
| 5 |
+
|
| 6 |
+
#models:
|
| 7 |
+
# url: http://my-server.com/models/default_core@latest
|
| 8 |
+
# wait_time_between_pulls: 10 # [optional](default: 100)
|
| 9 |
+
|
| 10 |
+
# Server which runs your custom actions.
|
| 11 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 12 |
+
|
| 13 |
+
#action_endpoint:
|
| 14 |
+
# url: "http://localhost:5055/webhook"
|
| 15 |
+
|
| 16 |
+
# Tracker store which is used to store the conversations.
|
| 17 |
+
# By default the conversations are stored in memory.
|
| 18 |
+
# https://rasa.com/docs/rasa/tracker-stores
|
| 19 |
+
|
| 20 |
+
#tracker_store:
|
| 21 |
+
# type: redis
|
| 22 |
+
# url: <host of the redis instance, e.g. localhost>
|
| 23 |
+
# port: <port of your redis instance, usually 6379>
|
| 24 |
+
# db: <number of your database within redis, e.g. 0>
|
| 25 |
+
# password: <password used for authentication>
|
| 26 |
+
# use_ssl: <whether or not the communication is encrypted, default false>
|
| 27 |
+
|
| 28 |
+
#tracker_store:
|
| 29 |
+
# type: mongod
|
| 30 |
+
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
|
| 31 |
+
# db: <name of the db within your mongo instance, e.g. rasa>
|
| 32 |
+
# username: <username used for authentication>
|
| 33 |
+
# password: <password used for authentication>
|
| 34 |
+
|
| 35 |
+
# Event broker which all conversation events should be streamed to.
|
| 36 |
+
# https://rasa.com/docs/rasa/event-brokers
|
| 37 |
+
|
| 38 |
+
#event_broker:
|
| 39 |
+
# url: localhost
|
| 40 |
+
# username: username
|
| 41 |
+
# password: password
|
| 42 |
+
# queue: queue
|
3_projeto_rasa/tests/test_stories.yml
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### This file contains tests to evaluate that your bot behaves as expected.
|
| 2 |
+
#### If you want to learn more, please see the docs: https://rasa.com/docs/rasa/testing-your-assistant
|
| 3 |
+
|
| 4 |
+
stories:
|
| 5 |
+
- story: happy path 1
|
| 6 |
+
steps:
|
| 7 |
+
- user: |
|
| 8 |
+
hello there!
|
| 9 |
+
intent: greet
|
| 10 |
+
- action: utter_greet
|
| 11 |
+
- user: |
|
| 12 |
+
amazing
|
| 13 |
+
intent: mood_great
|
| 14 |
+
- action: utter_happy
|
| 15 |
+
|
| 16 |
+
- story: happy path 2
|
| 17 |
+
steps:
|
| 18 |
+
- user: |
|
| 19 |
+
hello there!
|
| 20 |
+
intent: greet
|
| 21 |
+
- action: utter_greet
|
| 22 |
+
- user: |
|
| 23 |
+
amazing
|
| 24 |
+
intent: mood_great
|
| 25 |
+
- action: utter_happy
|
| 26 |
+
- user: |
|
| 27 |
+
bye-bye!
|
| 28 |
+
intent: goodbye
|
| 29 |
+
- action: utter_goodbye
|
| 30 |
+
|
| 31 |
+
- story: sad path 1
|
| 32 |
+
steps:
|
| 33 |
+
- user: |
|
| 34 |
+
hello
|
| 35 |
+
intent: greet
|
| 36 |
+
- action: utter_greet
|
| 37 |
+
- user: |
|
| 38 |
+
not good
|
| 39 |
+
intent: mood_unhappy
|
| 40 |
+
- action: utter_cheer_up
|
| 41 |
+
- action: utter_did_that_help
|
| 42 |
+
- user: |
|
| 43 |
+
yes
|
| 44 |
+
intent: affirm
|
| 45 |
+
- action: utter_happy
|
| 46 |
+
|
| 47 |
+
- story: sad path 2
|
| 48 |
+
steps:
|
| 49 |
+
- user: |
|
| 50 |
+
hello
|
| 51 |
+
intent: greet
|
| 52 |
+
- action: utter_greet
|
| 53 |
+
- user: |
|
| 54 |
+
not good
|
| 55 |
+
intent: mood_unhappy
|
| 56 |
+
- action: utter_cheer_up
|
| 57 |
+
- action: utter_did_that_help
|
| 58 |
+
- user: |
|
| 59 |
+
not really
|
| 60 |
+
intent: deny
|
| 61 |
+
- action: utter_goodbye
|
| 62 |
+
|
| 63 |
+
- story: sad path 3
|
| 64 |
+
steps:
|
| 65 |
+
- user: |
|
| 66 |
+
hi
|
| 67 |
+
intent: greet
|
| 68 |
+
- action: utter_greet
|
| 69 |
+
- user: |
|
| 70 |
+
very terrible
|
| 71 |
+
intent: mood_unhappy
|
| 72 |
+
- action: utter_cheer_up
|
| 73 |
+
- action: utter_did_that_help
|
| 74 |
+
- user: |
|
| 75 |
+
no
|
| 76 |
+
intent: deny
|
| 77 |
+
- action: utter_goodbye
|
| 78 |
+
|
| 79 |
+
- story: say goodbye
|
| 80 |
+
steps:
|
| 81 |
+
- user: |
|
| 82 |
+
bye-bye!
|
| 83 |
+
intent: goodbye
|
| 84 |
+
- action: utter_goodbye
|
| 85 |
+
|
| 86 |
+
- story: bot challenge
|
| 87 |
+
steps:
|
| 88 |
+
- user: |
|
| 89 |
+
are you a bot?
|
| 90 |
+
intent: bot_challenge
|
| 91 |
+
- action: utter_iamabot
|
4_projeto_rasa_DOCKER/.config/rasa/global.yml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
metrics:
|
| 2 |
+
enabled: true
|
| 3 |
+
rasa_user_id: 7dce037b120945a19c8b43374467258b
|
| 4 |
+
date: 2023-10-18 02:20:54.739289
|
4_projeto_rasa_DOCKER/Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Imagem Oficial do rasa:
|
| 2 |
+
FROM rasa/rasa:3.7.0a1-full
|
| 3 |
+
|
| 4 |
+
# Diretório de trabalho para o diretório do aplicativo Rasa:
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Mude para usuário root para baixar o modelo spaCy:
|
| 8 |
+
USER root
|
| 9 |
+
RUN python -m spacy download pt_core_news_lg
|
| 10 |
+
# Voltar para usuário não root
|
| 11 |
+
USER 1001
|
| 12 |
+
|
| 13 |
+
# Copie os arquivos do seu projeto Rasa para o contêiner:
|
| 14 |
+
COPY . /app
|
| 15 |
+
|
| 16 |
+
# Exponha a porta na qual o Rasa deve ser executado (o padrão é 5005):
|
| 17 |
+
EXPOSE 5005
|
| 18 |
+
|
| 19 |
+
# Defina o comando para executar o servidor Rasa:
|
| 20 |
+
CMD ["run", "-m", "models", "--enable-api", "--cors", "*", "--debug"]
|
4_projeto_rasa_DOCKER/actions/__init__.py
ADDED
|
File without changes
|
4_projeto_rasa_DOCKER/actions/actions.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This files contains your custom actions which can be used to run
|
| 2 |
+
# custom Python code.
|
| 3 |
+
#
|
| 4 |
+
# See this guide on how to implement these action:
|
| 5 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# This is a simple example for a custom action which utters "Hello World!"
|
| 9 |
+
|
| 10 |
+
# from typing import Any, Text, Dict, List
|
| 11 |
+
#
|
| 12 |
+
# from rasa_sdk import Action, Tracker
|
| 13 |
+
# from rasa_sdk.executor import CollectingDispatcher
|
| 14 |
+
#
|
| 15 |
+
#
|
| 16 |
+
# class ActionHelloWorld(Action):
|
| 17 |
+
#
|
| 18 |
+
# def name(self) -> Text:
|
| 19 |
+
# return "action_hello_world"
|
| 20 |
+
#
|
| 21 |
+
# def run(self, dispatcher: CollectingDispatcher,
|
| 22 |
+
# tracker: Tracker,
|
| 23 |
+
# domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
|
| 24 |
+
#
|
| 25 |
+
# dispatcher.utter_message(text="Hello World!")
|
| 26 |
+
#
|
| 27 |
+
# return []
|
4_projeto_rasa_DOCKER/config.yml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The config recipe.
|
| 2 |
+
# https://rasa.com/docs/rasa/model-configuration/
|
| 3 |
+
recipe: default.v1
|
| 4 |
+
|
| 5 |
+
# The assistant project unique identifier
|
| 6 |
+
# This default value must be replaced with a unique assistant name within your deployment
|
| 7 |
+
assistant_id: 20231010-203208-bold-gymnast
|
| 8 |
+
|
| 9 |
+
# Configuration for Rasa NLU.
|
| 10 |
+
# https://rasa.com/docs/rasa/nlu/components/
|
| 11 |
+
language: pt
|
| 12 |
+
|
| 13 |
+
pipeline:
|
| 14 |
+
- name: "SpacyNLP"
|
| 15 |
+
model: "pt_core_news_lg"
|
| 16 |
+
case_sensitive: false
|
| 17 |
+
- name: SpacyTokenizer
|
| 18 |
+
- name: SpacyFeaturizer
|
| 19 |
+
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
|
| 20 |
+
# # If you'd like to customize it, uncomment and adjust the pipeline.
|
| 21 |
+
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
|
| 22 |
+
#- name: WhitespaceTokenizer
|
| 23 |
+
- name: RegexFeaturizer
|
| 24 |
+
"case_sensitive": false
|
| 25 |
+
"use_word_boundaries": true
|
| 26 |
+
- name: LexicalSyntacticFeaturizer
|
| 27 |
+
#- name: CountVectorsFeaturizer
|
| 28 |
+
- name: CountVectorsFeaturizer
|
| 29 |
+
analyzer: char_wb
|
| 30 |
+
min_ngram: 1
|
| 31 |
+
max_ngram: 4
|
| 32 |
+
- name: DIETClassifier
|
| 33 |
+
epochs: 1000
|
| 34 |
+
constrain_similarities: true
|
| 35 |
+
- name: EntitySynonymMapper
|
| 36 |
+
- name: ResponseSelector
|
| 37 |
+
epochs: 500
|
| 38 |
+
constrain_similarities: true
|
| 39 |
+
# Use a classe de intenção nlu_fallback se outras confidences de intenção forem inferiores a "threshold" (padrão 0,3)
|
| 40 |
+
# ou não mais distantes que "ambiguity_threshold" (padrão 0,1).
|
| 41 |
+
- name: FallbackClassifier
|
| 42 |
+
threshold: 0.85
|
| 43 |
+
ambiguity_threshold: 0.1
|
| 44 |
+
|
| 45 |
+
# Configuration for Rasa Core.
|
| 46 |
+
# https://rasa.com/docs/rasa/core/policies/
|
| 47 |
+
policies:
|
| 48 |
+
# # No configuration for policies was provided. The following default policies were used to train your model.
|
| 49 |
+
# # If you'd like to customize them, uncomment and adjust the policies.
|
| 50 |
+
# # See https://rasa.com/docs/rasa/policies for more information.
|
| 51 |
+
- name: MemoizationPolicy
|
| 52 |
+
- name: RulePolicy
|
| 53 |
+
- name: UnexpecTEDIntentPolicy
|
| 54 |
+
max_history: 5
|
| 55 |
+
epochs: 300
|
| 56 |
+
- name: TEDPolicy
|
| 57 |
+
max_history: 5
|
| 58 |
+
epochs: 300
|
| 59 |
+
constrain_similarities: true
|
| 60 |
+
entity_recognition: false
|
| 61 |
+
#tensorboard_log_directory: ./results/
|
4_projeto_rasa_DOCKER/credentials.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the credentials for the voice & chat platforms
|
| 2 |
+
# which your bot is using.
|
| 3 |
+
# https://rasa.com/docs/rasa/messaging-and-voice-channels
|
| 4 |
+
|
| 5 |
+
rest:
|
| 6 |
+
# # you don't need to provide anything here - this channel doesn't
|
| 7 |
+
# # require any credentials
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
#facebook:
|
| 11 |
+
# verify: "<verify>"
|
| 12 |
+
# secret: "<your secret>"
|
| 13 |
+
# page-access-token: "<your page access token>"
|
| 14 |
+
|
| 15 |
+
#slack:
|
| 16 |
+
# slack_token: "<your slack token>"
|
| 17 |
+
# slack_channel: "<the slack channel>"
|
| 18 |
+
# slack_signing_secret: "<your slack signing secret>"
|
| 19 |
+
|
| 20 |
+
#socketio:
|
| 21 |
+
# user_message_evt: <event name for user message>
|
| 22 |
+
# bot_message_evt: <event name for bot messages>
|
| 23 |
+
# session_persistence: <true/false>
|
| 24 |
+
|
| 25 |
+
#mattermost:
|
| 26 |
+
# url: "https://<mattermost instance>/api/v4"
|
| 27 |
+
# token: "<bot token>"
|
| 28 |
+
# webhook_url: "<callback URL>"
|
| 29 |
+
|
| 30 |
+
# This entry is needed if you are using Rasa Enterprise. The entry represents credentials
|
| 31 |
+
# for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
|
| 32 |
+
rasa:
|
| 33 |
+
url: "http://localhost:5002/api"
|
4_projeto_rasa_DOCKER/data/nlu.yml
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
nlu:
|
| 3 |
+
- intent: saudacao
|
| 4 |
+
examples: |
|
| 5 |
+
- Olá
|
| 6 |
+
- Hello
|
| 7 |
+
- Oi
|
| 8 |
+
- Tudo bem com você?
|
| 9 |
+
- Bom dia
|
| 10 |
+
- Boa tarde
|
| 11 |
+
- Boa noite
|
| 12 |
+
- Como vai?
|
| 13 |
+
- Tudo tranquilo?
|
| 14 |
+
- Alô
|
| 15 |
+
- Salve
|
| 16 |
+
- E aí
|
| 17 |
+
- Coé
|
| 18 |
+
- Como vão as coisas?
|
| 19 |
+
- Opa
|
| 20 |
+
- Como tá, meu chapa?
|
| 21 |
+
- Tranquilidade?
|
| 22 |
+
- Firmeza?
|
| 23 |
+
- Suave?
|
| 24 |
+
- Como você está?
|
| 25 |
+
- Eae
|
| 26 |
+
- Tudo certo?
|
| 27 |
+
- Como está?
|
| 28 |
+
- Suave irmão?
|
| 29 |
+
- Tudo na paz?
|
| 30 |
+
- Tudo em cima?
|
| 31 |
+
- Fala truta
|
| 32 |
+
- Oi, tudo bem?
|
| 33 |
+
- E aí, beleza?
|
| 34 |
+
- Tudo joia?
|
| 35 |
+
- Tudo bom?
|
| 36 |
+
- Fala aí!
|
| 37 |
+
- E aí, meu amigo?
|
| 38 |
+
- Tudo em ordem?
|
| 39 |
+
- E aí, tudo de boa?
|
| 40 |
+
- Como você está, meu camarada?
|
| 41 |
+
- E aí, mano?
|
| 42 |
+
- Tudo de boa?
|
| 43 |
+
- Ei, beleza?
|
| 44 |
+
- Ei, qual é a boa?
|
| 45 |
+
- Tudo tranquilo, véi?
|
| 46 |
+
- Como você tá, meu chapa?
|
| 47 |
+
- Ei, como tá a fita?
|
| 48 |
+
- Tudo no sapatinho?
|
| 49 |
+
- Tudo nos trinques?
|
| 50 |
+
- fala parceiro!
|
| 51 |
+
- Fala maninho!
|
| 52 |
+
- Boa tarde!
|
| 53 |
+
- Olá, preciso da sua ajuda
|
| 54 |
+
- intent: finalizar
|
| 55 |
+
examples: |
|
| 56 |
+
- Tchau
|
| 57 |
+
- Até mais
|
| 58 |
+
- Adeus
|
| 59 |
+
- Bye
|
| 60 |
+
- Até breve
|
| 61 |
+
- Era só isso
|
| 62 |
+
- Depois nos falamos
|
| 63 |
+
- Foi ótimo falar com você
|
| 64 |
+
- Fui
|
| 65 |
+
- Tudo de bom pra você
|
| 66 |
+
- Inté
|
| 67 |
+
- Cuide-se
|
| 68 |
+
- Tenha um dia maravilhoso
|
| 69 |
+
- Até a próxima
|
| 70 |
+
- Peace out
|
| 71 |
+
- Falou
|
| 72 |
+
- Depois eu volto
|
| 73 |
+
- Au revoir
|
| 74 |
+
- Até depois
|
| 75 |
+
- Nos falamos em breve
|
| 76 |
+
- Tchauzinho
|
| 77 |
+
- Abraços
|
| 78 |
+
- Sucesso!
|
| 79 |
+
- Se cuida
|
| 80 |
+
- Tchau por enquanto
|
| 81 |
+
- Adeus por agora
|
| 82 |
+
- Volto logo
|
| 83 |
+
- Até logo
|
| 84 |
+
- Beleza!
|
| 85 |
+
- Tô saindo
|
| 86 |
+
- Tô de boa
|
| 87 |
+
- É nóis
|
| 88 |
+
- É noix
|
| 89 |
+
- Vou nessa, valeu!
|
| 90 |
+
- Tamo junto
|
| 91 |
+
- É isso aí, meu chapa
|
| 92 |
+
- Bora lá
|
| 93 |
+
- Tamo aí
|
| 94 |
+
- Partiu
|
| 95 |
+
- Tchauzim
|
| 96 |
+
- Até a próxima, parceiro
|
| 97 |
+
- Tchau, meus consagrados
|
| 98 |
+
- Fica na paz
|
| 99 |
+
- Tenha um bom dia
|
| 100 |
+
- Tenha uma boa tarde
|
| 101 |
+
- Tenha uma boa noite
|
| 102 |
+
- intent: agradecimento
|
| 103 |
+
examples: |
|
| 104 |
+
- Obrigado
|
| 105 |
+
- Valeu
|
| 106 |
+
- Show
|
| 107 |
+
- Beleza
|
| 108 |
+
- Maravilha
|
| 109 |
+
- Ótimo
|
| 110 |
+
- Perfeito
|
| 111 |
+
- Fechou
|
| 112 |
+
- Tranquilo
|
| 113 |
+
- Agradeço muito
|
| 114 |
+
- Grato
|
| 115 |
+
- Aprecio muito
|
| 116 |
+
- Muito obrigado!
|
| 117 |
+
- Agradecido!
|
| 118 |
+
- Obrigadão!
|
| 119 |
+
- Você é demais!
|
| 120 |
+
- Fico muito grato!
|
| 121 |
+
- Não tenho palavras!
|
| 122 |
+
- Agradeço de coração!
|
| 123 |
+
- Valeu mesmo!
|
| 124 |
+
- Sensacional!
|
| 125 |
+
- Não sei como te agradecer!
|
| 126 |
+
- Estou muito agradecido!
|
| 127 |
+
- Valeu, mano!
|
| 128 |
+
- Tamo junto, bro!
|
| 129 |
+
- Muito show, parceiro!
|
| 130 |
+
- Massa demais!
|
| 131 |
+
- Você é top, cara!
|
| 132 |
+
- Show de bola!
|
| 133 |
+
- Me salvou, véi!
|
| 134 |
+
- Mandou bem, brother!
|
| 135 |
+
- Arrasou, irmão!
|
| 136 |
+
- Sensa, mermão!
|
| 137 |
+
- Valeu horrores!
|
| 138 |
+
- Beleza, obrigado pela atenção!
|
| 139 |
+
- Você me ajudo muito, obrigado!
|
| 140 |
+
- intent: out_of_scope
|
| 141 |
+
examples: |
|
| 142 |
+
- Quem é o presidente do Brasil?
|
| 143 |
+
- Qual o partido político comanda o Brasil?
|
| 144 |
+
- Qual a cotação do Euro?
|
| 145 |
+
- Sabe o resultado do jobo do Botafogo x São Paulo?
|
| 146 |
+
- Vai chover ou fazer sol hoje?
|
| 147 |
+
- Que dia da semana é hoje?
|
| 148 |
+
- Estou precisando de dinheiro, você me empresta?
|
| 149 |
+
- Qual o nome do governador do Rio de Janeiro?
|
| 150 |
+
- Onde posso encontrar uma cerveja gelada?
|
| 151 |
+
- quem é pele?
|
| 152 |
+
- Quero pedir comida
|
| 153 |
+
- Quanto é 2 + 2?
|
| 154 |
+
- Quem -e o presidente dos EUA?
|
| 155 |
+
- como faço pão?
|
| 156 |
+
- como posso comprar um caderno?
|
| 157 |
+
- Quais são as vantagens desses estudos?
|
4_projeto_rasa_DOCKER/data/rules.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
rules:
|
| 4 |
+
|
| 5 |
+
- rule: Desejar finalizar
|
| 6 |
+
steps:
|
| 7 |
+
- intent: finalizar
|
| 8 |
+
- action: utter_finalizar
|
| 9 |
+
|
| 10 |
+
- rule: out-of-scope #Se não expressa intenção de 'saudacao' ou 'finalizar' ou agradecimento, então é fora do escopo
|
| 11 |
+
steps:
|
| 12 |
+
- intent: out_of_scope
|
| 13 |
+
- action: utter_out_of_scope
|
| 14 |
+
|
| 15 |
+
# - rule: peça ao usuário para reformular sempre que enviar uma mensagem com baixa confiança de NLU
|
| 16 |
+
# steps:
|
| 17 |
+
# - intent: nlu_fallback
|
| 18 |
+
# - action: utter_please_rephrase
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
# version: "3.1"
|
| 22 |
+
|
| 23 |
+
# rules:
|
| 24 |
+
|
| 25 |
+
# - rule: Say goodbye anytime the user says goodbye
|
| 26 |
+
# steps:
|
| 27 |
+
# - intent: goodbye
|
| 28 |
+
# - action: utter_goodbye
|
| 29 |
+
|
| 30 |
+
# - rule: Say 'I am a bot' anytime the user challenges
|
| 31 |
+
# steps:
|
| 32 |
+
# - intent: bot_challenge
|
| 33 |
+
# - action: utter_iamabot
|
4_projeto_rasa_DOCKER/data/stories.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.1"
|
| 2 |
+
|
| 3 |
+
stories:
|
| 4 |
+
|
| 5 |
+
- story: saudacao
|
| 6 |
+
steps:
|
| 7 |
+
- intent: saudacao
|
| 8 |
+
- action: utter_saudacao
|
| 9 |
+
- action: utter_disponivel
|
| 10 |
+
|
| 11 |
+
- story: agradecimento
|
| 12 |
+
steps:
|
| 13 |
+
- intent: agradecimento
|
| 14 |
+
- action: utter_agradecimento
|
| 15 |
+
- action: utter_disponivel
|
| 16 |
+
|
| 17 |
+
- story: finalizar atendimento
|
| 18 |
+
steps:
|
| 19 |
+
- intent: finalizar
|
| 20 |
+
- action: utter_finalizar
|
| 21 |
+
|
| 22 |
+
- story: out_of_scope
|
| 23 |
+
steps:
|
| 24 |
+
- intent: out_of_scope
|
| 25 |
+
- action: utter_out_of_scope
|
| 26 |
+
|
4_projeto_rasa_DOCKER/docker-compose.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '3.0'
|
| 2 |
+
services:
|
| 3 |
+
rasa:
|
| 4 |
+
image: rasa/rasa:3.7.0a1-full
|
| 5 |
+
ports:
|
| 6 |
+
- 5005:5005
|
| 7 |
+
volumes:
|
| 8 |
+
- ./rasa_ChatBot:/app
|
| 9 |
+
command:
|
| 10 |
+
- run
|
4_projeto_rasa_DOCKER/domain.yml
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '3.1'
|
| 2 |
+
intents:
|
| 3 |
+
- agradecimento
|
| 4 |
+
- finalizar
|
| 5 |
+
- out_of_scope
|
| 6 |
+
- saudacao
|
| 7 |
+
responses:
|
| 8 |
+
utter_saudacao:
|
| 9 |
+
- text: Seja bem vindo(a) ao atendimento AOQT!
|
| 10 |
+
- text: Bem vindo(a) ao atendimento AOQT!
|
| 11 |
+
- text: Seja bem-vindo(a)!
|
| 12 |
+
- text: Olá! É um prazer tê-lo(a) aqui no atendimento AOQT.
|
| 13 |
+
- text: Espero que esteja tendo um ótimo dia.
|
| 14 |
+
- text: Olá! É ótimo tê-lo(a) conosco.
|
| 15 |
+
utter_finalizar:
|
| 16 |
+
- text: |-
|
| 17 |
+
Agradecemos seu contato e esperamos revê-lo(a) brevemente!
|
| 18 |
+
Equipe AOQT.
|
| 19 |
+
- text: |-
|
| 20 |
+
Até breve!
|
| 21 |
+
Equipe AOQT.
|
| 22 |
+
- text: |-
|
| 23 |
+
Obrigado pelo contato!
|
| 24 |
+
Até breve - Equipe AOQT.
|
| 25 |
+
- text: |-
|
| 26 |
+
Espero lhe ver novamente!
|
| 27 |
+
Equipe AOQT.
|
| 28 |
+
- text: |-
|
| 29 |
+
Fico feliz em ajudar!
|
| 30 |
+
Equipe AOQT.
|
| 31 |
+
- text: Há algo mais que eu possa fazer por você?
|
| 32 |
+
- text: |-
|
| 33 |
+
Tenha um exelente dia!
|
| 34 |
+
Equipe AOQT.
|
| 35 |
+
- text: |-
|
| 36 |
+
Caso surja outra dúvida, não hesite em me contatar novamente!
|
| 37 |
+
Equipe AOQT.
|
| 38 |
+
- text: |-
|
| 39 |
+
Até mais! Se precisar de alguma coisa, estou aqui.
|
| 40 |
+
Equipe AOQT.
|
| 41 |
+
- text: |-
|
| 42 |
+
Até a próxima! Estou sempre à disposição.
|
| 43 |
+
Equipe AOQT.
|
| 44 |
+
- text: |-
|
| 45 |
+
Que bom saber! Se surgir alguma dúvida, é só perguntar.
|
| 46 |
+
Equipe AOQT.
|
| 47 |
+
- text: |-
|
| 48 |
+
Estou aqui para qualquer coisa que você precisar.
|
| 49 |
+
Equipe AOQT.
|
| 50 |
+
- text: |-
|
| 51 |
+
Estou à disposição, é só chamar.
|
| 52 |
+
Equipe AOQT.
|
| 53 |
+
- text: |-
|
| 54 |
+
Até mais! Se precisar de ajuda, estou por aqui.
|
| 55 |
+
Equipe AOQT.
|
| 56 |
+
- text: |-
|
| 57 |
+
Até a próxima! Estou sempre aqui.
|
| 58 |
+
Equipe AOQT.
|
| 59 |
+
utter_agradecimento:
|
| 60 |
+
- text: Disponha!
|
| 61 |
+
- text: Estou aqui para atendê-lo!
|
| 62 |
+
- text: Você é muito gentil!
|
| 63 |
+
- text: Não seja por isso.
|
| 64 |
+
- text: Conte comigo!
|
| 65 |
+
- text: É um prazer poder ser útil!
|
| 66 |
+
- text: Fico feliz em ter ajudado, sempre que precisar, estou aqui!
|
| 67 |
+
- text: Estou aqui para proporcionar a melhor experiência possível, obrigado pela sua mensagem!
|
| 68 |
+
- text: Fico feliz que tenha gostado do serviço, é sempre um prazer ajudar!
|
| 69 |
+
- text: Fico contente por ter sido útil, conte comigo sempre que precisar!
|
| 70 |
+
- text: É um prazer oferecer suporte excepcional, obrigado por escolher nossos serviços!
|
| 71 |
+
- text: De nada! Estou sempre aqui para ajudar.
|
| 72 |
+
- text: Não há de quê. Estou à disposição para auxiliar sempre que precisar.
|
| 73 |
+
- text: Obrigado(a) pelo seu agradecimento! É um prazer ajudar.
|
| 74 |
+
- text: Estou feliz por poder ajudar. Conte comigo!
|
| 75 |
+
- text: Foi um prazer poder ser útil. Estou à sua disposição.
|
| 76 |
+
- text: Fico contente por ter sido útil. Se precisar de mais alguma coisa, é só pedir!
|
| 77 |
+
utter_disponivel:
|
| 78 |
+
- text: Como posso ajudar?
|
| 79 |
+
- text: O que posso fazer por você?
|
| 80 |
+
- text: Estou à sua disposição!
|
| 81 |
+
- text: Será um prazer ajuda-lo(a).
|
| 82 |
+
- text: Como posso lhe ser útil?
|
| 83 |
+
- text: Caso tenha alguma dúvida, ficarei feliz em responde-la.
|
| 84 |
+
- text: Em que posso auxiliar hoje?
|
| 85 |
+
- text: Estou aqui para ajudar. Como posso ser útil?
|
| 86 |
+
- text: Fique à vontade para me fazer perguntas.
|
| 87 |
+
- text: Como posso tornar o seu dia mais fácil?
|
| 88 |
+
- text: Estou pronto para responder às suas perguntas.
|
| 89 |
+
- text: Qualquer coisa que você precisar, estou à disposição.
|
| 90 |
+
- text: Não hesite em me chamar se precisar de ajuda.
|
| 91 |
+
- text: Estou disponível para esclarecer suas dúvidas.
|
| 92 |
+
- text: Estou esperando suas perguntas. Como posso ajudar?
|
| 93 |
+
- text: Estou aqui para responder a qualquer dúvida que você tenha.
|
| 94 |
+
- text: Se você tiver alguma pergunta, não hesite em perguntar.
|
| 95 |
+
- text: Quais são as suas dúvidas? Estou pronto para responder.
|
| 96 |
+
- text: Como posso ajudar hoje?
|
| 97 |
+
- text: Em que posso lhe ser útil?
|
| 98 |
+
- text: Com o que gostaria de minha ajuda?
|
| 99 |
+
- text: Em que posso ajudar?
|
| 100 |
+
- text: Como posso ajudar você hoje?
|
| 101 |
+
- text: Em que posso ajudar nesse maravilhoso dia?
|
| 102 |
+
- text: Como posso ajudar hoje?
|
| 103 |
+
- text: Estou aqui para ajudar. Em que posso ser útil?
|
| 104 |
+
- text: Com o que gostaria da minha ajuda?
|
| 105 |
+
- text: Como posso ser útil a você hoje?
|
| 106 |
+
- text: Em que posso ser útil?
|
| 107 |
+
- text: Como posso tornar o seu dia mais fácil hoje?
|
| 108 |
+
- text: Em que posso ajudar inesse maravilhoso dia?
|
| 109 |
+
utter_out_of_scope:
|
| 110 |
+
- text: Não sei
|
| 111 |
+
session_config:
|
| 112 |
+
session_expiration_time: 60
|
| 113 |
+
carry_over_slots_to_new_session: true
|
| 114 |
+
actions:
|
| 115 |
+
- utter_out_of_scope
|
| 116 |
+
- utter_saudacao
|
| 117 |
+
- utter_agradecimento
|
| 118 |
+
- utter_disponivel
|
4_projeto_rasa_DOCKER/endpoints.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file contains the different endpoints your bot can use.
|
| 2 |
+
|
| 3 |
+
# Server where the models are pulled from.
|
| 4 |
+
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
|
| 5 |
+
|
| 6 |
+
#models:
|
| 7 |
+
# url: http://my-server.com/models/default_core@latest
|
| 8 |
+
# wait_time_between_pulls: 10 # [optional](default: 100)
|
| 9 |
+
|
| 10 |
+
# Server which runs your custom actions.
|
| 11 |
+
# https://rasa.com/docs/rasa/custom-actions
|
| 12 |
+
|
| 13 |
+
#action_endpoint:
|
| 14 |
+
# url: "http://localhost:5055/webhook"
|
| 15 |
+
|
| 16 |
+
# Tracker store which is used to store the conversations.
|
| 17 |
+
# By default the conversations are stored in memory.
|
| 18 |
+
# https://rasa.com/docs/rasa/tracker-stores
|
| 19 |
+
|
| 20 |
+
#tracker_store:
|
| 21 |
+
# type: redis
|
| 22 |
+
# url: <host of the redis instance, e.g. localhost>
|
| 23 |
+
# port: <port of your redis instance, usually 6379>
|
| 24 |
+
# db: <number of your database within redis, e.g. 0>
|
| 25 |
+
# password: <password used for authentication>
|
| 26 |
+
# use_ssl: <whether or not the communication is encrypted, default false>
|
| 27 |
+
|
| 28 |
+
rest:
|
| 29 |
+
|
| 30 |
+
#tracker_store:
|
| 31 |
+
# type: mongod
|
| 32 |
+
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
|
| 33 |
+
# db: <name of the db within your mongo instance, e.g. rasa>
|
| 34 |
+
# username: <username used for authentication>
|
| 35 |
+
# password: <password used for authentication>
|
| 36 |
+
|
| 37 |
+
# Event broker which all conversation events should be streamed to.
|
| 38 |
+
# https://rasa.com/docs/rasa/event-brokers
|
| 39 |
+
|
| 40 |
+
#event_broker:
|
| 41 |
+
# url: localhost
|
| 42 |
+
# username: username
|
| 43 |
+
# password: password
|
| 44 |
+
# queue: queue
|
4_projeto_rasa_DOCKER/readme_Docker.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# <h1 align="center"><font color="red">Usando RASA no Docker</font></h1>
|
| 3 |
+
|
| 4 |
+
<font color="yellow">Data Scientist.: Dr.Eddy Giusepe Chirinos Isidro</font>
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
No Dockerfile:
|
| 8 |
+
|
| 9 |
+
```
|
| 10 |
+
$ docker build -t eddy_dockerfile_rasa .
|
| 11 |
+
|
| 12 |
+
$ docker run -it -u $(id -u):$(id -g) -p 5005:5005 --name rasa_eddy_container -v $(pwd):/app eddy_dockerfile_rasa init
|
| 13 |
+
|
| 14 |
+
$ docker run -it -u $(id -u):$(id -g) -p 5005:5005 --name rasa_eddy_container -v $(pwd):/app eddy_dockerfile_rasa interactive
|
| 15 |
+
|
| 16 |
+
$ docker run -it -u $(id -u):$(id -g) -p 5005:5005 --name rasa_eddy_container -v $(pwd):/app eddy_dockerfile_rasa train
|
| 17 |
+
|
| 18 |
+
$ docker run -it -u $(id -u):$(id -g) -p 5005:5005 --name rasa_eddy_container -v $(pwd):/app eddy_dockerfile_rasa shell
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
Os seguintes comandos foram tentativas:
|
| 22 |
+
```
|
| 23 |
+
$ docker run -it -p 5005:5005 eddy_dockerfile_rasa
|
| 24 |
+
|
| 25 |
+
$ docker run -it -p 5005:5005 --name rasa_eddy_container -v $(pwd):/app eddy_dockerfile_rasa init
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
Comando:
|
| 30 |
+
|
| 31 |
+
``````
|
| 32 |
+
$ docker run -t --name rasa_eddy -e SQLALCHEMY_WARN_20=1 -e SQLALCHEMY_SILENCE_UBER_WARNING=1 -v $(pwd):/app rasa/rasa:3.7.0a1-full init
|
| 33 |
+
```
|
4_projeto_rasa_DOCKER/requirements.txt
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
absl-py==1.4.0
|
| 2 |
+
aio-pika==8.2.3
|
| 3 |
+
aiofiles==23.2.1
|
| 4 |
+
aiogram==2.25.2
|
| 5 |
+
aiohttp==3.8.6
|
| 6 |
+
aiohttp-retry==2.8.3
|
| 7 |
+
aiormq==6.4.2
|
| 8 |
+
aiosignal==1.3.1
|
| 9 |
+
APScheduler==3.9.1.post1
|
| 10 |
+
astunparse==1.6.3
|
| 11 |
+
async-timeout==4.0.3
|
| 12 |
+
attrs==22.1.0
|
| 13 |
+
Babel==2.9.1
|
| 14 |
+
bidict==0.22.1
|
| 15 |
+
blis==0.7.11
|
| 16 |
+
boto3==1.28.62
|
| 17 |
+
botocore==1.31.62
|
| 18 |
+
CacheControl==0.12.14
|
| 19 |
+
cachetools==5.3.1
|
| 20 |
+
catalogue==2.0.10
|
| 21 |
+
certifi==2023.7.22
|
| 22 |
+
cffi==1.16.0
|
| 23 |
+
charset-normalizer==3.3.0
|
| 24 |
+
click==8.1.7
|
| 25 |
+
cloudpickle==2.2.1
|
| 26 |
+
colorclass==2.2.2
|
| 27 |
+
coloredlogs==15.0.1
|
| 28 |
+
colorhash==1.2.1
|
| 29 |
+
confection==0.1.3
|
| 30 |
+
confluent-kafka==2.2.0
|
| 31 |
+
cryptography==41.0.4
|
| 32 |
+
cycler==0.12.1
|
| 33 |
+
cymem==2.0.8
|
| 34 |
+
dask==2022.10.2
|
| 35 |
+
dnspython==2.3.0
|
| 36 |
+
docopt==0.6.2
|
| 37 |
+
fbmessenger==6.0.0
|
| 38 |
+
filelock==3.12.4
|
| 39 |
+
fire==0.5.0
|
| 40 |
+
flatbuffers==23.5.26
|
| 41 |
+
fonttools==4.43.1
|
| 42 |
+
frozenlist==1.4.0
|
| 43 |
+
fsspec==2023.9.2
|
| 44 |
+
future==0.18.3
|
| 45 |
+
gast==0.4.0
|
| 46 |
+
google-auth==2.23.3
|
| 47 |
+
google-auth-oauthlib==1.0.0
|
| 48 |
+
google-pasta==0.2.0
|
| 49 |
+
greenlet==3.0.0
|
| 50 |
+
grpcio==1.59.0
|
| 51 |
+
h11==0.14.0
|
| 52 |
+
h5py==3.10.0
|
| 53 |
+
httptools==0.6.0
|
| 54 |
+
huggingface-hub==0.18.0
|
| 55 |
+
humanfriendly==10.0
|
| 56 |
+
idna==3.4
|
| 57 |
+
jax==0.4.18
|
| 58 |
+
jieba==0.42.1
|
| 59 |
+
Jinja2==3.1.2
|
| 60 |
+
jmespath==1.0.1
|
| 61 |
+
joblib==1.2.0
|
| 62 |
+
jsonpickle==3.0.2
|
| 63 |
+
jsonschema==4.17.3
|
| 64 |
+
keras==2.12.0
|
| 65 |
+
kiwisolver==1.4.5
|
| 66 |
+
langcodes==3.3.0
|
| 67 |
+
libclang==16.0.6
|
| 68 |
+
locket==1.0.0
|
| 69 |
+
magic-filter==1.0.12
|
| 70 |
+
Markdown==3.5
|
| 71 |
+
MarkupSafe==2.1.3
|
| 72 |
+
matplotlib==3.5.3
|
| 73 |
+
mattermostwrapper==2.2
|
| 74 |
+
ml-dtypes==0.3.1
|
| 75 |
+
msgpack==1.0.7
|
| 76 |
+
multidict==5.2.0
|
| 77 |
+
murmurhash==1.0.10
|
| 78 |
+
networkx==2.6.3
|
| 79 |
+
numpy==1.23.5
|
| 80 |
+
oauthlib==3.2.2
|
| 81 |
+
opt-einsum==3.3.0
|
| 82 |
+
packaging==20.9
|
| 83 |
+
pamqp==3.2.1
|
| 84 |
+
partd==1.4.1
|
| 85 |
+
pathy==0.10.2
|
| 86 |
+
Pillow==10.0.1
|
| 87 |
+
pluggy==1.3.0
|
| 88 |
+
portalocker==2.8.2
|
| 89 |
+
preshed==3.0.9
|
| 90 |
+
prompt-toolkit==3.0.28
|
| 91 |
+
protobuf==4.23.3
|
| 92 |
+
psycopg2-binary==2.9.9
|
| 93 |
+
pt-core-news-lg @ https://github.com/explosion/spacy-models/releases/download/pt_core_news_lg-3.4.0/pt_core_news_lg-3.4.0-py3-none-any.whl#sha256=38dd883847f32912c2211ee4905cff1609d341273c2191e3188162d792511892
|
| 94 |
+
pyasn1==0.5.0
|
| 95 |
+
pyasn1-modules==0.3.0
|
| 96 |
+
pycparser==2.21
|
| 97 |
+
pydantic==1.10.9
|
| 98 |
+
pydot==1.4.2
|
| 99 |
+
PyJWT==2.8.0
|
| 100 |
+
pykwalify==1.8.0
|
| 101 |
+
pymongo==4.3.3
|
| 102 |
+
pyparsing==3.1.1
|
| 103 |
+
pyrsistent==0.19.3
|
| 104 |
+
python-crfsuite==0.9.9
|
| 105 |
+
python-dateutil==2.8.2
|
| 106 |
+
python-engineio==4.7.1
|
| 107 |
+
python-socketio==5.9.0
|
| 108 |
+
pytz==2022.7.1
|
| 109 |
+
PyYAML==6.0.1
|
| 110 |
+
questionary==1.10.0
|
| 111 |
+
randomname==0.1.5
|
| 112 |
+
rasa==3.6.12
|
| 113 |
+
rasa-sdk==3.6.2
|
| 114 |
+
redis==4.6.0
|
| 115 |
+
regex==2022.10.31
|
| 116 |
+
requests==2.31.0
|
| 117 |
+
requests-oauthlib==1.3.1
|
| 118 |
+
requests-toolbelt==1.0.0
|
| 119 |
+
rocketchat-API==1.30.0
|
| 120 |
+
rsa==4.9
|
| 121 |
+
ruamel.yaml==0.17.21
|
| 122 |
+
ruamel.yaml.clib==0.2.8
|
| 123 |
+
s3transfer==0.7.0
|
| 124 |
+
sanic==21.12.2
|
| 125 |
+
Sanic-Cors==2.0.1
|
| 126 |
+
sanic-jwt==1.8.0
|
| 127 |
+
sanic-routing==0.7.2
|
| 128 |
+
scikit-learn==1.1.3
|
| 129 |
+
scipy==1.11.3
|
| 130 |
+
sentencepiece==0.1.99
|
| 131 |
+
sentry-sdk==1.14.0
|
| 132 |
+
simple-websocket==1.0.0
|
| 133 |
+
six==1.16.0
|
| 134 |
+
sklearn-crfsuite==0.3.6
|
| 135 |
+
slack-sdk==3.23.0
|
| 136 |
+
smart-open==6.4.0
|
| 137 |
+
spacy==3.4.4
|
| 138 |
+
spacy-legacy==3.0.12
|
| 139 |
+
spacy-loggers==1.0.5
|
| 140 |
+
SQLAlchemy==1.4.49
|
| 141 |
+
srsly==2.4.8
|
| 142 |
+
structlog==23.2.0
|
| 143 |
+
structlog-sentry==2.0.3
|
| 144 |
+
tabulate==0.9.0
|
| 145 |
+
tarsafe==0.0.4
|
| 146 |
+
tensorboard==2.12.3
|
| 147 |
+
tensorboard-data-server==0.7.1
|
| 148 |
+
tensorflow==2.12.0
|
| 149 |
+
tensorflow-estimator==2.12.0
|
| 150 |
+
tensorflow-hub==0.13.0
|
| 151 |
+
tensorflow-io-gcs-filesystem==0.32.0
|
| 152 |
+
tensorflow-text==2.12.0
|
| 153 |
+
termcolor==2.3.0
|
| 154 |
+
terminaltables==3.1.10
|
| 155 |
+
thinc==8.1.12
|
| 156 |
+
threadpoolctl==3.2.0
|
| 157 |
+
tokenizers==0.13.3
|
| 158 |
+
toolz==0.12.0
|
| 159 |
+
tqdm==4.66.1
|
| 160 |
+
transformers==4.26.0
|
| 161 |
+
twilio==8.2.2
|
| 162 |
+
typer==0.7.0
|
| 163 |
+
typing-utils==0.1.0
|
| 164 |
+
typing_extensions==4.8.0
|
| 165 |
+
tzlocal==5.1
|
| 166 |
+
ujson==5.8.0
|
| 167 |
+
urllib3==2.0.6
|
| 168 |
+
uvloop==0.17.0
|
| 169 |
+
wasabi==0.10.1
|
| 170 |
+
wcwidth==0.2.8
|
| 171 |
+
webexteamssdk==1.6.1
|
| 172 |
+
websockets==10.4
|
| 173 |
+
Werkzeug==3.0.0
|
| 174 |
+
wrapt==1.14.1
|
| 175 |
+
wsproto==1.2.0
|
| 176 |
+
yarl==1.9.2
|