rasa-pro 3.12.5__py3-none-any.whl → 3.12.6__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/core/actions/action.py +0 -6
- rasa/core/channels/voice_ready/audiocodes.py +52 -17
- rasa/core/channels/voice_stream/audiocodes.py +53 -9
- rasa/core/channels/voice_stream/genesys.py +146 -16
- rasa/core/policies/flows/flow_executor.py +3 -38
- rasa/core/processor.py +19 -5
- rasa/core/utils.py +53 -0
- rasa/dialogue_understanding/commands/cancel_flow_command.py +4 -59
- rasa/dialogue_understanding/commands/start_flow_command.py +0 -41
- rasa/dialogue_understanding/generator/command_generator.py +67 -0
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +2 -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/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 +23 -5
- rasa/shared/nlu/constants.py +0 -1
- rasa/shared/utils/common.py +11 -1
- rasa/validator.py +1 -123
- rasa/version.py +1 -1
- {rasa_pro-3.12.5.dist-info → rasa_pro-3.12.6.dist-info}/METADATA +4 -5
- {rasa_pro-3.12.5.dist-info → rasa_pro-3.12.6.dist-info}/RECORD +30 -35
- {rasa_pro-3.12.5.dist-info → rasa_pro-3.12.6.dist-info}/WHEEL +1 -1
- README.md +0 -38
- 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/keys +0 -1
- {rasa_pro-3.12.5.dist-info → rasa_pro-3.12.6.dist-info}/NOTICE +0 -0
- {rasa_pro-3.12.5.dist-info → rasa_pro-3.12.6.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
README.md,sha256=rn81McEFcq6MM6i5ZVs-MV7HQd4ffBVtBeVV2DvF7Bo,3175
|
|
2
1
|
rasa/__init__.py,sha256=YXG8RzVxiSJ__v-AewtV453YoCbmzWlHsU_4S0O2XpE,206
|
|
3
2
|
rasa/__main__.py,sha256=OmUXcaA9l7KR_eSYCwaCSetuczxjrcN2taNnZ2ZUTbA,6472
|
|
4
3
|
rasa/anonymization/__init__.py,sha256=Z-ZUW2ofZGfI6ysjYIS7U0JL4JSzDNOkHiiXK488Zik,86
|
|
@@ -93,10 +92,9 @@ rasa/cli/x.py,sha256=C7dLtYXAkD-uj7hNj7Pz5YbOupp2yRcMjQbsEVqXUJ8,6825
|
|
|
93
92
|
rasa/constants.py,sha256=m6If7alC5obaHU-JQWXEBo4mooVwIMzNRTjyTzzZSVg,1306
|
|
94
93
|
rasa/core/__init__.py,sha256=wTSmsFlgK0Ylvuyq20q9APwpT5xyVJYZfzhs4rrkciM,456
|
|
95
94
|
rasa/core/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
|
-
rasa/core/actions/action.py,sha256=
|
|
95
|
+
rasa/core/actions/action.py,sha256=2mDvSi1pSWipDWhprEFjDXf-X9yoID9DQEvmf0rQcJM,42664
|
|
97
96
|
rasa/core/actions/action_clean_stack.py,sha256=xUP-2ipPsPAnAiwP17c-ezmHPSrV4JSUZr-eSgPQwIs,2279
|
|
98
97
|
rasa/core/actions/action_exceptions.py,sha256=hghzXYN6VeHC-O_O7WiPesCNV86ZTkHgG90ZnQcbai8,724
|
|
99
|
-
rasa/core/actions/action_handle_digressions.py,sha256=p3cjzTfT0GEsJlYip-TPnr-PJQ545vQnNp0JPKBUs8A,5234
|
|
100
98
|
rasa/core/actions/action_hangup.py,sha256=o5iklHG-F9IcRgWis5C6AumVXznxzAV3o9zdduhozEM,994
|
|
101
99
|
rasa/core/actions/action_repeat_bot_messages.py,sha256=2DZFHPS7SKslz_Pm3Tyn0154xTws3E7lMYKl2ktQPTQ,3522
|
|
102
100
|
rasa/core/actions/action_run_slot_rejections.py,sha256=Rng5h-h5b63HisUeSFZXQ3FnNi-jPoqSbqnDo8M-jTk,7248
|
|
@@ -269,7 +267,7 @@ rasa/core/channels/telegram.py,sha256=TKVknsk3U9tYeY1a8bzlhqkltWmZfGSOvrcmwa9qoz
|
|
|
269
267
|
rasa/core/channels/twilio.py,sha256=2BTQpyx0b0yPpc0A2BHYfxLPgodrLGLs8nq6i3lVGAM,5906
|
|
270
268
|
rasa/core/channels/vier_cvg.py,sha256=GkrWKu7NRMFtLMyYp-kQ2taWAc_keAwhYrkVPW56iaU,13544
|
|
271
269
|
rasa/core/channels/voice_ready/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
272
|
-
rasa/core/channels/voice_ready/audiocodes.py,sha256=
|
|
270
|
+
rasa/core/channels/voice_ready/audiocodes.py,sha256=OFE84rOPfl3fJ5VTiywIpiKgAYm0YDMFArsdL3THW-0,20781
|
|
273
271
|
rasa/core/channels/voice_ready/jambonz.py,sha256=r7O8k_X934lQe0fzY7R0z_hMeX5qMN663bTugQ1-8eQ,4154
|
|
274
272
|
rasa/core/channels/voice_ready/jambonz_protocol.py,sha256=idWArI4SRr4fjyZx3VIUoua_cbLwpvw4e5VeHyQjE8E,12975
|
|
275
273
|
rasa/core/channels/voice_ready/twilio_voice.py,sha256=5N5dQ2l_u8CC9J16USgufl6MB1bJziCky7VT58MPt68,14520
|
|
@@ -281,10 +279,10 @@ rasa/core/channels/voice_stream/asr/asr_event.py,sha256=skPwrkRrcsptmeWXu9q68i4B
|
|
|
281
279
|
rasa/core/channels/voice_stream/asr/azure.py,sha256=uqg2xAmGfP8N9pts_AT6KxobiuQIqRy1lkyU7vqC564,5845
|
|
282
280
|
rasa/core/channels/voice_stream/asr/deepgram.py,sha256=9cIqRuv9gWzOfEKxeDbhijGoT8EPUV7Oo493WXaHlBo,5682
|
|
283
281
|
rasa/core/channels/voice_stream/audio_bytes.py,sha256=3V0QQplPD-kVfebaaeVcKgV7pwIJyjnTenujVD3y3sY,340
|
|
284
|
-
rasa/core/channels/voice_stream/audiocodes.py,sha256=
|
|
282
|
+
rasa/core/channels/voice_stream/audiocodes.py,sha256=WVAd5ksO97y7a6Wvv6PqQKQVgS1_IdRXeDIjnl6IAkY,12498
|
|
285
283
|
rasa/core/channels/voice_stream/browser_audio.py,sha256=fDwp-yaalik8R92EOJHsgHMuNAg9yoeGWVRGMCH2lJQ,3939
|
|
286
284
|
rasa/core/channels/voice_stream/call_state.py,sha256=fbwVbT0ddE7AjTYjx-Mq5jBMEGXanbug5wlBwstaews,899
|
|
287
|
-
rasa/core/channels/voice_stream/genesys.py,sha256
|
|
285
|
+
rasa/core/channels/voice_stream/genesys.py,sha256=EyZ4G3gfiQ5HXP6jslTjXRBYVEhpyO8nK5r6znQtHtE,16965
|
|
288
286
|
rasa/core/channels/voice_stream/tts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
289
287
|
rasa/core/channels/voice_stream/tts/azure.py,sha256=Fj9vLg-8d6aCoDcycDMG0oIPl5gw7Nhb8MXb-wBvLhE,4221
|
|
290
288
|
rasa/core/channels/voice_stream/tts/cartesia.py,sha256=cH2eHicZ_NCWtDH-cn9Chq8SSm-1agJRy-ieDJCVlD4,5407
|
|
@@ -334,7 +332,7 @@ rasa/core/policies/enterprise_search_prompt_with_citation_template.jinja2,sha256
|
|
|
334
332
|
rasa/core/policies/flow_policy.py,sha256=597G62hrLF_CAMCvu-TPRldFnjMP2XEIkhcIaPWcQAc,7489
|
|
335
333
|
rasa/core/policies/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
336
334
|
rasa/core/policies/flows/flow_exceptions.py,sha256=_FQuN-cerQDM1pivce9bz4zylh5UYkljvYS1gjDukHI,1527
|
|
337
|
-
rasa/core/policies/flows/flow_executor.py,sha256=
|
|
335
|
+
rasa/core/policies/flows/flow_executor.py,sha256=sT7ZFrm_CKVKBv5SO0M_QE984ZFw8t6trm8dMxCXbv8,25649
|
|
338
336
|
rasa/core/policies/flows/flow_step_result.py,sha256=agjPrD6lahGSe2ViO5peBeoMdI9ngVGRSgtytgxmJmg,1360
|
|
339
337
|
rasa/core/policies/intentless_policy.py,sha256=rSETeSDC3jodKvVeNeBc5OBptpSCsEYJdeJEB0b2p3U,36091
|
|
340
338
|
rasa/core/policies/intentless_prompt_template.jinja2,sha256=KhIL3cruMmkxhrs5oVbqgSvK6ZiN_6TQ_jXrgtEB-ZY,677
|
|
@@ -343,7 +341,7 @@ rasa/core/policies/policy.py,sha256=5SUnPajSTSf8PzB1-jFbQPtsvR-zLN-xkjeotWOxuJc,
|
|
|
343
341
|
rasa/core/policies/rule_policy.py,sha256=EItfUn07JIBLRIbriPKDprsvWq_-xzZTGrlTS2erByA,50730
|
|
344
342
|
rasa/core/policies/ted_policy.py,sha256=0RzIuyrtt4PxLcqQ-bfaExkZvU-TnsMbgmDcwh2SakY,87710
|
|
345
343
|
rasa/core/policies/unexpected_intent_policy.py,sha256=ZXvbswf2NDy00kHmBQcyXa1OVYFyc79HQKrFkQ4gCfM,39609
|
|
346
|
-
rasa/core/processor.py,sha256=
|
|
344
|
+
rasa/core/processor.py,sha256=sUEKKDFHw0uDw8BgorN4DFQa5f_kVbOS344qV4F0oDk,59821
|
|
347
345
|
rasa/core/run.py,sha256=5qq1Z-GiIrFejsthOnnkhQtNiqccuYHYf8ixP49PSHk,11484
|
|
348
346
|
rasa/core/secrets_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
349
347
|
rasa/core/secrets_manager/constants.py,sha256=dTDHenvG1JBVi34QIR6FpdO5RDOXQwAjAxLlgJ2ZNEI,1193
|
|
@@ -360,7 +358,7 @@ rasa/core/training/converters/responses_prefix_converter.py,sha256=D4wZ8XWBowUNq
|
|
|
360
358
|
rasa/core/training/interactive.py,sha256=OKTg2asZ_gC8S9GIJtDfK2q-hvtZeOC6CEkbr5jy8BU,60342
|
|
361
359
|
rasa/core/training/story_conflict.py,sha256=sr-DOpBMz2VikXcmpYiqrlRY2O_4ErX9GKlFI1fjjcM,13592
|
|
362
360
|
rasa/core/training/training.py,sha256=A7f3O4Nnfik1VVAGAI1VM3ZoxmZxNxqZxe_UGKO4Ado,3031
|
|
363
|
-
rasa/core/utils.py,sha256=
|
|
361
|
+
rasa/core/utils.py,sha256=i83G-AnFaNuGlsqCE-jJ-JNPr7V1y6rDrp5xQsmurk4,14048
|
|
364
362
|
rasa/core/visualize.py,sha256=ZP5k8YI3r7A_ZKUhBmXZ6PvBQ-dSw19xwUjHxCAfr3g,2125
|
|
365
363
|
rasa/dialogue_understanding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
366
364
|
rasa/dialogue_understanding/coexistence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -370,7 +368,7 @@ rasa/dialogue_understanding/coexistence/llm_based_router.py,sha256=UTLMZpynSRt8q
|
|
|
370
368
|
rasa/dialogue_understanding/coexistence/router_template.jinja2,sha256=CHWFreN0sv1EbPh-hf5AlCt3zxy2_llX1Pdn9Q11Y18,357
|
|
371
369
|
rasa/dialogue_understanding/commands/__init__.py,sha256=F-pLETYRUjhIkjjDfXGUuPsK_ac1HcLmJkrUUP0RhME,2259
|
|
372
370
|
rasa/dialogue_understanding/commands/can_not_handle_command.py,sha256=fKOj9ScLxuaFO9Iw0p7og_4zMiw2weBdx322rBKlnCI,3519
|
|
373
|
-
rasa/dialogue_understanding/commands/cancel_flow_command.py,sha256=
|
|
371
|
+
rasa/dialogue_understanding/commands/cancel_flow_command.py,sha256=7Jcvza6OBT8vM7bwJlTCujKsCMrC8gxR0DE6uaIb5_0,5340
|
|
374
372
|
rasa/dialogue_understanding/commands/change_flow_command.py,sha256=NnD9PM0B9o4oxTtYdcb-lDBC0-oQkbAQRB-55iYCkng,2409
|
|
375
373
|
rasa/dialogue_understanding/commands/chit_chat_answer_command.py,sha256=PtwNuAHJdIUQ_PIOv5bguVJMyZ_2jPtoozQQdiebKB4,2842
|
|
376
374
|
rasa/dialogue_understanding/commands/clarify_command.py,sha256=H-sse6PA47nPkFXhx8L6XAztdInSrgU_U4U0VF45EBU,4289
|
|
@@ -380,7 +378,6 @@ rasa/dialogue_understanding/commands/correct_slots_command.py,sha256=LlaBtWc3y-D
|
|
|
380
378
|
rasa/dialogue_understanding/commands/error_command.py,sha256=LTEsxkGGGZR6wEEGuTtQ4K4EK_u2UFhNK4eAKyPfyME,2436
|
|
381
379
|
rasa/dialogue_understanding/commands/free_form_answer_command.py,sha256=XlQrHXrcOemzu1LHZiDhBAluiSlnUQ2V7ET5Z-aG7gc,224
|
|
382
380
|
rasa/dialogue_understanding/commands/handle_code_change_command.py,sha256=Cp2e1iD0zacXmljJ8vDXHJu9Fp6BwB7cGx8NF748akw,2192
|
|
383
|
-
rasa/dialogue_understanding/commands/handle_digressions_command.py,sha256=KKEqyW6HROsZ0xcCUKqOIQapK6oSKWXyDNOHyzU-5KA,4889
|
|
384
381
|
rasa/dialogue_understanding/commands/human_handoff_command.py,sha256=vfMXBWKm7fsaabCcLti1r8c1GrjS_0bvRKzgxJ8s6rU,2965
|
|
385
382
|
rasa/dialogue_understanding/commands/knowledge_answer_command.py,sha256=hnU6hOVr9aR7KfuxIV-LFycQWk7fsl4b9ZuAqpjBjvM,2852
|
|
386
383
|
rasa/dialogue_understanding/commands/noop_command.py,sha256=aIaLBjSV84qy9X4aGlJfMIYhF57maH5CiKNWL_-giD4,1485
|
|
@@ -391,18 +388,18 @@ rasa/dialogue_understanding/commands/session_end_command.py,sha256=ZecUpYZDTX_68
|
|
|
391
388
|
rasa/dialogue_understanding/commands/session_start_command.py,sha256=FA4yocMnFt5bn2dmXj48S4Pq_yTlEnOBxgK_mq-qAxg,1704
|
|
392
389
|
rasa/dialogue_understanding/commands/set_slot_command.py,sha256=_Ce8OAikmwYVtiCnTUpUVGsCC2Zj-6Iz7iLbISDEu3U,6768
|
|
393
390
|
rasa/dialogue_understanding/commands/skip_question_command.py,sha256=PvGpiW0Dk1xwvmntzhz7pEn99XqPv5nMQfR-cwNKxXk,3296
|
|
394
|
-
rasa/dialogue_understanding/commands/start_flow_command.py,sha256=
|
|
391
|
+
rasa/dialogue_understanding/commands/start_flow_command.py,sha256=prPbTh7salW-p44JNQ2kkJHFBtnLXJCBT_3wDNsN_K4,4542
|
|
395
392
|
rasa/dialogue_understanding/commands/user_silence_command.py,sha256=DQjRfZk09sV1o2emnLkmX7cZpsJwBHNeJGBDQVkejjY,1686
|
|
396
393
|
rasa/dialogue_understanding/commands/utils.py,sha256=lyl8FSdR2kQogqdjX2NSpQVQ9D2FZpwYUG6z4yFIMlU,4057
|
|
397
394
|
rasa/dialogue_understanding/constants.py,sha256=_kB0edGV23uvhujlF193N2jk6YG0R6LC599YDX5B5vo,129
|
|
398
395
|
rasa/dialogue_understanding/generator/__init__.py,sha256=pBm0o6pnJA_0W0UOrGuVsiG4hsTNH_n5GLrz8BYQHM8,830
|
|
399
396
|
rasa/dialogue_understanding/generator/_jinja_filters.py,sha256=KuK7nGKvKzKJz6Wg3AmrLFvzneGgIyeK825MCE379wc,248
|
|
400
|
-
rasa/dialogue_understanding/generator/command_generator.py,sha256=
|
|
397
|
+
rasa/dialogue_understanding/generator/command_generator.py,sha256=WAlDCzpQuQnoWSHozq3a6xIN5UWMxxiKFFIRp9AXvA0,15640
|
|
401
398
|
rasa/dialogue_understanding/generator/command_parser.py,sha256=wf6FSgqBw5F0legg06SqKlzajIN6sc_Cov2lFY_O9MI,8109
|
|
402
399
|
rasa/dialogue_understanding/generator/constants.py,sha256=PuUckBGUZ-Tu31B0cs8yxN99BDW3PGoExZa-BlIL5v8,1108
|
|
403
400
|
rasa/dialogue_understanding/generator/flow_document_template.jinja2,sha256=f4H6vVd-_nX_RtutMh1xD3ZQE_J2OyuPHAtiltfiAPY,253
|
|
404
401
|
rasa/dialogue_understanding/generator/flow_retrieval.py,sha256=wlGnMj17-X1-siQmdSvOd7K61sRzBf82MQEL2pqDQMI,17891
|
|
405
|
-
rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=
|
|
402
|
+
rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=uzzGufs2oDBXqz4LKz2429Hr3GvkMIKbsmBrgvEG4TA,23587
|
|
406
403
|
rasa/dialogue_understanding/generator/llm_command_generator.py,sha256=z7jhIJ3W_5GFH-p15kVoWbigMIoY8fIJjc_j_uX7yxw,2581
|
|
407
404
|
rasa/dialogue_understanding/generator/multi_step/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
408
405
|
rasa/dialogue_understanding/generator/multi_step/fill_slots_prompt.jinja2,sha256=Y0m673tAML3cFPaLM-urMXDsBYUUcXIw9YUpkAhGUuA,2933
|
|
@@ -427,8 +424,7 @@ rasa/dialogue_understanding/patterns/collect_information.py,sha256=8YWvhFTt8CJML
|
|
|
427
424
|
rasa/dialogue_understanding/patterns/completed.py,sha256=7qkyUj2d__2R3mpwWVmQpfwCCbJruBrjRZbmbDr3Zbo,1278
|
|
428
425
|
rasa/dialogue_understanding/patterns/continue_interrupted.py,sha256=OSTbe5l0B0ECNIYWpYB0pdzIeaqM3m3UZskNNjL5vrw,1682
|
|
429
426
|
rasa/dialogue_understanding/patterns/correction.py,sha256=fGr1Fpot5c0sm6BgPBy1nGwRTnntRVZcFGHlWT9YSng,11402
|
|
430
|
-
rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml,sha256=
|
|
431
|
-
rasa/dialogue_understanding/patterns/handle_digressions.py,sha256=_6wNNLsGsGkjvzdnzS7vUoh0C5g0Dx9AHW-mC1XHQxU,3272
|
|
427
|
+
rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml,sha256=XWmAR1Rp6KdXrXxTVBNQgznGBNbbyh5HW_zd44YK0vs,10297
|
|
432
428
|
rasa/dialogue_understanding/patterns/human_handoff.py,sha256=1hkSdL6kui42rZc7zERZ9R7nLyvRHi_tHgNU7FyrhAQ,1132
|
|
433
429
|
rasa/dialogue_understanding/patterns/internal_error.py,sha256=APCKVv16M6mSQ4upu4UwG0yIaaKTyr7uB2yV8ZtpMzo,1609
|
|
434
430
|
rasa/dialogue_understanding/patterns/repeat.py,sha256=K7Ok3DGsB2mivA2AwaKfmDyagupSSySOo4oARx2eXm8,1152
|
|
@@ -439,7 +435,7 @@ rasa/dialogue_understanding/patterns/skip_question.py,sha256=fJ1MC0WEEtS-BpnGJEf
|
|
|
439
435
|
rasa/dialogue_understanding/patterns/user_silence.py,sha256=xP-QMnd-MsybH5z4g01hBv4OLOHcw6m3rc26LQfe2zo,1140
|
|
440
436
|
rasa/dialogue_understanding/patterns/validate_slot.py,sha256=hqd5AEGT3M3HLNhMwuI9W9kZNCvgU6GyI-2xc2b4kz8,2085
|
|
441
437
|
rasa/dialogue_understanding/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
442
|
-
rasa/dialogue_understanding/processor/command_processor.py,sha256
|
|
438
|
+
rasa/dialogue_understanding/processor/command_processor.py,sha256=3Q7vux5xN1oMwF7SPpbgm4934G_M9nF1dLDPiw_pAIk,29952
|
|
443
439
|
rasa/dialogue_understanding/processor/command_processor_component.py,sha256=nvp_q-vM2ZEa7sbNMjRhEeuvmCwVWQl1ckTf0UAXuH4,1606
|
|
444
440
|
rasa/dialogue_understanding/stack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
445
441
|
rasa/dialogue_understanding/stack/dialogue_stack.py,sha256=cYV6aQeh0EuOJHODDqK3biqXozYTX8baPgLwHhPxFqs,5244
|
|
@@ -449,7 +445,7 @@ rasa/dialogue_understanding/stack/frames/dialogue_stack_frame.py,sha256=SBTmCV4S
|
|
|
449
445
|
rasa/dialogue_understanding/stack/frames/flow_stack_frame.py,sha256=827ppz6PKr1tSN34BuMlm_iWZCYsZTgvqaNaq1QQFkc,5078
|
|
450
446
|
rasa/dialogue_understanding/stack/frames/pattern_frame.py,sha256=EVrYWv5dCP7XTvNV-HqtOOrseP-IkF0jD2_JacAvIYw,235
|
|
451
447
|
rasa/dialogue_understanding/stack/frames/search_frame.py,sha256=Eo6tSSbJpslKcs6DLu250NmtoKMe4bDHC8_ebx5sJ60,759
|
|
452
|
-
rasa/dialogue_understanding/stack/utils.py,sha256=
|
|
448
|
+
rasa/dialogue_understanding/stack/utils.py,sha256=7ETHyvsqUSyNElVmouswKm99NcGCOG6sWBWFazgXd7A,7932
|
|
453
449
|
rasa/dialogue_understanding/utils.py,sha256=s3Y-REFv2HKYGpPS8nCgISQh86SnQgaRA8KukeFSf9Y,5445
|
|
454
450
|
rasa/dialogue_understanding_test/README.md,sha256=klUCq_FYd0MkIeyxlwYCfsB9EEsSmXUpTTDTxdR7EPc,17764
|
|
455
451
|
rasa/dialogue_understanding_test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -535,7 +531,6 @@ rasa/graph_components/validators/default_recipe_validator.py,sha256=iOVoB7zVTKes
|
|
|
535
531
|
rasa/graph_components/validators/finetuning_validator.py,sha256=VfCGytnweijKBG8bAqYp7zKZB2aRgi2ZI8R0eou5Ev4,12865
|
|
536
532
|
rasa/hooks.py,sha256=5ZMrqNz323w56MMY6E8jeZ_YXgRqq8p-yi18S2XOmbo,4061
|
|
537
533
|
rasa/jupyter.py,sha256=TCYVD4QPQIMmfA6ZwDUBOBTAECwCwbU2XOkosodLO9k,1782
|
|
538
|
-
rasa/keys,sha256=2Stg1fstgJ203cOoW1B2gGMY29fhEnjIfTVxKv_fqPo,101
|
|
539
534
|
rasa/llm_fine_tuning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
540
535
|
rasa/llm_fine_tuning/annotation_module.py,sha256=6wBBjGwONVlikp79xAHp5g3rydEhPM6kP1bw1g-maYk,8578
|
|
541
536
|
rasa/llm_fine_tuning/conversations.py,sha256=QZVaUsfXe5iIE830Bv-_3oo8luhGfHpirvubxzOoEvA,4116
|
|
@@ -631,24 +626,24 @@ rasa/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
631
626
|
rasa/shared/constants.py,sha256=lGZKYydyfIKz98ZYyXKM0quCatB4R3mPXZZZ0AIHlfY,12073
|
|
632
627
|
rasa/shared/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
633
628
|
rasa/shared/core/command_payload_reader.py,sha256=puHYsp9xbX0YQm2L1NDBItOFmdzI7AzmfGefgcHiCc0,3871
|
|
634
|
-
rasa/shared/core/constants.py,sha256=
|
|
629
|
+
rasa/shared/core/constants.py,sha256=gwIZHjQYafHnBlMe9_jUiIPm17hxYG9R1MOCtxeC1Ns,6337
|
|
635
630
|
rasa/shared/core/conversation.py,sha256=0nUhcbQkPDnO3_Rig7oiinrWmPy5fsVQs_U6Fx1hG5c,1384
|
|
636
|
-
rasa/shared/core/domain.py,sha256=
|
|
631
|
+
rasa/shared/core/domain.py,sha256=piJu4Kr2exC9ehC3e2oNaxPxXkeIhOYoQJQQOuzMw18,81638
|
|
637
632
|
rasa/shared/core/events.py,sha256=kTUWSpDepj3kpjjXveYXz3h2XcIQV3Sq8h7MTbx5fMw,86489
|
|
638
633
|
rasa/shared/core/flows/__init__.py,sha256=Z4pBY0qcEbHeOwgmKsyg2Nz4dX9CF67fFCwj2KXSMpg,180
|
|
639
634
|
rasa/shared/core/flows/constants.py,sha256=0HN3k-apOb_fi8E2AJtUxMxro8jwFVyXQpil-tHEzbM,340
|
|
640
|
-
rasa/shared/core/flows/flow.py,sha256=
|
|
635
|
+
rasa/shared/core/flows/flow.py,sha256=6RQvDdXNq1FTPKCjZc7wAWZ__eYiJYpvIH2-vQyukG0,23817
|
|
641
636
|
rasa/shared/core/flows/flow_path.py,sha256=xstwahZBU5cfMY46mREA4NoOGlKLBRAqeP_mJ3UZqOI,2283
|
|
642
637
|
rasa/shared/core/flows/flow_step.py,sha256=ZvjXz1Fs5FR1_BlGBitOEYRnLhzk-bBYv1CC2Oi6iWQ,4537
|
|
643
638
|
rasa/shared/core/flows/flow_step_links.py,sha256=U9c4MFASieJGp_-XMhR0hrxFQISCJAF4TQ0wEy4IjB0,10530
|
|
644
639
|
rasa/shared/core/flows/flow_step_sequence.py,sha256=Rcw82OccjJsNc2wKXi6IePOIAPFRBTylSVphCRJCuc4,2362
|
|
645
640
|
rasa/shared/core/flows/flows_list.py,sha256=fnWzY-pI0SmNb6tsEnKIhfhzxFM35rPeKz_SkMw1fjw,8728
|
|
646
|
-
rasa/shared/core/flows/flows_yaml_schema.json,sha256=
|
|
641
|
+
rasa/shared/core/flows/flows_yaml_schema.json,sha256=lILHEH3sp9rm61uV4HcN-3V3Dxg1xakcVvYFRAs3gu8,12399
|
|
647
642
|
rasa/shared/core/flows/nlu_trigger.py,sha256=GG6m5h6Z0jaukA5rPAHscnULgZGDjYMXfufX9nYQtzA,3907
|
|
648
643
|
rasa/shared/core/flows/steps/__init__.py,sha256=jvJp02o9_Wx-rZeQ3SYiLVMpO6ulS1yKuiiKg0ld_nE,655
|
|
649
644
|
rasa/shared/core/flows/steps/action.py,sha256=ctePK0izZudBQE_2wTPQL83T1QAZtaVNSD8mqHtulCQ,1730
|
|
650
645
|
rasa/shared/core/flows/steps/call.py,sha256=ZbJQpRVL8qzU-nS19aW4Hu3RvxemAYRLyNslmId4oww,1856
|
|
651
|
-
rasa/shared/core/flows/steps/collect.py,sha256=
|
|
646
|
+
rasa/shared/core/flows/steps/collect.py,sha256=AOLlbhFrS3UlYCrqbXJyxaxS0nsR6ijwwBY7AKcGV6o,3327
|
|
652
647
|
rasa/shared/core/flows/steps/constants.py,sha256=DCxrEUGbJciBknHm-_t4tmcnH19IZKP-WYxqix9gm7M,132
|
|
653
648
|
rasa/shared/core/flows/steps/continuation.py,sha256=5Rzayr80FsgS4bAajuRObVvVcLqPEh9nxGbT2te85xY,1498
|
|
654
649
|
rasa/shared/core/flows/steps/end.py,sha256=0XrPlQMVBnQKVeZs0or8P9IrVqG7i6RoSNDsVrvAeDk,749
|
|
@@ -657,13 +652,13 @@ rasa/shared/core/flows/steps/link.py,sha256=T6TE-LnfoGUrrPCmlZBLeXou2HGHmOVhu_zh
|
|
|
657
652
|
rasa/shared/core/flows/steps/no_operation.py,sha256=SKqNQ4usLZ4c-faSZOX41lpHBD8YtVe2eGDSt50H05s,1399
|
|
658
653
|
rasa/shared/core/flows/steps/set_slots.py,sha256=DudtHKXaVSNmQL_vXLvkK23_JqgTBU9RJrdQeBpC4s0,1492
|
|
659
654
|
rasa/shared/core/flows/steps/start.py,sha256=AJpKIm0S3GZYLEs3ybXW0Zrq03Pu9lvirNahiUy2I6k,1010
|
|
660
|
-
rasa/shared/core/flows/utils.py,sha256=
|
|
655
|
+
rasa/shared/core/flows/utils.py,sha256=wqPWuEgYcbGMTs6wuckX400Sq1_Jz8yKYd2t91p3e8U,2270
|
|
661
656
|
rasa/shared/core/flows/validation.py,sha256=4IfTR8LoaJcqP8I7NQXjl0Ysmwc7VO7YzCshpiDEDP0,27410
|
|
662
657
|
rasa/shared/core/flows/yaml_flows_io.py,sha256=85ln95jpkh7ZqDl1cheFa8Q21gnadLjWrW8ADmQlrUQ,14385
|
|
663
658
|
rasa/shared/core/generator.py,sha256=UAuBPu5UjUhL9djVK-PvrWZcNhRACOEgnRsTleV7eeY,35686
|
|
664
659
|
rasa/shared/core/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
665
660
|
rasa/shared/core/policies/utils.py,sha256=rWE_-48Ovc__V7wOKCJ-2lTerVRtN3iRHV4ZvuU2b2g,3070
|
|
666
|
-
rasa/shared/core/slot_mappings.py,sha256=
|
|
661
|
+
rasa/shared/core/slot_mappings.py,sha256=afWxJsnAdHPzIxpHBBG1NbK4JBBWSsua3_xq87PKEZA,26663
|
|
667
662
|
rasa/shared/core/slots.py,sha256=KOGC5dqW7yLIZZrNqoMBrqqEmaJMNbKB_0yW7d__1yM,29211
|
|
668
663
|
rasa/shared/core/trackers.py,sha256=fgSBpaoVm98dQjFhfJGxaDiQN7Gg94AnT_Rk4z_UEms,45271
|
|
669
664
|
rasa/shared/core/training_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -689,7 +684,7 @@ rasa/shared/importers/rasa.py,sha256=04ohlwnqllfFDJPcmE32SkMNg1TMKwKnsfNlzeGJWUc
|
|
|
689
684
|
rasa/shared/importers/remote_importer.py,sha256=fKLQskaCVPpD5cCMQ9sR71cZZlSIP-SSv3J3o2kra2w,7696
|
|
690
685
|
rasa/shared/importers/utils.py,sha256=NcVgGTc_wnIXhsTjielimDXhO2zg3_qV1w_vBpyENJo,1289
|
|
691
686
|
rasa/shared/nlu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
692
|
-
rasa/shared/nlu/constants.py,sha256=
|
|
687
|
+
rasa/shared/nlu/constants.py,sha256=EVMuFXWX_SspnB7FFi8gf-ZHDjdESxalNJI9h7sjG9g,1919
|
|
693
688
|
rasa/shared/nlu/interpreter.py,sha256=eCNJp61nQYTGVf4aJi8SCWb46jxZY6-C1M1LFxMyQTM,188
|
|
694
689
|
rasa/shared/nlu/training_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
695
690
|
rasa/shared/nlu/training_data/entities_parser.py,sha256=YbPxz8y-o4zwkPAj7V9ohG8eJ600xxERfzckI1rc_kM,6729
|
|
@@ -754,7 +749,7 @@ rasa/shared/providers/router/_base_litellm_router_client.py,sha256=I6ucWfG7dUz_a
|
|
|
754
749
|
rasa/shared/providers/router/router_client.py,sha256=5BBEg-_JtClOVxBy1hu-HceG329PsKs-2v_qbyX_vSo,2174
|
|
755
750
|
rasa/shared/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
756
751
|
rasa/shared/utils/cli.py,sha256=cCI7-2WSqW_O_3fp_X3UPWKevLtHuts8nueV2PhPqlg,2916
|
|
757
|
-
rasa/shared/utils/common.py,sha256=
|
|
752
|
+
rasa/shared/utils/common.py,sha256=bDgy_a3XBKtvuAXOFTlrYIG2NyL_HY1qb0h6-JT6BWY,11234
|
|
758
753
|
rasa/shared/utils/constants.py,sha256=CkcwE1mmaAo_1QDydUX5WO8x_-stFGZ17dPAGP1t_k4,262
|
|
759
754
|
rasa/shared/utils/health_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
760
755
|
rasa/shared/utils/health_check/embeddings_health_check_mixin.py,sha256=ASOzDtI3i6HlRLzee8pafejlTkUesOhY6FZb5-wAZMI,1034
|
|
@@ -824,10 +819,10 @@ rasa/utils/tensorflow/types.py,sha256=PLG7VI5P_3fNZaXYdGyNIRF4dOMTnLtzfvgms67_IS
|
|
|
824
819
|
rasa/utils/train_utils.py,sha256=ClJx-6x3-h3Vt6mskacgkcCUJTMXjFPe3zAcy_DfmaU,21259
|
|
825
820
|
rasa/utils/url_tools.py,sha256=dZ1HGkVdWTJB7zYEdwoDIrEuyX9HE5WsxKKFVsXBLE0,1218
|
|
826
821
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
827
|
-
rasa/validator.py,sha256=
|
|
828
|
-
rasa/version.py,sha256=
|
|
829
|
-
rasa_pro-3.12.
|
|
830
|
-
rasa_pro-3.12.
|
|
831
|
-
rasa_pro-3.12.
|
|
832
|
-
rasa_pro-3.12.
|
|
833
|
-
rasa_pro-3.12.
|
|
822
|
+
rasa/validator.py,sha256=Uyjkn3OD5EcEU_FTsYKydAbCvyG_SmSSbAMMQdXPMrA,83219
|
|
823
|
+
rasa/version.py,sha256=dHTgIujST1jxJ6aJaFx74d-RrRms0pZxKWpSKETmGGw,117
|
|
824
|
+
rasa_pro-3.12.6.dist-info/METADATA,sha256=FBH4ZwMwN2RRXJUWMpIby2fit7bKw__XG2VfBY77bRg,10615
|
|
825
|
+
rasa_pro-3.12.6.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
826
|
+
rasa_pro-3.12.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
827
|
+
rasa_pro-3.12.6.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
828
|
+
rasa_pro-3.12.6.dist-info/RECORD,,
|
README.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<h1 align="center">Rasa Pro</h1>
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
|
|
5
|
-
[](https://sonarcloud.io/summary/new_code?id=RasaHQ_rasa)
|
|
6
|
-
[](https://rasa.com/docs/docs/pro/intro)
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<hr />
|
|
12
|
-
|
|
13
|
-
Rasa Pro is a framework for building scalable, dynamic conversational AI assistants that integrate large language models (LLMs) to enable more contextually aware and agentic interactions. Whether you’re new to conversational AI or an experienced developer, Rasa Pro offers enhanced flexibility, control, and performance for mission-critical applications.
|
|
14
|
-
|
|
15
|
-
Building on the foundation of Rasa Open Source, Rasa Pro adds advanced features like CALM (Conversational AI with Language Models) and Dialogue Understanding (DU), which enable developers to shift from traditional intent-driven systems to LLM-based agents. This allows for more robust, responsive interactions that adhere strictly to business logic, while reducing risks like prompt injection and minimizing hallucinations.
|
|
16
|
-
|
|
17
|
-
**Key Features:**
|
|
18
|
-
|
|
19
|
-
- **Flows for Business Logic:** Easily define business logic through Flows, a simplified way to describe how your AI assistant should handle conversations. Flows help streamline the development process, focusing on key tasks and reducing the complexity involved in managing conversations.
|
|
20
|
-
- **Automatic Conversation Repair:** Ensure seamless interactions by automatically handling interruptions or unexpected inputs. Developers have full control to customize these repairs based on specific use cases.
|
|
21
|
-
- **Customizable and Open:** Fully customizable code that allows developers to modify Rasa Pro to meet specific requirements, ensuring flexibility and adaptability to various conversational AI needs.
|
|
22
|
-
- **Robustness and Control:** Maintain strict adherence to business logic, preventing unwanted behaviors like prompt injection and hallucinations, leading to more reliable responses and secure interactions.
|
|
23
|
-
- **Built-in Security:** Safeguard sensitive data, control access, and ensure secure deployment, essential for production environments that demand high levels of security and compliance.
|
|
24
|
-
|
|
25
|
-
A [free developer license](https://rasa.com/docs/pro/intro/#who-rasa-pro-is-for) is available so you can explore and get to know Rasa Pro. It allows you to take your assistant live in production a limited capacity. A paid license is required for larger-scale production use, but all code is visible and can be customized as needed.
|
|
26
|
-
|
|
27
|
-
To get started right now, you can
|
|
28
|
-
|
|
29
|
-
`pip install rasa-pro`
|
|
30
|
-
|
|
31
|
-
Check out our
|
|
32
|
-
|
|
33
|
-
- [Rasa-pro Quickstart](https://rasa.com/docs/learn/quickstart/pro),
|
|
34
|
-
- [Conversational AI with Language Models (CALM) conceptual rundown](https://rasa.com/docs/learn/concepts/calm),
|
|
35
|
-
- [Rasa Pro / CALM tutorial](https://rasa.com/docs/pro/tutorial), and
|
|
36
|
-
- [Rasa pro changelog](https://rasa.com/docs/reference/changelogs/rasa-pro-changelog)
|
|
37
|
-
|
|
38
|
-
for more. Also feel free to reach out to us on the [Rasa forum](https://forum.rasa.com/).
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import Any, Dict, List, Optional
|
|
4
|
-
|
|
5
|
-
import structlog
|
|
6
|
-
|
|
7
|
-
from rasa.core.actions.action import Action, create_bot_utterance
|
|
8
|
-
from rasa.core.channels import OutputChannel
|
|
9
|
-
from rasa.core.nlg import NaturalLanguageGenerator
|
|
10
|
-
from rasa.core.utils import add_bot_utterance_metadata
|
|
11
|
-
from rasa.dialogue_understanding.patterns.continue_interrupted import (
|
|
12
|
-
ContinueInterruptedPatternFlowStackFrame,
|
|
13
|
-
)
|
|
14
|
-
from rasa.dialogue_understanding.patterns.handle_digressions import (
|
|
15
|
-
HandleDigressionsPatternFlowStackFrame,
|
|
16
|
-
)
|
|
17
|
-
from rasa.dialogue_understanding.stack.frames.flow_stack_frame import (
|
|
18
|
-
FlowStackFrameType,
|
|
19
|
-
UserFlowStackFrame,
|
|
20
|
-
)
|
|
21
|
-
from rasa.dialogue_understanding.stack.utils import (
|
|
22
|
-
remove_digression_from_stack,
|
|
23
|
-
user_flows_on_the_stack,
|
|
24
|
-
)
|
|
25
|
-
from rasa.shared.core.constants import (
|
|
26
|
-
ACTION_BLOCK_DIGRESSION,
|
|
27
|
-
ACTION_CONTINUE_DIGRESSION,
|
|
28
|
-
)
|
|
29
|
-
from rasa.shared.core.domain import Domain
|
|
30
|
-
from rasa.shared.core.events import Event, FlowInterrupted
|
|
31
|
-
from rasa.shared.core.trackers import DialogueStateTracker
|
|
32
|
-
|
|
33
|
-
structlogger = structlog.get_logger()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class ActionBlockDigressions(Action):
|
|
37
|
-
"""Action which blocks an interruption and continues the current flow."""
|
|
38
|
-
|
|
39
|
-
def name(self) -> str:
|
|
40
|
-
"""Return the action name."""
|
|
41
|
-
return ACTION_BLOCK_DIGRESSION
|
|
42
|
-
|
|
43
|
-
async def run(
|
|
44
|
-
self,
|
|
45
|
-
output_channel: OutputChannel,
|
|
46
|
-
nlg: NaturalLanguageGenerator,
|
|
47
|
-
tracker: DialogueStateTracker,
|
|
48
|
-
domain: Domain,
|
|
49
|
-
metadata: Optional[Dict[str, Any]] = None,
|
|
50
|
-
) -> List[Event]:
|
|
51
|
-
"""Update the stack."""
|
|
52
|
-
structlogger.debug("action_block_digressions.run")
|
|
53
|
-
top_frame = tracker.stack.top()
|
|
54
|
-
|
|
55
|
-
if not isinstance(top_frame, HandleDigressionsPatternFlowStackFrame):
|
|
56
|
-
return []
|
|
57
|
-
|
|
58
|
-
blocked_flow_id = top_frame.interrupting_flow_id
|
|
59
|
-
frame_type = FlowStackFrameType.REGULAR
|
|
60
|
-
|
|
61
|
-
stack = tracker.stack
|
|
62
|
-
|
|
63
|
-
if blocked_flow_id in user_flows_on_the_stack(stack):
|
|
64
|
-
structlogger.debug(
|
|
65
|
-
"action_block_digressions.already_blocked_flow",
|
|
66
|
-
blocked_flow_id=blocked_flow_id,
|
|
67
|
-
)
|
|
68
|
-
events = []
|
|
69
|
-
else:
|
|
70
|
-
stack.push(
|
|
71
|
-
UserFlowStackFrame(flow_id=blocked_flow_id, frame_type=frame_type), 0
|
|
72
|
-
)
|
|
73
|
-
stack.push(
|
|
74
|
-
ContinueInterruptedPatternFlowStackFrame(
|
|
75
|
-
previous_flow_name=blocked_flow_id
|
|
76
|
-
),
|
|
77
|
-
1,
|
|
78
|
-
)
|
|
79
|
-
events = tracker.create_stack_updated_events(stack)
|
|
80
|
-
|
|
81
|
-
utterance = "utter_block_digressions"
|
|
82
|
-
message = await nlg.generate(
|
|
83
|
-
utterance,
|
|
84
|
-
tracker,
|
|
85
|
-
output_channel.name(),
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
if message is None:
|
|
89
|
-
structlogger.error(
|
|
90
|
-
"action_block_digressions.run.failed.finding.utter",
|
|
91
|
-
utterance=utterance,
|
|
92
|
-
)
|
|
93
|
-
else:
|
|
94
|
-
message = add_bot_utterance_metadata(
|
|
95
|
-
message, utterance, nlg, domain, tracker
|
|
96
|
-
)
|
|
97
|
-
events.append(create_bot_utterance(message))
|
|
98
|
-
|
|
99
|
-
return events
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class ActionContinueDigression(Action):
|
|
103
|
-
"""Action which continues with an interruption."""
|
|
104
|
-
|
|
105
|
-
def name(self) -> str:
|
|
106
|
-
"""Return the action name."""
|
|
107
|
-
return ACTION_CONTINUE_DIGRESSION
|
|
108
|
-
|
|
109
|
-
async def run(
|
|
110
|
-
self,
|
|
111
|
-
output_channel: OutputChannel,
|
|
112
|
-
nlg: NaturalLanguageGenerator,
|
|
113
|
-
tracker: DialogueStateTracker,
|
|
114
|
-
domain: Domain,
|
|
115
|
-
metadata: Optional[Dict[str, Any]] = None,
|
|
116
|
-
) -> List[Event]:
|
|
117
|
-
"""Update the stack."""
|
|
118
|
-
structlogger.debug("action_continue_digression.run")
|
|
119
|
-
top_frame = tracker.stack.top()
|
|
120
|
-
|
|
121
|
-
if not isinstance(top_frame, HandleDigressionsPatternFlowStackFrame):
|
|
122
|
-
return []
|
|
123
|
-
|
|
124
|
-
interrupting_flow_id = top_frame.interrupting_flow_id
|
|
125
|
-
stack = tracker.stack
|
|
126
|
-
|
|
127
|
-
if interrupting_flow_id in user_flows_on_the_stack(stack):
|
|
128
|
-
structlogger.debug(
|
|
129
|
-
"action_continue_digression.interrupting_flow_id_already_on_the_stack",
|
|
130
|
-
interrupting_flow_id=interrupting_flow_id,
|
|
131
|
-
)
|
|
132
|
-
stack = remove_digression_from_stack(stack, interrupting_flow_id)
|
|
133
|
-
|
|
134
|
-
frame_type = FlowStackFrameType.INTERRUPT
|
|
135
|
-
stack.push(
|
|
136
|
-
UserFlowStackFrame(flow_id=interrupting_flow_id, frame_type=frame_type)
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
events = [
|
|
140
|
-
FlowInterrupted(
|
|
141
|
-
flow_id=top_frame.interrupted_flow_id,
|
|
142
|
-
step_id=top_frame.interrupted_step_id,
|
|
143
|
-
)
|
|
144
|
-
] + tracker.create_stack_updated_events(stack)
|
|
145
|
-
|
|
146
|
-
utterance = "utter_continue_interruption"
|
|
147
|
-
message = await nlg.generate(
|
|
148
|
-
utterance,
|
|
149
|
-
tracker,
|
|
150
|
-
output_channel.name(),
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
if message is None:
|
|
154
|
-
structlogger.error(
|
|
155
|
-
"action_continue_digression.run.failed.finding.utter",
|
|
156
|
-
utterance=utterance,
|
|
157
|
-
)
|
|
158
|
-
else:
|
|
159
|
-
message = add_bot_utterance_metadata(
|
|
160
|
-
message, utterance, nlg, domain, tracker
|
|
161
|
-
)
|
|
162
|
-
events.append(create_bot_utterance(message))
|
|
163
|
-
|
|
164
|
-
return events
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from dataclasses import dataclass
|
|
4
|
-
from typing import Any, Dict, List
|
|
5
|
-
|
|
6
|
-
import structlog
|
|
7
|
-
|
|
8
|
-
from rasa.dialogue_understanding.commands.command import Command
|
|
9
|
-
from rasa.dialogue_understanding.patterns.cannot_handle import (
|
|
10
|
-
CannotHandlePatternFlowStackFrame,
|
|
11
|
-
)
|
|
12
|
-
from rasa.dialogue_understanding.patterns.handle_digressions import (
|
|
13
|
-
HandleDigressionsPatternFlowStackFrame,
|
|
14
|
-
)
|
|
15
|
-
from rasa.dialogue_understanding.stack.utils import (
|
|
16
|
-
top_flow_frame,
|
|
17
|
-
)
|
|
18
|
-
from rasa.shared.core.events import Event
|
|
19
|
-
from rasa.shared.core.flows import FlowsList
|
|
20
|
-
from rasa.shared.core.flows.steps import CollectInformationFlowStep
|
|
21
|
-
from rasa.shared.core.flows.utils import ALL_LABEL
|
|
22
|
-
from rasa.shared.core.trackers import DialogueStateTracker
|
|
23
|
-
from rasa.shared.nlu.constants import HANDLE_DIGRESSIONS_COMMAND
|
|
24
|
-
|
|
25
|
-
structlogger = structlog.get_logger()
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@dataclass
|
|
29
|
-
class HandleDigressionsCommand(Command):
|
|
30
|
-
"""A command to handle digressions during an active flow."""
|
|
31
|
-
|
|
32
|
-
flow: str
|
|
33
|
-
"""The interrupting flow."""
|
|
34
|
-
|
|
35
|
-
@classmethod
|
|
36
|
-
def command(cls) -> str:
|
|
37
|
-
"""Returns the command type."""
|
|
38
|
-
return HANDLE_DIGRESSIONS_COMMAND
|
|
39
|
-
|
|
40
|
-
@classmethod
|
|
41
|
-
def from_dict(cls, data: Dict[str, Any]) -> HandleDigressionsCommand:
|
|
42
|
-
"""Converts the dictionary to a command.
|
|
43
|
-
|
|
44
|
-
Returns:
|
|
45
|
-
The converted dictionary.
|
|
46
|
-
"""
|
|
47
|
-
try:
|
|
48
|
-
return HandleDigressionsCommand(flow=data["flow"])
|
|
49
|
-
except KeyError as e:
|
|
50
|
-
raise ValueError(
|
|
51
|
-
f"Missing parameter '{e}' while parsing HandleDigressionsCommand."
|
|
52
|
-
) from e
|
|
53
|
-
|
|
54
|
-
def run_command_on_tracker(
|
|
55
|
-
self,
|
|
56
|
-
tracker: DialogueStateTracker,
|
|
57
|
-
all_flows: FlowsList,
|
|
58
|
-
original_tracker: DialogueStateTracker,
|
|
59
|
-
) -> List[Event]:
|
|
60
|
-
"""Runs the command on the tracker.
|
|
61
|
-
|
|
62
|
-
Args:
|
|
63
|
-
tracker: The tracker to run the command on.
|
|
64
|
-
all_flows: All flows in the assistant.
|
|
65
|
-
original_tracker: The tracker before any command was executed.
|
|
66
|
-
|
|
67
|
-
Returns:
|
|
68
|
-
The events to apply to the tracker.
|
|
69
|
-
"""
|
|
70
|
-
stack = tracker.stack
|
|
71
|
-
original_stack = original_tracker.stack
|
|
72
|
-
|
|
73
|
-
if self.flow not in all_flows.flow_ids:
|
|
74
|
-
structlogger.debug(
|
|
75
|
-
"command_executor.push_cannot_handle.start_invalid_flow_id",
|
|
76
|
-
command=self,
|
|
77
|
-
)
|
|
78
|
-
stack.push(CannotHandlePatternFlowStackFrame())
|
|
79
|
-
return tracker.create_stack_updated_events(stack)
|
|
80
|
-
|
|
81
|
-
# this allows to include called user flows in the stack search
|
|
82
|
-
latest_user_frame = top_flow_frame(original_stack, ignore_call_frames=False)
|
|
83
|
-
|
|
84
|
-
if latest_user_frame is None:
|
|
85
|
-
structlogger.debug(
|
|
86
|
-
"command_executor.skip_command.no_top_flow", command=self
|
|
87
|
-
)
|
|
88
|
-
return []
|
|
89
|
-
|
|
90
|
-
original_top_flow = latest_user_frame.flow(all_flows)
|
|
91
|
-
current_step = original_top_flow.step_by_id(latest_user_frame.step_id)
|
|
92
|
-
if not isinstance(current_step, CollectInformationFlowStep):
|
|
93
|
-
structlogger.debug(
|
|
94
|
-
"command_executor.skip_command.not_at_a_collect_step", command=self
|
|
95
|
-
)
|
|
96
|
-
return []
|
|
97
|
-
|
|
98
|
-
ask_confirm_digressions = set(
|
|
99
|
-
current_step.ask_confirm_digressions
|
|
100
|
-
+ original_top_flow.ask_confirm_digressions
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
block_digressions = set(
|
|
104
|
-
current_step.block_digressions + original_top_flow.block_digressions
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
if block_digressions:
|
|
108
|
-
if ALL_LABEL in block_digressions:
|
|
109
|
-
block_digressions.remove(ALL_LABEL)
|
|
110
|
-
block_digressions.add(self.flow)
|
|
111
|
-
|
|
112
|
-
if ask_confirm_digressions:
|
|
113
|
-
if ALL_LABEL in ask_confirm_digressions:
|
|
114
|
-
ask_confirm_digressions.remove(ALL_LABEL)
|
|
115
|
-
ask_confirm_digressions.add(self.flow)
|
|
116
|
-
|
|
117
|
-
structlogger.debug(
|
|
118
|
-
"command_executor.push_handle_digressions",
|
|
119
|
-
interrupting_flow_id=self.flow,
|
|
120
|
-
interrupted_flow_id=original_top_flow.id,
|
|
121
|
-
interrupted_step_id=current_step.id,
|
|
122
|
-
ask_confirm_digressions=ask_confirm_digressions,
|
|
123
|
-
block_digressions=block_digressions,
|
|
124
|
-
)
|
|
125
|
-
stack.push(
|
|
126
|
-
HandleDigressionsPatternFlowStackFrame(
|
|
127
|
-
interrupting_flow_id=self.flow,
|
|
128
|
-
interrupted_flow_id=original_top_flow.id,
|
|
129
|
-
interrupted_step_id=current_step.id,
|
|
130
|
-
ask_confirm_digressions=ask_confirm_digressions,
|
|
131
|
-
block_digressions=block_digressions,
|
|
132
|
-
)
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
return tracker.create_stack_updated_events(stack)
|
|
136
|
-
|
|
137
|
-
def __hash__(self) -> int:
|
|
138
|
-
return hash(self.flow)
|
|
139
|
-
|
|
140
|
-
def __eq__(self, other: object) -> bool:
|
|
141
|
-
if not isinstance(other, HandleDigressionsCommand):
|
|
142
|
-
return False
|
|
143
|
-
|
|
144
|
-
return other.flow == self.flow
|