rasa-pro 3.12.1.dev2__py3-none-any.whl → 3.12.2__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/generator/llm_based_command_generator.py +24 -1
- rasa/dialogue_understanding/processor/command_processor.py +20 -1
- rasa/keys +1 -0
- rasa/shared/constants.py +1 -0
- rasa/shared/providers/llm/default_litellm_llm_client.py +6 -1
- rasa/version.py +1 -1
- {rasa_pro-3.12.1.dev2.dist-info → rasa_pro-3.12.2.dist-info}/METADATA +1 -1
- {rasa_pro-3.12.1.dev2.dist-info → rasa_pro-3.12.2.dist-info}/RECORD +11 -10
- {rasa_pro-3.12.1.dev2.dist-info → rasa_pro-3.12.2.dist-info}/NOTICE +0 -0
- {rasa_pro-3.12.1.dev2.dist-info → rasa_pro-3.12.2.dist-info}/WHEEL +0 -0
- {rasa_pro-3.12.1.dev2.dist-info → rasa_pro-3.12.2.dist-info}/entry_points.txt +0 -0
|
@@ -12,6 +12,9 @@ from rasa.dialogue_understanding.commands import (
|
|
|
12
12
|
SetSlotCommand,
|
|
13
13
|
StartFlowCommand,
|
|
14
14
|
)
|
|
15
|
+
from rasa.dialogue_understanding.commands.handle_digressions_command import (
|
|
16
|
+
HandleDigressionsCommand,
|
|
17
|
+
)
|
|
15
18
|
from rasa.dialogue_understanding.constants import KEY_MINIMIZE_NUM_CALLS
|
|
16
19
|
from rasa.dialogue_understanding.generator import CommandGenerator
|
|
17
20
|
from rasa.dialogue_understanding.generator.constants import (
|
|
@@ -584,6 +587,24 @@ class LLMBasedCommandGenerator(
|
|
|
584
587
|
|
|
585
588
|
return filtered_commands
|
|
586
589
|
|
|
590
|
+
def _should_merge_llm_commands(
|
|
591
|
+
self,
|
|
592
|
+
prior_commands: List[Command],
|
|
593
|
+
prior_start_flow_names: Set[str],
|
|
594
|
+
) -> bool:
|
|
595
|
+
"""Check if the LLM current commands should be merged with the prior commands.
|
|
596
|
+
|
|
597
|
+
This can be done if there are no prior start flow commands and
|
|
598
|
+
no prior handle digressions commands.
|
|
599
|
+
"""
|
|
600
|
+
prior_handle_digressions = [
|
|
601
|
+
command
|
|
602
|
+
for command in prior_commands
|
|
603
|
+
if isinstance(command, HandleDigressionsCommand)
|
|
604
|
+
]
|
|
605
|
+
|
|
606
|
+
return not prior_start_flow_names and not prior_handle_digressions
|
|
607
|
+
|
|
587
608
|
def _check_start_flow_command_overlap(
|
|
588
609
|
self,
|
|
589
610
|
prior_commands: List[Command],
|
|
@@ -596,7 +617,9 @@ class LLMBasedCommandGenerator(
|
|
|
596
617
|
prior_start_flow_names
|
|
597
618
|
)
|
|
598
619
|
|
|
599
|
-
if not different_flow_names
|
|
620
|
+
if not different_flow_names or self._should_merge_llm_commands(
|
|
621
|
+
prior_commands, prior_start_flow_names
|
|
622
|
+
):
|
|
600
623
|
return prior_commands + commands
|
|
601
624
|
|
|
602
625
|
# discard the flow names that are different to prior start flow commands
|
|
@@ -447,7 +447,14 @@ def clean_up_commands(
|
|
|
447
447
|
continue
|
|
448
448
|
|
|
449
449
|
if should_add_handle_digressions_command(tracker, all_flows, top_flow_id):
|
|
450
|
-
|
|
450
|
+
handle_digression_command = HandleDigressionsCommand(flow=command.flow)
|
|
451
|
+
if handle_digression_command in clean_commands:
|
|
452
|
+
structlogger.debug(
|
|
453
|
+
"command_processor.clean_up_commands.skip_handle_digressions.command_already_present",
|
|
454
|
+
command=handle_digression_command,
|
|
455
|
+
)
|
|
456
|
+
continue
|
|
457
|
+
clean_commands.append(handle_digression_command)
|
|
451
458
|
structlogger.debug(
|
|
452
459
|
"command_processor.clean_up_commands.push_handle_digressions",
|
|
453
460
|
command=command,
|
|
@@ -487,6 +494,18 @@ def clean_up_commands(
|
|
|
487
494
|
elif not tracker.has_coexistence_routing_slot and len(clean_commands) > 1:
|
|
488
495
|
clean_commands = filter_cannot_handle_command_for_skipped_slots(clean_commands)
|
|
489
496
|
|
|
497
|
+
# remove cancel flow when there is a handle digression command
|
|
498
|
+
# otherwise the cancel command will cancel the active flow which defined a specific
|
|
499
|
+
# behavior for the digression
|
|
500
|
+
if contains_command(clean_commands, HandleDigressionsCommand) and contains_command(
|
|
501
|
+
clean_commands, CancelFlowCommand
|
|
502
|
+
):
|
|
503
|
+
clean_commands = [
|
|
504
|
+
command
|
|
505
|
+
for command in clean_commands
|
|
506
|
+
if not isinstance(command, CancelFlowCommand)
|
|
507
|
+
]
|
|
508
|
+
|
|
490
509
|
clean_commands = ensure_max_number_of_command_type(
|
|
491
510
|
clean_commands, RepeatBotMessagesCommand, 1
|
|
492
511
|
)
|
rasa/keys
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"segment": "CcvVD1I68Nkkxrv93cIqv1twIwrwG8nz", "sentry": "a283f1fde04347b099c8d729109dd450@o251570"}
|
rasa/shared/constants.py
CHANGED
|
@@ -183,6 +183,7 @@ OPENAI_API_VERSION_CONFIG_KEY = "openai_api_version"
|
|
|
183
183
|
|
|
184
184
|
AWS_BEDROCK_PROVIDER = "bedrock"
|
|
185
185
|
AWS_SAGEMAKER_PROVIDER = "sagemaker"
|
|
186
|
+
AWS_SAGEMAKER_CHAT_PROVIDER = "sagemaker_chat"
|
|
186
187
|
|
|
187
188
|
API_BASE_CONFIG_KEY = "api_base"
|
|
188
189
|
API_TYPE_CONFIG_KEY = "api_type"
|
|
@@ -4,6 +4,7 @@ from typing import Any, Dict
|
|
|
4
4
|
|
|
5
5
|
from rasa.shared.constants import (
|
|
6
6
|
AWS_BEDROCK_PROVIDER,
|
|
7
|
+
AWS_SAGEMAKER_CHAT_PROVIDER,
|
|
7
8
|
AWS_SAGEMAKER_PROVIDER,
|
|
8
9
|
)
|
|
9
10
|
from rasa.shared.providers._configs.default_litellm_client_config import (
|
|
@@ -100,7 +101,11 @@ class DefaultLiteLLMClient(_BaseLiteLLMClient):
|
|
|
100
101
|
# SageMaker) in Rasa by allowing AWS secrets to be provided as extra
|
|
101
102
|
# parameters without triggering validation errors due to missing AWS
|
|
102
103
|
# environment variables.
|
|
103
|
-
if self.provider.lower() in [
|
|
104
|
+
if self.provider.lower() in [
|
|
105
|
+
AWS_BEDROCK_PROVIDER,
|
|
106
|
+
AWS_SAGEMAKER_PROVIDER,
|
|
107
|
+
AWS_SAGEMAKER_CHAT_PROVIDER,
|
|
108
|
+
]:
|
|
104
109
|
validate_aws_setup_for_litellm_clients(
|
|
105
110
|
self._litellm_model_name,
|
|
106
111
|
self._litellm_extra_parameters,
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.12.
|
|
3
|
+
Version: 3.12.2
|
|
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
|
|
@@ -401,7 +401,7 @@ rasa/dialogue_understanding/generator/command_parser.py,sha256=wf6FSgqBw5F0legg0
|
|
|
401
401
|
rasa/dialogue_understanding/generator/constants.py,sha256=nA184YgNRaoA9Q0XlLp7VKxGCX4nN_b3zLyDaL22rQw,1018
|
|
402
402
|
rasa/dialogue_understanding/generator/flow_document_template.jinja2,sha256=f4H6vVd-_nX_RtutMh1xD3ZQE_J2OyuPHAtiltfiAPY,253
|
|
403
403
|
rasa/dialogue_understanding/generator/flow_retrieval.py,sha256=wlGnMj17-X1-siQmdSvOd7K61sRzBf82MQEL2pqDQMI,17891
|
|
404
|
-
rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=
|
|
404
|
+
rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=CksE7iUchYuKwCJBYhLhEaf4kMLtAOyUFBJOxYj_FFU,23237
|
|
405
405
|
rasa/dialogue_understanding/generator/llm_command_generator.py,sha256=z7jhIJ3W_5GFH-p15kVoWbigMIoY8fIJjc_j_uX7yxw,2581
|
|
406
406
|
rasa/dialogue_understanding/generator/multi_step/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
407
407
|
rasa/dialogue_understanding/generator/multi_step/fill_slots_prompt.jinja2,sha256=Y0m673tAML3cFPaLM-urMXDsBYUUcXIw9YUpkAhGUuA,2933
|
|
@@ -438,7 +438,7 @@ rasa/dialogue_understanding/patterns/skip_question.py,sha256=fJ1MC0WEEtS-BpnGJEf
|
|
|
438
438
|
rasa/dialogue_understanding/patterns/user_silence.py,sha256=xP-QMnd-MsybH5z4g01hBv4OLOHcw6m3rc26LQfe2zo,1140
|
|
439
439
|
rasa/dialogue_understanding/patterns/validate_slot.py,sha256=hqd5AEGT3M3HLNhMwuI9W9kZNCvgU6GyI-2xc2b4kz8,2085
|
|
440
440
|
rasa/dialogue_understanding/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
441
|
-
rasa/dialogue_understanding/processor/command_processor.py,sha256
|
|
441
|
+
rasa/dialogue_understanding/processor/command_processor.py,sha256=-uOr7z4EhIQl1ffD-q2xoTYA0qiFSDArdgdyo7kJHOA,31884
|
|
442
442
|
rasa/dialogue_understanding/processor/command_processor_component.py,sha256=9NWJxMibKeaOBLDRT9lcylJr0ki5sQ0hJRtLlKHIlnI,1526
|
|
443
443
|
rasa/dialogue_understanding/stack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
444
444
|
rasa/dialogue_understanding/stack/dialogue_stack.py,sha256=cYV6aQeh0EuOJHODDqK3biqXozYTX8baPgLwHhPxFqs,5244
|
|
@@ -534,6 +534,7 @@ rasa/graph_components/validators/default_recipe_validator.py,sha256=iOVoB7zVTKes
|
|
|
534
534
|
rasa/graph_components/validators/finetuning_validator.py,sha256=VfCGytnweijKBG8bAqYp7zKZB2aRgi2ZI8R0eou5Ev4,12865
|
|
535
535
|
rasa/hooks.py,sha256=5ZMrqNz323w56MMY6E8jeZ_YXgRqq8p-yi18S2XOmbo,4061
|
|
536
536
|
rasa/jupyter.py,sha256=TCYVD4QPQIMmfA6ZwDUBOBTAECwCwbU2XOkosodLO9k,1782
|
|
537
|
+
rasa/keys,sha256=2Stg1fstgJ203cOoW1B2gGMY29fhEnjIfTVxKv_fqPo,101
|
|
537
538
|
rasa/llm_fine_tuning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
538
539
|
rasa/llm_fine_tuning/annotation_module.py,sha256=6wBBjGwONVlikp79xAHp5g3rydEhPM6kP1bw1g-maYk,8578
|
|
539
540
|
rasa/llm_fine_tuning/conversations.py,sha256=QZVaUsfXe5iIE830Bv-_3oo8luhGfHpirvubxzOoEvA,4116
|
|
@@ -626,7 +627,7 @@ rasa/nlu/utils/spacy_utils.py,sha256=5EnHR-MVAZhGbg2rq8VpOu7I0tagV3ThRTlM0-WO2Cg
|
|
|
626
627
|
rasa/plugin.py,sha256=cSmFhSWr5WQyYXdJOWwgH4ra_2kbhoNLZAtnqcsGny4,3071
|
|
627
628
|
rasa/server.py,sha256=eomGM_3SpBxaF_-VfZbkSO_bMk_vI1XLUZjt32f4gcI,59390
|
|
628
629
|
rasa/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
629
|
-
rasa/shared/constants.py,sha256=
|
|
630
|
+
rasa/shared/constants.py,sha256=RrlkeBkjZikbU0SDXAB6YnaSLbOrTB0puRBa3B5OS1g,12010
|
|
630
631
|
rasa/shared/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
631
632
|
rasa/shared/core/command_payload_reader.py,sha256=puHYsp9xbX0YQm2L1NDBItOFmdzI7AzmfGefgcHiCc0,3871
|
|
632
633
|
rasa/shared/core/constants.py,sha256=zT2zHFUqqbExPN9A0QmN3hKJic_YHoO9fBBP_np_iXs,6601
|
|
@@ -737,7 +738,7 @@ rasa/shared/providers/embedding/openai_embedding_client.py,sha256=XNRGE7apo2v3kW
|
|
|
737
738
|
rasa/shared/providers/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
738
739
|
rasa/shared/providers/llm/_base_litellm_client.py,sha256=NQ_AxENfnUT_cEsshBLPh-4RtsZEVNAT2OaO8X7yQXk,11411
|
|
739
740
|
rasa/shared/providers/llm/azure_openai_llm_client.py,sha256=tMHn0i7-HZb01__CuzKvzSbXAq2dE0Oov4U7qIl74no,14989
|
|
740
|
-
rasa/shared/providers/llm/default_litellm_llm_client.py,sha256=
|
|
741
|
+
rasa/shared/providers/llm/default_litellm_llm_client.py,sha256=xx-o-NX_mtx6AszK--ZRj8n8JyEJuVu1-42dt8AynBM,4083
|
|
741
742
|
rasa/shared/providers/llm/litellm_router_llm_client.py,sha256=_6vAdPLAVSI_sBJLaXLnE87M-0ip_klfQ78fQ_pyoyI,7947
|
|
742
743
|
rasa/shared/providers/llm/llm_client.py,sha256=-hTCRsL-A3GCMRHtcyCgcCyra-9OJ8GUC-mURoRXH0k,3242
|
|
743
744
|
rasa/shared/providers/llm/llm_response.py,sha256=8mOpZdmh4-3yM7aOmNO0yEYUmRDErfoP7ZDMUuHr2Cc,3504
|
|
@@ -821,9 +822,9 @@ rasa/utils/train_utils.py,sha256=ClJx-6x3-h3Vt6mskacgkcCUJTMXjFPe3zAcy_DfmaU,212
|
|
|
821
822
|
rasa/utils/url_tools.py,sha256=dZ1HGkVdWTJB7zYEdwoDIrEuyX9HE5WsxKKFVsXBLE0,1218
|
|
822
823
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
823
824
|
rasa/validator.py,sha256=tAFzUKVbCPRPx0LjCUKY0zSCaX2hgINuaMfK123FCyc,88716
|
|
824
|
-
rasa/version.py,sha256=
|
|
825
|
-
rasa_pro-3.12.
|
|
826
|
-
rasa_pro-3.12.
|
|
827
|
-
rasa_pro-3.12.
|
|
828
|
-
rasa_pro-3.12.
|
|
829
|
-
rasa_pro-3.12.
|
|
825
|
+
rasa/version.py,sha256=xmNdUAHXciuCW_NNj2FUxUVh8kk0IW2lFAlF1P59j_4,117
|
|
826
|
+
rasa_pro-3.12.2.dist-info/METADATA,sha256=WTM7ZDxzHBxholu0CZ1nC2_slKKcn4QUqH1ua7AOVMs,10688
|
|
827
|
+
rasa_pro-3.12.2.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
828
|
+
rasa_pro-3.12.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
829
|
+
rasa_pro-3.12.2.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
830
|
+
rasa_pro-3.12.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|