rasa-pro 3.13.1a3__py3-none-any.whl → 3.13.1a5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/builder/config.py +2 -2
- rasa/builder/project_generator.py +6 -1
- rasa/builder/service.py +5 -3
- rasa/cli/project_templates/finance/actions/__init__.py +0 -0
- rasa/cli/project_templates/plain/actions/__init__.py +0 -0
- rasa/cli/project_templates/teleco/actions/actions_billing.py +151 -0
- rasa/cli/project_templates/teleco/actions/actions_get_data_from_db.py +27 -0
- rasa/cli/project_templates/teleco/actions/actions_run_diagnostics.py +23 -0
- rasa/cli/project_templates/teleco/actions/actions_session_start.py +13 -0
- rasa/cli/project_templates/{telecom → teleco}/config.yml +9 -1
- rasa/cli/project_templates/teleco/csvs/billing.csv +10 -0
- rasa/cli/project_templates/teleco/csvs/customers.csv +5 -0
- rasa/cli/project_templates/teleco/data/flows/flow_global.yml +5 -0
- rasa/cli/project_templates/teleco/data/flows/flow_reboot_router.yml +8 -0
- rasa/cli/project_templates/teleco/data/flows/flow_reset_router.yml +7 -0
- rasa/cli/project_templates/teleco/data/flows/flow_solve_internet_issue.yml +73 -0
- rasa/cli/project_templates/teleco/data/flows/flow_undertand_bill.yml +45 -0
- rasa/cli/project_templates/teleco/data/patterns/pattern_completed.yml +7 -0
- rasa/cli/project_templates/teleco/data/patterns/pattern_human_handoff.yml +6 -0
- rasa/cli/project_templates/teleco/data/patterns/pattern_search.yml +7 -0
- rasa/cli/project_templates/teleco/data/patterns/pattern_session_start.yml +9 -0
- rasa/cli/project_templates/teleco/docs/reset_vs_rboot_router.txt +1 -0
- rasa/cli/project_templates/teleco/docs/restart_router.txt +6 -0
- rasa/cli/project_templates/teleco/docs/run_speed_test.txt +6 -0
- rasa/cli/project_templates/teleco/domain/domain_global.yml +29 -0
- rasa/cli/project_templates/teleco/domain/domain_patterns.yml +17 -0
- rasa/cli/project_templates/teleco/domain/domain_reboot_router.yml +20 -0
- rasa/cli/project_templates/teleco/domain/domain_reset_router.yml +11 -0
- rasa/cli/project_templates/teleco/domain/domain_run_speed_test.yml +24 -0
- rasa/cli/project_templates/teleco/domain/domain_solve_internet_issue.yml +74 -0
- rasa/cli/project_templates/teleco/domain/domain_undertand_bill.yml +102 -0
- rasa/cli/project_templates/{telecom → teleco}/endpoints.yml +4 -2
- rasa/cli/project_templates/teleco/prompts/command-generator.jinja2 +57 -0
- rasa/cli/project_templates/teleco/tests/e2e_results_failed.yml +62 -0
- rasa/cli/project_templates/teleco/tests/e2e_results_passed.yml +130 -0
- rasa/cli/project_templates/teleco/tests/e2e_test_cases/billing_test_cases.yml +68 -0
- rasa/cli/project_templates/teleco/tests/e2e_test_cases/global_test_cases.yml +13 -0
- rasa/cli/project_templates/teleco/tests/e2e_test_cases/internet_slow_test_case.yml +47 -0
- rasa/cli/project_templates/teleco/tests/e2e_test_cases/out_of_scope_test_case.yml +21 -0
- rasa/cli/project_templates/teleco/tests/e2e_test_cases/patterns_test_cases.yml +15 -0
- rasa/cli/scaffold.py +1 -1
- rasa/core/channels/studio_chat.py +1 -0
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a3.dist-info → rasa_pro-3.13.1a5.dist-info}/METADATA +1 -1
- {rasa_pro-3.13.1a3.dist-info → rasa_pro-3.13.1a5.dist-info}/RECORD +49 -17
- rasa/cli/project_templates/telecom/data/flows/upgrade_contract.yml +0 -5
- rasa/cli/project_templates/telecom/data/patterns/pattern_session_start.yml +0 -7
- rasa/cli/project_templates/telecom/domain.yml +0 -7
- /rasa/cli/project_templates/{telecom → teleco}/credentials.yml +0 -0
- {rasa_pro-3.13.1a3.dist-info → rasa_pro-3.13.1a5.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a3.dist-info → rasa_pro-3.13.1a5.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a3.dist-info → rasa_pro-3.13.1a5.dist-info}/entry_points.txt +0 -0
rasa/builder/config.py
CHANGED
|
@@ -18,8 +18,8 @@ OPENAI_MAX_VECTOR_RESULTS = int(os.getenv("OPENAI_MAX_VECTOR_RESULTS", "10"))
|
|
|
18
18
|
OPENAI_TIMEOUT = int(os.getenv("OPENAI_TIMEOUT", "30"))
|
|
19
19
|
|
|
20
20
|
# Server Configuration
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
BUILDER_SERVER_HOST = os.getenv("SERVER_HOST", "0.0.0.0")
|
|
22
|
+
BUILDER_SERVER_PORT = int(os.getenv("SERVER_PORT", "5050"))
|
|
23
23
|
MAX_RETRIES = int(os.getenv("MAX_RETRIES", "5"))
|
|
24
24
|
MAX_LOG_ENTRIES = int(os.getenv("MAX_LOG_ENTRIES", "30"))
|
|
25
25
|
|
|
@@ -161,9 +161,14 @@ class ProjectGenerator:
|
|
|
161
161
|
def _create_importer(self) -> TrainingDataImporter:
|
|
162
162
|
"""Create a training data importer from the current bot files."""
|
|
163
163
|
try:
|
|
164
|
+
if (self.project_folder / "domain.yml").exists():
|
|
165
|
+
domain_path = self.project_folder / "domain.yml"
|
|
166
|
+
else:
|
|
167
|
+
domain_path = self.project_folder / "domain"
|
|
168
|
+
|
|
164
169
|
return TrainingDataImporter.load_from_config(
|
|
165
170
|
config_path=self.project_folder / "config.yml",
|
|
166
|
-
domain_path=
|
|
171
|
+
domain_path=domain_path,
|
|
167
172
|
training_data_paths=[
|
|
168
173
|
self.project_folder / "data",
|
|
169
174
|
],
|
rasa/builder/service.py
CHANGED
|
@@ -436,12 +436,14 @@ class PromptToBotService:
|
|
|
436
436
|
def run(self):
|
|
437
437
|
"""Run the service."""
|
|
438
438
|
structlogger.info(
|
|
439
|
-
"service.starting",
|
|
439
|
+
"service.starting",
|
|
440
|
+
host=config.BUILDER_SERVER_HOST,
|
|
441
|
+
port=config.BUILDER_SERVER_PORT,
|
|
440
442
|
)
|
|
441
443
|
|
|
442
444
|
self.app.run(
|
|
443
|
-
host=config.
|
|
444
|
-
port=config.
|
|
445
|
+
host=config.BUILDER_SERVER_HOST,
|
|
446
|
+
port=config.BUILDER_SERVER_PORT,
|
|
445
447
|
legacy=True,
|
|
446
448
|
motd=False,
|
|
447
449
|
)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
|
|
4
|
+
import pandas as pd
|
|
5
|
+
from rasa_sdk import Action
|
|
6
|
+
from rasa_sdk.events import SlotSet
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ActionVerifyBillByDate(Action):
|
|
10
|
+
def name(self):
|
|
11
|
+
return "action_verify_bill_by_date"
|
|
12
|
+
|
|
13
|
+
def text_to_date(month_text):
|
|
14
|
+
try:
|
|
15
|
+
# Get the current year
|
|
16
|
+
current_year = datetime.now().year
|
|
17
|
+
|
|
18
|
+
# Combine user input with the current year
|
|
19
|
+
full_text = f"{month_text} {current_year}"
|
|
20
|
+
|
|
21
|
+
# Parse the text format (e.g., "March 2025")
|
|
22
|
+
date_obj = datetime.strptime(full_text, "%B %Y")
|
|
23
|
+
|
|
24
|
+
# Format as DD/MM/YYYY (defaults to the first day of the month)
|
|
25
|
+
formatted_date = date_obj.strftime("01/%m/%Y")
|
|
26
|
+
logging.info(f"This is an info message: formatted_date: {formatted_date}")
|
|
27
|
+
return formatted_date
|
|
28
|
+
except ValueError:
|
|
29
|
+
return "Invalid format. Please use a full month name (e.g., 'March')."
|
|
30
|
+
|
|
31
|
+
def run(self, dispatcher, tracker, domain):
|
|
32
|
+
# Load CSV file with billing data
|
|
33
|
+
df = pd.read_csv("csvs/billing.csv")
|
|
34
|
+
|
|
35
|
+
# Get customer ID and date from slots
|
|
36
|
+
customer_id = tracker.get_slot("customer_id")
|
|
37
|
+
bill_month = tracker.get_slot("bill_month")
|
|
38
|
+
# logging.info(f"This is an info message: bill_month : {bill_month}")
|
|
39
|
+
|
|
40
|
+
bill_date = ActionVerifyBillByDate.text_to_date(bill_month)
|
|
41
|
+
# logging.info(f"This is an info message: bill_month after
|
|
42
|
+
# transformation: {bill_date}")
|
|
43
|
+
|
|
44
|
+
if not customer_id:
|
|
45
|
+
dispatcher.utter_message(
|
|
46
|
+
"I couldn't find your customer ID. Please provide it."
|
|
47
|
+
)
|
|
48
|
+
return []
|
|
49
|
+
|
|
50
|
+
if not bill_date:
|
|
51
|
+
dispatcher.utter_message(
|
|
52
|
+
"Please specify the date for the bill you want to check."
|
|
53
|
+
)
|
|
54
|
+
return []
|
|
55
|
+
|
|
56
|
+
# Convert date to datetime
|
|
57
|
+
df["date"] = pd.to_datetime(df["date"])
|
|
58
|
+
bill_date = pd.to_datetime(bill_date)
|
|
59
|
+
|
|
60
|
+
# Filter data for the given customer and date
|
|
61
|
+
customer_bills = df[df["customer_id"] == int(customer_id)]
|
|
62
|
+
specific_bill = customer_bills[customer_bills["date"] == bill_date]
|
|
63
|
+
|
|
64
|
+
if specific_bill.empty:
|
|
65
|
+
dispatcher.utter_message(f"No bill found for {bill_date.date()}.")
|
|
66
|
+
return []
|
|
67
|
+
|
|
68
|
+
bill_amount = specific_bill.iloc[0]["amount"]
|
|
69
|
+
average_bill = customer_bills["amount"].mean()
|
|
70
|
+
difference = bill_amount - average_bill
|
|
71
|
+
|
|
72
|
+
# Generate response
|
|
73
|
+
response = (
|
|
74
|
+
f"Your bill for {bill_month} {bill_date.date().year} is "
|
|
75
|
+
f"${bill_amount:.2f}. \n"
|
|
76
|
+
f"The average of your past bills is ${average_bill:.2f}. \n"
|
|
77
|
+
f"This bill is {'higher' if difference > 0 else 'lower'} than "
|
|
78
|
+
f"your average by ${abs(difference):.2f}."
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
dispatcher.utter_message(response)
|
|
82
|
+
return [
|
|
83
|
+
SlotSet("bill_amount", int(bill_amount)),
|
|
84
|
+
SlotSet("average_bill", int(average_bill)),
|
|
85
|
+
SlotSet("difference", int(difference)),
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ActionRecapBill(Action):
|
|
90
|
+
def name(self):
|
|
91
|
+
return "action_recap_bill"
|
|
92
|
+
|
|
93
|
+
def run(self, dispatcher, tracker, domain):
|
|
94
|
+
# Path to the CSV file (Update path if necessary)
|
|
95
|
+
csv_path = "csvs/billing.csv"
|
|
96
|
+
|
|
97
|
+
# Read the CSV
|
|
98
|
+
df = pd.read_csv(csv_path)
|
|
99
|
+
# this can be shown in the logs of your custom action, if you want
|
|
100
|
+
# the message to be displayed to the user use 'dispatcher.utter_message'
|
|
101
|
+
print(df)
|
|
102
|
+
# Get customer_id and bill_date from slots
|
|
103
|
+
customer_id = tracker.get_slot("customer_id")
|
|
104
|
+
bill_month = tracker.get_slot("bill_month")
|
|
105
|
+
# Convert date to datetime
|
|
106
|
+
df["date"] = pd.to_datetime(df["date"])
|
|
107
|
+
bill_date = ActionVerifyBillByDate.text_to_date(bill_month)
|
|
108
|
+
bill_date = pd.to_datetime(bill_date)
|
|
109
|
+
|
|
110
|
+
if not customer_id:
|
|
111
|
+
dispatcher.utter_message(
|
|
112
|
+
"I need your customer ID to fetch your bill recap."
|
|
113
|
+
)
|
|
114
|
+
return []
|
|
115
|
+
|
|
116
|
+
if not bill_date:
|
|
117
|
+
dispatcher.utter_message(
|
|
118
|
+
"I need a date to fetch your bill recap. Can you provide one?"
|
|
119
|
+
)
|
|
120
|
+
return []
|
|
121
|
+
|
|
122
|
+
# Convert customer_id to int if needed
|
|
123
|
+
try:
|
|
124
|
+
customer_id = int(customer_id)
|
|
125
|
+
except ValueError:
|
|
126
|
+
dispatcher.utter_message("Invalid customer ID format.")
|
|
127
|
+
return []
|
|
128
|
+
|
|
129
|
+
# Filter records for the given customer_id and date
|
|
130
|
+
filtered_df = df[(df["customer_id"] == customer_id)]
|
|
131
|
+
|
|
132
|
+
if filtered_df.empty:
|
|
133
|
+
dispatcher.utter_message(
|
|
134
|
+
f"No transactions found for customer {customer_id} on "
|
|
135
|
+
f"{bill_date.date().strftime('%B %Y')}."
|
|
136
|
+
)
|
|
137
|
+
return []
|
|
138
|
+
|
|
139
|
+
# Format the output
|
|
140
|
+
response1 = "Here is a summary of your costs :"
|
|
141
|
+
dispatcher.utter_message(response1)
|
|
142
|
+
response = "\n".join(
|
|
143
|
+
[
|
|
144
|
+
f"{row['date'].date()} | {row['amount']} $ | {row['source']}"
|
|
145
|
+
for _, row in filtered_df.iterrows()
|
|
146
|
+
]
|
|
147
|
+
)
|
|
148
|
+
# Send response to user
|
|
149
|
+
dispatcher.utter_message(response)
|
|
150
|
+
print("response heeere", response)
|
|
151
|
+
return []
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from rasa_sdk import Action
|
|
3
|
+
from rasa_sdk.events import SlotSet
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ActionGetCustomerInfo(Action):
|
|
7
|
+
def name(self):
|
|
8
|
+
return "action_get_customer_info"
|
|
9
|
+
|
|
10
|
+
def run(self, dispatcher, tracker, domain):
|
|
11
|
+
# Load CSV file
|
|
12
|
+
file_path = "csvs/customers.csv" # get information from your DBs
|
|
13
|
+
df = pd.read_csv(file_path)
|
|
14
|
+
customer_id = tracker.get_slot("customer_id")
|
|
15
|
+
|
|
16
|
+
# Filter data for the given customer ID
|
|
17
|
+
customer_info = df[df["customer_id"] == int(customer_id)]
|
|
18
|
+
|
|
19
|
+
if customer_info.empty:
|
|
20
|
+
dispatcher.utter_message("No customer found with this ID.")
|
|
21
|
+
return []
|
|
22
|
+
|
|
23
|
+
# Extract customer details
|
|
24
|
+
first_name = customer_info.iloc[0]["first_name"]
|
|
25
|
+
|
|
26
|
+
# Set the retrieved name in a slot
|
|
27
|
+
return [SlotSet("customer_first_name", first_name)]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import random
|
|
3
|
+
|
|
4
|
+
from rasa_sdk import Action
|
|
5
|
+
from rasa_sdk.events import EventType, SlotSet
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ActionSleepAndRespond(Action):
|
|
9
|
+
def name(self) -> str:
|
|
10
|
+
return "actions_run_speed_test"
|
|
11
|
+
|
|
12
|
+
async def run(self, dispatcher, tracker, domain) -> list[EventType]:
|
|
13
|
+
await asyncio.sleep(10)
|
|
14
|
+
dispatcher.utter_message(
|
|
15
|
+
text="Thank you for waiting... ✅ "
|
|
16
|
+
) # Send to the user
|
|
17
|
+
|
|
18
|
+
random_number = random.randint(
|
|
19
|
+
50, 150
|
|
20
|
+
) # we will pick randomly the internet speed here
|
|
21
|
+
# for local testing purposes you can define the number
|
|
22
|
+
# for Production testing connect to the API to get this data
|
|
23
|
+
return [SlotSet("network_speed", random_number)]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from rasa_sdk import Action
|
|
4
|
+
from rasa_sdk.events import EventType
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ActionSleepAndRespond(Action):
|
|
8
|
+
def name(self) -> str:
|
|
9
|
+
return "action_sleep_few_sec"
|
|
10
|
+
|
|
11
|
+
async def run(self, dispatcher, tracker, domain) -> list[EventType]:
|
|
12
|
+
await asyncio.sleep(3)
|
|
13
|
+
return []
|
|
@@ -10,8 +10,16 @@ pipeline:
|
|
|
10
10
|
- name: CompactLLMCommandGenerator
|
|
11
11
|
llm:
|
|
12
12
|
model_group: openai-gpt-4o
|
|
13
|
+
flow_retrieval:
|
|
14
|
+
active: false
|
|
15
|
+
prompt_template: prompts/command-generator.jinja2
|
|
13
16
|
|
|
14
17
|
# Configuration for Rasa Core.
|
|
15
18
|
policies:
|
|
16
19
|
- name: FlowPolicy
|
|
17
|
-
- name:
|
|
20
|
+
- name: EnterpriseSearchPolicy
|
|
21
|
+
vector_store:
|
|
22
|
+
type: "faiss"
|
|
23
|
+
source: "./docs"
|
|
24
|
+
llm:
|
|
25
|
+
model_group: openai-gpt-4o
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
customer_id,date,amount,source
|
|
2
|
+
123,01/01/2025,150.50,Internet
|
|
3
|
+
123,01/02/2025,55.00,Internet
|
|
4
|
+
123,01/03/2025,60.00,Internet
|
|
5
|
+
124,01/01/2025,53.00,TV
|
|
6
|
+
124,01/02/2025,53.00,TV
|
|
7
|
+
124,01/03/2025,53.00,TV
|
|
8
|
+
125,01/01/2025,89.75,Mobile
|
|
9
|
+
125,01/02/2025,89.75,Mobile
|
|
10
|
+
125,01/03/2025,89.75,Mobile
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
reboot_router: # only reboot/restart the router
|
|
3
|
+
if: False
|
|
4
|
+
description: Help user reboot and restart their router, the user will be doing this action
|
|
5
|
+
steps:
|
|
6
|
+
- action: utter_explain_reboot_router
|
|
7
|
+
- collect: reboot_router
|
|
8
|
+
reset_after_flow_ends: true
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
fix_internet_slow: # flow name mandatory – this defines a conversational flow for running diagnostics.
|
|
3
|
+
description: Help users solve when internet is slow and provide solutions # description another madatory field this will be sent to CALM
|
|
4
|
+
steps:
|
|
5
|
+
- action: utter_acknowledge_issue # an utter a response that the assistant will display to the end user.
|
|
6
|
+
- action: action_sleep_few_sec # Adding sleep time in a chatbot conversation makes interactions feel more natural,
|
|
7
|
+
#improves readability, and simulates processing delays for a better user experience.
|
|
8
|
+
- call: run_diagnostics # Call a flow, this flow can be re-used multiple times.
|
|
9
|
+
# fix_internet_slow will (parent flow) call run_diagnostics (child flow)
|
|
10
|
+
# when you call a flow, you go to the child flow and then be back to the parent flow
|
|
11
|
+
# first call
|
|
12
|
+
next:
|
|
13
|
+
- if: slots.network_speed < 100 # the syntax is important it has to be slots, this slot has to be float as well
|
|
14
|
+
then:
|
|
15
|
+
- action: utter_acknowledge_speed_test_not_good
|
|
16
|
+
- action: action_sleep_few_sec
|
|
17
|
+
- action: utter_propose_reboot_router_solution
|
|
18
|
+
- action: action_sleep_few_sec
|
|
19
|
+
- call: reboot_router
|
|
20
|
+
next:
|
|
21
|
+
- if: slots.reboot_router # this slot is boolean
|
|
22
|
+
then:
|
|
23
|
+
- call: run_diagnostics # Second call
|
|
24
|
+
next:
|
|
25
|
+
- if: slots.network_speed > 100
|
|
26
|
+
then:
|
|
27
|
+
- action: action_sleep_few_sec
|
|
28
|
+
- action: utter_speed_issue_resolved
|
|
29
|
+
next: "END" # this has to be added, either next END to explain the flow end or point to another section
|
|
30
|
+
- else:
|
|
31
|
+
- action: action_sleep_few_sec
|
|
32
|
+
- action: utter_speed_issue_not_resolved
|
|
33
|
+
- call: reset_router
|
|
34
|
+
- action: utter_final_diagnistics_run
|
|
35
|
+
- call: run_diagnostics # Third call
|
|
36
|
+
next:
|
|
37
|
+
- if: slots.network_speed < 100
|
|
38
|
+
then:
|
|
39
|
+
- action: utter_acknowledge_speed_test_not_good
|
|
40
|
+
- action: utter_fail_to_find_fix
|
|
41
|
+
- link: pattern_human_handoff # when you link a flow, you go to the child flow and then the flow ends there.
|
|
42
|
+
- else:
|
|
43
|
+
- action: action_sleep_few_sec
|
|
44
|
+
- action: utter_final_try_worked
|
|
45
|
+
- action: utter_speed_issue_resolved
|
|
46
|
+
next: "END"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
- else:
|
|
50
|
+
- link: pattern_human_handoff
|
|
51
|
+
- else:
|
|
52
|
+
- action: utter_speed_network_not_issue
|
|
53
|
+
- action: action_sleep_few_sec
|
|
54
|
+
- action: utter_propose_other_solutions
|
|
55
|
+
- action: action_sleep_few_sec
|
|
56
|
+
- collect: more_help_needed
|
|
57
|
+
next:
|
|
58
|
+
- if: slots.more_help_needed
|
|
59
|
+
then:
|
|
60
|
+
- link: pattern_human_handoff
|
|
61
|
+
- else:
|
|
62
|
+
- action: action_sleep_few_sec
|
|
63
|
+
- action: utter_final_help
|
|
64
|
+
next: "END"
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
run_diagnostics:
|
|
68
|
+
if: False # Conditional check – this flow will not run unless this condition is verified.
|
|
69
|
+
#when it is False this means this flow will only be run if it is called by another flow, not the user.
|
|
70
|
+
description: run diagnostics to check the internet speed for the user
|
|
71
|
+
steps:
|
|
72
|
+
- action: utter_communicate_run_diagnosticss
|
|
73
|
+
- action: actions_run_speed_test
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
understand_bill:
|
|
3
|
+
if: slots.user_authenticated # the user has to be authenticated in order to access this flow
|
|
4
|
+
description: This flow allows users to check their bill and billing related details.
|
|
5
|
+
steps:
|
|
6
|
+
- collect: bill_month
|
|
7
|
+
ask_before_filling: False
|
|
8
|
+
- action: action_verify_bill_by_date
|
|
9
|
+
- collect: breakdown_cost
|
|
10
|
+
description: |
|
|
11
|
+
This slot is boolean variable. it holds one of two possible values: true or false
|
|
12
|
+
(breakdown_cost = True, breakdown_cost = False), and if the user says "yup," it should be considered True, while "nope" should be considered False
|
|
13
|
+
(e.g., breakdown_cost = True for "yup", breakdown_cost = False for "nope").
|
|
14
|
+
ask_before_filling: true # This can be useful some LLMs will prefill bool slots here we make it mandatory for the bot to ask the user
|
|
15
|
+
next:
|
|
16
|
+
- if: slots.breakdown_cost # it has to be 'slots' with an 's', this means breakdown_cost is True
|
|
17
|
+
then:
|
|
18
|
+
- action: action_recap_bill
|
|
19
|
+
- collect: more_bill_details
|
|
20
|
+
next:
|
|
21
|
+
- if: slots.more_bill_details
|
|
22
|
+
then:
|
|
23
|
+
- action: utter_provide_bill_sources
|
|
24
|
+
next: "END"
|
|
25
|
+
- else: issue_solved_section # this will call "issue_solved_section" section
|
|
26
|
+
|
|
27
|
+
- else: issue_solved_section
|
|
28
|
+
|
|
29
|
+
- id: issue_solved_section # This will help avoid re-writting the same piece of code, this way it can be re-used
|
|
30
|
+
collect: issue_solved
|
|
31
|
+
description: |
|
|
32
|
+
This slot is boolean variable. it holds one of two possible values: true or false
|
|
33
|
+
(issue_solved = True, issue_solved = False), and if the user says "yup" it should be considered True, while "nope" should be considered False
|
|
34
|
+
(e.g., issue_solved = True for "yup", issue_solved = False for "nope").
|
|
35
|
+
ask_before_filling: true
|
|
36
|
+
next:
|
|
37
|
+
- if: not slots.issue_solved # this means issue_solved is False
|
|
38
|
+
then:
|
|
39
|
+
- action: utter_connect_to_human
|
|
40
|
+
- action: action_sleep_few_sec
|
|
41
|
+
- link: pattern_human_handoff
|
|
42
|
+
|
|
43
|
+
- else:
|
|
44
|
+
- action: utter_end_conversation
|
|
45
|
+
next: "END"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
pattern_completed: # this a patters that is triggered at the end of every flow
|
|
3
|
+
description: all flows have been completed and there is nothing else to be done
|
|
4
|
+
name: pattern completed
|
|
5
|
+
steps:
|
|
6
|
+
- noop: True # this means no operation and when this command is detected CALM won't do any actions. it can also be replaced by an utter.
|
|
7
|
+
next: END
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
pattern_search: # This is a patter that triggered if we have a knowledge base question so we rely on the description we have for SearchAndReply() command
|
|
3
|
+
description: Flow for handling how to run a speed test ## This is a description just a place holder
|
|
4
|
+
#if you want to change it you need to update the command description in the prompt
|
|
5
|
+
name: pattern search
|
|
6
|
+
steps:
|
|
7
|
+
- action: action_trigger_search
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
pattern_session_start: # this is a pattern that will be triggered in the begining of the session
|
|
3
|
+
description: Flow for starting the conversation
|
|
4
|
+
name: pattern session start
|
|
5
|
+
nlu_trigger:
|
|
6
|
+
- intent: session_start
|
|
7
|
+
steps:
|
|
8
|
+
- action: action_get_customer_info
|
|
9
|
+
- action: utter_session_start
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Rebooting a router means simply turning it off and back on without changing any settings. This helps resolve temporary issues like slow speeds or dropped connections and is done by pressing the power button or unplugging the device for a few seconds before turning it back on. Resetting a router, on the other hand, restores it to factory settings, erasing all custom configurations such as the Wi-Fi name, password, and advanced settings. This is done by holding the reset button for about 10-30 seconds until the router restarts. While rebooting is a quick fix for minor issues, resetting should only be done as a last resort when troubleshooting persistent problems.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Here are concise summaries of how to turn your router on and off:
|
|
2
|
+
Using the Power Button: Press the power button to turn off the router, wait 30 seconds, then press it again to turn it back on.
|
|
3
|
+
Unplugging Method: Disconnect the power cable, wait 30 seconds, then plug it back in to restart the router.
|
|
4
|
+
Full Restart for Issues: Turn off the router, wait 1 minute, then turn it back on to refresh the connection.
|
|
5
|
+
|
|
6
|
+
To turn your router off, press the power button (if available) or unplug it from the power source. Wait about 30 seconds to 1 minute before turning it back on by pressing the power button again or plugging it back in. This helps refresh the connection and resolve minor network issues.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Speed test is run by a special software to check what is the current speed of your Internet when uploading or downloading files
|
|
2
|
+
You can use "Fast.com", "Speedtest.net", or Google "Internet speed test"
|
|
3
|
+
An internet speed test measures your connection's performance by evaluating download and upload speeds (Mbps), ping (latency in ms), and jitter.
|
|
4
|
+
It helps determine how fast data is sent and received, impacting streaming, gaming, and video calls.
|
|
5
|
+
Speed tests are useful for diagnosing slow connections and verifying ISP performance.
|
|
6
|
+
You can use our App for a speed test. Go to the Home menu, select WLAN speed test and run it.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
version: "3.1"
|
|
2
|
+
|
|
3
|
+
slots: # list all you slots, it can be in different files per use case for better structure
|
|
4
|
+
customer_id:
|
|
5
|
+
type: text
|
|
6
|
+
mappings:
|
|
7
|
+
- type: from_llm
|
|
8
|
+
initial_value: 123 # suppose we always have the customer ID
|
|
9
|
+
customer_first_name:
|
|
10
|
+
type: text
|
|
11
|
+
mappings:
|
|
12
|
+
- type: controlled
|
|
13
|
+
|
|
14
|
+
responses:
|
|
15
|
+
utter_session_start:
|
|
16
|
+
- text: |
|
|
17
|
+
Hey {customer_first_name} 👋
|
|
18
|
+
I am your virtual AI assistant that can check your bills or resolve issues with Internet speed.
|
|
19
|
+
How may I help you?
|
|
20
|
+
|
|
21
|
+
utter_end_conversation:
|
|
22
|
+
- text: |
|
|
23
|
+
Glad, I helped ✨
|
|
24
|
+
Have a nice day!
|
|
25
|
+
|
|
26
|
+
utter_bot_challenge:
|
|
27
|
+
- text: |
|
|
28
|
+
I'm an AI assistant designed to assist you quickly and efficiently.
|
|
29
|
+
If you ever need to speak with a human agent, just let me know!
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
responses:
|
|
3
|
+
utter_more_help_needed_handoff_pattern: # add more information here, if you need this to connect to specific channel..
|
|
4
|
+
- text: |
|
|
5
|
+
Please hold on while I connect you to our expert 📲
|
|
6
|
+
image: "https://cdn-icons-png.flaticon.com/512/1042/1042127.png"
|
|
7
|
+
utter_connect_to_human:
|
|
8
|
+
- text: |
|
|
9
|
+
Let me connect you to our human support managers. They will help you further!
|
|
10
|
+
|
|
11
|
+
utter_cannot_handle:
|
|
12
|
+
- text: |
|
|
13
|
+
I appreciate your question!
|
|
14
|
+
That's a bit outside my expertise, but I'm here to help if your internet is slow or if you need help understanding your bill.
|
|
15
|
+
Would you like assistance with that?
|
|
16
|
+
metadata:
|
|
17
|
+
rephrase: true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
slots:
|
|
2
|
+
reboot_router:
|
|
3
|
+
type: bool
|
|
4
|
+
mappings:
|
|
5
|
+
- type: from_llm
|
|
6
|
+
|
|
7
|
+
responses:
|
|
8
|
+
|
|
9
|
+
utter_explain_reboot_router:
|
|
10
|
+
- text: |
|
|
11
|
+
Please turn the router off, wait 10 seconds and turn it back on.
|
|
12
|
+
|
|
13
|
+
utter_ask_reboot_router:
|
|
14
|
+
- text: |
|
|
15
|
+
Let me know when you are done!
|
|
16
|
+
buttons:
|
|
17
|
+
- title: "Done"
|
|
18
|
+
payload: "/SetSlots(reboot_router=True)"
|
|
19
|
+
- title: "Facing a problem"
|
|
20
|
+
payload: "/SetSlots(reboot_router=False)"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
responses:
|
|
3
|
+
utter_explain_reset_router:
|
|
4
|
+
- text: |
|
|
5
|
+
I will reset your router remotely to try to fix the issue.
|
|
6
|
+
No action is needed from your end.
|
|
7
|
+
It may take a minute. Please hold on ⏳
|
|
8
|
+
utter_image_reset_router:
|
|
9
|
+
- text: |
|
|
10
|
+
Router is reset successfully! 🎉
|
|
11
|
+
image: "https://www.creativefabrica.com/wp-content/uploads/2022/09/04/Wifi-router-outline-icon-Graphics-37782400-1.jpg"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
slots:
|
|
2
|
+
how_to_run_speed_test:
|
|
3
|
+
type: text
|
|
4
|
+
mappings:
|
|
5
|
+
- type: from_llm
|
|
6
|
+
|
|
7
|
+
run_speed_test:
|
|
8
|
+
type: bool
|
|
9
|
+
mappings:
|
|
10
|
+
- type: from_llm
|
|
11
|
+
|
|
12
|
+
download_speed:
|
|
13
|
+
type: text
|
|
14
|
+
mappings:
|
|
15
|
+
- type: from_llm
|
|
16
|
+
|
|
17
|
+
responses:
|
|
18
|
+
|
|
19
|
+
utter_ask_download_speed:
|
|
20
|
+
- text: |
|
|
21
|
+
Run it and let me know the download speed.
|
|
22
|
+
utter_help_run_speed_test:
|
|
23
|
+
- text: |
|
|
24
|
+
You can use our Rasacom App, go to the Home menu and select WLAN speed test or use this link https://fast.com/
|