rasa-pro 3.14.0.dev2__py3-none-any.whl → 3.14.0.dev4__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/agent_manager.py +2 -2
- rasa/agents/constants.py +9 -0
- rasa/agents/core/agent_protocol.py +1 -2
- rasa/agents/protocol/a2a/a2a_agent.py +628 -17
- rasa/agents/protocol/mcp/mcp_base_agent.py +35 -56
- rasa/agents/protocol/mcp/mcp_open_agent.py +3 -2
- rasa/agents/protocol/mcp/mcp_task_agent.py +38 -16
- rasa/agents/schemas/__init__.py +8 -2
- rasa/agents/schemas/agent_input.py +15 -1
- rasa/agents/schemas/agent_tool_schema.py +23 -1
- rasa/agents/templates/mcp_task_agent_prompt_template.jinja2 +6 -2
- rasa/core/actions/action.py +13 -8
- rasa/core/available_agents.py +3 -0
- rasa/core/channels/development_inspector.py +3 -3
- rasa/core/channels/hangouts.py +2 -2
- rasa/core/channels/inspector/dist/assets/{arc-2e78c586.js → arc-63212852.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-806b712e.js → blockDiagram-38ab4fdb-eecf6b13.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-0745efa9.js → c4Diagram-3d4e48cf-8f798a9a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/channel-0cd70adf.js +1 -0
- rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-7bd1082b.js → classDiagram-70f12bd4-df71a04c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-d937ba49.js → classDiagram-v2-f2320105-9b275968.js} +1 -1
- rasa/core/channels/inspector/dist/assets/clone-a0f9c4ed.js +1 -0
- rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-a2a564ca.js → createText-2e5e7dd3-1c669cad.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-b5256940.js → edges-e0da2a9e-b1553799.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-e6883ad2.js → erDiagram-9861fffd-112388d6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-e576fc02.js → flowDb-956e92f1-fdebec47.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-2e298d01.js → flowDiagram-66a62f08-6280ede1.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-de9cc4aa.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-dd7b150a.js → flowchart-elk-definition-4a651766-e1dc03e5.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-5b79575c.js → ganttDiagram-c361ad54-83f68c51.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-3016f40a.js → gitGraphDiagram-72cf32ee-22f8666f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{graph-3e19170f.js → graph-ca9e6217.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-3862675e-eb9c86de.js → index-3862675e-c5ceb692.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-1bd9135e.js → index-3e293924.js} +3 -3
- rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-b4280e4d.js → infoDiagram-f8f76790-faa9999b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-556091f8.js → journeyDiagram-49397b02-c4dda8d9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-08436411.js → layout-d4307784.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-683c4f3b.js → line-0567aaa7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-cee6d791.js → linear-c11b95cf.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-a0bf0b1a.js → mindmap-definition-fc14e90a-0c7d3ca9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-3730d5c4.js → pieDiagram-8a3498a8-34b433fa.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-12a20fed.js → quadrantDiagram-120e2f19-4cab816e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-b9732102.js → requirementDiagram-deff3bca-8c22fa9e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-a2e72776.js → sankeyDiagram-04a897e0-70ce9e8e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-8b7a76bb.js → sequenceDiagram-704730f1-fbcd7fc9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-e65853ac.js → stateDiagram-587899a1-45f05ea6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-6f58a44b.js → stateDiagram-v2-d93cdb3a-beab1ea6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-df25b934.js → styles-6aaf32cf-2f29dbd5.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9a916d00-88357141.js → styles-9a916d00-951eac83.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-c10674c1-d600174d.js → styles-c10674c1-897fbfdd.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-4adc3e0b.js → svgDrawCommon-08f97a94-d667fac1.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-42816fa1.js → timeline-definition-85554ec2-e3205144.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-621eb66a.js → xychartDiagram-e933f94c-4abeb0e2.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +1 -1
- rasa/core/channels/inspector/src/components/DialogueStack.tsx +1 -1
- rasa/core/channels/studio_chat.py +6 -6
- rasa/core/channels/voice_stream/genesys.py +1 -1
- rasa/core/policies/flow_policy.py +2 -2
- rasa/core/policies/flows/flow_executor.py +96 -17
- rasa/core/policies/flows/mcp_tool_executor.py +48 -11
- rasa/core/policies/intentless_policy.py +1 -1
- rasa/core/policies/unexpected_intent_policy.py +1 -0
- rasa/core/processor.py +12 -14
- rasa/core/tracker_stores/tracker_store.py +3 -7
- rasa/core/train.py +1 -1
- rasa/core/training/interactive.py +16 -16
- rasa/core/training/story_conflict.py +5 -5
- rasa/dialogue_understanding/commands/start_flow_command.py +36 -1
- rasa/dialogue_understanding/generator/llm_command_generator.py +1 -1
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +1 -1
- rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +5 -5
- rasa/dialogue_understanding/processor/command_processor.py +31 -15
- rasa/dialogue_understanding/stack/utils.py +14 -0
- rasa/e2e_test/e2e_test_runner.py +7 -2
- rasa/engine/caching.py +2 -2
- rasa/engine/recipes/default_components.py +10 -18
- rasa/graph_components/validators/default_recipe_validator.py +134 -134
- rasa/hooks.py +5 -5
- rasa/llm_fine_tuning/utils.py +2 -2
- rasa/model_manager/warm_rasa_process.py +1 -1
- rasa/nlu/extractors/extractor.py +2 -1
- rasa/plugin.py +8 -8
- rasa/privacy/privacy_manager.py +11 -2
- rasa/server.py +4 -2
- rasa/shared/core/events.py +9 -1
- rasa/shared/core/flows/flows_yaml_schema.json +12 -1
- rasa/shared/core/flows/steps/call.py +2 -0
- rasa/shared/core/flows/validation.py +3 -2
- rasa/shared/core/flows/yaml_flows_io.py +1 -1
- rasa/shared/core/slots.py +2 -2
- rasa/shared/core/trackers.py +5 -2
- rasa/shared/exceptions.py +4 -0
- rasa/shared/utils/yaml.py +3 -1
- rasa/tracing/instrumentation/instrumentation.py +8 -8
- rasa/tracing/instrumentation/intentless_policy_instrumentation.py +4 -4
- rasa/utils/common.py +26 -0
- rasa/utils/log_utils.py +1 -1
- rasa/utils/ml_utils.py +1 -1
- rasa/utils/tensorflow/rasa_layers.py +1 -1
- rasa/utils/train_utils.py +15 -15
- rasa/validator.py +16 -14
- rasa/version.py +1 -1
- {rasa_pro-3.14.0.dev2.dist-info → rasa_pro-3.14.0.dev4.dist-info}/METADATA +12 -15
- {rasa_pro-3.14.0.dev2.dist-info → rasa_pro-3.14.0.dev4.dist-info}/RECORD +107 -107
- rasa/core/channels/inspector/dist/assets/channel-c436ca7c.js +0 -1
- rasa/core/channels/inspector/dist/assets/clone-50dd656b.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-2b2aeaf8.js +0 -1
- {rasa_pro-3.14.0.dev2.dist-info → rasa_pro-3.14.0.dev4.dist-info}/NOTICE +0 -0
- {rasa_pro-3.14.0.dev2.dist-info → rasa_pro-3.14.0.dev4.dist-info}/WHEEL +0 -0
- {rasa_pro-3.14.0.dev2.dist-info → rasa_pro-3.14.0.dev4.dist-info}/entry_points.txt +0 -0
|
@@ -14,7 +14,7 @@ from rasa.shared.core.constants import (
|
|
|
14
14
|
from rasa.shared.core.domain import Domain, State
|
|
15
15
|
from rasa.shared.core.events import ActionExecuted, Event
|
|
16
16
|
from rasa.shared.core.generator import TrackerWithCachedStates
|
|
17
|
-
from rasa.shared.nlu.constants import TEXT
|
|
17
|
+
from rasa.shared.nlu.constants import INTENT, TEXT
|
|
18
18
|
from rasa.shared.nlu.training_data.message import Message
|
|
19
19
|
|
|
20
20
|
logger = logging.getLogger(__name__)
|
|
@@ -362,12 +362,12 @@ def _get_previous_event(
|
|
|
362
362
|
previous_event_type = "bot utterance"
|
|
363
363
|
previous_event_name = state[PREVIOUS_ACTION]["action_text"]
|
|
364
364
|
elif USER in state.keys():
|
|
365
|
-
if
|
|
365
|
+
if INTENT in state[USER]:
|
|
366
366
|
previous_event_type = "intent"
|
|
367
|
-
previous_event_name = state[USER][
|
|
368
|
-
elif
|
|
367
|
+
previous_event_name = state[USER][INTENT]
|
|
368
|
+
elif TEXT in state[USER]:
|
|
369
369
|
previous_event_type = "user utterance"
|
|
370
|
-
previous_event_name = state[USER][
|
|
370
|
+
previous_event_name = state[USER][TEXT]
|
|
371
371
|
|
|
372
372
|
if not isinstance(previous_event_name, (str, type(None))):
|
|
373
373
|
# While the Substate type doesn't restrict the value of `action_text` /
|
|
@@ -21,7 +21,9 @@ from rasa.dialogue_understanding.stack.frames.flow_stack_frame import (
|
|
|
21
21
|
FlowStackFrameType,
|
|
22
22
|
UserFlowStackFrame,
|
|
23
23
|
)
|
|
24
|
+
from rasa.dialogue_understanding.stack.frames.pattern_frame import PatternFlowStackFrame
|
|
24
25
|
from rasa.dialogue_understanding.stack.utils import (
|
|
26
|
+
is_continue_interrupted_flow_active,
|
|
25
27
|
top_user_flow_frame,
|
|
26
28
|
user_flows_on_the_stack,
|
|
27
29
|
)
|
|
@@ -97,13 +99,26 @@ class StartFlowCommand(Command):
|
|
|
97
99
|
# if the original top flow is the same as the flow to start, the flow is
|
|
98
100
|
# already active, do nothing
|
|
99
101
|
if original_top_flow is not None and original_top_flow.id == self.flow:
|
|
100
|
-
|
|
102
|
+
# in case continue_interrupted is not active, skip the already active start
|
|
103
|
+
# flow command
|
|
104
|
+
if not is_continue_interrupted_flow_active(stack):
|
|
105
|
+
return []
|
|
106
|
+
|
|
107
|
+
# if the continue interrupted flow is active, and the command generator
|
|
108
|
+
# predicted a start flow command for the flow which is on top of the stack,
|
|
109
|
+
# we just need to remove the pattern_continue_interrupted frame(s) from the
|
|
110
|
+
# stack
|
|
111
|
+
stack = _remove_pattern_continue_interrupted_frames(stack)
|
|
112
|
+
return applied_events + tracker.create_stack_updated_events(stack)
|
|
101
113
|
|
|
102
114
|
# if the flow is already on the stack, resume it
|
|
103
115
|
if (
|
|
104
116
|
self.flow in user_flows_on_the_stack(stack)
|
|
105
117
|
and original_user_frame is not None
|
|
106
118
|
):
|
|
119
|
+
# if pattern_continue_interrupted is active, we need to remove it
|
|
120
|
+
# from the stack before resuming the flow
|
|
121
|
+
stack = _remove_pattern_continue_interrupted_frames(stack)
|
|
107
122
|
return self.resume_flow(tracker, stack, original_user_frame)
|
|
108
123
|
|
|
109
124
|
frame_type = FlowStackFrameType.REGULAR
|
|
@@ -265,3 +280,23 @@ class StartFlowCommand(Command):
|
|
|
265
280
|
frames_to_resume.append(frame)
|
|
266
281
|
|
|
267
282
|
return list(frames_to_resume), frame_to_resume
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
def _remove_pattern_continue_interrupted_frames(stack: DialogueStack) -> DialogueStack:
|
|
286
|
+
"""Remove pattern_continue_interrupted frames from the stack."""
|
|
287
|
+
if not is_continue_interrupted_flow_active(stack):
|
|
288
|
+
return stack
|
|
289
|
+
|
|
290
|
+
# remove pattern_continue_interrupted from the stack
|
|
291
|
+
top_frame = stack.top()
|
|
292
|
+
while isinstance(top_frame, PatternFlowStackFrame):
|
|
293
|
+
# If the top frame is a pattern frame, we need to remove it
|
|
294
|
+
# before continuing with the active user flow frame.
|
|
295
|
+
# This prevents the pattern frame
|
|
296
|
+
# from being left on the stack when the flow is started
|
|
297
|
+
# which would prevent pattern_completed to be triggered
|
|
298
|
+
# once the user flow is completed.
|
|
299
|
+
stack.pop()
|
|
300
|
+
top_frame = stack.top()
|
|
301
|
+
|
|
302
|
+
return stack
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Any, Dict, List, Optional, Text, Union
|
|
2
2
|
|
|
3
3
|
import structlog
|
|
4
|
-
from deprecated import deprecated # type: ignore[import]
|
|
4
|
+
from deprecated import deprecated # type: ignore[import-untyped]
|
|
5
5
|
|
|
6
6
|
from rasa.dialogue_understanding.generator.single_step.single_step_llm_command_generator import ( # noqa: E501
|
|
7
7
|
SingleStepLLMCommandGenerator,
|
|
@@ -2,7 +2,7 @@ import importlib.resources
|
|
|
2
2
|
from typing import Any, Dict, List, Optional, Text, Tuple, Union
|
|
3
3
|
|
|
4
4
|
import structlog
|
|
5
|
-
from deprecated import deprecated # type: ignore[import]
|
|
5
|
+
from deprecated import deprecated # type: ignore[import-untyped]
|
|
6
6
|
from jinja2 import Template
|
|
7
7
|
|
|
8
8
|
import rasa.shared.utils.io
|
|
@@ -135,13 +135,13 @@ slots:
|
|
|
135
135
|
type: bool
|
|
136
136
|
initial_value: false
|
|
137
137
|
confirmation_continue_interrupted_flow:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- type: controlled
|
|
138
|
+
type: bool
|
|
139
|
+
mappings:
|
|
140
|
+
- type: from_llm
|
|
142
141
|
interrupted_flow_to_continue:
|
|
143
142
|
type: text
|
|
144
|
-
|
|
143
|
+
mappings:
|
|
144
|
+
- type: from_llm
|
|
145
145
|
|
|
146
146
|
flows:
|
|
147
147
|
pattern_cancel_flow:
|
|
@@ -37,6 +37,7 @@ from rasa.dialogue_understanding.stack.frames import (
|
|
|
37
37
|
BaseFlowStackFrame,
|
|
38
38
|
)
|
|
39
39
|
from rasa.dialogue_understanding.stack.utils import (
|
|
40
|
+
is_continue_interrupted_flow_active,
|
|
40
41
|
top_flow_frame,
|
|
41
42
|
top_user_flow_frame,
|
|
42
43
|
)
|
|
@@ -428,22 +429,9 @@ def clean_up_commands(
|
|
|
428
429
|
)
|
|
429
430
|
|
|
430
431
|
elif isinstance(command, StartFlowCommand):
|
|
431
|
-
|
|
432
|
-
tracker
|
|
432
|
+
clean_commands = clean_up_start_flow_command(
|
|
433
|
+
clean_commands, tracker, command
|
|
433
434
|
)
|
|
434
|
-
top_flow_id = top_user_frame.flow_id if top_user_frame else ""
|
|
435
|
-
|
|
436
|
-
if top_flow_id == command.flow:
|
|
437
|
-
# drop a start flow command if the starting flow is equal
|
|
438
|
-
# to the currently active flow
|
|
439
|
-
structlogger.debug(
|
|
440
|
-
"command_processor.clean_up_commands."
|
|
441
|
-
"skip_command_flow_already_active",
|
|
442
|
-
command=command,
|
|
443
|
-
)
|
|
444
|
-
continue
|
|
445
|
-
|
|
446
|
-
clean_commands.append(command)
|
|
447
435
|
|
|
448
436
|
# handle chitchat command differently from other free-form answer commands
|
|
449
437
|
elif isinstance(command, ChitChatAnswerCommand):
|
|
@@ -529,6 +517,34 @@ def ensure_max_number_of_command_type(
|
|
|
529
517
|
return filtered
|
|
530
518
|
|
|
531
519
|
|
|
520
|
+
def clean_up_start_flow_command(
|
|
521
|
+
clean_commands: List[Command],
|
|
522
|
+
tracker: DialogueStateTracker,
|
|
523
|
+
command: StartFlowCommand,
|
|
524
|
+
) -> List[Command]:
|
|
525
|
+
"""Clean up a start flow command."""
|
|
526
|
+
continue_interrupted_flow_active = is_continue_interrupted_flow_active(
|
|
527
|
+
tracker.stack
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
top_user_frame = top_user_flow_frame(
|
|
531
|
+
tracker.stack, ignore_call_and_link_frames=False
|
|
532
|
+
)
|
|
533
|
+
top_flow_id = top_user_frame.flow_id if top_user_frame else ""
|
|
534
|
+
|
|
535
|
+
if top_flow_id == command.flow and not continue_interrupted_flow_active:
|
|
536
|
+
# drop a start flow command if the starting flow is equal
|
|
537
|
+
# to the currently active flow
|
|
538
|
+
structlogger.debug(
|
|
539
|
+
"command_processor.clean_up_commands." "skip_command_flow_already_active",
|
|
540
|
+
command=command,
|
|
541
|
+
)
|
|
542
|
+
return clean_commands
|
|
543
|
+
|
|
544
|
+
clean_commands.append(command)
|
|
545
|
+
return clean_commands
|
|
546
|
+
|
|
547
|
+
|
|
532
548
|
def clean_up_clarify_command(
|
|
533
549
|
commands_so_far: List[Command],
|
|
534
550
|
all_commands: List[Command],
|
|
@@ -231,3 +231,17 @@ def get_collect_steps_excluding_ask_before_filling_for_active_flow(
|
|
|
231
231
|
for step in active_flow.get_collect_steps()
|
|
232
232
|
if not step.ask_before_filling
|
|
233
233
|
)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def is_continue_interrupted_flow_active(stack: DialogueStack) -> bool:
|
|
237
|
+
"""Check if the continue interrupted flow is active."""
|
|
238
|
+
from rasa.dialogue_understanding.patterns.continue_interrupted import (
|
|
239
|
+
ContinueInterruptedPatternFlowStackFrame,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
for frame in reversed(stack.frames):
|
|
243
|
+
if isinstance(frame, ContinueInterruptedPatternFlowStackFrame):
|
|
244
|
+
return True
|
|
245
|
+
if isinstance(frame, UserFlowStackFrame):
|
|
246
|
+
return False
|
|
247
|
+
return False
|
rasa/e2e_test/e2e_test_runner.py
CHANGED
|
@@ -747,7 +747,7 @@ class E2ETestRunner:
|
|
|
747
747
|
test_result = test_turns[index]
|
|
748
748
|
if index in failure_points:
|
|
749
749
|
diff_test_text, diff_actual_text = cls._handle_fail_diff(
|
|
750
|
-
test_result,
|
|
750
|
+
test_result,
|
|
751
751
|
latest_response,
|
|
752
752
|
cls._select_bot_utter_turns(test_turns, index),
|
|
753
753
|
) # test_result can only be TestStep in failure_points
|
|
@@ -811,7 +811,12 @@ class E2ETestRunner:
|
|
|
811
811
|
"""
|
|
812
812
|
# This will only be used when the TestCase is not started
|
|
813
813
|
# with a user step
|
|
814
|
-
|
|
814
|
+
latest_response_event = test_turns[-1]
|
|
815
|
+
if not isinstance(latest_response_event, ActualStepOutput):
|
|
816
|
+
raise ValueError(
|
|
817
|
+
f"Expected ActualStepOutput, got {type(latest_response_event)}"
|
|
818
|
+
)
|
|
819
|
+
latest_response: ActualStepOutput = latest_response_event
|
|
815
820
|
failures = []
|
|
816
821
|
match = None
|
|
817
822
|
for position in range(last_user_step_position, len(test_turns) - 1):
|
rasa/engine/caching.py
CHANGED
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
import shutil
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Any, List, Optional, Text, Tuple
|
|
8
|
+
from typing import Any, List, Optional, Text, Tuple, Union
|
|
9
9
|
|
|
10
10
|
import sqlalchemy as sa
|
|
11
11
|
import sqlalchemy.orm
|
|
@@ -294,7 +294,7 @@ class LocalTrainingCache(TrainingCache):
|
|
|
294
294
|
|
|
295
295
|
def _cache_output_to_disk(
|
|
296
296
|
self, output: Cacheable, model_storage: ModelStorage
|
|
297
|
-
) -> Tuple[Optional[Text], Optional[Text]]:
|
|
297
|
+
) -> Tuple[Optional[Union[Path, Text]], Optional[Text]]:
|
|
298
298
|
tempdir_name = rasa.utils.common.get_temp_dir_name()
|
|
299
299
|
|
|
300
300
|
# Use `TempDirectoryPath` instead of `tempfile.TemporaryDirectory` as this
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
from rasa.core.policies.enterprise_search_policy import EnterpriseSearchPolicy
|
|
2
2
|
from rasa.core.policies.flow_policy import FlowPolicy
|
|
3
3
|
from rasa.core.policies.intentless_policy import IntentlessPolicy
|
|
4
|
-
from rasa.core.policies.memoization import AugmentedMemoizationPolicy
|
|
5
|
-
from rasa.core.policies.rule_policy import RulePolicy
|
|
6
|
-
from rasa.core.policies.ted_policy import TEDPolicy
|
|
7
|
-
from rasa.core.policies.unexpected_intent_policy import UnexpecTEDIntentPolicy
|
|
4
|
+
from rasa.core.policies.memoization import AugmentedMemoizationPolicy
|
|
8
5
|
from rasa.dialogue_understanding.coexistence.intent_based_router import (
|
|
9
6
|
IntentBasedRouter,
|
|
10
7
|
)
|
|
@@ -13,7 +10,6 @@ from rasa.dialogue_understanding.generator import (
|
|
|
13
10
|
LLMCommandGenerator,
|
|
14
11
|
)
|
|
15
12
|
from rasa.dialogue_understanding.generator.nlu_command_adapter import NLUCommandAdapter
|
|
16
|
-
from rasa.nlu.classifiers.diet_classifier import DIETClassifier
|
|
17
13
|
from rasa.nlu.classifiers.fallback_classifier import FallbackClassifier
|
|
18
14
|
from rasa.nlu.classifiers.keyword_intent_classifier import KeywordIntentClassifier
|
|
19
15
|
from rasa.nlu.classifiers.logistic_regression_classifier import (
|
|
@@ -21,14 +17,11 @@ from rasa.nlu.classifiers.logistic_regression_classifier import (
|
|
|
21
17
|
)
|
|
22
18
|
from rasa.nlu.classifiers.mitie_intent_classifier import MitieIntentClassifier
|
|
23
19
|
from rasa.nlu.classifiers.sklearn_intent_classifier import SklearnIntentClassifier
|
|
24
|
-
from rasa.nlu.extractors.crf_entity_extractor import CRFEntityExtractor
|
|
25
20
|
from rasa.nlu.extractors.duckling_entity_extractor import DucklingEntityExtractor
|
|
26
21
|
from rasa.nlu.extractors.entity_synonyms import EntitySynonymMapper
|
|
27
22
|
from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor
|
|
28
23
|
from rasa.nlu.extractors.regex_entity_extractor import RegexEntityExtractor
|
|
29
24
|
from rasa.nlu.extractors.spacy_entity_extractor import SpacyEntityExtractor
|
|
30
|
-
from rasa.nlu.featurizers.dense_featurizer.convert_featurizer import ConveRTFeaturizer
|
|
31
|
-
from rasa.nlu.featurizers.dense_featurizer.lm_featurizer import LanguageModelFeaturizer
|
|
32
25
|
from rasa.nlu.featurizers.dense_featurizer.mitie_featurizer import MitieFeaturizer
|
|
33
26
|
from rasa.nlu.featurizers.dense_featurizer.spacy_featurizer import SpacyFeaturizer
|
|
34
27
|
from rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer import (
|
|
@@ -38,7 +31,6 @@ from rasa.nlu.featurizers.sparse_featurizer.lexical_syntactic_featurizer import
|
|
|
38
31
|
LexicalSyntacticFeaturizer,
|
|
39
32
|
)
|
|
40
33
|
from rasa.nlu.featurizers.sparse_featurizer.regex_featurizer import RegexFeaturizer
|
|
41
|
-
from rasa.nlu.selectors.response_selector import ResponseSelector
|
|
42
34
|
from rasa.nlu.tokenizers.jieba_tokenizer import JiebaTokenizer
|
|
43
35
|
from rasa.nlu.tokenizers.mitie_tokenizer import MitieTokenizer
|
|
44
36
|
from rasa.nlu.tokenizers.spacy_tokenizer import SpacyTokenizer
|
|
@@ -48,7 +40,7 @@ from rasa.nlu.utils.spacy_utils import SpacyNLP
|
|
|
48
40
|
|
|
49
41
|
DEFAULT_COMPONENTS = [
|
|
50
42
|
# Message Classifiers
|
|
51
|
-
DIETClassifier,
|
|
43
|
+
# DIETClassifier,
|
|
52
44
|
FallbackClassifier,
|
|
53
45
|
KeywordIntentClassifier,
|
|
54
46
|
MitieIntentClassifier,
|
|
@@ -59,9 +51,9 @@ DEFAULT_COMPONENTS = [
|
|
|
59
51
|
LLMBasedRouter,
|
|
60
52
|
IntentBasedRouter,
|
|
61
53
|
# Response Selectors
|
|
62
|
-
ResponseSelector,
|
|
54
|
+
# ResponseSelector,
|
|
63
55
|
# Message Entity Extractors
|
|
64
|
-
CRFEntityExtractor,
|
|
56
|
+
# CRFEntityExtractor,
|
|
65
57
|
DucklingEntityExtractor,
|
|
66
58
|
EntitySynonymMapper,
|
|
67
59
|
MitieEntityExtractor,
|
|
@@ -69,11 +61,11 @@ DEFAULT_COMPONENTS = [
|
|
|
69
61
|
RegexEntityExtractor,
|
|
70
62
|
# Message Feauturizers
|
|
71
63
|
LexicalSyntacticFeaturizer,
|
|
72
|
-
ConveRTFeaturizer,
|
|
64
|
+
# ConveRTFeaturizer,
|
|
73
65
|
MitieFeaturizer,
|
|
74
66
|
SpacyFeaturizer,
|
|
75
67
|
CountVectorsFeaturizer,
|
|
76
|
-
LanguageModelFeaturizer,
|
|
68
|
+
# LanguageModelFeaturizer,
|
|
77
69
|
RegexFeaturizer,
|
|
78
70
|
# Tokenizers
|
|
79
71
|
JiebaTokenizer,
|
|
@@ -84,10 +76,10 @@ DEFAULT_COMPONENTS = [
|
|
|
84
76
|
MitieNLP,
|
|
85
77
|
SpacyNLP,
|
|
86
78
|
# Dialogue Management Policies
|
|
87
|
-
TEDPolicy,
|
|
88
|
-
UnexpecTEDIntentPolicy,
|
|
89
|
-
RulePolicy,
|
|
90
|
-
MemoizationPolicy,
|
|
79
|
+
# TEDPolicy,
|
|
80
|
+
# UnexpecTEDIntentPolicy,
|
|
81
|
+
# RulePolicy,
|
|
82
|
+
# MemoizationPolicy,
|
|
91
83
|
AugmentedMemoizationPolicy,
|
|
92
84
|
FlowPolicy,
|
|
93
85
|
EnterpriseSearchPolicy,
|