rasa-pro 3.13.1a18__py3-none-any.whl → 3.13.1a20__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/__main__.py +8 -0
- rasa/builder/auth.py +71 -0
- rasa/builder/config.py +16 -0
- rasa/builder/copilot/constants.py +15 -0
- rasa/builder/copilot/copilot.py +342 -0
- rasa/builder/copilot/copilot_response_handler.py +471 -0
- rasa/builder/copilot/exceptions.py +20 -0
- rasa/builder/copilot/models.py +344 -0
- rasa/builder/copilot/prompts/copilot_system_prompt.jinja2 +495 -0
- rasa/builder/copilot/telemetry.py +195 -0
- rasa/builder/document_retrieval/__init__.py +0 -0
- rasa/builder/document_retrieval/constants.py +16 -0
- rasa/builder/{inkeep_document_retrieval.py → document_retrieval/inkeep_document_retrieval.py} +53 -44
- rasa/builder/document_retrieval/models.py +62 -0
- rasa/builder/download.py +140 -0
- rasa/builder/guardrails/__init__.py +1 -0
- rasa/builder/guardrails/constants.py +4 -0
- rasa/builder/guardrails/exceptions.py +4 -0
- rasa/builder/guardrails/lakera.py +188 -0
- rasa/builder/guardrails/models.py +199 -0
- rasa/builder/guardrails/utils.py +305 -0
- rasa/builder/job_manager.py +87 -0
- rasa/builder/jobs.py +232 -0
- rasa/builder/llm_service.py +89 -173
- rasa/builder/logging_utils.py +162 -4
- rasa/builder/main.py +29 -16
- rasa/builder/models.py +93 -121
- rasa/builder/project_generator.py +91 -7
- rasa/builder/scrape_rasa_docs.py +1 -1
- rasa/builder/service.py +650 -452
- rasa/builder/shared/tracker_context.py +212 -0
- rasa/builder/validation_service.py +4 -4
- rasa/cli/data.py +8 -3
- rasa/cli/project_templates/basic/actions/action_api.py +15 -0
- rasa/cli/project_templates/basic/actions/action_human_handoff.py +44 -0
- rasa/cli/project_templates/basic/config.yml +23 -0
- rasa/cli/project_templates/{plain → basic}/credentials.yml +8 -7
- rasa/cli/project_templates/basic/data/general/feedback.yml +20 -0
- rasa/cli/project_templates/basic/data/general/goodbye.yml +6 -0
- rasa/cli/project_templates/basic/data/general/hello.yml +7 -0
- rasa/cli/project_templates/basic/data/general/help.yml +6 -0
- rasa/cli/project_templates/basic/data/general/human_handoff.yml +16 -0
- rasa/cli/project_templates/basic/data/general/welcome.yml +9 -0
- rasa/cli/project_templates/{finance/data/patterns → basic/data/system}/pattern_completed.yml +2 -1
- rasa/cli/project_templates/basic/data/system/pattern_correction.yml +7 -0
- rasa/cli/project_templates/basic/data/system/pattern_search.yml +8 -0
- rasa/cli/project_templates/basic/data/system/pattern_session_start.yml +8 -0
- rasa/cli/project_templates/basic/docs/rasa_assistant_qa.txt +65 -0
- rasa/cli/project_templates/basic/docs/template.txt +7 -0
- rasa/cli/project_templates/basic/domain/general/assistant_details.yml +12 -0
- rasa/cli/project_templates/basic/domain/general/bot_identity.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/cannot_handle.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/feedback.yml +28 -0
- rasa/cli/project_templates/basic/domain/general/goodbye.yml +7 -0
- rasa/cli/project_templates/basic/domain/general/help.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/human_handoff_domain.yml +35 -0
- rasa/cli/project_templates/{finance/domain/default_actions.yml → basic/domain/general/utils.yml} +0 -3
- rasa/cli/project_templates/basic/domain/general/welcome.yml +7 -0
- rasa/cli/project_templates/{plain → basic}/endpoints.yml +42 -27
- rasa/cli/project_templates/basic/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/defaults.py +25 -3
- rasa/cli/project_templates/finance/actions/__init__.py +46 -0
- rasa/cli/project_templates/finance/actions/accounts/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_ask_account.py → accounts/action_ask_account.py} +6 -9
- rasa/cli/project_templates/finance/actions/{action_check_balance.py → accounts/action_check_balance.py} +4 -4
- rasa/cli/project_templates/finance/actions/action_session_start.py +11 -6
- rasa/cli/project_templates/finance/actions/cards/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_ask_card.py → cards/action_ask_card.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_check_card_existence.py → cards/action_check_card_existence.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_update_card_status.py → cards/action_update_card_status.py} +18 -9
- rasa/cli/project_templates/finance/actions/database.py +1 -0
- rasa/cli/project_templates/finance/actions/transfers/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_add_payee.py → transfers/action_add_payee.py} +8 -3
- rasa/cli/project_templates/finance/actions/{action_ask_account_from.py → transfers/action_ask_account_from.py} +5 -4
- rasa/cli/project_templates/finance/actions/{action_check_payee_existence.py → transfers/action_check_payee_existence.py} +3 -3
- rasa/cli/project_templates/finance/actions/{action_check_sufficient_funds.py → transfers/action_check_sufficient_funds.py} +3 -4
- rasa/cli/project_templates/finance/actions/{action_list_payees.py → transfers/action_list_payees.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_remove_payee.py → transfers/action_remove_payee.py} +4 -4
- rasa/cli/project_templates/finance/config.yml +8 -19
- rasa/cli/project_templates/finance/credentials.yml +6 -7
- rasa/cli/project_templates/finance/csvs/cards.csv +10 -10
- rasa/cli/project_templates/finance/csvs/payees.csv +10 -9
- rasa/cli/project_templates/finance/data/{flows → accounts}/check_balance.yml +2 -1
- rasa/cli/project_templates/finance/data/general/bot_identity.yml +6 -0
- rasa/cli/project_templates/finance/data/general/feedback.yml +20 -0
- rasa/cli/project_templates/finance/data/general/goodbye.yml +6 -0
- rasa/cli/project_templates/finance/data/general/hello.yml +7 -0
- rasa/cli/project_templates/finance/data/{flows/welcome.yml → general/help.yml} +2 -7
- rasa/cli/project_templates/finance/data/general/human_handoff.yml +16 -0
- rasa/cli/project_templates/finance/data/general/welcome.yml +9 -0
- rasa/cli/project_templates/finance/data/{patterns → system/patterns}/pattern_chitchat.yml +0 -2
- rasa/cli/project_templates/finance/data/system/patterns/pattern_completed.yml +7 -0
- rasa/cli/project_templates/finance/data/system/patterns/pattern_correction.yml +7 -0
- rasa/cli/project_templates/finance/data/system/patterns/pattern_search.yml +8 -0
- rasa/cli/project_templates/finance/data/{patterns → system/patterns}/pattern_session_start.yml +0 -1
- rasa/cli/project_templates/finance/domain/{check_balance.yml → accounts/check_balance.yml} +2 -0
- rasa/cli/project_templates/finance/domain/general/assistant_details.yml +12 -0
- rasa/cli/project_templates/finance/domain/general/bot_identity.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/cannot_handle.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/defaults.yml +24 -0
- rasa/cli/project_templates/finance/domain/general/feedback.yml +28 -0
- rasa/cli/project_templates/finance/domain/general/goodbye.yml +7 -0
- rasa/cli/project_templates/finance/domain/general/help.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/human_handoff.yml +30 -0
- rasa/cli/project_templates/finance/domain/general/utils.yml +13 -0
- rasa/cli/project_templates/finance/domain/general/welcome.yml +8 -0
- rasa/cli/project_templates/finance/endpoints.yml +1 -0
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +3 -3
- rasa/cli/project_templates/telco/actions/actions_billing.py +24 -17
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +6 -1
- rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +6 -1
- rasa/cli/project_templates/telco/actions/actions_session_start.py +6 -1
- rasa/cli/project_templates/tutorial/config.yml +2 -1
- rasa/cli/scaffold.py +27 -2
- rasa/cli/train.py +8 -0
- rasa/cli/utils.py +31 -15
- rasa/core/actions/action.py +28 -41
- rasa/core/actions/action_run_slot_rejections.py +1 -1
- rasa/core/channels/development_inspector.py +47 -14
- rasa/core/channels/inspector/dist/assets/{arc-371401b1.js → arc-1ddec37b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-3f126156.js → blockDiagram-38ab4fdb-18af387c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-12f22eb7.js → c4Diagram-3d4e48cf-250127a3.js} +1 -1
- rasa/core/channels/inspector/dist/assets/channel-59f6d54b.js +1 -0
- rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-03b1d386.js → classDiagram-70f12bd4-c3388b34.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-84f69d63.js → classDiagram-v2-f2320105-9c893a82.js} +1 -1
- rasa/core/channels/inspector/dist/assets/clone-26177ddb.js +1 -0
- rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-ca47fd38.js → createText-2e5e7dd3-c111213b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-f837ca8a.js → edges-e0da2a9e-812a729d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-8717ac54.js → erDiagram-9861fffd-fd5051bc.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-94f38b83.js → flowDb-956e92f1-3287ac02.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-b616f9fb.js → flowDiagram-66a62f08-692fb0b2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-29c03f5a.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-f5d24bb8.js → flowchart-elk-definition-4a651766-008376f1.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-b43ba8d9.js → ganttDiagram-c361ad54-df330a69.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-c3aafaa5.js → gitGraphDiagram-72cf32ee-e03676fb.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{graph-0d0a2c10.js → graph-46fad2ba.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-3862675e-58ea0305.js → index-3862675e-a484ac55.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-cce6f8a1.js → index-a003633f.js} +179 -179
- rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-b8f60461.js → infoDiagram-f8f76790-3f9e6ec2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-95be5545.js → journeyDiagram-49397b02-79f72383.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-da885b9b.js → layout-aad098e5.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-f1c817d3.js → line-219ab7ae.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-d42801e6.js → linear-2cddbe62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-a38923a6.js → mindmap-definition-fc14e90a-1d41ed99.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-ca6e71e9.js → pieDiagram-8a3498a8-cc496ee8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-b290dae9.js → quadrantDiagram-120e2f19-84d32884.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-03f02ceb.js → requirementDiagram-deff3bca-c0deb984.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-c49eee40.js → sankeyDiagram-04a897e0-b9d7fd62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-b2cd6a3d.js → sequenceDiagram-704730f1-7d517565.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-e53a2028.js → stateDiagram-587899a1-98ef9b27.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-e1982a03.js → stateDiagram-v2-d93cdb3a-cee70748.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-d0226ca5.js → styles-6aaf32cf-3f9d1c96.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9a916d00-0e21dc00.js → styles-9a916d00-67471923.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-c10674c1-9588494e.js → styles-c10674c1-bd093fb7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-be478d4f.js → svgDrawCommon-08f97a94-675794e8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-74631749.js → timeline-definition-85554ec2-0ac67617.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-a043552f.js → xychartDiagram-e933f94c-c018dc37.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +2 -2
- rasa/core/channels/inspector/index.html +1 -1
- rasa/core/channels/inspector/package.json +4 -3
- rasa/core/channels/inspector/src/App.tsx +53 -7
- rasa/core/channels/inspector/src/components/Chat.tsx +3 -2
- rasa/core/channels/inspector/src/components/DiagramFlow.tsx +1 -1
- rasa/core/channels/inspector/src/components/LatencyDisplay.tsx +268 -0
- rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +6 -2
- rasa/core/channels/inspector/src/helpers/audio/audiostream.ts +8 -3
- rasa/core/channels/inspector/src/types.ts +8 -0
- rasa/core/channels/inspector/yarn.lock +12 -12
- rasa/core/channels/studio_chat.py +119 -34
- rasa/core/channels/voice_ready/twilio_voice.py +1 -1
- rasa/core/channels/voice_stream/asr/asr_engine.py +5 -1
- rasa/core/channels/voice_stream/asr/deepgram.py +5 -0
- rasa/core/channels/voice_stream/audiocodes.py +16 -8
- rasa/core/channels/voice_stream/browser_audio.py +39 -4
- rasa/core/channels/voice_stream/call_state.py +13 -2
- rasa/core/channels/voice_stream/genesys.py +16 -13
- rasa/core/channels/voice_stream/jambonz.py +14 -12
- rasa/core/channels/voice_stream/twilio_media_streams.py +14 -13
- rasa/core/channels/voice_stream/util.py +11 -1
- rasa/core/channels/voice_stream/voice_channel.py +108 -29
- rasa/core/nlg/callback.py +1 -1
- rasa/core/nlg/contextual_response_rephraser.py +19 -9
- rasa/core/nlg/generator.py +21 -5
- rasa/core/nlg/response.py +43 -6
- rasa/core/nlg/translate.py +8 -0
- rasa/core/policies/enterprise_search_policy.py +16 -21
- rasa/dialogue_understanding/commands/correct_slots_command.py +38 -10
- rasa/dialogue_understanding/generator/command_generator.py +5 -5
- rasa/dialogue_understanding/generator/command_parser.py +9 -13
- rasa/dialogue_understanding/processor/command_processor.py +149 -55
- rasa/dialogue_understanding/stack/utils.py +13 -3
- rasa/dialogue_understanding_test/du_test_schema.yml +3 -3
- rasa/dialogue_understanding_test/validation.py +9 -10
- rasa/e2e_test/e2e_config.py +18 -11
- rasa/e2e_test/e2e_test_schema.yml +3 -3
- rasa/e2e_test/utils/validation.py +17 -19
- rasa/engine/validation.py +86 -91
- rasa/exceptions.py +26 -1
- rasa/model_manager/model_api.py +2 -2
- rasa/model_manager/socket_bridge.py +8 -2
- rasa/shared/providers/_configs/default_litellm_client_config.py +3 -7
- rasa/shared/utils/cli.py +2 -0
- rasa/shared/utils/common.py +2 -1
- rasa/shared/utils/health_check/health_check.py +10 -14
- rasa/studio/upload.py +6 -2
- rasa/studio/utils.py +33 -22
- rasa/telemetry.py +95 -22
- rasa/utils/licensing.py +21 -10
- rasa/utils/log_utils.py +1 -1
- rasa/utils/tensorflow/transformer.py +3 -3
- rasa/validator.py +7 -5
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/METADATA +7 -7
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/RECORD +242 -203
- rasa/builder/create_openai_vector_store.py +0 -228
- rasa/builder/llm-helper-schema.json +0 -69
- rasa/builder/llm_context.py +0 -81
- rasa/builder/llm_helper_prompt.jinja2 +0 -245
- rasa/cli/project_templates/finance/data/nlu.yml +0 -29
- rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +0 -5
- rasa/cli/project_templates/finance/domain/default_flows.yml +0 -33
- rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +0 -57
- rasa/cli/project_templates/finance/tests/conversation_repair/cancellations.yml +0 -12
- rasa/cli/project_templates/finance/tests/conversation_repair/cannot_handle.yml +0 -7
- rasa/cli/project_templates/finance/tests/conversation_repair/chitchat.yml +0 -7
- rasa/cli/project_templates/finance/tests/conversation_repair/clarification.yml +0 -9
- rasa/cli/project_templates/finance/tests/conversation_repair/completion.yml +0 -18
- rasa/cli/project_templates/finance/tests/conversation_repair/corrections.yml +0 -17
- rasa/cli/project_templates/finance/tests/conversation_repair/digressions.yml +0 -32
- rasa/cli/project_templates/finance/tests/conversation_repair/human_handoff.yml +0 -21
- rasa/cli/project_templates/finance/tests/conversation_repair/skipping_collect_steps.yml +0 -16
- rasa/cli/project_templates/finance/tests/demo_scripts/main.yml +0 -16
- rasa/cli/project_templates/finance/tests/happy_paths/balance_verification.yml +0 -15
- rasa/cli/project_templates/finance/tests/happy_paths/banking_questions.yml +0 -12
- rasa/cli/project_templates/finance/tests/happy_paths/card_blocking.yml +0 -52
- rasa/cli/project_templates/finance/tests/happy_paths/money_transfer.yml +0 -136
- rasa/cli/project_templates/finance/tests/happy_paths/payee_management.yml +0 -27
- rasa/cli/project_templates/finance/tests/happy_paths/user_greeted.yml +0 -5
- rasa/cli/project_templates/plain/config.yml +0 -17
- rasa/cli/project_templates/plain/data/patterns/pattern_session_start.yml +0 -7
- rasa/cli/project_templates/plain/domain.yml +0 -5
- rasa/core/channels/inspector/dist/assets/channel-f1efda17.js +0 -1
- rasa/core/channels/inspector/dist/assets/clone-fdf164e2.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-7d7a1629.js +0 -1
- rasa/shared/importers/static.py +0 -63
- /rasa/{cli/project_templates/plain/actions → builder/copilot}/__init__.py +0 -0
- /rasa/builder/{inkeep-rag-response-schema.json → document_retrieval/inkeep-rag-response-schema.json} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_process_immediate_payment.py → transfers/action_process_immediate_payment.py} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_schedule_payment.py → transfers/action_schedule_payment.py} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_validate_payment_date.py → transfers/action_validate_payment_date.py} +0 -0
- /rasa/cli/project_templates/finance/data/{flows → cards}/block_card.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → cards}/select_card.yml +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/accounts.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/advisors.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/appointments.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/branches.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/cards.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/payees.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/transactions.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/users.json +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/add_payee.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/list_payees.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/remove_payee.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/transfer_money.yml +0 -0
- /rasa/cli/project_templates/finance/domain/{block_card.yml → cards/block_card.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{select_card.yml → cards/select_card.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{add_payee.yml → transfers/add_payee.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{list_payees.yml → transfers/list_payees.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{remove_payee.yml → transfers/remove_payee.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{transfer_money.yml → transfers/transfer_money.yml} +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/entry_points.txt +0 -0
|
@@ -17,19 +17,19 @@ class ActionRemovePayee(Action):
|
|
|
17
17
|
tracker: Tracker,
|
|
18
18
|
domain: Dict[Text, Any],
|
|
19
19
|
) -> List[Dict[Text, Any]]:
|
|
20
|
-
|
|
20
|
+
name = tracker.get_slot("name")
|
|
21
21
|
payee_name = tracker.get_slot("payee_name")
|
|
22
22
|
|
|
23
23
|
db = Database()
|
|
24
24
|
|
|
25
25
|
# Get user information
|
|
26
|
-
user = db.get_user_by_name(
|
|
26
|
+
user = db.get_user_by_name(name)
|
|
27
27
|
if not user:
|
|
28
28
|
dispatcher.utter_message(text="User not found.")
|
|
29
29
|
return []
|
|
30
30
|
|
|
31
31
|
# Check if payee exists
|
|
32
|
-
payee = db.get_payee_by_name_and_user(payee_name, user["id"])
|
|
32
|
+
payee = db.get_payee_by_name_and_user(payee_name, int(user["id"]))
|
|
33
33
|
if not payee:
|
|
34
34
|
dispatcher.utter_message(
|
|
35
35
|
text=f"I'm sorry, but I couldn't find a payee named '{payee_name}'"
|
|
@@ -37,7 +37,7 @@ class ActionRemovePayee(Action):
|
|
|
37
37
|
return [SlotSet("payee_removed", False)]
|
|
38
38
|
|
|
39
39
|
# Remove the payee
|
|
40
|
-
success = db.remove_payee(payee_name, user["id"])
|
|
40
|
+
success = db.remove_payee(payee_name, int(user["id"]))
|
|
41
41
|
|
|
42
42
|
if success:
|
|
43
43
|
dispatcher.utter_message(
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
# The config recipe.
|
|
2
1
|
recipe: default.v1
|
|
3
|
-
|
|
4
|
-
# The assistant project unique identifier
|
|
5
|
-
# This default value must be replaced with a unique assistant name within your deployment
|
|
2
|
+
language: en
|
|
6
3
|
assistant_id: placeholder_default
|
|
7
4
|
|
|
8
|
-
language: en
|
|
9
5
|
pipeline:
|
|
10
|
-
- name:
|
|
11
|
-
- name: RegexFeaturizer
|
|
12
|
-
- name: LexicalSyntacticFeaturizer
|
|
13
|
-
- name: CountVectorsFeaturizer
|
|
14
|
-
- name: CountVectorsFeaturizer
|
|
15
|
-
analyzer: char_wb
|
|
16
|
-
min_ngram: 1
|
|
17
|
-
max_ngram: 4
|
|
18
|
-
- name: LogisticRegressionClassifier
|
|
19
|
-
# - name: NLUCommandAdapter
|
|
20
|
-
- name: CompactLLMCommandGenerator
|
|
6
|
+
- name: SearchReadyLLMCommandGenerator
|
|
21
7
|
llm:
|
|
22
8
|
model_group: openai-gpt-4o
|
|
23
|
-
|
|
9
|
+
flow_retrieval:
|
|
10
|
+
active: false
|
|
11
|
+
|
|
24
12
|
|
|
25
|
-
# Configuration for Rasa Core.
|
|
26
13
|
policies:
|
|
27
14
|
- name: FlowPolicy
|
|
28
15
|
- name: EnterpriseSearchPolicy
|
|
29
|
-
model: openai-gpt-4o
|
|
30
16
|
vector_store:
|
|
31
17
|
type: "faiss"
|
|
32
18
|
source: "./docs"
|
|
19
|
+
llm:
|
|
20
|
+
model_group: openai-gpt-4o
|
|
21
|
+
check_relevancy: true
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# This file contains the credentials for the voice & chat platforms
|
|
2
2
|
# which your bot is using.
|
|
3
3
|
# https://rasa.com/docs/rasa-pro/connectors/messaging-and-voice-channels/
|
|
4
|
-
|
|
5
4
|
rest:
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
socketio:
|
|
6
|
+
bot_message_evt: bot_uttered
|
|
7
|
+
session_persistence: true
|
|
8
|
+
user_message_evt: user_uttered
|
|
8
9
|
|
|
10
|
+
rasa:
|
|
11
|
+
url: "http://localhost:5002/api"
|
|
9
12
|
|
|
10
13
|
#facebook:
|
|
11
14
|
# verify: "<verify>"
|
|
@@ -27,7 +30,3 @@ rest:
|
|
|
27
30
|
# token: "<bot token>"
|
|
28
31
|
# webhook_url: "<callback URL>"
|
|
29
32
|
|
|
30
|
-
# This entry is needed if you are using Rasa Enterprise. The entry represents credentials
|
|
31
|
-
# for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
|
|
32
|
-
rasa:
|
|
33
|
-
url: "http://localhost:5002/api"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
id,user_id,account_id,number,type,status,issued_at,updated_at
|
|
2
|
-
1,1,1,1111222233334444,debit,active,
|
|
3
|
-
2,1,2,1234567812345678,debit,active,
|
|
4
|
-
3,1,,5555666677778888,credit,active,
|
|
5
|
-
4,2,3,9999000011112222,debit,active,
|
|
6
|
-
5,2,4,2345678923456789,debit,active,
|
|
7
|
-
6,2,5,3456789034567890,debit,active,
|
|
8
|
-
7,2,,3333444455556666,credit,active,
|
|
9
|
-
8,3,6,2222333344445555,debit,active,
|
|
10
|
-
9,3,7,4567890145678901,debit,active,
|
|
11
|
-
10,3,,6666777788889999,credit,active,
|
|
2
|
+
1,1,1,1111222233334444,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
3
|
+
2,1,2,1234567812345678,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
4
|
+
3,1,,5555666677778888,credit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
5
|
+
4,2,3,9999000011112222,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
6
|
+
5,2,4,2345678923456789,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
7
|
+
6,2,5,3456789034567890,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
8
|
+
7,2,,3333444455556666,credit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
9
|
+
8,3,6,2222333344445555,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
10
|
+
9,3,7,4567890145678901,debit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
11
|
+
10,3,,6666777788889999,credit,active,2024-10-02 17:33:16,2024-10-02 17:33:16
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
id,user_id,name,sort_code,account_number,type,reference,added_at
|
|
2
|
-
1,1,Robert,123456,65432178,person,friend,
|
|
3
|
-
2,1,James,123456,87654321,person,son,
|
|
4
|
-
3,1,
|
|
5
|
-
4,2,Richard,654321,12345678,person,
|
|
6
|
-
5,2,Susan,654321,87654321,person,friend,
|
|
7
|
-
6,2,
|
|
8
|
-
8,3,Amy,111111,33332222,person,colleague,
|
|
9
|
-
9,3,
|
|
10
|
-
10,3,William,111111,22223333,person,friend,
|
|
2
|
+
1,1,Robert,123456,65432178,person,friend,2024-10-02 17:33:16
|
|
3
|
+
2,1,James,123456,87654321,person,son,2024-10-02 17:33:16
|
|
4
|
+
3,1,Food Market,123456,11223344,business,groceries,2024-10-02 17:33:16
|
|
5
|
+
4,2,Richard,654321,12345678,person,business partner,2024-10-02 17:33:16
|
|
6
|
+
5,2,Susan,654321,87654321,person,friend,2024-10-02 17:33:16
|
|
7
|
+
6,2,Electric Company,654321,99887766,business,utilities,2024-10-02 17:33:16
|
|
8
|
+
8,3,Amy,111111,33332222,person,colleague,2024-10-02 17:33:16
|
|
9
|
+
9,3,Fitness Gym,111111,44556677,business,gym,2024-10-02 17:33:16
|
|
10
|
+
10,3,William,111111,22223333,person,friend,2024-11-27 12:21:15
|
|
11
|
+
11,1,albert,,123123123,person,big brother,2025-08-01 15:47:00
|
|
@@ -2,8 +2,9 @@ flows:
|
|
|
2
2
|
check_balance:
|
|
3
3
|
description: |
|
|
4
4
|
Guides the user through retrieving their account balance by requesting an
|
|
5
|
-
account number and returning the balance on account
|
|
5
|
+
account number or an account name and returning the balance on the selected account
|
|
6
6
|
name: check an account balance
|
|
7
7
|
steps:
|
|
8
8
|
- collect: account
|
|
9
|
+
description: "The account number to check balance for"
|
|
9
10
|
- action: action_check_balance
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Simple thumbs up/down feedback flow
|
|
2
|
+
flows:
|
|
3
|
+
leave_feedback:
|
|
4
|
+
description: This flow collects simple thumbs up or thumbs down feedback
|
|
5
|
+
if: False # Flow guard to prevent direct triggering
|
|
6
|
+
steps:
|
|
7
|
+
- collect: feedback_rating
|
|
8
|
+
description: Ask user for thumbs up or thumbs down feedback
|
|
9
|
+
- id: feedback_response
|
|
10
|
+
noop: true
|
|
11
|
+
next:
|
|
12
|
+
- if: slots.feedback_rating == "thumbs_up"
|
|
13
|
+
then: positive_response
|
|
14
|
+
- else: negative_response
|
|
15
|
+
- id: positive_response
|
|
16
|
+
action: utter_thankyou_positive
|
|
17
|
+
next: END
|
|
18
|
+
- id: negative_response
|
|
19
|
+
action: utter_thankyou_negative
|
|
20
|
+
next: END
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
flows:
|
|
2
2
|
help:
|
|
3
|
-
|
|
4
|
-
# - intent:
|
|
5
|
-
# name: help
|
|
6
|
-
# confidence_threshold: 0.9999
|
|
7
|
-
description: |
|
|
8
|
-
This flow addresses user inquiries about the assistant's capabilities.
|
|
3
|
+
description: This flow addresses user inquiries about the assistant's capabilities.
|
|
9
4
|
It starts by acknowledging the user's request and providing a clear overview of
|
|
10
5
|
key skills and services. This helps users understand how the assistant can assist
|
|
11
6
|
them effectively.
|
|
12
|
-
name: help
|
|
7
|
+
name: help
|
|
13
8
|
steps:
|
|
14
9
|
- action: utter_help
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
version: "3.1"
|
|
2
|
+
flows:
|
|
3
|
+
human_handoff:
|
|
4
|
+
description: Handles escalation to a live human agent.
|
|
5
|
+
steps:
|
|
6
|
+
- collect: confirm_human_handoff
|
|
7
|
+
ask_before_filling: True
|
|
8
|
+
next:
|
|
9
|
+
- if: slots.confirm_human_handoff is "Yes"
|
|
10
|
+
then:
|
|
11
|
+
- action: utter_transferring_to_human
|
|
12
|
+
- action: action_human_handoff
|
|
13
|
+
next: END
|
|
14
|
+
- else:
|
|
15
|
+
- action: utter_human_handoff_cancelled
|
|
16
|
+
next: END
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
welcome:
|
|
3
|
+
if: False
|
|
4
|
+
description: |
|
|
5
|
+
This flow is designed to greet and onboard new users who initiate a welcome intent.
|
|
6
|
+
It begins with an initial greeting message to establish a friendly interaction.
|
|
7
|
+
name: say hello
|
|
8
|
+
steps:
|
|
9
|
+
- action: utter_greeting
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
slots:
|
|
2
|
+
skills_summary:
|
|
3
|
+
type: text
|
|
4
|
+
initial_value: "transferring money, managing authorised payees, checking an account balance, blocking a card, and answering your general finance enquiries"
|
|
5
|
+
mappings:
|
|
6
|
+
- type: controlled
|
|
7
|
+
assistant_name:
|
|
8
|
+
type: text
|
|
9
|
+
initial_value: "Finley"
|
|
10
|
+
mappings:
|
|
11
|
+
- type: controlled
|
|
12
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
responses:
|
|
2
|
+
utter_bot_identity:
|
|
3
|
+
- text: "Yes, I'm an AI assistant designed to help you with your questions. I'm here to provide helpful information and support. How can I assist you today?"
|
|
4
|
+
- text: "I am indeed an AI assistant! I'm programmed to be helpful, accurate, and friendly. What can I help you with?"
|
|
5
|
+
- text: "That's right, I'm an AI bot created to assist you. I aim to provide useful responses and help solve your questions. Is there something specific I can help you with?"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
version: "3.1"
|
|
2
|
+
|
|
3
|
+
slots:
|
|
4
|
+
current_date:
|
|
5
|
+
type: text
|
|
6
|
+
username:
|
|
7
|
+
type: text
|
|
8
|
+
email_address:
|
|
9
|
+
type: text
|
|
10
|
+
physical_address:
|
|
11
|
+
type: text
|
|
12
|
+
segment:
|
|
13
|
+
type: text
|
|
14
|
+
name:
|
|
15
|
+
type: text
|
|
16
|
+
|
|
17
|
+
actions:
|
|
18
|
+
- action_session_start
|
|
19
|
+
|
|
20
|
+
responses:
|
|
21
|
+
utter_chitchat:
|
|
22
|
+
- text: "Hello, how can I help you today?"
|
|
23
|
+
metadata:
|
|
24
|
+
rephrase: True
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
slots:
|
|
2
|
+
feedback_rating:
|
|
3
|
+
type: categorical
|
|
4
|
+
values: [thumbs_up, thumbs_down]
|
|
5
|
+
mappings:
|
|
6
|
+
- type: from_llm
|
|
7
|
+
|
|
8
|
+
responses:
|
|
9
|
+
utter_ask_feedback_rating:
|
|
10
|
+
- text: "Before you go, how was your experience?"
|
|
11
|
+
buttons:
|
|
12
|
+
- title: "👍 Great"
|
|
13
|
+
payload: "/SetSlots(feedback_rating=thumbs_up)"
|
|
14
|
+
- title: "👎 Could be better"
|
|
15
|
+
payload: "/SetSlots(feedback_rating=thumbs_down)"
|
|
16
|
+
|
|
17
|
+
utter_thankyou_positive:
|
|
18
|
+
- text: "That's wonderful to hear! Thank you for your feedback! Have a fantastic day! 🌟"
|
|
19
|
+
- text: "So glad we could help! Thanks for the positive feedback! Take care! 😊"
|
|
20
|
+
- text: "Amazing! We're thrilled you had a great experience. Have a wonderful day! 🎉"
|
|
21
|
+
|
|
22
|
+
utter_thankyou_negative:
|
|
23
|
+
- text: "Thank you for your honest feedback. We're always working to improve our service. Have a good day."
|
|
24
|
+
- text: "We appreciate your feedback and will use it to make our service better. Thank you for your time."
|
|
25
|
+
- text: "Thanks for letting us know. Your feedback helps us improve. Take care!"
|
|
26
|
+
|
|
27
|
+
actions:
|
|
28
|
+
- action_default_fallback
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
responses:
|
|
2
|
+
utter_goodbye:
|
|
3
|
+
- text: "Thanks for stopping by — take care!"
|
|
4
|
+
- text: "Thanks for the chat. Have a great day!"
|
|
5
|
+
- text: "Catch you later! Feel free to reach out anytime."
|
|
6
|
+
- text: "Goodbye for now — we’re here if you need anything."
|
|
7
|
+
- text: "Take care! Let us know if you have any other questions."
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
version: "3.1"
|
|
2
|
+
actions:
|
|
3
|
+
- "action_human_handoff"
|
|
4
|
+
|
|
5
|
+
slots:
|
|
6
|
+
confirm_human_handoff:
|
|
7
|
+
type: "categorical"
|
|
8
|
+
mappings:
|
|
9
|
+
- type: "from_llm"
|
|
10
|
+
values:
|
|
11
|
+
- "Yes"
|
|
12
|
+
- "No"
|
|
13
|
+
|
|
14
|
+
responses:
|
|
15
|
+
utter_ask_confirm_human_handoff:
|
|
16
|
+
- text: "Do you want to be connected to a human agent?"
|
|
17
|
+
buttons:
|
|
18
|
+
- payload: "/SetSlots(confirm_human_handoff=Yes)"
|
|
19
|
+
title: "Yes"
|
|
20
|
+
- payload: "/SetSlots(confirm_human_handoff=No)"
|
|
21
|
+
title: "No"
|
|
22
|
+
|
|
23
|
+
utter_transferring_to_human:
|
|
24
|
+
- text: "You will be transfered to a human agent in a few moments."
|
|
25
|
+
|
|
26
|
+
utter_human_handoff_cancelled:
|
|
27
|
+
- text: "Ok, I understand you don't want to be connected to a human agent. Is there something else I can help you with?"
|
|
28
|
+
metadata:
|
|
29
|
+
rephrase: True
|
|
30
|
+
|
|
@@ -3,11 +3,11 @@ The assistant is professional, calm, and highly attentive to detail.
|
|
|
3
3
|
Its main priorities are efficiency, speed, and accuracy when handling user requests.
|
|
4
4
|
|
|
5
5
|
Please rephrase the suggested AI response, staying close to the original meaning while
|
|
6
|
-
ensuring the assistant
|
|
6
|
+
ensuring the assistant's tone remains formal yet empathetic, friendly, and reassuring.
|
|
7
7
|
It should convey patience, even with vague or repetitive questions, and be clear,
|
|
8
8
|
informative, and slightly humorous where appropriate.
|
|
9
9
|
|
|
10
|
-
Write your responses in
|
|
10
|
+
Write your responses in English
|
|
11
11
|
|
|
12
12
|
Context / previous conversation with the user:
|
|
13
13
|
{{history}}
|
|
@@ -16,4 +16,4 @@ Context / previous conversation with the user:
|
|
|
16
16
|
|
|
17
17
|
Suggested AI Response: {{suggested_response}}
|
|
18
18
|
|
|
19
|
-
Rephrased AI Response:
|
|
19
|
+
Rephrased AI Response:
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import csv
|
|
2
2
|
import logging
|
|
3
3
|
from datetime import datetime
|
|
4
|
-
from typing import Dict, List
|
|
4
|
+
from typing import Any, Dict, List
|
|
5
5
|
|
|
6
6
|
from rasa_sdk import Action
|
|
7
7
|
from rasa_sdk.events import SlotSet
|
|
8
|
+
from rasa_sdk.executor import CollectingDispatcher
|
|
9
|
+
from rasa_sdk.interfaces import Tracker
|
|
10
|
+
from rasa_sdk.types import DomainDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class ActionVerifyBillByDate(Action):
|
|
11
14
|
def name(self) -> str:
|
|
12
15
|
return "action_verify_bill_by_date"
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
@staticmethod
|
|
18
|
+
def text_to_date(month_text: str) -> str:
|
|
15
19
|
try:
|
|
16
20
|
# Get the current year
|
|
17
21
|
current_year = datetime.now().year
|
|
@@ -29,7 +33,9 @@ class ActionVerifyBillByDate(Action):
|
|
|
29
33
|
except ValueError:
|
|
30
34
|
return "Invalid format. Please use a full month name (e.g., 'March')."
|
|
31
35
|
|
|
32
|
-
def run(
|
|
36
|
+
def run(
|
|
37
|
+
self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: DomainDict
|
|
38
|
+
) -> List[Dict[str, Any]]:
|
|
33
39
|
# Get customer ID and date from slots
|
|
34
40
|
customer_id = tracker.get_slot("customer_id")
|
|
35
41
|
bill_month = tracker.get_slot("bill_month")
|
|
@@ -77,15 +83,15 @@ class ActionVerifyBillByDate(Action):
|
|
|
77
83
|
)
|
|
78
84
|
return []
|
|
79
85
|
|
|
80
|
-
bill_amount = specific_bill["amount"]
|
|
86
|
+
bill_amount = float(specific_bill["amount"])
|
|
81
87
|
|
|
82
88
|
# Calculate average
|
|
83
89
|
if customer_bills:
|
|
84
|
-
average_bill = sum(
|
|
85
|
-
customer_bills
|
|
86
|
-
)
|
|
90
|
+
average_bill = sum(
|
|
91
|
+
float(bill["amount"]) for bill in customer_bills
|
|
92
|
+
) / len(customer_bills)
|
|
87
93
|
else:
|
|
88
|
-
average_bill = 0
|
|
94
|
+
average_bill = 0.0
|
|
89
95
|
|
|
90
96
|
difference = bill_amount - average_bill
|
|
91
97
|
|
|
@@ -100,9 +106,9 @@ class ActionVerifyBillByDate(Action):
|
|
|
100
106
|
|
|
101
107
|
dispatcher.utter_message(response)
|
|
102
108
|
return [
|
|
103
|
-
SlotSet("bill_amount",
|
|
104
|
-
SlotSet("average_bill",
|
|
105
|
-
SlotSet("difference",
|
|
109
|
+
SlotSet("bill_amount", float(bill_amount)),
|
|
110
|
+
SlotSet("average_bill", float(average_bill)),
|
|
111
|
+
SlotSet("difference", float(difference)),
|
|
106
112
|
]
|
|
107
113
|
|
|
108
114
|
except FileNotFoundError:
|
|
@@ -117,7 +123,9 @@ class ActionRecapBill(Action):
|
|
|
117
123
|
def name(self) -> str:
|
|
118
124
|
return "action_recap_bill"
|
|
119
125
|
|
|
120
|
-
def run(
|
|
126
|
+
def run(
|
|
127
|
+
self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: DomainDict
|
|
128
|
+
) -> List[Dict[str, Any]]:
|
|
121
129
|
# Get customer_id and bill_date from slots
|
|
122
130
|
customer_id = tracker.get_slot("customer_id")
|
|
123
131
|
bill_month = tracker.get_slot("bill_month")
|
|
@@ -151,14 +159,14 @@ class ActionRecapBill(Action):
|
|
|
151
159
|
bill_date_obj = datetime.strptime(bill_date, "%d/%m/%Y")
|
|
152
160
|
|
|
153
161
|
# Filter records for the given customer_id
|
|
154
|
-
filtered_records = []
|
|
162
|
+
filtered_records: List[Dict[str, Any]] = []
|
|
155
163
|
for row in reader:
|
|
156
164
|
if row["customer_id"] == str(customer_id):
|
|
157
165
|
# Parse date and add to filtered records
|
|
158
|
-
row_date = datetime.strptime(row["date"], "%Y-%m-%d")
|
|
166
|
+
row_date: datetime = datetime.strptime(row["date"], "%Y-%m-%d")
|
|
159
167
|
filtered_records.append(
|
|
160
168
|
{
|
|
161
|
-
"date": row_date,
|
|
169
|
+
"date": row_date.date(),
|
|
162
170
|
"amount": float(row["amount"]),
|
|
163
171
|
"source": row["source"],
|
|
164
172
|
}
|
|
@@ -177,7 +185,7 @@ class ActionRecapBill(Action):
|
|
|
177
185
|
response = "\n".join(
|
|
178
186
|
[
|
|
179
187
|
(
|
|
180
|
-
f"{record['date']
|
|
188
|
+
f"{record['date']} | {record['amount']} $ "
|
|
181
189
|
f"| {record['source']}"
|
|
182
190
|
)
|
|
183
191
|
for record in filtered_records
|
|
@@ -186,7 +194,6 @@ class ActionRecapBill(Action):
|
|
|
186
194
|
|
|
187
195
|
# Send response to user
|
|
188
196
|
dispatcher.utter_message(response)
|
|
189
|
-
print("response heeere", response)
|
|
190
197
|
return []
|
|
191
198
|
|
|
192
199
|
except FileNotFoundError:
|
|
@@ -3,13 +3,18 @@ from typing import Dict, List
|
|
|
3
3
|
|
|
4
4
|
from rasa_sdk import Action
|
|
5
5
|
from rasa_sdk.events import SlotSet
|
|
6
|
+
from rasa_sdk.executor import CollectingDispatcher
|
|
7
|
+
from rasa_sdk.interfaces import Tracker
|
|
8
|
+
from rasa_sdk.types import DomainDict
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
class ActionGetCustomerInfo(Action):
|
|
9
12
|
def name(self) -> str:
|
|
10
13
|
return "action_get_customer_info"
|
|
11
14
|
|
|
12
|
-
def run(
|
|
15
|
+
def run(
|
|
16
|
+
self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: DomainDict
|
|
17
|
+
) -> List[Dict]:
|
|
13
18
|
# Load CSV file
|
|
14
19
|
file_path = "csvs/customers.csv" # get information from your DBs
|
|
15
20
|
customer_id = tracker.get_slot("customer_id")
|
|
@@ -3,13 +3,18 @@ import random
|
|
|
3
3
|
|
|
4
4
|
from rasa_sdk import Action
|
|
5
5
|
from rasa_sdk.events import EventType, SlotSet
|
|
6
|
+
from rasa_sdk.executor import CollectingDispatcher
|
|
7
|
+
from rasa_sdk.interfaces import Tracker
|
|
8
|
+
from rasa_sdk.types import DomainDict
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
class ActionSleepAndRespond(Action):
|
|
9
12
|
def name(self) -> str:
|
|
10
13
|
return "actions_run_speed_test"
|
|
11
14
|
|
|
12
|
-
async def run(
|
|
15
|
+
async def run(
|
|
16
|
+
self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: DomainDict
|
|
17
|
+
) -> list[EventType]:
|
|
13
18
|
await asyncio.sleep(10)
|
|
14
19
|
dispatcher.utter_message(
|
|
15
20
|
text="Thank you for waiting... ✅ "
|