rasa-pro 3.14.0.dev4__py3-none-any.whl → 3.14.0.dev5__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/api.py +0 -5
- rasa/builder/README.md +120 -0
- rasa/builder/auth.py +176 -0
- rasa/builder/config.py +115 -0
- rasa/builder/copilot/constants.py +25 -0
- rasa/builder/copilot/copilot.py +372 -0
- rasa/builder/copilot/copilot_response_handler.py +487 -0
- rasa/builder/copilot/copilot_templated_message_provider.py +58 -0
- rasa/builder/copilot/exceptions.py +20 -0
- rasa/builder/copilot/models.py +431 -0
- rasa/builder/copilot/prompts/copilot_system_prompt.jinja2 +726 -0
- rasa/builder/copilot/telemetry.py +195 -0
- rasa/builder/copilot/templated_messages/copilot_internal_messages_templates.yml +16 -0
- rasa/builder/copilot/templated_messages/copilot_templated_responses.yml +26 -0
- rasa/builder/document_retrieval/constants.py +15 -0
- rasa/builder/document_retrieval/inkeep-rag-response-schema.json +64 -0
- rasa/builder/document_retrieval/inkeep_document_retrieval.py +238 -0
- rasa/builder/document_retrieval/models.py +62 -0
- rasa/builder/download.py +140 -0
- rasa/builder/exceptions.py +55 -0
- rasa/builder/guardrails/__init__.py +1 -0
- rasa/builder/guardrails/constants.py +3 -0
- rasa/builder/guardrails/exceptions.py +4 -0
- rasa/builder/guardrails/lakera.py +206 -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 +234 -0
- rasa/builder/llm_service.py +246 -0
- rasa/builder/logging_utils.py +209 -0
- rasa/builder/main.py +174 -0
- rasa/builder/models.py +197 -0
- rasa/builder/project_generator.py +450 -0
- rasa/builder/project_info.py +72 -0
- rasa/builder/scrape_rasa_docs.py +97 -0
- rasa/builder/service.py +1142 -0
- rasa/builder/shared/tracker_context.py +212 -0
- rasa/builder/skill_to_bot_prompt.jinja2 +164 -0
- rasa/builder/training_service.py +132 -0
- rasa/builder/validation_service.py +93 -0
- rasa/cli/arguments/default_arguments.py +0 -12
- rasa/cli/arguments/run.py +0 -2
- rasa/cli/dialogue_understanding_test.py +0 -4
- rasa/cli/e2e_test.py +0 -4
- rasa/cli/inspect.py +0 -3
- rasa/cli/llm_fine_tuning.py +0 -5
- 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/basic/credentials.yml +34 -0
- 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/basic/data/system/pattern_completed.yml +7 -0
- 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/basic/domain/general/utils.yml +13 -0
- rasa/cli/project_templates/basic/domain/general/welcome.yml +7 -0
- rasa/cli/project_templates/basic/endpoints.yml +73 -0
- rasa/cli/project_templates/basic/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/finance/actions/__init__.py +46 -0
- rasa/cli/project_templates/finance/actions/accounts/action_ask_account.py +47 -0
- rasa/cli/project_templates/finance/actions/accounts/action_check_balance.py +40 -0
- rasa/cli/project_templates/finance/actions/action_session_start.py +74 -0
- rasa/cli/project_templates/finance/actions/cards/action_ask_card.py +48 -0
- rasa/cli/project_templates/finance/actions/cards/action_check_card_existence.py +36 -0
- rasa/cli/project_templates/finance/actions/cards/action_update_card_status.py +54 -0
- rasa/cli/project_templates/finance/actions/database.py +277 -0
- rasa/cli/project_templates/finance/actions/transfers/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/transfers/action_add_payee.py +52 -0
- rasa/cli/project_templates/finance/actions/transfers/action_ask_account_from.py +51 -0
- rasa/cli/project_templates/finance/actions/transfers/action_check_payee_existence.py +40 -0
- rasa/cli/project_templates/finance/actions/transfers/action_check_sufficient_funds.py +40 -0
- rasa/cli/project_templates/finance/actions/transfers/action_list_payees.py +46 -0
- rasa/cli/project_templates/finance/actions/transfers/action_process_immediate_payment.py +18 -0
- rasa/cli/project_templates/finance/actions/transfers/action_remove_payee.py +49 -0
- rasa/cli/project_templates/finance/actions/transfers/action_schedule_payment.py +19 -0
- rasa/cli/project_templates/finance/actions/transfers/action_validate_payment_date.py +36 -0
- rasa/cli/project_templates/finance/config.yml +21 -0
- rasa/cli/project_templates/finance/credentials.yml +32 -0
- rasa/cli/project_templates/finance/csvs/accounts.csv +8 -0
- rasa/cli/project_templates/finance/csvs/advisors.csv +7 -0
- rasa/cli/project_templates/finance/csvs/appointments.csv +211 -0
- rasa/cli/project_templates/finance/csvs/branches.csv +10 -0
- rasa/cli/project_templates/finance/csvs/cards.csv +11 -0
- rasa/cli/project_templates/finance/csvs/payees.csv +11 -0
- rasa/cli/project_templates/finance/csvs/transactions.csv +71 -0
- rasa/cli/project_templates/finance/csvs/users.csv +4 -0
- rasa/cli/project_templates/finance/data/accounts/check_balance.yml +10 -0
- rasa/cli/project_templates/finance/data/cards/block_card.yml +66 -0
- rasa/cli/project_templates/finance/data/cards/select_card.yml +12 -0
- 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/general/help.yml +9 -0
- 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/system/patterns/pattern_chitchat.yml +5 -0
- 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/system/patterns/pattern_session_start.yml +8 -0
- rasa/cli/project_templates/finance/data/system/source/accounts.json +51 -0
- rasa/cli/project_templates/finance/data/system/source/advisors.json +44 -0
- rasa/cli/project_templates/finance/data/system/source/appointments.json +1474 -0
- rasa/cli/project_templates/finance/data/system/source/branches.json +47 -0
- rasa/cli/project_templates/finance/data/system/source/cards.json +72 -0
- rasa/cli/project_templates/finance/data/system/source/payees.json +74 -0
- rasa/cli/project_templates/finance/data/system/source/transactions.json +492 -0
- rasa/cli/project_templates/finance/data/system/source/users.json +29 -0
- rasa/cli/project_templates/finance/data/transfers/add_payee.yml +29 -0
- rasa/cli/project_templates/finance/data/transfers/list_payees.yml +5 -0
- rasa/cli/project_templates/finance/data/transfers/remove_payee.yml +21 -0
- rasa/cli/project_templates/finance/data/transfers/transfer_money.yml +67 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/consequences_of_blocking_card.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/reasons_to_block_card.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/recovering_from_card_fraud.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/tips_for_card_security.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/what_to_do_if_card_is_lost.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/account_balance_security.txt +7 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/common_balance_inquiries.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/methods_to_check_balance.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/understanding_balance_updates.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/what_to_do_if_balance_is_incorrect.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/benefits_of_authorised_payees.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/common_issues_with_payees.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/general_payee_information.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/payee_management_tips.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/understanding_payee_types.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/common_transfer_errors.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/fees_for_transfers.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/general_transfer_information.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/security_tips_for_transfers.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/transfer_processing_times.txt +8 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part1.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part10.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part11.txt +48 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part12.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part13.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part14.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part15.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part16.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part17.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part18.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part19.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part2.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part20.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part21.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part22.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part23.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part24.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part25.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part26.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part27.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part28.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part29.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part3.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part30.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part31.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part32.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part33.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part34.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part35.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part36.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part37.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part38.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part39.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part4.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part40.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part41.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part42.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part43.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part44.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part45.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part46.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part47.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part48.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part49.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part5.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part50.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part51.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part52.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part53.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part54.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part55.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part56.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part57.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part58.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part59.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part6.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part60.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part61.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part7.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part8.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part9.txt +47 -0
- rasa/cli/project_templates/finance/domain/accounts/check_balance.yml +11 -0
- rasa/cli/project_templates/finance/domain/cards/block_card.yml +101 -0
- rasa/cli/project_templates/finance/domain/cards/select_card.yml +12 -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/domain/transfers/add_payee.yml +47 -0
- rasa/cli/project_templates/finance/domain/transfers/list_payees.yml +4 -0
- rasa/cli/project_templates/finance/domain/transfers/remove_payee.yml +16 -0
- rasa/cli/project_templates/finance/domain/transfers/transfer_money.yml +79 -0
- rasa/cli/project_templates/finance/endpoints.yml +63 -0
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/telco/actions/__init__.py +0 -0
- rasa/cli/project_templates/telco/actions/actions_billing.py +204 -0
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +48 -0
- rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +28 -0
- rasa/cli/project_templates/telco/actions/actions_session_start.py +18 -0
- rasa/cli/project_templates/telco/config.yml +25 -0
- rasa/cli/project_templates/telco/credentials.yml +33 -0
- rasa/cli/project_templates/telco/csvs/billing.csv +10 -0
- rasa/cli/project_templates/telco/csvs/customers.csv +5 -0
- rasa/cli/project_templates/telco/data/flows/flow_global.yml +5 -0
- rasa/cli/project_templates/telco/data/flows/flow_reboot_router.yml +8 -0
- rasa/cli/project_templates/telco/data/flows/flow_reset_router.yml +7 -0
- rasa/cli/project_templates/telco/data/flows/flow_solve_internet_issue.yml +73 -0
- rasa/cli/project_templates/telco/data/flows/flow_undertand_bill.yml +45 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_completed.yml +7 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_human_handoff.yml +6 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_search.yml +7 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_session_start.yml +9 -0
- rasa/cli/project_templates/telco/docs/reset_vs_rboot_router.txt +1 -0
- rasa/cli/project_templates/telco/docs/restart_router.txt +6 -0
- rasa/cli/project_templates/telco/docs/run_speed_test.txt +6 -0
- rasa/cli/project_templates/telco/domain/domain_global.yml +29 -0
- rasa/cli/project_templates/telco/domain/domain_patterns.yml +17 -0
- rasa/cli/project_templates/telco/domain/domain_reboot_router.yml +20 -0
- rasa/cli/project_templates/telco/domain/domain_reset_router.yml +11 -0
- rasa/cli/project_templates/telco/domain/domain_run_speed_test.yml +24 -0
- rasa/cli/project_templates/telco/domain/domain_solve_internet_issue.yml +74 -0
- rasa/cli/project_templates/telco/domain/domain_undertand_bill.yml +102 -0
- rasa/cli/project_templates/telco/endpoints.yml +60 -0
- rasa/{dialogue_understanding/generator/prompt_templates/agent_command_prompt_v2_gpt_4o_2024_11_20_template.jinja2 → cli/project_templates/telco/prompts/command-generator.jinja2} +3 -7
- rasa/cli/project_templates/telco/tests/e2e_results_failed.yml +62 -0
- rasa/cli/project_templates/telco/tests/e2e_results_passed.yml +130 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/billing_test_cases.yml +68 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/global_test_cases.yml +13 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/internet_slow_test_case.yml +47 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/out_of_scope_test_case.yml +21 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/patterns_test_cases.yml +15 -0
- rasa/cli/project_templates/tutorial/config.yml +2 -1
- rasa/cli/run.py +0 -4
- rasa/cli/scaffold.py +46 -2
- rasa/cli/shell.py +0 -3
- rasa/constants.py +0 -6
- rasa/core/actions/action.py +10 -56
- rasa/core/agent.py +0 -16
- rasa/core/available_endpoints.py +0 -30
- rasa/core/channels/channel.py +4 -3
- rasa/core/channels/constants.py +3 -0
- rasa/core/channels/development_inspector.py +4 -4
- rasa/core/channels/hangouts.py +2 -2
- rasa/core/channels/inspector/dist/assets/{arc-63212852.js → arc-18042c22.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-eecf6b13.js → blockDiagram-38ab4fdb-fdd6bcfa.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-8f798a9a.js → c4Diagram-3d4e48cf-f5ae6786.js} +1 -1
- rasa/core/channels/inspector/dist/assets/channel-b9b536fc.js +1 -0
- rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-df71a04c.js → classDiagram-70f12bd4-81efba3e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-9b275968.js → classDiagram-v2-f2320105-3b6b6a92.js} +1 -1
- rasa/core/channels/inspector/dist/assets/clone-78d2ddcf.js +1 -0
- rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-1c669cad.js → createText-2e5e7dd3-31422447.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-b1553799.js → edges-e0da2a9e-518a90db.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-112388d6.js → erDiagram-9861fffd-a6d3c25a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-fdebec47.js → flowDb-956e92f1-e048c2be.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-6280ede1.js → flowDiagram-66a62f08-c7474c91.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-8b09c060.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-e1dc03e5.js → flowchart-elk-definition-4a651766-cb4d8723.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-83f68c51.js → ganttDiagram-c361ad54-346636a2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-22f8666f.js → gitGraphDiagram-72cf32ee-7c508874.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{graph-ca9e6217.js → graph-14702d8a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-3862675e-c5ceb692.js → index-3862675e-f18b534b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/index-4d4bdf3a.js +1335 -0
- rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-faa9999b.js → infoDiagram-f8f76790-64154b83.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-c4dda8d9.js → journeyDiagram-49397b02-833a5f95.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-d4307784.js → layout-5a3b2123.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-0567aaa7.js → line-2272a8c7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-c11b95cf.js → linear-35bcf273.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-0c7d3ca9.js → mindmap-definition-fc14e90a-92dcb0e9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-34b433fa.js → pieDiagram-8a3498a8-94dbc900.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-4cab816e.js → quadrantDiagram-120e2f19-8b7a9c33.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-8c22fa9e.js → requirementDiagram-deff3bca-6f7eab81.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-70ce9e8e.js → sankeyDiagram-04a897e0-f43e581d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-fbcd7fc9.js → sequenceDiagram-704730f1-0bcbefc3.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-45f05ea6.js → stateDiagram-587899a1-b8a74083.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-beab1ea6.js → stateDiagram-v2-d93cdb3a-2070218f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-2f29dbd5.js → styles-6aaf32cf-f1d54e34.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9a916d00-951eac83.js → styles-9a916d00-980de489.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-c10674c1-897fbfdd.js → styles-c10674c1-3c03abde.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-d667fac1.js → svgDrawCommon-08f97a94-46ba068f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-e3205144.js → timeline-definition-85554ec2-901f5e3d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-4abeb0e2.js → xychartDiagram-e933f94c-acbc628a.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +2 -2
- rasa/core/channels/inspector/index.html +1 -1
- rasa/core/channels/inspector/src/App.tsx +10 -11
- rasa/core/channels/inspector/src/components/DialogueInformation.tsx +12 -3
- rasa/core/channels/inspector/src/components/DialogueStack.tsx +4 -6
- rasa/core/channels/inspector/src/helpers/formatters.ts +3 -24
- rasa/core/channels/inspector/src/theme/base/styles.ts +1 -19
- rasa/core/channels/inspector/src/types.ts +0 -4
- rasa/core/channels/socketio.py +212 -51
- rasa/core/channels/studio_chat.py +49 -29
- rasa/core/channels/voice_stream/genesys.py +1 -1
- rasa/core/channels/voice_stream/voice_channel.py +5 -3
- rasa/core/constants.py +0 -4
- rasa/core/policies/enterprise_search_policy.py +6 -11
- rasa/core/policies/flow_policy.py +4 -4
- rasa/core/policies/flows/flow_executor.py +45 -456
- rasa/core/policies/intentless_policy.py +1 -1
- rasa/core/policies/unexpected_intent_policy.py +0 -1
- rasa/core/processor.py +15 -18
- rasa/core/run.py +14 -11
- rasa/core/tracker_stores/tracker_store.py +7 -3
- rasa/core/train.py +1 -1
- rasa/core/training/interactive.py +16 -16
- rasa/core/training/story_conflict.py +5 -5
- rasa/core/utils.py +1 -21
- rasa/dialogue_understanding/commands/__init__.py +0 -8
- rasa/dialogue_understanding/commands/cancel_flow_command.py +4 -97
- rasa/dialogue_understanding/commands/chit_chat_answer_command.py +0 -11
- rasa/dialogue_understanding/commands/clarify_command.py +0 -10
- rasa/dialogue_understanding/commands/knowledge_answer_command.py +0 -11
- rasa/dialogue_understanding/commands/start_flow_command.py +8 -164
- rasa/dialogue_understanding/commands/utils.py +2 -6
- rasa/dialogue_understanding/generator/command_parser.py +0 -4
- rasa/dialogue_understanding/generator/flow_retrieval.py +10 -9
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +12 -50
- rasa/dialogue_understanding/generator/llm_command_generator.py +1 -1
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +1 -1
- rasa/dialogue_understanding/generator/single_step/compact_llm_command_generator.py +6 -7
- rasa/dialogue_understanding/generator/single_step/search_ready_llm_command_generator.py +6 -7
- rasa/dialogue_understanding/generator/single_step/single_step_based_llm_command_generator.py +2 -41
- rasa/dialogue_understanding/patterns/continue_interrupted.py +1 -163
- rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +8 -52
- rasa/dialogue_understanding/processor/command_processor.py +15 -31
- rasa/dialogue_understanding/stack/dialogue_stack.py +2 -123
- rasa/dialogue_understanding/stack/frames/flow_stack_frame.py +0 -57
- rasa/dialogue_understanding/stack/utils.py +2 -17
- rasa/dialogue_understanding_test/du_test_runner.py +2 -7
- rasa/e2e_test/e2e_test_runner.py +2 -12
- rasa/engine/caching.py +2 -2
- rasa/engine/recipes/default_components.py +18 -10
- rasa/engine/storage/local_model_storage.py +45 -2
- rasa/graph_components/validators/default_recipe_validator.py +134 -134
- rasa/hooks.py +5 -5
- rasa/llm_fine_tuning/utils.py +2 -2
- rasa/model_manager/model_api.py +4 -5
- rasa/model_manager/runner_service.py +1 -1
- rasa/model_manager/socket_bridge.py +20 -14
- rasa/model_manager/trainer_service.py +12 -9
- rasa/model_manager/utils.py +1 -29
- rasa/model_manager/warm_rasa_process.py +1 -1
- rasa/nlu/extractors/extractor.py +1 -2
- rasa/plugin.py +8 -8
- rasa/privacy/privacy_manager.py +2 -11
- rasa/server.py +2 -14
- rasa/shared/constants.py +0 -5
- rasa/shared/core/constants.py +1 -12
- rasa/shared/core/domain.py +58 -11
- rasa/shared/core/events.py +0 -327
- rasa/shared/core/flows/flow_step.py +7 -1
- rasa/shared/core/flows/flows_list.py +2 -2
- rasa/shared/core/flows/flows_yaml_schema.json +186 -112
- rasa/shared/core/flows/steps/call.py +5 -53
- rasa/shared/core/flows/validation.py +7 -46
- rasa/shared/core/flows/yaml_flows_io.py +17 -9
- rasa/shared/core/slots.py +6 -2
- rasa/shared/core/trackers.py +2 -5
- rasa/shared/exceptions.py +0 -4
- rasa/shared/importers/importer.py +6 -0
- rasa/shared/importers/utils.py +77 -1
- rasa/shared/providers/_utils.py +60 -44
- rasa/shared/providers/embedding/default_litellm_embedding_client.py +2 -0
- rasa/shared/providers/llm/_base_litellm_client.py +7 -39
- rasa/shared/providers/llm/default_litellm_llm_client.py +2 -0
- rasa/shared/providers/llm/litellm_router_llm_client.py +4 -8
- rasa/shared/providers/llm/llm_client.py +3 -7
- rasa/shared/providers/llm/llm_response.py +0 -49
- rasa/shared/providers/llm/self_hosted_llm_client.py +4 -8
- rasa/shared/utils/llm.py +5 -28
- rasa/shared/utils/schemas/events.py +0 -42
- rasa/shared/utils/yaml.py +1 -3
- rasa/studio/upload.py +16 -47
- rasa/telemetry.py +97 -23
- rasa/tracing/instrumentation/instrumentation.py +10 -12
- rasa/tracing/instrumentation/intentless_policy_instrumentation.py +4 -4
- rasa/utils/common.py +0 -79
- rasa/utils/io.py +27 -9
- rasa/utils/json_utils.py +6 -1
- rasa/utils/log_utils.py +6 -2
- rasa/utils/ml_utils.py +1 -1
- rasa/utils/openapi.py +144 -0
- rasa/utils/tensorflow/rasa_layers.py +1 -1
- rasa/utils/train_utils.py +15 -15
- rasa/validator.py +21 -19
- rasa/version.py +1 -1
- {rasa_pro-3.14.0.dev4.dist-info → rasa_pro-3.14.0.dev5.dist-info}/METADATA +17 -14
- {rasa_pro-3.14.0.dev4.dist-info → rasa_pro-3.14.0.dev5.dist-info}/RECORD +431 -200
- rasa/agents/agent_factory.py +0 -122
- rasa/agents/agent_manager.py +0 -162
- rasa/agents/constants.py +0 -40
- rasa/agents/core/agent_protocol.py +0 -107
- rasa/agents/core/types.py +0 -70
- rasa/agents/exceptions.py +0 -8
- rasa/agents/protocol/__init__.py +0 -5
- rasa/agents/protocol/a2a/a2a_agent.py +0 -662
- rasa/agents/protocol/mcp/mcp_base_agent.py +0 -676
- rasa/agents/protocol/mcp/mcp_open_agent.py +0 -276
- rasa/agents/protocol/mcp/mcp_task_agent.py +0 -469
- rasa/agents/schemas/__init__.py +0 -12
- rasa/agents/schemas/agent_input.py +0 -38
- rasa/agents/schemas/agent_output.py +0 -26
- rasa/agents/schemas/agent_tool_result.py +0 -51
- rasa/agents/schemas/agent_tool_schema.py +0 -134
- rasa/agents/templates/mcp_open_agent_prompt_template.jinja2 +0 -15
- rasa/agents/templates/mcp_task_agent_prompt_template.jinja2 +0 -17
- rasa/agents/utils.py +0 -72
- rasa/core/available_agents.py +0 -199
- rasa/core/channels/inspector/dist/assets/channel-0cd70adf.js +0 -1
- rasa/core/channels/inspector/dist/assets/clone-a0f9c4ed.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-de9cc4aa.js +0 -1
- rasa/core/channels/inspector/dist/assets/index-3e293924.js +0 -1353
- rasa/core/policies/flows/mcp_tool_executor.py +0 -277
- rasa/dialogue_understanding/commands/continue_agent_command.py +0 -91
- rasa/dialogue_understanding/commands/restart_agent_command.py +0 -162
- rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v2_claude_3_5_sonnet_20240620_template.jinja2 +0 -61
- rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v3_claude_3_5_sonnet_20240620_template.jinja2 +0 -81
- rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v3_gpt_4o_2024_11_20_template.jinja2 +0 -81
- rasa/shared/agents/utils.py +0 -35
- rasa/shared/utils/mcp/server_connection.py +0 -157
- /rasa/{agents → builder}/__init__.py +0 -0
- /rasa/{agents/core → builder/copilot}/__init__.py +0 -0
- /rasa/{agents/protocol/a2a → builder/copilot/prompts}/__init__.py +0 -0
- /rasa/{agents/protocol/mcp → builder/copilot/templated_messages}/__init__.py +0 -0
- /rasa/{agents/templates → builder/document_retrieval}/__init__.py +0 -0
- /rasa/{shared/agents → cli/project_templates/finance/actions/accounts}/__init__.py +0 -0
- /rasa/{shared/utils/mcp → cli/project_templates/finance/actions/cards}/__init__.py +0 -0
- {rasa_pro-3.14.0.dev4.dist-info → rasa_pro-3.14.0.dev5.dist-info}/NOTICE +0 -0
- {rasa_pro-3.14.0.dev4.dist-info → rasa_pro-3.14.0.dev5.dist-info}/WHEEL +0 -0
- {rasa_pro-3.14.0.dev4.dist-info → rasa_pro-3.14.0.dev5.dist-info}/entry_points.txt +0 -0
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "object",
|
|
3
|
-
"required": [
|
|
3
|
+
"required": [
|
|
4
|
+
"flows"
|
|
5
|
+
],
|
|
4
6
|
"properties": {
|
|
5
|
-
"version": {
|
|
7
|
+
"version": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
6
10
|
"flows": {
|
|
7
11
|
"type": "object",
|
|
8
12
|
"schema_name": "dictionary of flows",
|
|
9
|
-
"patternProperties": {
|
|
13
|
+
"patternProperties": {
|
|
14
|
+
"^[A-Za-z_][A-Za-z0-9_]*$": {
|
|
15
|
+
"$ref": "#/$defs/flow"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
10
18
|
}
|
|
11
19
|
},
|
|
12
20
|
"$defs": {
|
|
@@ -20,22 +28,34 @@
|
|
|
20
28
|
{
|
|
21
29
|
"schema_name": "intent trigger",
|
|
22
30
|
"type": "object",
|
|
23
|
-
"required": [
|
|
31
|
+
"required": [
|
|
32
|
+
"intent"
|
|
33
|
+
],
|
|
24
34
|
"additionalProperties": false,
|
|
25
35
|
"properties": {
|
|
26
36
|
"intent": {
|
|
27
37
|
"type": "object",
|
|
28
38
|
"properties": {
|
|
29
|
-
"confidence_threshold": {
|
|
30
|
-
|
|
39
|
+
"confidence_threshold": {
|
|
40
|
+
"type": "number"
|
|
41
|
+
},
|
|
42
|
+
"name": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
31
45
|
},
|
|
32
|
-
"required": [
|
|
46
|
+
"required": [
|
|
47
|
+
"name"
|
|
48
|
+
]
|
|
33
49
|
}
|
|
34
50
|
}
|
|
35
51
|
},
|
|
36
52
|
{
|
|
37
53
|
"schema_name": "simple intent trigger",
|
|
38
|
-
"properties": {
|
|
54
|
+
"properties": {
|
|
55
|
+
"intent": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
39
59
|
}
|
|
40
60
|
]
|
|
41
61
|
}
|
|
@@ -46,7 +66,9 @@
|
|
|
46
66
|
"items": {
|
|
47
67
|
"type": "object",
|
|
48
68
|
"properties": {
|
|
49
|
-
"id": {
|
|
69
|
+
"id": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
50
72
|
"next": {
|
|
51
73
|
"anyOf": [
|
|
52
74
|
{
|
|
@@ -57,11 +79,16 @@
|
|
|
57
79
|
"oneOf": [
|
|
58
80
|
{
|
|
59
81
|
"schema_name": "if-then block",
|
|
60
|
-
"required": [
|
|
82
|
+
"required": [
|
|
83
|
+
"if",
|
|
84
|
+
"then"
|
|
85
|
+
]
|
|
61
86
|
},
|
|
62
87
|
{
|
|
63
88
|
"schema_name": "else block",
|
|
64
|
-
"required": [
|
|
89
|
+
"required": [
|
|
90
|
+
"else"
|
|
91
|
+
]
|
|
65
92
|
}
|
|
66
93
|
],
|
|
67
94
|
"properties": {
|
|
@@ -77,7 +104,12 @@
|
|
|
77
104
|
}
|
|
78
105
|
]
|
|
79
106
|
},
|
|
80
|
-
"if": {
|
|
107
|
+
"if": {
|
|
108
|
+
"type": [
|
|
109
|
+
"boolean",
|
|
110
|
+
"string"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
81
113
|
"then": {
|
|
82
114
|
"oneOf": [
|
|
83
115
|
{
|
|
@@ -93,25 +125,66 @@
|
|
|
93
125
|
}
|
|
94
126
|
}
|
|
95
127
|
},
|
|
96
|
-
{
|
|
128
|
+
{
|
|
129
|
+
"type": "string",
|
|
130
|
+
"schema_name": "step id"
|
|
131
|
+
}
|
|
97
132
|
]
|
|
98
133
|
},
|
|
99
|
-
"action": {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
134
|
+
"action": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"collect": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
},
|
|
140
|
+
"link": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"call": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
103
146
|
"set_slots": {
|
|
104
147
|
"$ref": "#/$defs/set_slots",
|
|
105
148
|
"schema_name": "slot set"
|
|
106
149
|
}
|
|
107
150
|
},
|
|
108
151
|
"oneOf": [
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
152
|
+
{
|
|
153
|
+
"required": [
|
|
154
|
+
"action"
|
|
155
|
+
],
|
|
156
|
+
"schema_name": "action step"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"required": [
|
|
160
|
+
"collect"
|
|
161
|
+
],
|
|
162
|
+
"schema_name": "collect step"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"required": [
|
|
166
|
+
"link"
|
|
167
|
+
],
|
|
168
|
+
"schema_name": "link step"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"required": [
|
|
172
|
+
"call"
|
|
173
|
+
],
|
|
174
|
+
"schema_name": "call step"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"required": [
|
|
178
|
+
"set_slots"
|
|
179
|
+
],
|
|
180
|
+
"schema_name": "slot set step"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"required": [
|
|
184
|
+
"noop"
|
|
185
|
+
],
|
|
186
|
+
"schema_name": ""
|
|
187
|
+
}
|
|
115
188
|
],
|
|
116
189
|
"dependentSchemas": {
|
|
117
190
|
"action": {
|
|
@@ -123,23 +196,10 @@
|
|
|
123
196
|
"metadata": {}
|
|
124
197
|
}
|
|
125
198
|
},
|
|
126
|
-
"noop": {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"call": {"type": "string"},
|
|
131
|
-
"id": {},
|
|
132
|
-
"next": {},
|
|
133
|
-
"metadata": {},
|
|
134
|
-
"description": {"type": "string"},
|
|
135
|
-
"mcp_server": {"type": "string"},
|
|
136
|
-
"mapping": {"$ref": "#/$defs/call_step/properties/mapping"},
|
|
137
|
-
"exit_if": {"$ref": "#/$defs/call_step/properties/exit_if"}
|
|
138
|
-
},
|
|
139
|
-
"dependentSchemas": {
|
|
140
|
-
"mcp_server": {"required": ["mapping"]},
|
|
141
|
-
"mapping": {"required": ["mcp_server"]}
|
|
142
|
-
}
|
|
199
|
+
"noop": {
|
|
200
|
+
"required": [
|
|
201
|
+
"next"
|
|
202
|
+
]
|
|
143
203
|
},
|
|
144
204
|
"collect": {
|
|
145
205
|
"additionalProperties": false,
|
|
@@ -148,116 +208,130 @@
|
|
|
148
208
|
"id": {},
|
|
149
209
|
"next": {},
|
|
150
210
|
"metadata": {},
|
|
151
|
-
"description": {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
|
|
211
|
+
"description": {
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
"ask_before_filling": {
|
|
215
|
+
"type": "boolean"
|
|
216
|
+
},
|
|
217
|
+
"reset_after_flow_ends": {
|
|
218
|
+
"type": "boolean"
|
|
219
|
+
},
|
|
220
|
+
"utter": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"force_slot_filling": {
|
|
224
|
+
"type": "boolean"
|
|
225
|
+
},
|
|
156
226
|
"rejections": {
|
|
157
227
|
"type": "array",
|
|
158
228
|
"schema_name": "list of rejections",
|
|
159
229
|
"items": {
|
|
160
230
|
"type": "object",
|
|
161
|
-
"required": [
|
|
231
|
+
"required": [
|
|
232
|
+
"if",
|
|
233
|
+
"utter"
|
|
234
|
+
],
|
|
162
235
|
"properties": {
|
|
163
|
-
"if": {
|
|
164
|
-
|
|
236
|
+
"if": {
|
|
237
|
+
"type": [
|
|
238
|
+
"boolean",
|
|
239
|
+
"string"
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"utter": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
}
|
|
165
245
|
}
|
|
166
246
|
}
|
|
167
247
|
},
|
|
168
|
-
"silence_timeout": {
|
|
248
|
+
"silence_timeout": {
|
|
249
|
+
"type": "number"
|
|
250
|
+
}
|
|
169
251
|
}
|
|
170
252
|
}
|
|
171
253
|
}
|
|
172
254
|
}
|
|
173
255
|
},
|
|
174
256
|
"flow": {
|
|
175
|
-
"required": [
|
|
257
|
+
"required": [
|
|
258
|
+
"steps",
|
|
259
|
+
"description"
|
|
260
|
+
],
|
|
176
261
|
"type": "object",
|
|
177
262
|
"additionalProperties": false,
|
|
178
263
|
"schema_name": "dictionary with flow properties",
|
|
179
264
|
"properties": {
|
|
180
|
-
"name": {
|
|
181
|
-
|
|
265
|
+
"name": {
|
|
266
|
+
"type": "string"
|
|
267
|
+
},
|
|
268
|
+
"description": {
|
|
269
|
+
"type": "string"
|
|
270
|
+
},
|
|
182
271
|
"translation": {
|
|
183
272
|
"type": "object",
|
|
184
|
-
"additionalProperties": false,
|
|
185
273
|
"schema_name": "flow translation mapping",
|
|
186
|
-
"properties": {
|
|
274
|
+
"properties": {
|
|
275
|
+
"metadata": {
|
|
276
|
+
"type": "object"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
187
279
|
"patternProperties": {
|
|
188
280
|
"^(?!metadata$).+": {
|
|
189
281
|
"type": "object",
|
|
190
282
|
"additionalProperties": false,
|
|
191
|
-
"required": [
|
|
192
|
-
|
|
283
|
+
"required": [
|
|
284
|
+
"name"
|
|
285
|
+
],
|
|
286
|
+
"properties": {
|
|
287
|
+
"name": {
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"metadata": {}
|
|
291
|
+
}
|
|
193
292
|
}
|
|
194
|
-
}
|
|
293
|
+
},
|
|
294
|
+
"additionalProperties": false
|
|
295
|
+
},
|
|
296
|
+
"if": {
|
|
297
|
+
"type": [
|
|
298
|
+
"string",
|
|
299
|
+
"boolean"
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"always_include_in_prompt": {
|
|
303
|
+
"type": "boolean"
|
|
304
|
+
},
|
|
305
|
+
"nlu_trigger": {
|
|
306
|
+
"$ref": "#/$defs/nlu_trigger"
|
|
307
|
+
},
|
|
308
|
+
"file_path": {
|
|
309
|
+
"type": "string"
|
|
310
|
+
},
|
|
311
|
+
"steps": {
|
|
312
|
+
"$ref": "#/$defs/steps"
|
|
313
|
+
},
|
|
314
|
+
"persisted_slots": {
|
|
315
|
+
"$ref": "#/$defs/persisted_slots"
|
|
195
316
|
},
|
|
196
|
-
"
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
"file_path": {"type": "string"},
|
|
200
|
-
"steps": {"$ref": "#/$defs/steps"},
|
|
201
|
-
"persisted_slots": {"$ref": "#/$defs/persisted_slots"},
|
|
202
|
-
"run_pattern_completed": {"type": "boolean"}
|
|
317
|
+
"run_pattern_completed": {
|
|
318
|
+
"type": "boolean"
|
|
319
|
+
}
|
|
203
320
|
}
|
|
204
321
|
},
|
|
205
322
|
"set_slots": {
|
|
206
323
|
"type": "array",
|
|
207
324
|
"schema_name": "list of slot sets",
|
|
208
|
-
"items": {
|
|
209
|
-
|
|
210
|
-
"call_step": {
|
|
211
|
-
"type": "object",
|
|
212
|
-
"additionalProperties": false,
|
|
213
|
-
"schema_name": "dictionary with call properties",
|
|
214
|
-
"required": ["call"],
|
|
215
|
-
"properties": {
|
|
216
|
-
"call": {"type": "string"},
|
|
217
|
-
"mcp_server": {"type": "string"},
|
|
218
|
-
"mapping": {
|
|
219
|
-
"type": "object",
|
|
220
|
-
"additionalProperties": false,
|
|
221
|
-
"schema_name": "input and output mapping for a MCP tool call",
|
|
222
|
-
"required": ["input", "output"],
|
|
223
|
-
"properties": {
|
|
224
|
-
"input": {
|
|
225
|
-
"type": "array",
|
|
226
|
-
"items": {
|
|
227
|
-
"type": "object",
|
|
228
|
-
"additionalProperties": false,
|
|
229
|
-
"required": ["slot", "param"],
|
|
230
|
-
"properties": {
|
|
231
|
-
"slot": {"type": "string"},
|
|
232
|
-
"param": {"type": "string"}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
"output": {
|
|
237
|
-
"type": "array",
|
|
238
|
-
"items": {
|
|
239
|
-
"type": "object",
|
|
240
|
-
"additionalProperties": false,
|
|
241
|
-
"required": ["slot", "result_key"],
|
|
242
|
-
"properties": {
|
|
243
|
-
"slot": {"type": "string"},
|
|
244
|
-
"result_key": {"type": "string"}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
"exit_if": {
|
|
251
|
-
"type": "array",
|
|
252
|
-
"schema_name": "list of slot predicates to exit agent call",
|
|
253
|
-
"items": {"type": ["string"]}
|
|
254
|
-
}
|
|
325
|
+
"items": {
|
|
326
|
+
"type": "object"
|
|
255
327
|
}
|
|
256
328
|
},
|
|
257
329
|
"persisted_slots": {
|
|
258
330
|
"type": "array",
|
|
259
331
|
"schema_name": "list of slots",
|
|
260
|
-
"items": {
|
|
332
|
+
"items": {
|
|
333
|
+
"type": "string"
|
|
334
|
+
}
|
|
261
335
|
}
|
|
262
336
|
}
|
|
263
337
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
|
-
from typing import TYPE_CHECKING, Any, Dict, Generator,
|
|
4
|
+
from typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Text
|
|
5
5
|
|
|
6
|
-
from rasa.core.available_agents import AvailableAgents
|
|
7
|
-
from rasa.core.available_endpoints import AvailableEndpoints
|
|
8
6
|
from rasa.shared.core.flows.flow_step import FlowStep
|
|
9
7
|
|
|
10
8
|
if TYPE_CHECKING:
|
|
@@ -13,22 +11,12 @@ if TYPE_CHECKING:
|
|
|
13
11
|
|
|
14
12
|
@dataclass
|
|
15
13
|
class CallFlowStep(FlowStep):
|
|
16
|
-
"""Represents the configuration of
|
|
14
|
+
"""Represents the configuration of an call flow step."""
|
|
17
15
|
|
|
18
16
|
call: Text
|
|
19
|
-
"""The flow to be called
|
|
17
|
+
"""The flow to be called."""
|
|
20
18
|
called_flow_reference: Optional["Flow"] = None
|
|
21
19
|
|
|
22
|
-
# MCP Tool calling
|
|
23
|
-
"""The MCP server that hosts the tool to be called."""
|
|
24
|
-
mcp_server: Optional[str] = None
|
|
25
|
-
"""The input and output mapping for the MCP tool."""
|
|
26
|
-
mapping: Optional[Dict[str, Any]] = None
|
|
27
|
-
|
|
28
|
-
# Call agent exit condition
|
|
29
|
-
"""A list of slot predicates that determine when to exit the agent loop."""
|
|
30
|
-
exit_if: Optional[List[str]] = None
|
|
31
|
-
|
|
32
20
|
@classmethod
|
|
33
21
|
def from_json(cls, flow_id: Text, data: Dict[Text, Any]) -> CallFlowStep:
|
|
34
22
|
"""Used to read flow steps from parsed YAML.
|
|
@@ -43,9 +31,6 @@ class CallFlowStep(FlowStep):
|
|
|
43
31
|
base = super().from_json(flow_id, data)
|
|
44
32
|
return CallFlowStep(
|
|
45
33
|
call=data.get("call", ""),
|
|
46
|
-
mcp_server=data.get("mcp_server", None),
|
|
47
|
-
mapping=data.get("mapping", None),
|
|
48
|
-
exit_if=data.get("exit_if", None),
|
|
49
34
|
**base.__dict__,
|
|
50
35
|
)
|
|
51
36
|
|
|
@@ -55,16 +40,7 @@ class CallFlowStep(FlowStep):
|
|
|
55
40
|
Returns:
|
|
56
41
|
The flow step as a dictionary.
|
|
57
42
|
"""
|
|
58
|
-
step_properties:
|
|
59
|
-
"call": self.call,
|
|
60
|
-
}
|
|
61
|
-
if self.is_calling_mcp_tool():
|
|
62
|
-
step_properties["mcp_server"] = self.mcp_server
|
|
63
|
-
step_properties["mapping"] = self.mapping
|
|
64
|
-
if self.exit_if:
|
|
65
|
-
step_properties["exit_if"] = self.exit_if
|
|
66
|
-
|
|
67
|
-
return super().as_json(step_properties=step_properties)
|
|
43
|
+
return super().as_json(step_properties={"call": self.call})
|
|
68
44
|
|
|
69
45
|
def steps_in_tree(
|
|
70
46
|
self, should_resolve_calls: bool = True
|
|
@@ -72,7 +48,7 @@ class CallFlowStep(FlowStep):
|
|
|
72
48
|
"""Returns the steps in the tree of the flow step."""
|
|
73
49
|
yield self
|
|
74
50
|
|
|
75
|
-
if should_resolve_calls
|
|
51
|
+
if should_resolve_calls:
|
|
76
52
|
if not self.called_flow_reference:
|
|
77
53
|
raise ValueError("Call flow reference not set.")
|
|
78
54
|
|
|
@@ -80,27 +56,6 @@ class CallFlowStep(FlowStep):
|
|
|
80
56
|
|
|
81
57
|
yield from self.next.steps_in_tree(should_resolve_calls)
|
|
82
58
|
|
|
83
|
-
def is_calling_flow(self) -> bool:
|
|
84
|
-
"""Returns True if the call references a flow."""
|
|
85
|
-
return not self.is_calling_mcp_tool() and not self.is_calling_agent()
|
|
86
|
-
|
|
87
|
-
def is_calling_mcp_tool(self) -> bool:
|
|
88
|
-
"""Returns True if the call references an MCP tool of an existing MCP server."""
|
|
89
|
-
mcp_server_list = AvailableEndpoints.get_instance().mcp_servers
|
|
90
|
-
if mcp_server_list is None:
|
|
91
|
-
return False
|
|
92
|
-
|
|
93
|
-
mcp_server_names = [server.name for server in mcp_server_list]
|
|
94
|
-
return (
|
|
95
|
-
self.mcp_server is not None
|
|
96
|
-
and self.mapping is not None
|
|
97
|
-
and self.mcp_server in mcp_server_names
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
def is_calling_agent(self) -> bool:
|
|
101
|
-
"""Returns True if the call references an agent."""
|
|
102
|
-
return self.call in AvailableAgents.get_instance().agents
|
|
103
|
-
|
|
104
59
|
@property
|
|
105
60
|
def default_id_postfix(self) -> str:
|
|
106
61
|
"""Returns the default id postfix of the flow step."""
|
|
@@ -111,9 +66,6 @@ class CallFlowStep(FlowStep):
|
|
|
111
66
|
return (
|
|
112
67
|
self.call == other.call
|
|
113
68
|
and self.called_flow_reference == other.called_flow_reference
|
|
114
|
-
and self.mcp_server == other.mcp_server
|
|
115
|
-
and self.mapping == other.mapping
|
|
116
|
-
and self.exit_if == other.exit_if
|
|
117
69
|
and super().__eq__(other)
|
|
118
70
|
)
|
|
119
71
|
return False
|
|
@@ -261,7 +261,7 @@ class NoLinkAllowedInCalledFlowException(RasaException):
|
|
|
261
261
|
)
|
|
262
262
|
|
|
263
263
|
|
|
264
|
-
class
|
|
264
|
+
class UnresolvedFlowException(RasaException):
|
|
265
265
|
"""Raised when a flow is called or linked from another flow but doesn't exist."""
|
|
266
266
|
|
|
267
267
|
def __init__(self, flow_id: str, calling_flow_id: str, step_id: str) -> None:
|
|
@@ -273,37 +273,13 @@ class UnresolvedLinkFlowException(RasaException):
|
|
|
273
273
|
def __str__(self) -> str:
|
|
274
274
|
"""Return a string representation of the exception."""
|
|
275
275
|
return (
|
|
276
|
-
f"Flow '{self.flow_id}' is linked from flow "
|
|
276
|
+
f"Flow '{self.flow_id}' is called or linked from flow "
|
|
277
277
|
f"'{self.calling_flow_id}' in step '{self.step_id}', "
|
|
278
278
|
f"but it doesn't exist. "
|
|
279
279
|
f"Please make sure that a flow with id '{self.flow_id}' exists."
|
|
280
280
|
)
|
|
281
281
|
|
|
282
282
|
|
|
283
|
-
class UnresolvedCallStepException(RasaException):
|
|
284
|
-
"""Valid call step should have a reference to an existing flow or agent.
|
|
285
|
-
Raised when it does not.
|
|
286
|
-
"""
|
|
287
|
-
|
|
288
|
-
def __init__(
|
|
289
|
-
self, call_step_argument: str, calling_flow_id: str, step_id: str
|
|
290
|
-
) -> None:
|
|
291
|
-
"""Initializes the exception."""
|
|
292
|
-
self.call_step_argument = call_step_argument
|
|
293
|
-
self.calling_flow_id = calling_flow_id
|
|
294
|
-
self.step_id = step_id
|
|
295
|
-
|
|
296
|
-
def __str__(self) -> str:
|
|
297
|
-
"""Return a string representation of the exception."""
|
|
298
|
-
return (
|
|
299
|
-
f"The call step '{self.step_id}' in flow '{self.calling_flow_id}' "
|
|
300
|
-
f"is invalid: there is no flow or agent with the "
|
|
301
|
-
f"id '{self.call_step_argument}'. "
|
|
302
|
-
f"Please make sure that the call step argument is a valid flow id "
|
|
303
|
-
f"or an agent id."
|
|
304
|
-
)
|
|
305
|
-
|
|
306
|
-
|
|
307
283
|
class UnresolvedFlowStepIdException(RasaException):
|
|
308
284
|
"""Raised when a flow step is referenced, but its id can not be resolved."""
|
|
309
285
|
|
|
@@ -586,30 +562,15 @@ def validate_link_in_call_restriction(flows: "FlowsList") -> None:
|
|
|
586
562
|
raise NoLinkAllowedInCalledFlowException(step.id, flow.id, step.call)
|
|
587
563
|
|
|
588
564
|
|
|
589
|
-
def
|
|
590
|
-
"""Validates that all called flows
|
|
591
|
-
are valid.
|
|
592
|
-
"""
|
|
565
|
+
def validate_called_flows_exists(flows: "FlowsList") -> None:
|
|
566
|
+
"""Validates that all called flows exist."""
|
|
593
567
|
for flow in flows.underlying_flows:
|
|
594
568
|
for step in flow.steps:
|
|
595
569
|
if not isinstance(step, CallFlowStep):
|
|
596
570
|
continue
|
|
597
571
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
not _is_step_calling_agent
|
|
601
|
-
and flows.flow_by_id(step.call) is None
|
|
602
|
-
and not step.is_calling_mcp_tool()
|
|
603
|
-
):
|
|
604
|
-
raise UnresolvedCallStepException(step.call, flow.id, step.id)
|
|
605
|
-
|
|
606
|
-
if step.exit_if and not _is_step_calling_agent:
|
|
607
|
-
# exit_if is only allowed for call steps that call an agent
|
|
608
|
-
raise RasaException(
|
|
609
|
-
f"Call step '{step.id}' in flow '{flow.id}' has an 'exit_if' "
|
|
610
|
-
f"condition, but it is not calling an agent. "
|
|
611
|
-
f"'exit_if' is only allowed for call steps that call an agent."
|
|
612
|
-
)
|
|
572
|
+
if flows.flow_by_id(step.call) is None:
|
|
573
|
+
raise UnresolvedFlowException(step.call, flow.id, step.id)
|
|
613
574
|
|
|
614
575
|
|
|
615
576
|
def validate_linked_flows_exists(flows: "FlowsList") -> None:
|
|
@@ -633,7 +594,7 @@ def validate_linked_flows_exists(flows: "FlowsList") -> None:
|
|
|
633
594
|
flow.is_rasa_default_flow and step.link == RASA_PATTERN_CHITCHAT
|
|
634
595
|
)
|
|
635
596
|
):
|
|
636
|
-
raise
|
|
597
|
+
raise UnresolvedFlowException(step.link, flow.id, step.id)
|
|
637
598
|
|
|
638
599
|
|
|
639
600
|
def validate_patterns_are_not_called_or_linked(flows: "FlowsList") -> None:
|
|
@@ -127,7 +127,7 @@ class YAMLFlowsReader:
|
|
|
127
127
|
If a schema does not have a `schema_name` set, we will use the
|
|
128
128
|
`type` instead as a fallback.
|
|
129
129
|
"""
|
|
130
|
-
return
|
|
130
|
+
return schema.get("schema_name", schema.get("type"))
|
|
131
131
|
|
|
132
132
|
def schema_names(schemas: List[Dict[str, Any]]) -> List[str]:
|
|
133
133
|
"""Get the names of the schemas.
|
|
@@ -262,12 +262,9 @@ class YamlFlowsWriter:
|
|
|
262
262
|
Returns:
|
|
263
263
|
The dumped YAML.
|
|
264
264
|
"""
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
del dumped_flow["id"]
|
|
269
|
-
dump[flow.id] = dumped_flow
|
|
270
|
-
return dump_obj_as_yaml_to_string({KEY_FLOWS: dump})
|
|
265
|
+
return dump_obj_as_yaml_to_string(
|
|
266
|
+
{KEY_FLOWS: get_flows_as_json(flows, should_clean_json)}
|
|
267
|
+
)
|
|
271
268
|
|
|
272
269
|
@staticmethod
|
|
273
270
|
def dump(
|
|
@@ -418,13 +415,24 @@ def process_yaml_content(yaml_content: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
418
415
|
|
|
419
416
|
# Under the "flows" key certain keys cannot have metadata
|
|
420
417
|
_process_keys_recursively(
|
|
421
|
-
yaml_content["flows"],
|
|
422
|
-
["nlu_trigger", "set_slots", "metadata", "mapping", "exit_if"],
|
|
418
|
+
yaml_content["flows"], ["nlu_trigger", "set_slots", "metadata"]
|
|
423
419
|
)
|
|
424
420
|
|
|
425
421
|
return yaml_content
|
|
426
422
|
|
|
427
423
|
|
|
424
|
+
def get_flows_as_json(
|
|
425
|
+
flows: FlowsList, should_clean_json: bool = False
|
|
426
|
+
) -> Dict[str, Any]:
|
|
427
|
+
"""Get the flows as a JSON dictionary."""
|
|
428
|
+
dump = {}
|
|
429
|
+
for flow in flows:
|
|
430
|
+
dumped_flow = get_flow_as_json(flow, should_clean_json)
|
|
431
|
+
del dumped_flow["id"]
|
|
432
|
+
dump[flow.id] = dumped_flow
|
|
433
|
+
return dump
|
|
434
|
+
|
|
435
|
+
|
|
428
436
|
def get_flow_as_json(flow: Flow, should_clean_json: bool = False) -> Dict[str, Any]:
|
|
429
437
|
"""Clean the Flow JSON by removing default values and empty fields.
|
|
430
438
|
|