rasa-pro 3.13.0.dev1__py3-none-any.whl → 3.13.0.dev3__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/cli/run.py +10 -6
- rasa/cli/utils.py +7 -0
- rasa/core/actions/action.py +0 -6
- rasa/core/channels/channel.py +30 -0
- rasa/core/channels/voice_ready/audiocodes.py +52 -17
- rasa/core/channels/voice_ready/jambonz.py +25 -5
- rasa/core/channels/voice_ready/jambonz_protocol.py +4 -0
- rasa/core/channels/voice_stream/audiocodes.py +53 -9
- rasa/core/channels/voice_stream/genesys.py +146 -16
- rasa/core/information_retrieval/faiss.py +6 -62
- rasa/core/nlg/contextual_response_rephraser.py +3 -0
- rasa/core/policies/enterprise_search_policy.py +10 -1
- rasa/core/policies/flows/flow_executor.py +3 -38
- rasa/core/policies/intentless_policy.py +3 -0
- rasa/core/processor.py +27 -6
- rasa/core/utils.py +53 -0
- rasa/dialogue_understanding/coexistence/llm_based_router.py +8 -0
- rasa/dialogue_understanding/commands/cancel_flow_command.py +4 -59
- rasa/dialogue_understanding/commands/knowledge_answer_command.py +2 -2
- rasa/dialogue_understanding/commands/start_flow_command.py +0 -41
- rasa/dialogue_understanding/generator/command_generator.py +67 -0
- rasa/dialogue_understanding/generator/flow_retrieval.py +1 -4
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +2 -12
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +13 -0
- rasa/dialogue_understanding/generator/prompt_templates/command_prompt_v2_claude_3_5_sonnet_20240620_template.jinja2 +1 -1
- rasa/dialogue_understanding/generator/prompt_templates/command_prompt_v2_gpt_4o_2024_11_20_template.jinja2 +2 -5
- rasa/dialogue_understanding/generator/single_step/compact_llm_command_generator.py +22 -10
- rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +27 -12
- rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +0 -61
- rasa/dialogue_understanding/processor/command_processor.py +7 -65
- rasa/dialogue_understanding/stack/utils.py +0 -38
- rasa/e2e_test/utils/validation.py +3 -3
- rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py +3 -0
- rasa/shared/core/constants.py +0 -8
- rasa/shared/core/domain.py +12 -3
- rasa/shared/core/flows/flow.py +0 -17
- rasa/shared/core/flows/flows_yaml_schema.json +3 -38
- rasa/shared/core/flows/steps/collect.py +5 -18
- rasa/shared/core/flows/utils.py +1 -16
- rasa/shared/core/slot_mappings.py +11 -5
- rasa/shared/nlu/constants.py +0 -1
- rasa/shared/utils/common.py +11 -1
- rasa/shared/utils/constants.py +3 -0
- rasa/shared/utils/llm.py +69 -23
- rasa/validator.py +1 -123
- rasa/version.py +1 -1
- {rasa_pro-3.13.0.dev1.dist-info → rasa_pro-3.13.0.dev3.dist-info}/METADATA +2 -2
- {rasa_pro-3.13.0.dev1.dist-info → rasa_pro-3.13.0.dev3.dist-info}/RECORD +51 -54
- rasa/core/actions/action_handle_digressions.py +0 -164
- rasa/dialogue_understanding/commands/handle_digressions_command.py +0 -144
- rasa/dialogue_understanding/patterns/handle_digressions.py +0 -81
- {rasa_pro-3.13.0.dev1.dist-info → rasa_pro-3.13.0.dev3.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.0.dev1.dist-info → rasa_pro-3.13.0.dev3.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.0.dev1.dist-info → rasa_pro-3.13.0.dev3.dist-info}/entry_points.txt +0 -0
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from dataclasses import dataclass, field
|
|
4
|
-
from typing import Any, Dict, Set
|
|
5
|
-
|
|
6
|
-
from rasa.dialogue_understanding.stack.frames import PatternFlowStackFrame
|
|
7
|
-
from rasa.shared.constants import RASA_DEFAULT_FLOW_PATTERN_PREFIX
|
|
8
|
-
from rasa.shared.core.constants import (
|
|
9
|
-
KEY_ASK_CONFIRM_DIGRESSIONS,
|
|
10
|
-
KEY_BLOCK_DIGRESSIONS,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
FLOW_PATTERN_HANDLE_DIGRESSIONS = (
|
|
14
|
-
RASA_DEFAULT_FLOW_PATTERN_PREFIX + "handle_digressions"
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@dataclass
|
|
19
|
-
class HandleDigressionsPatternFlowStackFrame(PatternFlowStackFrame):
|
|
20
|
-
"""A pattern flow stack frame that gets added if an interruption is completed."""
|
|
21
|
-
|
|
22
|
-
flow_id: str = FLOW_PATTERN_HANDLE_DIGRESSIONS
|
|
23
|
-
"""The ID of the flow."""
|
|
24
|
-
interrupting_flow_id: str = ""
|
|
25
|
-
"""The ID of the flow that interrupted the active flow."""
|
|
26
|
-
interrupted_flow_id: str = ""
|
|
27
|
-
"""The name of the active flow that was interrupted."""
|
|
28
|
-
interrupted_step_id: str = ""
|
|
29
|
-
"""The ID of the step that was interrupted."""
|
|
30
|
-
ask_confirm_digressions: Set[str] = field(default_factory=set)
|
|
31
|
-
"""The set of interrupting flow names to confirm."""
|
|
32
|
-
block_digressions: Set[str] = field(default_factory=set)
|
|
33
|
-
"""The set of interrupting flow names to block."""
|
|
34
|
-
|
|
35
|
-
@classmethod
|
|
36
|
-
def type(cls) -> str:
|
|
37
|
-
"""Returns the type of the frame."""
|
|
38
|
-
return FLOW_PATTERN_HANDLE_DIGRESSIONS
|
|
39
|
-
|
|
40
|
-
@staticmethod
|
|
41
|
-
def from_dict(data: Dict[str, Any]) -> HandleDigressionsPatternFlowStackFrame:
|
|
42
|
-
"""Creates a `DialogueStackFrame` from a dictionary.
|
|
43
|
-
|
|
44
|
-
Args:
|
|
45
|
-
data: The dictionary to create the `DialogueStackFrame` from.
|
|
46
|
-
|
|
47
|
-
Returns:
|
|
48
|
-
The created `DialogueStackFrame`.
|
|
49
|
-
"""
|
|
50
|
-
return HandleDigressionsPatternFlowStackFrame(
|
|
51
|
-
frame_id=data["frame_id"],
|
|
52
|
-
step_id=data["step_id"],
|
|
53
|
-
interrupted_step_id=data["interrupted_step_id"],
|
|
54
|
-
interrupted_flow_id=data["interrupted_flow_id"],
|
|
55
|
-
interrupting_flow_id=data["interrupting_flow_id"],
|
|
56
|
-
ask_confirm_digressions=set(data.get(KEY_ASK_CONFIRM_DIGRESSIONS, [])),
|
|
57
|
-
# This attribute must be converted to a set to enable usage
|
|
58
|
-
# of subset `contains` pypred operator in the default pattern
|
|
59
|
-
# conditional branching
|
|
60
|
-
block_digressions=set(data.get(KEY_BLOCK_DIGRESSIONS, [])),
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
def __eq__(self, other: Any) -> bool:
|
|
64
|
-
if not isinstance(other, HandleDigressionsPatternFlowStackFrame):
|
|
65
|
-
return False
|
|
66
|
-
return (
|
|
67
|
-
self.flow_id == other.flow_id
|
|
68
|
-
and self.interrupted_step_id == other.interrupted_step_id
|
|
69
|
-
and self.interrupted_flow_id == other.interrupted_flow_id
|
|
70
|
-
and self.interrupting_flow_id == other.interrupting_flow_id
|
|
71
|
-
and self.ask_confirm_digressions == other.ask_confirm_digressions
|
|
72
|
-
and self.block_digressions == other.block_digressions
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
def as_dict(self) -> Dict[str, Any]:
|
|
76
|
-
"""Returns the frame as a dictionary."""
|
|
77
|
-
data = super().as_dict()
|
|
78
|
-
# converting back to list to avoid serialization issues
|
|
79
|
-
data[KEY_ASK_CONFIRM_DIGRESSIONS] = list(self.ask_confirm_digressions)
|
|
80
|
-
data[KEY_BLOCK_DIGRESSIONS] = list(self.block_digressions)
|
|
81
|
-
return data
|
|
File without changes
|
|
File without changes
|
|
File without changes
|