rasa-pro 3.12.0.dev10__py3-none-any.whl → 3.12.0.dev12__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.

Files changed (55) hide show
  1. rasa/core/actions/action.py +3 -17
  2. rasa/core/actions/forms.py +2 -4
  3. rasa/core/channels/voice_ready/audiocodes.py +23 -42
  4. rasa/core/channels/voice_stream/tts/azure.py +1 -2
  5. rasa/core/migrate.py +2 -2
  6. rasa/core/policies/flows/flow_executor.py +1 -33
  7. rasa/dialogue_understanding/commands/can_not_handle_command.py +2 -2
  8. rasa/dialogue_understanding/commands/cancel_flow_command.py +4 -62
  9. rasa/dialogue_understanding/commands/change_flow_command.py +2 -2
  10. rasa/dialogue_understanding/commands/chit_chat_answer_command.py +2 -2
  11. rasa/dialogue_understanding/commands/clarify_command.py +2 -2
  12. rasa/dialogue_understanding/commands/correct_slots_command.py +2 -11
  13. rasa/dialogue_understanding/commands/human_handoff_command.py +2 -2
  14. rasa/dialogue_understanding/commands/knowledge_answer_command.py +2 -2
  15. rasa/dialogue_understanding/commands/repeat_bot_messages_command.py +2 -2
  16. rasa/dialogue_understanding/commands/set_slot_command.py +15 -7
  17. rasa/dialogue_understanding/commands/skip_question_command.py +2 -2
  18. rasa/dialogue_understanding/commands/start_flow_command.py +2 -43
  19. rasa/dialogue_understanding/commands/utils.py +1 -1
  20. rasa/dialogue_understanding/constants.py +0 -1
  21. rasa/dialogue_understanding/generator/command_generator.py +76 -10
  22. rasa/dialogue_understanding/generator/command_parser.py +1 -1
  23. rasa/dialogue_understanding/generator/llm_based_command_generator.py +2 -126
  24. rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +2 -10
  25. rasa/dialogue_understanding/generator/nlu_command_adapter.py +2 -4
  26. rasa/dialogue_understanding/generator/single_step/command_prompt_template.jinja2 +79 -53
  27. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +19 -11
  28. rasa/dialogue_understanding/patterns/correction.py +1 -13
  29. rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +2 -62
  30. rasa/dialogue_understanding/processor/command_processor.py +28 -117
  31. rasa/dialogue_understanding/utils.py +0 -31
  32. rasa/dialogue_understanding_test/test_case_simulation/test_case_tracker_simulator.py +2 -2
  33. rasa/shared/core/constants.py +1 -22
  34. rasa/shared/core/domain.py +4 -6
  35. rasa/shared/core/events.py +2 -13
  36. rasa/shared/core/flows/flow.py +0 -17
  37. rasa/shared/core/flows/flows_yaml_schema.json +0 -38
  38. rasa/shared/core/flows/steps/collect.py +1 -18
  39. rasa/shared/core/flows/utils.py +1 -16
  40. rasa/shared/core/slot_mappings.py +6 -6
  41. rasa/shared/core/slots.py +0 -19
  42. rasa/shared/core/trackers.py +1 -3
  43. rasa/shared/nlu/constants.py +0 -1
  44. rasa/shared/utils/llm.py +1 -1
  45. rasa/shared/utils/schemas/domain.yml +1 -0
  46. rasa/validator.py +22 -172
  47. rasa/version.py +1 -1
  48. {rasa_pro-3.12.0.dev10.dist-info → rasa_pro-3.12.0.dev12.dist-info}/METADATA +1 -1
  49. {rasa_pro-3.12.0.dev10.dist-info → rasa_pro-3.12.0.dev12.dist-info}/RECORD +52 -55
  50. rasa/core/actions/action_handle_digressions.py +0 -142
  51. rasa/dialogue_understanding/commands/handle_digressions_command.py +0 -150
  52. rasa/dialogue_understanding/patterns/handle_digressions.py +0 -81
  53. {rasa_pro-3.12.0.dev10.dist-info → rasa_pro-3.12.0.dev12.dist-info}/NOTICE +0 -0
  54. {rasa_pro-3.12.0.dev10.dist-info → rasa_pro-3.12.0.dev12.dist-info}/WHEEL +0 -0
  55. {rasa_pro-3.12.0.dev10.dist-info → rasa_pro-3.12.0.dev12.dist-info}/entry_points.txt +0 -0
@@ -1,10 +1,9 @@
1
- from typing import Any, Dict, List, Set
1
+ from typing import Set
2
2
 
3
3
  from rasa.shared.utils.io import raise_deprecation_warning
4
4
 
5
5
  RESET_PROPERTY_NAME = "reset_after_flow_ends"
6
6
  PERSIST_PROPERTY_NAME = "persisted_slots"
7
- ALL_LABEL = "ALL"
8
7
 
9
8
 
10
9
  def warn_deprecated_collect_step_config(flow_id: str, collect_step: str) -> None:
@@ -39,17 +38,3 @@ def get_invalid_slot_persistence_config_error_message(
39
38
  f"are neither used in a collect step nor a set_slot step of the flow. "
40
39
  f"Please remove such slots from the '{PERSIST_PROPERTY_NAME}' property."
41
40
  )
42
-
43
-
44
- def extract_digression_prop(prop: str, data: Dict[str, Any]) -> List[str]:
45
- """Extracts the digression property from the data.
46
-
47
- There can be two types of properties: ask_confirm_digressions and
48
- block_digressions.
49
- """
50
- digression_property = data.get(prop, [])
51
-
52
- if isinstance(digression_property, bool):
53
- digression_property = [ALL_LABEL] if digression_property else []
54
-
55
- return digression_property
@@ -6,8 +6,8 @@ from rasa.shared.constants import DOCS_URL_NLU_BASED_SLOTS, IGNORED_INTENTS
6
6
  from rasa.shared.core.constants import (
7
7
  ACTIVE_FLOW,
8
8
  ACTIVE_LOOP,
9
- KEY_MAPPING_TYPE,
10
9
  MAPPING_CONDITIONS,
10
+ MAPPING_TYPE,
11
11
  REQUESTED_SLOT,
12
12
  SLOT_MAPPINGS,
13
13
  SlotMappingType,
@@ -59,11 +59,11 @@ class SlotMapping:
59
59
  )
60
60
 
61
61
  try:
62
- mapping_type = SlotMappingType(mapping.get(KEY_MAPPING_TYPE))
62
+ mapping_type = SlotMappingType(mapping.get(MAPPING_TYPE))
63
63
  except ValueError:
64
64
  raise InvalidDomain(
65
65
  f"Your domain uses an invalid slot mapping of type "
66
- f"'{mapping.get(KEY_MAPPING_TYPE)}' for slot '{slot_name}'. Please see "
66
+ f"'{mapping.get(MAPPING_TYPE)}' for slot '{slot_name}'. Please see "
67
67
  f"{DOCS_URL_NLU_BASED_SLOTS} for more information."
68
68
  )
69
69
 
@@ -299,7 +299,7 @@ class SlotFillingManager:
299
299
  def _verify_mapping_conditions(
300
300
  self, mapping: Dict[Text, Any], slot_name: Text
301
301
  ) -> bool:
302
- if mapping.get(MAPPING_CONDITIONS) and mapping[KEY_MAPPING_TYPE] != str(
302
+ if mapping.get(MAPPING_CONDITIONS) and mapping[MAPPING_TYPE] != str(
303
303
  SlotMappingType.FROM_TRIGGER_INTENT
304
304
  ):
305
305
  if not self._matches_mapping_conditions(mapping, slot_name):
@@ -374,7 +374,7 @@ class SlotFillingManager:
374
374
  ) -> bool:
375
375
  from rasa.core.actions.forms import FormAction
376
376
 
377
- if mapping[KEY_MAPPING_TYPE] != str(SlotMappingType.FROM_ENTITY):
377
+ if mapping[MAPPING_TYPE] != str(SlotMappingType.FROM_ENTITY):
378
378
  return False
379
379
 
380
380
  form_name = self.tracker.active_loop_name
@@ -495,7 +495,7 @@ def extract_slot_value(
495
495
 
496
496
  for mapping in slot.mappings:
497
497
  mapping_type = SlotMappingType(
498
- mapping.get(KEY_MAPPING_TYPE, SlotMappingType.FROM_LLM.value)
498
+ mapping.get(MAPPING_TYPE, SlotMappingType.FROM_LLM.value)
499
499
  )
500
500
 
501
501
  if mapping_type in [SlotMappingType.FROM_LLM, SlotMappingType.CUSTOM]:
rasa/shared/core/slots.py CHANGED
@@ -41,7 +41,6 @@ class Slot(ABC):
41
41
  influence_conversation: bool = True,
42
42
  is_builtin: bool = False,
43
43
  shared_for_coexistence: bool = False,
44
- filled_by: Optional[str] = None,
45
44
  ) -> None:
46
45
  """Create a Slot.
47
46
 
@@ -58,7 +57,6 @@ class Slot(ABC):
58
57
  such as `return_value`.
59
58
  shared_for_coexistence: If `True` the slot is not forgotten after either
60
59
  dm1 or CALM finishes.
61
- filled_by: The name of the extractor that fills the slot.
62
60
  """
63
61
  self.name = name
64
62
  self.mappings = mappings
@@ -69,7 +67,6 @@ class Slot(ABC):
69
67
  self._has_been_set = False
70
68
  self.is_builtin = is_builtin
71
69
  self.shared_for_coexistence = shared_for_coexistence
72
- self._filled_by = filled_by
73
70
 
74
71
  def feature_dimensionality(self) -> int:
75
72
  """How many features this single slot creates.
@@ -135,16 +132,6 @@ class Slot(ABC):
135
132
  self._value = value
136
133
  self._has_been_set = True
137
134
 
138
- @property
139
- def filled_by(self) -> Optional[str]:
140
- """Gets the slot's latest value extractor."""
141
- return self._filled_by
142
-
143
- @filled_by.setter
144
- def filled_by(self, extractor: str) -> None:
145
- """Sets the slot's latest value extractor."""
146
- self._filled_by = extractor
147
-
148
135
  def has_same_coerced_value(self, other_value: Any) -> bool:
149
136
  """Checks if the coerced value of is the same as the slot value.
150
137
 
@@ -228,7 +215,6 @@ class FloatSlot(Slot):
228
215
  influence_conversation: bool = True,
229
216
  is_builtin: bool = False,
230
217
  shared_for_coexistence: bool = False,
231
- filled_by: Optional[str] = None,
232
218
  ) -> None:
233
219
  """Creates a FloatSlot.
234
220
 
@@ -244,7 +230,6 @@ class FloatSlot(Slot):
244
230
  influence_conversation,
245
231
  is_builtin,
246
232
  shared_for_coexistence,
247
- filled_by=filled_by,
248
233
  )
249
234
  self.max_value = max_value
250
235
  self.min_value = min_value
@@ -402,7 +387,6 @@ class CategoricalSlot(Slot):
402
387
  influence_conversation: bool = True,
403
388
  is_builtin: bool = False,
404
389
  shared_for_coexistence: bool = False,
405
- filled_by: Optional[str] = None,
406
390
  ) -> None:
407
391
  """Creates a `Categorical Slot` (see parent class for detailed docstring)."""
408
392
  super().__init__(
@@ -413,7 +397,6 @@ class CategoricalSlot(Slot):
413
397
  influence_conversation,
414
398
  is_builtin,
415
399
  shared_for_coexistence,
416
- filled_by=filled_by,
417
400
  )
418
401
  if values and None in values:
419
402
  rasa.shared.utils.io.raise_warning(
@@ -624,7 +607,6 @@ class AnySlot(Slot):
624
607
  influence_conversation: bool = False,
625
608
  is_builtin: bool = False,
626
609
  shared_for_coexistence: bool = False,
627
- filled_by: Optional[str] = None,
628
610
  ) -> None:
629
611
  """Creates an `Any Slot` (see parent class for detailed docstring).
630
612
 
@@ -648,7 +630,6 @@ class AnySlot(Slot):
648
630
  influence_conversation,
649
631
  is_builtin,
650
632
  shared_for_coexistence,
651
- filled_by=filled_by,
652
633
  )
653
634
 
654
635
  def __eq__(self, other: Any) -> bool:
@@ -916,13 +916,11 @@ class DialogueStateTracker:
916
916
  continue
917
917
  slot.reset()
918
918
 
919
- def _set_slot(self, key: Text, value: Any, filled_by: Optional[str] = None) -> None:
919
+ def _set_slot(self, key: Text, value: Any) -> None:
920
920
  """Sets the value of a slot if that slot exists."""
921
921
  if key in self.slots:
922
922
  slot = self.slots[key]
923
923
  slot.value = value
924
- if filled_by is not None:
925
- slot.filled_by = filled_by
926
924
  else:
927
925
  logger.error(
928
926
  f"Tried to set non existent slot '{key}'. Make sure you "
@@ -55,4 +55,3 @@ SPLIT_ENTITIES_BY_COMMA_DEFAULT_VALUE = True
55
55
  SINGLE_ENTITY_ALLOWED_INTERLEAVING_CHARSET = {".", ",", " ", ";"}
56
56
 
57
57
  SET_SLOT_COMMAND = "set slot"
58
- HANDLE_DIGRESSIONS_COMMAND = "handle digressions"
rasa/shared/utils/llm.py CHANGED
@@ -680,7 +680,7 @@ def allowed_values_for_slot(slot: Slot) -> Union[str, None]:
680
680
  if isinstance(slot, BooleanSlot):
681
681
  return str([True, False])
682
682
  if isinstance(slot, CategoricalSlot):
683
- return str([v for v in slot.values if v != "__other__"])
683
+ return str([v for v in slot.values if v != "__other__"] + ["other"])
684
684
  else:
685
685
  return None
686
686
 
@@ -78,6 +78,7 @@ mapping:
78
78
  mappings:
79
79
  type: "seq"
80
80
  required: False
81
+ allowempty: False
81
82
  sequence:
82
83
  - type: "map"
83
84
  allowempty: True
rasa/validator.py CHANGED
@@ -36,9 +36,8 @@ from rasa.shared.core.command_payload_reader import (
36
36
  )
37
37
  from rasa.shared.core.constants import (
38
38
  ACTIVE_LOOP,
39
- KEY_ALLOW_NLU_CORRECTION,
40
- KEY_MAPPING_TYPE,
41
39
  MAPPING_CONDITIONS,
40
+ MAPPING_TYPE,
42
41
  SlotMappingType,
43
42
  )
44
43
  from rasa.shared.core.domain import (
@@ -46,14 +45,13 @@ from rasa.shared.core.domain import (
46
45
  Domain,
47
46
  )
48
47
  from rasa.shared.core.events import ActionExecuted, ActiveLoop, UserUttered
49
- from rasa.shared.core.flows import Flow, FlowsList
48
+ from rasa.shared.core.flows import FlowsList
50
49
  from rasa.shared.core.flows.flow_step_links import IfFlowStepLink
51
50
  from rasa.shared.core.flows.steps.action import ActionFlowStep
52
51
  from rasa.shared.core.flows.steps.collect import CollectInformationFlowStep
53
52
  from rasa.shared.core.flows.steps.link import LinkFlowStep
54
53
  from rasa.shared.core.flows.steps.set_slots import SetSlotsFlowStep
55
54
  from rasa.shared.core.flows.utils import (
56
- ALL_LABEL,
57
55
  get_duplicate_slot_persistence_config_error_message,
58
56
  get_invalid_slot_persistence_config_error_message,
59
57
  warn_deprecated_collect_step_config,
@@ -522,7 +520,7 @@ class Validator:
522
520
  for mapping in slot.mappings:
523
521
  for condition in mapping.get(MAPPING_CONDITIONS, []):
524
522
  condition_active_loop = condition.get(ACTIVE_LOOP)
525
- mapping_type = SlotMappingType(mapping.get(KEY_MAPPING_TYPE))
523
+ mapping_type = SlotMappingType(mapping.get(MAPPING_TYPE))
526
524
  if (
527
525
  condition_active_loop
528
526
  and condition_active_loop not in self.domain.form_names
@@ -1266,7 +1264,6 @@ class Validator:
1266
1264
  self.verify_unique_flows(),
1267
1265
  self.verify_predicates(),
1268
1266
  self.verify_slot_persistence_configuration(),
1269
- self.verify_digression_configuration(),
1270
1267
  ]
1271
1268
 
1272
1269
  all_good = all(flow_validation_conditions)
@@ -1397,31 +1394,29 @@ class Validator:
1397
1394
  nlu_mappings = any(
1398
1395
  [
1399
1396
  SlotMappingType(
1400
- mapping.get(KEY_MAPPING_TYPE, SlotMappingType.FROM_LLM.value)
1397
+ mapping.get("type", SlotMappingType.FROM_LLM.value)
1401
1398
  ).is_predefined_type()
1402
1399
  for mapping in slot.mappings
1403
1400
  ]
1404
1401
  )
1405
1402
  llm_mappings = any(
1406
1403
  [
1407
- SlotMappingType(
1408
- mapping.get(KEY_MAPPING_TYPE, SlotMappingType.FROM_LLM.value)
1409
- )
1404
+ SlotMappingType(mapping.get("type", SlotMappingType.FROM_LLM.value))
1410
1405
  == SlotMappingType.FROM_LLM
1411
1406
  for mapping in slot.mappings
1412
1407
  ]
1413
1408
  )
1414
1409
  custom_mappings = any(
1415
1410
  [
1416
- SlotMappingType(
1417
- mapping.get(KEY_MAPPING_TYPE, SlotMappingType.FROM_LLM.value)
1418
- )
1411
+ SlotMappingType(mapping.get("type", SlotMappingType.FROM_LLM.value))
1419
1412
  == SlotMappingType.CUSTOM
1420
1413
  for mapping in slot.mappings
1421
1414
  ]
1422
1415
  )
1423
1416
 
1424
- all_good = self._allow_nlu_correction_is_valid(slot, nlu_mappings, all_good)
1417
+ all_good = self._slot_contains_all_mappings_types(
1418
+ llm_mappings, nlu_mappings, custom_mappings, slot.name, all_good
1419
+ )
1425
1420
 
1426
1421
  all_good = self._custom_action_name_is_defined_in_the_domain(
1427
1422
  custom_mappings, slot, all_good
@@ -1438,48 +1433,23 @@ class Validator:
1438
1433
  return all_good
1439
1434
 
1440
1435
  @staticmethod
1441
- def _allow_nlu_correction_is_valid(
1442
- slot: Slot, nlu_mappings: bool, all_good: bool
1436
+ def _slot_contains_all_mappings_types(
1437
+ llm_mappings: bool,
1438
+ nlu_mappings: bool,
1439
+ custom_mappings: bool,
1440
+ slot_name: str,
1441
+ all_good: bool,
1443
1442
  ) -> bool:
1444
- """Verify that `allow_nlu_correction` property is used correctly in a `from_llm` mappings only.""" # noqa: E501
1445
- if not slot.mappings:
1446
- return all_good
1447
-
1448
- invalid_usage = False
1449
-
1450
- for mapping in slot.mappings:
1451
- allow_nlu_correction = mapping.get(KEY_ALLOW_NLU_CORRECTION)
1452
- if (
1453
- allow_nlu_correction
1454
- and mapping.get(KEY_MAPPING_TYPE) != SlotMappingType.FROM_LLM.value
1455
- ):
1456
- invalid_usage = True
1457
-
1458
- if allow_nlu_correction and not nlu_mappings:
1459
- structlogger.error(
1460
- "validator.validate_slot_mappings_in_CALM.nlu_mappings_not_present",
1461
- slot_name=slot.name,
1462
- event_info=(
1463
- f"The slot '{slot.name}' does not have any "
1464
- f"NLU-based slot mappings. "
1465
- f"The property `allow_nlu_correction` is only "
1466
- f"applicable when the slot "
1467
- f"contains both NLU-based and LLM-based slot mappings."
1468
- ),
1469
- )
1470
- all_good = False
1471
-
1472
- if invalid_usage:
1443
+ if llm_mappings and (nlu_mappings or custom_mappings):
1473
1444
  structlogger.error(
1474
- "validator.validate_slot_mappings_in_CALM.allow_nlu_correction",
1475
- slot_name=slot.name,
1445
+ "validator.validate_slot_mappings_in_CALM.llm_and_nlu_mappings",
1446
+ slot_name=slot_name,
1476
1447
  event_info=(
1477
- f"The slot '{slot.name}' has at least 1 slot mapping with "
1478
- f"'{KEY_ALLOW_NLU_CORRECTION}' set to 'true', but "
1479
- f"the slot mapping type is not 'from_llm'. "
1480
- f"Please set the slot mapping type to 'from_llm' "
1481
- f"to allow the LLM to correct this slot."
1448
+ f"The slot '{slot_name}' has both LLM and "
1449
+ f"NLU or custom slot mappings. "
1450
+ f"Please make sure that the slot has only one type of mapping."
1482
1451
  ),
1452
+ docs_link=DOCS_URL_DOMAIN + "#calm-slot-mappings",
1483
1453
  )
1484
1454
  all_good = False
1485
1455
 
@@ -1688,123 +1658,3 @@ class Validator:
1688
1658
  )
1689
1659
 
1690
1660
  return all_good
1691
-
1692
- def verify_digression_configuration(self) -> bool:
1693
- """Validates the digression configuration in flows."""
1694
- all_good = True
1695
-
1696
- for flow in self.flows.underlying_flows:
1697
- all_good = self._validate_ask_confirm_digressions(flow, all_good)
1698
- all_good = self._validate_block_digressions(flow, all_good)
1699
-
1700
- return all_good
1701
-
1702
- def _validate_ask_confirm_digressions(self, flow: Flow, all_good: bool) -> bool:
1703
- """Validates the ask_confirm_digressions configuration in a flow."""
1704
- for flow_id in flow.ask_confirm_digressions:
1705
- if flow_id == ALL_LABEL:
1706
- continue
1707
- if flow_id not in self.flows.flow_ids:
1708
- structlogger.error(
1709
- "validator.verify_digression_configuration.ask_confirm_digressions",
1710
- flow=flow.id,
1711
- event_info=(
1712
- f"The flow '{flow_id}' is listed in the "
1713
- f"`ask_confirm_digressions` configuration of flow "
1714
- f"'{flow.id}', but it is not found in the "
1715
- f"flows file. Please make sure that the flow id is correct."
1716
- ),
1717
- )
1718
- all_good = False
1719
-
1720
- if flow_id in flow.block_digressions:
1721
- structlogger.error(
1722
- "validator.verify_digression_configuration.overlap_digressions",
1723
- flow=flow.id,
1724
- event_info=(
1725
- f"The flow '{flow_id}' is listed in both the "
1726
- f"`ask_confirm_digressions` and `block_digressions` "
1727
- f"configuration of flow '{flow.id}'. "
1728
- f"Please make sure that the flow id is not listed in both "
1729
- f"configurations."
1730
- ),
1731
- )
1732
- all_good = False
1733
-
1734
- for step in flow.get_collect_steps():
1735
- for flow_id in step.ask_confirm_digressions:
1736
- if flow_id == ALL_LABEL:
1737
- continue
1738
-
1739
- if flow_id not in self.flows.flow_ids:
1740
- structlogger.error(
1741
- "validator.verify_digression_configuration.ask_confirm_digressions",
1742
- flow=flow.id,
1743
- step_id=step.id,
1744
- event_info=(
1745
- f"The flow '{flow_id}' is listed in the "
1746
- f"`ask_confirm_digressions` configuration of step "
1747
- f"'{step.id}' in flow '{flow.id}', but it is "
1748
- f"not found in the flows file. "
1749
- f"Please make sure that the flow id is correct."
1750
- ),
1751
- )
1752
- all_good = False
1753
-
1754
- if flow_id in step.block_digressions:
1755
- structlogger.error(
1756
- "validator.verify_digression_configuration.overlap_digressions",
1757
- flow=flow.id,
1758
- step_id=step.id,
1759
- event_info=(
1760
- f"The flow '{flow_id}' is listed in both the "
1761
- f"`ask_confirm_digressions` and `block_digressions` "
1762
- f"configuration of step '{step.id}' in flow '{flow.id}'. "
1763
- f"Please make sure that the flow id is not listed in both "
1764
- f"configurations."
1765
- ),
1766
- )
1767
- all_good = False
1768
-
1769
- return all_good
1770
-
1771
- def _validate_block_digressions(self, flow: Flow, all_good: bool) -> bool:
1772
- """Validates the block_digressions configuration in a flow."""
1773
- for flow_id in flow.block_digressions:
1774
- if flow_id == ALL_LABEL:
1775
- continue
1776
-
1777
- if flow_id not in self.flows.flow_ids:
1778
- structlogger.error(
1779
- "validator.verify_digression_configuration.block_digressions",
1780
- flow=flow.id,
1781
- event_info=(
1782
- f"The flow '{flow_id}' is listed in the `block_digressions` "
1783
- f"configuration of flow '{flow.id}', but it is not found "
1784
- f"in the flows file. Please make sure that the flow id "
1785
- f"is correct."
1786
- ),
1787
- )
1788
- all_good = False
1789
-
1790
- for step in flow.get_collect_steps():
1791
- for flow_id in step.block_digressions:
1792
- if flow_id == ALL_LABEL:
1793
- continue
1794
-
1795
- if flow_id not in self.flows.flow_ids:
1796
- structlogger.error(
1797
- "validator.verify_digression_configuration.block_digressions",
1798
- flow=flow.id,
1799
- step_id=step.id,
1800
- event_info=(
1801
- f"The flow '{flow_id}' is listed in the "
1802
- f"`block_digressions` configuration of step "
1803
- f"'{step.id}' in flow '{flow.id}', but it is "
1804
- f"not found in the flows file. "
1805
- f"Please make sure that the flow id is correct."
1806
- ),
1807
- )
1808
- all_good = False
1809
-
1810
- return all_good
rasa/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  # this file will automatically be changed,
2
2
  # do not add anything but the version number here!
3
- __version__ = "3.12.0.dev10"
3
+ __version__ = "3.12.0.dev12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rasa-pro
3
- Version: 3.12.0.dev10
3
+ Version: 3.12.0.dev12
4
4
  Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
5
5
  Home-page: https://rasa.com
6
6
  Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework