rasa-pro 3.14.0rc2__py3-none-any.whl → 3.14.0rc3__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/agents/protocol/a2a/a2a_agent.py +50 -42
- rasa/agents/utils.py +27 -5
- rasa/agents/validation.py +7 -9
- rasa/api.py +1 -2
- rasa/builder/copilot/copilot.py +37 -1
- rasa/builder/copilot/models.py +43 -49
- rasa/builder/copilot/prompts/copilot_system_prompt.jinja2 +33 -12
- rasa/builder/copilot/prompts/latest_user_message_context_prompt.jinja2 +59 -29
- rasa/builder/copilot/telemetry.py +8 -0
- rasa/builder/service.py +1 -0
- rasa/cli/dialogue_understanding_test.py +1 -0
- rasa/cli/e2e_test.py +1 -0
- rasa/cli/inspect.py +1 -0
- rasa/cli/project_templates/basic/tests/e2e_test_cases/without_stub/general/feedback.yml +46 -0
- rasa/cli/project_templates/basic/tests/e2e_test_cases/without_stub/general/goodbye.yml +9 -0
- rasa/cli/project_templates/basic/tests/e2e_test_cases/without_stub/general/help.yml +8 -0
- rasa/cli/project_templates/basic/tests/e2e_test_cases/without_stub/general/human_handoff.yml +41 -0
- rasa/cli/project_templates/basic/tests/e2e_test_cases/without_stub/general/patterns.yml +32 -0
- rasa/cli/project_templates/basic/tests/e2e_test_cases/without_stub/general/show_faqs.yml +8 -0
- rasa/cli/project_templates/telco/data/network/flow_solve_internet_issue.yml +2 -2
- rasa/cli/project_templates/telco/domain/network/solve_internet_issue.yml +1 -2
- rasa/cli/project_templates/telco/tests/e2e_test_cases/with_stub/network/solve_internet_not_slow.yml +33 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/with_stub/network/solve_internet_slow.yml +47 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/without_stub/general/hello.yml +8 -0
- rasa/cli/run.py +1 -5
- rasa/cli/shell.py +1 -0
- rasa/cli/train.py +1 -0
- rasa/cli/validation/bot_config.py +7 -2
- rasa/core/available_agents.py +65 -55
- rasa/core/config/available_endpoints.py +0 -3
- rasa/core/config/configuration.py +36 -1
- rasa/core/policies/flows/agent_executor.py +16 -8
- rasa/dialogue_understanding/commands/start_flow_command.py +10 -3
- rasa/dialogue_understanding/commands/utils.py +15 -4
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +4 -2
- rasa/dialogue_understanding/generator/single_step/compact_llm_command_generator.py +4 -4
- rasa/dialogue_understanding/generator/single_step/search_ready_llm_command_generator.py +4 -4
- rasa/dialogue_understanding/generator/single_step/single_step_based_llm_command_generator.py +2 -2
- rasa/dialogue_understanding_test/du_test_runner.py +2 -2
- rasa/e2e_test/e2e_test_runner.py +2 -2
- rasa/shared/agents/auth/auth_strategy/oauth2_auth_strategy.py +10 -4
- rasa/shared/agents/auth/constants.py +1 -0
- rasa/shared/core/flows/steps/call.py +2 -2
- rasa/telemetry.py +3 -3
- rasa/validator.py +37 -0
- rasa/version.py +1 -1
- {rasa_pro-3.14.0rc2.dist-info → rasa_pro-3.14.0rc3.dist-info}/METADATA +13 -2
- {rasa_pro-3.14.0rc2.dist-info → rasa_pro-3.14.0rc3.dist-info}/RECORD +68 -60
- rasa/cli/project_templates/telco/tests/e2e_test_cases/network/solve_internet_issue.yml +0 -57
- /rasa/cli/project_templates/{finance/tests/e2e_test_cases → basic/tests/e2e_test_cases/without_stub}/general/hello.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{accounts → without_stub/accounts}/check_balance.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{accounts → without_stub/accounts}/download_statements.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{cards → without_stub/cards}/block_card.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{general → without_stub/general}/bot_challenge.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{general → without_stub/general}/feedback.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{general → without_stub/general}/goodbye.yml +0 -0
- /rasa/cli/project_templates/{telco/tests/e2e_test_cases → finance/tests/e2e_test_cases/without_stub}/general/hello.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{general → without_stub/general}/human_handoff.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{general → without_stub/general}/patterns.yml +0 -0
- /rasa/cli/project_templates/finance/tests/e2e_test_cases/{transfers → without_stub/transfers}/transfer_money.yml +0 -0
- /rasa/cli/project_templates/telco/tests/e2e_test_cases/{billing → without_stub/billing}/understand_bill.yml +0 -0
- /rasa/cli/project_templates/telco/tests/e2e_test_cases/{general → without_stub/general}/bot_challenge.yml +0 -0
- /rasa/cli/project_templates/telco/tests/e2e_test_cases/{general → without_stub/general}/feedback.yml +0 -0
- /rasa/cli/project_templates/telco/tests/e2e_test_cases/{general → without_stub/general}/goodbye.yml +0 -0
- /rasa/cli/project_templates/telco/tests/e2e_test_cases/{general → without_stub/general}/human_handoff.yml +0 -0
- /rasa/cli/project_templates/telco/tests/e2e_test_cases/{general → without_stub/general}/patterns.yml +0 -0
- {rasa_pro-3.14.0rc2.dist-info → rasa_pro-3.14.0rc3.dist-info}/NOTICE +0 -0
- {rasa_pro-3.14.0rc2.dist-info → rasa_pro-3.14.0rc3.dist-info}/WHEEL +0 -0
- {rasa_pro-3.14.0rc2.dist-info → rasa_pro-3.14.0rc3.dist-info}/entry_points.txt +0 -0
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
# Context
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Context Priority
|
|
2
|
+
When interpreting user questions (especially vague ones like *"What's this?"*), follow
|
|
3
|
+
this order of priority:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
| Priority | Context Source | Usage |
|
|
6
|
+
|----------|----------------|-------|
|
|
7
|
+
| 1 | **Attachments** | Highest priority. If attachments exist, assume the user's question refers to them. Always ground explanations in attachment content first. |
|
|
8
|
+
| 2 | **Assistant State / Current Conversation** | Use this when attachments are not present. Supplement attachment knowledge with state info if needed. |
|
|
9
|
+
| 3 | **Assistant Files** | Use when neither attachments nor state provide enough context. |
|
|
10
|
+
| 4 | **Documentation Results** | Use to explain Rasa features and validate facts. Must always be cited inline. |
|
|
11
|
+
| 5 | **Assistant Logs** | Lowest priority. Use only if directly relevant to the user’s issue. |
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
```json
|
|
10
|
-
{{ current_conversation }}
|
|
11
|
-
```
|
|
13
|
+
---
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
# Remember!
|
|
16
|
+
- Focus on accessibility and efficiency. Give guidance users can act on right away.
|
|
17
|
+
- Keep answers concise, cut any fluff.
|
|
18
|
+
- Never impersonate or role-play as the assistant being built. You are the **Rasa assistant development expert**.
|
|
19
|
+
- Cite documentation inline frequently — every factual statement about Rasa features, concepts, or capabilities MUST be cited.
|
|
20
|
+
- Only cite from current turn documentation — never from previous conversation turns.
|
|
21
|
+
- NEVER add a separate list of URLs or sources — only use inline citations.
|
|
22
|
+
- NEVER start your response with a ``` or """ or any other quoting characters.
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
***
|
|
24
|
+
---
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
{% endif %}
|
|
26
|
+
# Context Available to You
|
|
27
|
+
Treat everything **below** as context for the user's current request.
|
|
28
|
+
You have access to:
|
|
27
29
|
|
|
30
|
+
***
|
|
28
31
|
|
|
29
32
|
## Assistant Files (Configuration, Domain, Flows)
|
|
30
33
|
{% if assistant_files %}
|
|
@@ -51,11 +54,38 @@ numbers (1, 2, 3, etc.) for inline citations:
|
|
|
51
54
|
No relevant documentation source found.
|
|
52
55
|
{% endif %}
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
{% if current_conversation %}
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
## Current Conversation and Conversation State between the user and the assistant
|
|
61
|
+
|
|
62
|
+
**Conversation History:**
|
|
63
|
+
```json
|
|
64
|
+
{{ current_conversation }}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Assistant's State:**
|
|
68
|
+
```json
|
|
69
|
+
{{ current_state }}
|
|
70
|
+
```
|
|
71
|
+
{% endif %}
|
|
72
|
+
|
|
73
|
+
{% if assistant_logs %}
|
|
74
|
+
***
|
|
75
|
+
|
|
76
|
+
## Assistant Logs
|
|
77
|
+
```
|
|
78
|
+
{{ assistant_logs }}
|
|
79
|
+
```
|
|
80
|
+
{% endif %}
|
|
81
|
+
|
|
82
|
+
{% if attachments %}
|
|
83
|
+
***
|
|
84
|
+
|
|
85
|
+
## Attachments
|
|
86
|
+
The user clicked **Ask Copilot** in the **Inspect Mode** and included additional context
|
|
87
|
+
as attachments:
|
|
88
|
+
```json
|
|
89
|
+
{{ attachments }}
|
|
90
|
+
```
|
|
91
|
+
{% endif %}
|
|
@@ -8,6 +8,7 @@ import structlog
|
|
|
8
8
|
from rasa import telemetry
|
|
9
9
|
from rasa.builder.copilot.constants import COPILOT_SEGMENT_WRITE_KEY_ENV_VAR
|
|
10
10
|
from rasa.builder.copilot.copilot_response_handler import CopilotResponseHandler
|
|
11
|
+
from rasa.builder.copilot.models import EventContent
|
|
11
12
|
from rasa.builder.document_retrieval.models import Document
|
|
12
13
|
from rasa.telemetry import (
|
|
13
14
|
SEGMENT_TRACK_ENDPOINT,
|
|
@@ -100,6 +101,7 @@ class CopilotTelemetry:
|
|
|
100
101
|
system_message: Optional[dict[str, Any]] = None,
|
|
101
102
|
chat_history: Optional[list[dict[str, Any]]] = None,
|
|
102
103
|
last_user_message: Optional[str] = None,
|
|
104
|
+
tracker_event_attachments: Optional[list[dict[str, Any]]] = None,
|
|
103
105
|
) -> None:
|
|
104
106
|
"""Track a copilot message in the conversation.
|
|
105
107
|
|
|
@@ -115,6 +117,7 @@ class CopilotTelemetry:
|
|
|
115
117
|
system_message: The system message used (optional).
|
|
116
118
|
chat_history: The chat history messages used (optional).
|
|
117
119
|
last_user_message: The last user message used (optional).
|
|
120
|
+
tracker_event_attachments: The tracker event attachments used (optional).
|
|
118
121
|
"""
|
|
119
122
|
structlogger.debug("builder.telemetry.log_copilot_turn", text=text)
|
|
120
123
|
|
|
@@ -136,6 +139,7 @@ class CopilotTelemetry:
|
|
|
136
139
|
"total_tokens": total_tokens,
|
|
137
140
|
"chat_history": chat_history,
|
|
138
141
|
"last_user_message": last_user_message,
|
|
142
|
+
"tracker_event_attachments": tracker_event_attachments,
|
|
139
143
|
"timestamp": dt.datetime.utcnow().isoformat(),
|
|
140
144
|
}
|
|
141
145
|
|
|
@@ -194,6 +198,7 @@ class CopilotTelemetry:
|
|
|
194
198
|
system_message: dict[str, Any],
|
|
195
199
|
chat_history: list[dict[str, Any]],
|
|
196
200
|
last_user_message: Optional[str],
|
|
201
|
+
tracker_event_attachments: list[EventContent],
|
|
197
202
|
) -> None:
|
|
198
203
|
"""Log a copilot message from the response handler.
|
|
199
204
|
|
|
@@ -223,4 +228,7 @@ class CopilotTelemetry:
|
|
|
223
228
|
system_message=system_message,
|
|
224
229
|
chat_history=chat_history,
|
|
225
230
|
last_user_message=last_user_message,
|
|
231
|
+
tracker_event_attachments=[
|
|
232
|
+
attachment.model_dump() for attachment in tracker_event_attachments
|
|
233
|
+
],
|
|
226
234
|
)
|
rasa/builder/service.py
CHANGED
|
@@ -1176,6 +1176,7 @@ async def copilot(request: Request) -> None:
|
|
|
1176
1176
|
if (req.last_message and req.last_message.role == ROLE_USER)
|
|
1177
1177
|
else None
|
|
1178
1178
|
),
|
|
1179
|
+
tracker_event_attachments=generation_context.tracker_event_attachments,
|
|
1179
1180
|
**copilot_client.usage_statistics.model_dump(),
|
|
1180
1181
|
)
|
|
1181
1182
|
)
|
|
@@ -214,6 +214,7 @@ def execute_dialogue_understanding_tests(args: argparse.Namespace) -> None:
|
|
|
214
214
|
|
|
215
215
|
# initialization of endpoints
|
|
216
216
|
endpoints = set_up_available_endpoints(args)
|
|
217
|
+
Configuration.initialise_sub_agents(args.sub_agents)
|
|
217
218
|
|
|
218
219
|
# set up the test runner, e.g. start the agent
|
|
219
220
|
try:
|
rasa/cli/e2e_test.py
CHANGED
|
@@ -160,6 +160,7 @@ def execute_e2e_tests(args: argparse.Namespace) -> None:
|
|
|
160
160
|
endpoints = Configuration.initialise_endpoints(
|
|
161
161
|
endpoints_path=EndpointsConfigPath.validate(args.endpoints)
|
|
162
162
|
).endpoints
|
|
163
|
+
Configuration.initialise_sub_agents(args.sub_agents)
|
|
163
164
|
|
|
164
165
|
# Ignore all endpoints apart from action server, model, nlu and nlg
|
|
165
166
|
# to ensure InMemoryTrackerStore is being used instead of production
|
rasa/cli/inspect.py
CHANGED
|
@@ -93,6 +93,7 @@ def inspect(args: argparse.Namespace) -> None:
|
|
|
93
93
|
# it can be used safely throughout the codebase with
|
|
94
94
|
# `Configuration.get_instance().endpoints`
|
|
95
95
|
Configuration.initialise_endpoints(endpoints_path=Path(args.endpoints))
|
|
96
|
+
Configuration.initialise_sub_agents(args.sub_agents)
|
|
96
97
|
|
|
97
98
|
try:
|
|
98
99
|
model = get_local_model(model)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
test_cases:
|
|
2
|
+
- test_case: positive feedback
|
|
3
|
+
steps:
|
|
4
|
+
- user: "goodbye"
|
|
5
|
+
assertions:
|
|
6
|
+
- flow_started: "goodbye_flow"
|
|
7
|
+
- bot_uttered:
|
|
8
|
+
utter_name: "utter_goodbye"
|
|
9
|
+
- flow_started: "leave_feedback"
|
|
10
|
+
- bot_uttered:
|
|
11
|
+
utter_name: "utter_ask_feedback_rating"
|
|
12
|
+
buttons:
|
|
13
|
+
- title: "👍 Great"
|
|
14
|
+
payload: "/SetSlots(feedback_rating=thumbs_up)"
|
|
15
|
+
- title: "👎 Could be better"
|
|
16
|
+
payload: "/SetSlots(feedback_rating=thumbs_down)"
|
|
17
|
+
- user: "/SetSlots(feedback_rating=thumbs_up)"
|
|
18
|
+
assertions:
|
|
19
|
+
- slot_was_set:
|
|
20
|
+
- name: "feedback_rating"
|
|
21
|
+
value: "thumbs_up"
|
|
22
|
+
- bot_uttered:
|
|
23
|
+
utter_name: "utter_thankyou_positive"
|
|
24
|
+
#
|
|
25
|
+
- test_case: negative feedback
|
|
26
|
+
steps:
|
|
27
|
+
- user: "goodbye"
|
|
28
|
+
assertions:
|
|
29
|
+
- flow_started: "goodbye_flow"
|
|
30
|
+
- bot_uttered:
|
|
31
|
+
utter_name: "utter_goodbye"
|
|
32
|
+
- flow_started: "leave_feedback"
|
|
33
|
+
- bot_uttered:
|
|
34
|
+
utter_name: "utter_ask_feedback_rating"
|
|
35
|
+
buttons:
|
|
36
|
+
- title: "👍 Great"
|
|
37
|
+
payload: "/SetSlots(feedback_rating=thumbs_up)"
|
|
38
|
+
- title: "👎 Could be better"
|
|
39
|
+
payload: "/SetSlots(feedback_rating=thumbs_down)"
|
|
40
|
+
- user: "/SetSlots(feedback_rating=thumbs_down)"
|
|
41
|
+
assertions:
|
|
42
|
+
- slot_was_set:
|
|
43
|
+
- name: "feedback_rating"
|
|
44
|
+
value: "thumbs_down"
|
|
45
|
+
- bot_uttered:
|
|
46
|
+
utter_name: "utter_thankyou_negative"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
test_cases:
|
|
2
|
+
- test_case: human handoff happy path
|
|
3
|
+
steps:
|
|
4
|
+
- user: "I would like to speak with a human"
|
|
5
|
+
assertions:
|
|
6
|
+
- flow_started: "human_handoff"
|
|
7
|
+
- bot_uttered:
|
|
8
|
+
utter_name: "utter_ask_confirm_human_handoff"
|
|
9
|
+
buttons:
|
|
10
|
+
- payload: "/SetSlots(confirm_human_handoff=Yes)"
|
|
11
|
+
title: "Yes"
|
|
12
|
+
- payload: "/SetSlots(confirm_human_handoff=No)"
|
|
13
|
+
title: "No"
|
|
14
|
+
- user: "/SetSlots(confirm_human_handoff=Yes)"
|
|
15
|
+
assertions:
|
|
16
|
+
- slot_was_set:
|
|
17
|
+
- name: "confirm_human_handoff"
|
|
18
|
+
value: "Yes"
|
|
19
|
+
- bot_uttered:
|
|
20
|
+
utter_name: "utter_transferring_to_human"
|
|
21
|
+
- action_executed: action_human_handoff
|
|
22
|
+
# ====================================================>
|
|
23
|
+
- test_case: human handoff unhappy path
|
|
24
|
+
steps:
|
|
25
|
+
- user: "I would like to speak with a human"
|
|
26
|
+
assertions:
|
|
27
|
+
- flow_started: "human_handoff"
|
|
28
|
+
- bot_uttered:
|
|
29
|
+
utter_name: "utter_ask_confirm_human_handoff"
|
|
30
|
+
buttons:
|
|
31
|
+
- payload: "/SetSlots(confirm_human_handoff=Yes)"
|
|
32
|
+
title: "Yes"
|
|
33
|
+
- payload: "/SetSlots(confirm_human_handoff=No)"
|
|
34
|
+
title: "No"
|
|
35
|
+
- user: "/SetSlots(confirm_human_handoff=No)"
|
|
36
|
+
assertions:
|
|
37
|
+
- slot_was_set:
|
|
38
|
+
- name: "confirm_human_handoff"
|
|
39
|
+
value: "No"
|
|
40
|
+
- bot_uttered:
|
|
41
|
+
utter_name: "utter_human_handoff_cancelled"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
test_cases:
|
|
2
|
+
- test_case: test pattern session start
|
|
3
|
+
steps:
|
|
4
|
+
- user: "/session_start"
|
|
5
|
+
assertions:
|
|
6
|
+
- flow_started: "pattern_session_start"
|
|
7
|
+
- bot_uttered:
|
|
8
|
+
utter_name: "utter_welcome"
|
|
9
|
+
#
|
|
10
|
+
- test_case: test basic conversation flow
|
|
11
|
+
steps:
|
|
12
|
+
- user: "hello"
|
|
13
|
+
assertions:
|
|
14
|
+
- flow_started: "hello"
|
|
15
|
+
- bot_uttered:
|
|
16
|
+
utter_name: "utter_hello"
|
|
17
|
+
- user: "what can you help me with?"
|
|
18
|
+
assertions:
|
|
19
|
+
- flow_started: "help"
|
|
20
|
+
- bot_uttered:
|
|
21
|
+
utter_name: "utter_what_can_you_do"
|
|
22
|
+
- user: "show me faqs"
|
|
23
|
+
assertions:
|
|
24
|
+
- flow_started: "show_faqs"
|
|
25
|
+
- bot_uttered:
|
|
26
|
+
utter_name: "utter_top_faqs"
|
|
27
|
+
- user: "goodbye"
|
|
28
|
+
assertions:
|
|
29
|
+
- flow_started: "goodbye_flow"
|
|
30
|
+
- bot_uttered:
|
|
31
|
+
utter_name: "utter_goodbye"
|
|
32
|
+
- flow_started: "leave_feedback"
|
|
@@ -69,5 +69,5 @@ flows:
|
|
|
69
69
|
#when it is False this means this flow will only be run if it is called by another flow, not the user.
|
|
70
70
|
description: run diagnostics to check the internet speed for the user
|
|
71
71
|
steps:
|
|
72
|
-
- action:
|
|
73
|
-
- action: actions_run_speed_test
|
|
72
|
+
- action: utter_communicate_run_diagnostics
|
|
73
|
+
- action: actions_run_speed_test
|
|
@@ -14,7 +14,7 @@ responses:
|
|
|
14
14
|
- text: |
|
|
15
15
|
I see.
|
|
16
16
|
Let me try to identify the root cause of the issue you are facing.
|
|
17
|
-
|
|
17
|
+
utter_communicate_run_diagnostics:
|
|
18
18
|
- text: |
|
|
19
19
|
I will run a network diagnostics for you 🛜
|
|
20
20
|
Wait a moment please...
|
|
@@ -72,4 +72,3 @@ responses:
|
|
|
72
72
|
actions:
|
|
73
73
|
- actions_run_speed_test
|
|
74
74
|
- action_sleep_few_sec
|
|
75
|
-
|
rasa/cli/project_templates/telco/tests/e2e_test_cases/with_stub/network/solve_internet_not_slow.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
stub_custom_actions:
|
|
2
|
+
actions_run_speed_test:
|
|
3
|
+
events:
|
|
4
|
+
- event: slot
|
|
5
|
+
name: network_speed
|
|
6
|
+
value: 150.0
|
|
7
|
+
responses:
|
|
8
|
+
- text: "Thank you for waiting... ✅ "
|
|
9
|
+
action_sleep_few_sec:
|
|
10
|
+
events: []
|
|
11
|
+
responses: []
|
|
12
|
+
|
|
13
|
+
test_cases:
|
|
14
|
+
- test_case: Solving Internet issue not slow
|
|
15
|
+
steps:
|
|
16
|
+
- user: "Hey, my internet is very slow. What's going on?"
|
|
17
|
+
assertions:
|
|
18
|
+
- flow_started: "fix_internet_slow"
|
|
19
|
+
- bot_uttered:
|
|
20
|
+
utter_name: "utter_acknowledge_issue"
|
|
21
|
+
- action_executed: action_sleep_few_sec
|
|
22
|
+
- flow_started: "run_diagnostics"
|
|
23
|
+
- bot_uttered:
|
|
24
|
+
utter_name: "utter_speed_network_not_issue"
|
|
25
|
+
- action_executed: "actions_run_speed_test"
|
|
26
|
+
- bot_uttered:
|
|
27
|
+
utter_name: "utter_propose_other_solutions"
|
|
28
|
+
- action_executed: "action_sleep_few_sec"
|
|
29
|
+
- bot_uttered:
|
|
30
|
+
utter_name: "utter_ask_more_help_needed"
|
|
31
|
+
- user: "/SetSlots(more_help_needed=True)"
|
|
32
|
+
assertions:
|
|
33
|
+
- flow_started: "human_handoff"
|
rasa/cli/project_templates/telco/tests/e2e_test_cases/with_stub/network/solve_internet_slow.yml
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
stub_custom_actions:
|
|
2
|
+
actions_run_speed_test:
|
|
3
|
+
events:
|
|
4
|
+
- event: slot
|
|
5
|
+
name: network_speed
|
|
6
|
+
value: 50.0
|
|
7
|
+
responses:
|
|
8
|
+
- text: "Thank you for waiting... ✅ "
|
|
9
|
+
action_sleep_few_sec:
|
|
10
|
+
events: []
|
|
11
|
+
responses: []
|
|
12
|
+
|
|
13
|
+
test_cases:
|
|
14
|
+
- test_case: Solving Internet slow issue
|
|
15
|
+
steps:
|
|
16
|
+
- user: "Hey, my internet is very slow. What's going on?"
|
|
17
|
+
assertions:
|
|
18
|
+
- flow_started: "fix_internet_slow"
|
|
19
|
+
- bot_uttered:
|
|
20
|
+
utter_name: "utter_acknowledge_issue"
|
|
21
|
+
- action_executed: action_sleep_few_sec
|
|
22
|
+
- flow_started: "run_diagnostics"
|
|
23
|
+
- bot_uttered:
|
|
24
|
+
utter_name: "utter_communicate_run_diagnostics"
|
|
25
|
+
- action_executed: "actions_run_speed_test"
|
|
26
|
+
- bot_uttered:
|
|
27
|
+
utter_name: "utter_acknowledge_speed_test_not_good"
|
|
28
|
+
- action_executed: "action_sleep_few_sec"
|
|
29
|
+
- bot_uttered:
|
|
30
|
+
utter_name: "utter_propose_reboot_router_solution"
|
|
31
|
+
- action_executed: "action_sleep_few_sec"
|
|
32
|
+
- flow_started: "reboot_router"
|
|
33
|
+
- bot_uttered:
|
|
34
|
+
utter_name: "utter_explain_reboot_router"
|
|
35
|
+
- bot_uttered:
|
|
36
|
+
utter_name: "utter_ask_reboot_router"
|
|
37
|
+
buttons:
|
|
38
|
+
- title: "Done"
|
|
39
|
+
payload: "/SetSlots(reboot_router=True)"
|
|
40
|
+
- title: "Facing a problem"
|
|
41
|
+
payload: "/SetSlots(reboot_router=False)"
|
|
42
|
+
- user: "/SetSlots(reboot_router=False)"
|
|
43
|
+
assertions:
|
|
44
|
+
- slot_was_set:
|
|
45
|
+
- name: "reboot_router"
|
|
46
|
+
value: False
|
|
47
|
+
- flow_started: "human_handoff"
|
rasa/cli/run.py
CHANGED
|
@@ -88,7 +88,7 @@ def run(args: argparse.Namespace) -> None:
|
|
|
88
88
|
"""
|
|
89
89
|
Configuration.initialise_endpoints(
|
|
90
90
|
args.endpoints,
|
|
91
|
-
).initialise_credentials(
|
|
91
|
+
).initialise_sub_agents(args.sub_agents).initialise_credentials(
|
|
92
92
|
args.credentials,
|
|
93
93
|
)
|
|
94
94
|
|
|
@@ -108,7 +108,6 @@ def run(args: argparse.Namespace) -> None:
|
|
|
108
108
|
# configured
|
|
109
109
|
|
|
110
110
|
import rasa.model
|
|
111
|
-
from rasa.core.available_agents import AvailableAgents
|
|
112
111
|
|
|
113
112
|
# start server if remote storage is configured
|
|
114
113
|
if args.remote_storage is not None:
|
|
@@ -122,9 +121,6 @@ def run(args: argparse.Namespace) -> None:
|
|
|
122
121
|
rasa_run(**vars(args))
|
|
123
122
|
return
|
|
124
123
|
|
|
125
|
-
# load sub-agents
|
|
126
|
-
AvailableAgents.get_instance(args.sub_agents)
|
|
127
|
-
|
|
128
124
|
# start server if local model found
|
|
129
125
|
args.model = _validate_model_path(args.model, "model", DEFAULT_MODELS_PATH)
|
|
130
126
|
local_model_set = True
|
rasa/cli/shell.py
CHANGED
|
@@ -115,6 +115,7 @@ def shell(args: argparse.Namespace) -> None:
|
|
|
115
115
|
# it can be used safely throughout the codebase with
|
|
116
116
|
# `Configuration.get_instance().endpoints`
|
|
117
117
|
Configuration.initialise_endpoints(endpoints_path=Path(args.endpoints))
|
|
118
|
+
Configuration.initialise_sub_agents(args.sub_agents)
|
|
118
119
|
model = get_validated_path(args.model, "model", DEFAULT_MODELS_PATH)
|
|
119
120
|
|
|
120
121
|
try:
|
rasa/cli/train.py
CHANGED
|
@@ -128,6 +128,7 @@ def run_training(args: argparse.Namespace, can_exit: bool = False) -> Optional[T
|
|
|
128
128
|
# Validates and loads endpoints with proper endpoint file location
|
|
129
129
|
# TODO(Radovan): this should be probably be done in Configuration
|
|
130
130
|
_check_nlg_endpoint_validity(args.endpoints)
|
|
131
|
+
Configuration.initialise_sub_agents(args.sub_agents)
|
|
131
132
|
|
|
132
133
|
training_files = [
|
|
133
134
|
get_validated_path(f, "data", DEFAULT_DATA_PATH, none_is_valid=True)
|
|
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Optional
|
|
|
5
5
|
import structlog
|
|
6
6
|
|
|
7
7
|
from rasa import telemetry
|
|
8
|
+
from rasa.core.constants import DEFAULT_SUB_AGENTS
|
|
8
9
|
from rasa.exceptions import ValidationError
|
|
9
10
|
from rasa.shared.importers.importer import TrainingDataImporter
|
|
10
11
|
from rasa.shared.utils.common import display_research_study_prompt
|
|
@@ -194,8 +195,12 @@ def validate_files(
|
|
|
194
195
|
valid_translations = True
|
|
195
196
|
valid_CALM_slot_mappings = validator.validate_CALM_slot_mappings()
|
|
196
197
|
|
|
197
|
-
# Validate sub-agents
|
|
198
|
-
|
|
198
|
+
# Validate sub-agents
|
|
199
|
+
sub_agents_path = sub_agents or DEFAULT_SUB_AGENTS
|
|
200
|
+
valid_sub_agents = _validate_sub_agents(sub_agents_path)
|
|
201
|
+
|
|
202
|
+
if valid_sub_agents:
|
|
203
|
+
valid_sub_agents = validator.validate_agent_flow_conflicts(sub_agents_path)
|
|
199
204
|
|
|
200
205
|
all_good = (
|
|
201
206
|
valid_domain
|