rasa-pro 3.12.29__py3-none-any.whl → 3.12.30__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/dialogue_understanding/processor/command_processor.py +27 -11
- rasa/version.py +1 -1
- {rasa_pro-3.12.29.dist-info → rasa_pro-3.12.30.dist-info}/METADATA +1 -1
- {rasa_pro-3.12.29.dist-info → rasa_pro-3.12.30.dist-info}/RECORD +7 -7
- {rasa_pro-3.12.29.dist-info → rasa_pro-3.12.30.dist-info}/NOTICE +0 -0
- {rasa_pro-3.12.29.dist-info → rasa_pro-3.12.30.dist-info}/WHEEL +0 -0
- {rasa_pro-3.12.29.dist-info → rasa_pro-3.12.30.dist-info}/entry_points.txt +0 -0
|
@@ -399,19 +399,12 @@ def clean_up_commands(
|
|
|
399
399
|
"""
|
|
400
400
|
domain = domain if domain else Domain.empty()
|
|
401
401
|
|
|
402
|
-
# we consider all slots that were set in the tracker for potential corrections
|
|
403
|
-
# in the correct_slot_command we will check if a slot should actually be
|
|
404
|
-
# corrected
|
|
405
|
-
slots_so_far = set(
|
|
406
|
-
[event.key for event in tracker.events if isinstance(event, SlotSet)]
|
|
407
|
-
)
|
|
408
|
-
|
|
409
402
|
clean_commands: List[Command] = []
|
|
410
403
|
|
|
411
404
|
for command in commands:
|
|
412
405
|
if isinstance(command, SetSlotCommand):
|
|
413
406
|
clean_commands = clean_up_slot_command(
|
|
414
|
-
clean_commands, command, tracker, all_flows
|
|
407
|
+
clean_commands, command, tracker, all_flows
|
|
415
408
|
)
|
|
416
409
|
|
|
417
410
|
elif isinstance(command, CancelFlowCommand) and contains_command(
|
|
@@ -502,6 +495,25 @@ def clean_up_commands(
|
|
|
502
495
|
return clean_commands
|
|
503
496
|
|
|
504
497
|
|
|
498
|
+
def _get_slots_eligible_for_correction(tracker: DialogueStateTracker) -> Set[str]:
|
|
499
|
+
"""Get all slots that are eligible for correction.
|
|
500
|
+
|
|
501
|
+
# We consider all slots, which are not None, that were set in the tracker
|
|
502
|
+
# eligible for correction.
|
|
503
|
+
# In the correct_slot_command we will check if a slot should actually be
|
|
504
|
+
# corrected.
|
|
505
|
+
"""
|
|
506
|
+
# get all slots that were set in the tracker
|
|
507
|
+
slots_so_far = set(
|
|
508
|
+
[event.key for event in tracker.events if isinstance(event, SlotSet)]
|
|
509
|
+
)
|
|
510
|
+
|
|
511
|
+
# filter out slots that are set to None (None = empty value)
|
|
512
|
+
slots_so_far = {slot for slot in slots_so_far if tracker.get_slot(slot) is not None}
|
|
513
|
+
|
|
514
|
+
return slots_so_far
|
|
515
|
+
|
|
516
|
+
|
|
505
517
|
def ensure_max_number_of_command_type(
|
|
506
518
|
commands: List[Command], command_type: Type[Command], n: int
|
|
507
519
|
) -> List[Command]:
|
|
@@ -561,7 +573,6 @@ def clean_up_slot_command(
|
|
|
561
573
|
command: SetSlotCommand,
|
|
562
574
|
tracker: DialogueStateTracker,
|
|
563
575
|
all_flows: FlowsList,
|
|
564
|
-
slots_so_far: Set[str],
|
|
565
576
|
) -> List[Command]:
|
|
566
577
|
"""Clean up a slot command.
|
|
567
578
|
|
|
@@ -574,7 +585,6 @@ def clean_up_slot_command(
|
|
|
574
585
|
command: The command to clean up.
|
|
575
586
|
tracker: The dialogue state tracker.
|
|
576
587
|
all_flows: All flows.
|
|
577
|
-
slots_so_far: The slots that have been filled so far.
|
|
578
588
|
|
|
579
589
|
Returns:
|
|
580
590
|
The cleaned up commands.
|
|
@@ -643,7 +653,13 @@ def clean_up_slot_command(
|
|
|
643
653
|
)
|
|
644
654
|
return resulting_commands
|
|
645
655
|
|
|
646
|
-
|
|
656
|
+
# get all slots that were set in the tracker and are eligible for correction
|
|
657
|
+
slots_eligible_for_correction = _get_slots_eligible_for_correction(tracker)
|
|
658
|
+
|
|
659
|
+
if (
|
|
660
|
+
command.name in slots_eligible_for_correction
|
|
661
|
+
and command.name != ROUTE_TO_CALM_SLOT
|
|
662
|
+
):
|
|
647
663
|
current_collect_info = get_current_collect_step(stack, all_flows)
|
|
648
664
|
|
|
649
665
|
if current_collect_info and current_collect_info.collect == command.name:
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.12.
|
|
3
|
+
Version: 3.12.30
|
|
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
|
Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
|
|
6
6
|
Author: Rasa Technologies GmbH
|
|
@@ -436,7 +436,7 @@ rasa/dialogue_understanding/patterns/skip_question.py,sha256=fJ1MC0WEEtS-BpnGJEf
|
|
|
436
436
|
rasa/dialogue_understanding/patterns/user_silence.py,sha256=xP-QMnd-MsybH5z4g01hBv4OLOHcw6m3rc26LQfe2zo,1140
|
|
437
437
|
rasa/dialogue_understanding/patterns/validate_slot.py,sha256=hqd5AEGT3M3HLNhMwuI9W9kZNCvgU6GyI-2xc2b4kz8,2085
|
|
438
438
|
rasa/dialogue_understanding/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
439
|
-
rasa/dialogue_understanding/processor/command_processor.py,sha256=
|
|
439
|
+
rasa/dialogue_understanding/processor/command_processor.py,sha256=At3R1gwYMggfeC-j-YJzYTMLYKXWi2RGh0SMCEx8EXo,33522
|
|
440
440
|
rasa/dialogue_understanding/processor/command_processor_component.py,sha256=rkErI_Uo7s3LsEojUSGSRbWGyGaX7GtGOYSJn0V-TI4,1650
|
|
441
441
|
rasa/dialogue_understanding/stack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
442
442
|
rasa/dialogue_understanding/stack/dialogue_stack.py,sha256=cYV6aQeh0EuOJHODDqK3biqXozYTX8baPgLwHhPxFqs,5244
|
|
@@ -822,9 +822,9 @@ rasa/utils/train_utils.py,sha256=ClJx-6x3-h3Vt6mskacgkcCUJTMXjFPe3zAcy_DfmaU,212
|
|
|
822
822
|
rasa/utils/url_tools.py,sha256=dZ1HGkVdWTJB7zYEdwoDIrEuyX9HE5WsxKKFVsXBLE0,1218
|
|
823
823
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
824
824
|
rasa/validator.py,sha256=524VlFTYK0B3iXYveVD6BDC3K0j1QfpzJ9O-TAWczmc,83166
|
|
825
|
-
rasa/version.py,sha256=
|
|
826
|
-
rasa_pro-3.12.
|
|
827
|
-
rasa_pro-3.12.
|
|
828
|
-
rasa_pro-3.12.
|
|
829
|
-
rasa_pro-3.12.
|
|
830
|
-
rasa_pro-3.12.
|
|
825
|
+
rasa/version.py,sha256=9pHHdCcacB7k3dA4b6QLVw9JG0FDRA0ckMI39G-23fI,118
|
|
826
|
+
rasa_pro-3.12.30.dist-info/METADATA,sha256=G441WLaRBhJh8vVqd4RRdKP2PvQN5KruxfCbc7lh4QQ,10609
|
|
827
|
+
rasa_pro-3.12.30.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
828
|
+
rasa_pro-3.12.30.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
829
|
+
rasa_pro-3.12.30.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
830
|
+
rasa_pro-3.12.30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|