rasa-pro 3.14.0.dev3__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 +2 -43
- 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 +1 -1
- rasa/core/channels/inspector/dist/assets/{arc-2e78c586.js → arc-18042c22.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-806b712e.js → blockDiagram-38ab4fdb-fdd6bcfa.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-0745efa9.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-7bd1082b.js → classDiagram-70f12bd4-81efba3e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-d937ba49.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-a2a564ca.js → createText-2e5e7dd3-31422447.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-b5256940.js → edges-e0da2a9e-518a90db.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-e6883ad2.js → erDiagram-9861fffd-a6d3c25a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-e576fc02.js → flowDb-956e92f1-e048c2be.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-2e298d01.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-dd7b150a.js → flowchart-elk-definition-4a651766-cb4d8723.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-5b79575c.js → ganttDiagram-c361ad54-346636a2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-3016f40a.js → gitGraphDiagram-72cf32ee-7c508874.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{graph-3e19170f.js → graph-14702d8a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-3862675e-eb9c86de.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-b4280e4d.js → infoDiagram-f8f76790-64154b83.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-556091f8.js → journeyDiagram-49397b02-833a5f95.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-08436411.js → layout-5a3b2123.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-683c4f3b.js → line-2272a8c7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-cee6d791.js → linear-35bcf273.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-a0bf0b1a.js → mindmap-definition-fc14e90a-92dcb0e9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-3730d5c4.js → pieDiagram-8a3498a8-94dbc900.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-12a20fed.js → quadrantDiagram-120e2f19-8b7a9c33.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-b9732102.js → requirementDiagram-deff3bca-6f7eab81.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-a2e72776.js → sankeyDiagram-04a897e0-f43e581d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-8b7a76bb.js → sequenceDiagram-704730f1-0bcbefc3.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-e65853ac.js → stateDiagram-587899a1-b8a74083.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-6f58a44b.js → stateDiagram-v2-d93cdb3a-2070218f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-df25b934.js → styles-6aaf32cf-f1d54e34.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9a916d00-88357141.js → styles-9a916d00-980de489.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-c10674c1-d600174d.js → styles-c10674c1-3c03abde.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-4adc3e0b.js → svgDrawCommon-08f97a94-46ba068f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-42816fa1.js → timeline-definition-85554ec2-901f5e3d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-621eb66a.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 +5 -7
- 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 +43 -23
- 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 -415
- rasa/core/processor.py +1 -6
- rasa/core/run.py +14 -11
- 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/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 +0 -5
- rasa/engine/storage/local_model_storage.py +45 -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/server.py +0 -10
- 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 -319
- 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 +16 -8
- rasa/shared/core/slots.py +4 -0
- 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/studio/upload.py +16 -47
- rasa/telemetry.py +97 -23
- rasa/tracing/instrumentation/instrumentation.py +2 -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 +5 -1
- rasa/utils/openapi.py +144 -0
- rasa/validator.py +7 -3
- rasa/version.py +1 -1
- {rasa_pro-3.14.0.dev3.dist-info → rasa_pro-3.14.0.dev5.dist-info}/METADATA +3 -3
- {rasa_pro-3.14.0.dev3.dist-info → rasa_pro-3.14.0.dev5.dist-info}/RECORD +405 -174
- rasa/agents/agent_factory.py +0 -122
- rasa/agents/agent_manager.py +0 -162
- rasa/agents/constants.py +0 -32
- rasa/agents/core/agent_protocol.py +0 -108
- 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 -51
- rasa/agents/protocol/mcp/mcp_base_agent.py +0 -674
- 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 -196
- rasa/core/channels/inspector/dist/assets/channel-c436ca7c.js +0 -1
- rasa/core/channels/inspector/dist/assets/clone-50dd656b.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-2b2aeaf8.js +0 -1
- rasa/core/channels/inspector/dist/assets/index-1bd9135e.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.dev3.dist-info → rasa_pro-3.14.0.dev5.dist-info}/NOTICE +0 -0
- {rasa_pro-3.14.0.dev3.dist-info → rasa_pro-3.14.0.dev5.dist-info}/WHEEL +0 -0
- {rasa_pro-3.14.0.dev3.dist-info → rasa_pro-3.14.0.dev5.dist-info}/entry_points.txt +0 -0
rasa/utils/io.py
CHANGED
|
@@ -26,6 +26,7 @@ from typing_extensions import Protocol
|
|
|
26
26
|
|
|
27
27
|
import rasa.shared.constants
|
|
28
28
|
import rasa.shared.utils.io
|
|
29
|
+
from rasa.shared.exceptions import RasaException
|
|
29
30
|
|
|
30
31
|
if TYPE_CHECKING:
|
|
31
32
|
from prompt_toolkit.validation import Validator
|
|
@@ -124,9 +125,7 @@ def create_path(file_path: Text) -> None:
|
|
|
124
125
|
def file_type_validator(
|
|
125
126
|
valid_file_types: List[Text], error_message: Text
|
|
126
127
|
) -> Type["Validator"]:
|
|
127
|
-
"""Creates a
|
|
128
|
-
file paths.
|
|
129
|
-
"""
|
|
128
|
+
"""Creates a file type validator class for the questionary package."""
|
|
130
129
|
|
|
131
130
|
def is_valid(path: Text) -> bool:
|
|
132
131
|
return path is not None and any(
|
|
@@ -137,9 +136,7 @@ def file_type_validator(
|
|
|
137
136
|
|
|
138
137
|
|
|
139
138
|
def not_empty_validator(error_message: Text) -> Type["Validator"]:
|
|
140
|
-
"""Creates a
|
|
141
|
-
that the user entered something other than whitespace.
|
|
142
|
-
"""
|
|
139
|
+
"""Creates a not empty validator class for the questionary package."""
|
|
143
140
|
|
|
144
141
|
def is_valid(input: Text) -> bool:
|
|
145
142
|
return input is not None and input.strip() != ""
|
|
@@ -150,9 +147,7 @@ def not_empty_validator(error_message: Text) -> Type["Validator"]:
|
|
|
150
147
|
def create_validator(
|
|
151
148
|
function: Callable[[Text], bool], error_message: Text
|
|
152
149
|
) -> Type["Validator"]:
|
|
153
|
-
"""Helper method to create
|
|
154
|
-
removed when questionary supports `Validator` objects.
|
|
155
|
-
"""
|
|
150
|
+
"""Helper method to create a validator class from a callable function."""
|
|
156
151
|
from prompt_toolkit.document import Document
|
|
157
152
|
from prompt_toolkit.validation import ValidationError, Validator
|
|
158
153
|
|
|
@@ -250,3 +245,26 @@ def write_yaml(
|
|
|
250
245
|
|
|
251
246
|
with Path(target).open("w", encoding="utf-8") as outfile:
|
|
252
247
|
dumper.dump(data, outfile, transform=transform)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class InvalidPathException(RasaException):
|
|
251
|
+
"""Raised if a path is invalid - e.g. path traversal is detected."""
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def subpath(parent: str, child: str) -> str:
|
|
255
|
+
"""Return the path to the child directory of the parent directory.
|
|
256
|
+
|
|
257
|
+
Ensures, that child doesn't navigate to parent directories. Prevents
|
|
258
|
+
path traversal. Raises an InvalidPathException if the path is invalid.
|
|
259
|
+
|
|
260
|
+
Based on Snyk's directory traversal mitigation:
|
|
261
|
+
https://learn.snyk.io/lesson/directory-traversal/
|
|
262
|
+
"""
|
|
263
|
+
safe_path = os.path.abspath(os.path.join(parent, child))
|
|
264
|
+
parent = os.path.abspath(parent)
|
|
265
|
+
|
|
266
|
+
common_base = os.path.commonpath([parent, safe_path])
|
|
267
|
+
if common_base != parent:
|
|
268
|
+
raise InvalidPathException(f"Invalid path: {safe_path}")
|
|
269
|
+
|
|
270
|
+
return safe_path
|
rasa/utils/json_utils.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from decimal import Decimal
|
|
3
|
-
from typing import Any, Text
|
|
3
|
+
from typing import Any, Dict, List, Text
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class DecimalEncoder(json.JSONEncoder):
|
|
@@ -58,3 +58,8 @@ def replace_decimals_with_floats(obj: Any) -> Any:
|
|
|
58
58
|
Input `obj` with all `Decimal` types replaced by `float`s.
|
|
59
59
|
"""
|
|
60
60
|
return json.loads(json.dumps(obj, cls=DecimalEncoder))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def extract_values(data: Dict, keys: List[Text]) -> Dict:
|
|
64
|
+
"""Extracts values for given keys from a dictionary."""
|
|
65
|
+
return {key: data.get(key) for key in keys if data.get(key)}
|
rasa/utils/log_utils.py
CHANGED
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
5
|
import sys
|
|
6
|
-
from typing import Any, Optional
|
|
6
|
+
from typing import Any, List, Optional
|
|
7
7
|
|
|
8
8
|
import structlog
|
|
9
9
|
from structlog.dev import ConsoleRenderer
|
|
@@ -37,6 +37,7 @@ class HumanConsoleRenderer(ConsoleRenderer):
|
|
|
37
37
|
def configure_structlog(
|
|
38
38
|
log_level: Optional[int] = None,
|
|
39
39
|
include_time: bool = False,
|
|
40
|
+
additional_processors: Optional[List[structlog.typing.Processor]] = None,
|
|
40
41
|
) -> None:
|
|
41
42
|
"""Configure logging of the server."""
|
|
42
43
|
if log_level is None: # Log level NOTSET is 0 so we use `is None` here
|
|
@@ -75,6 +76,9 @@ def configure_structlog(
|
|
|
75
76
|
if include_time:
|
|
76
77
|
shared_processors.append(structlog.processors.TimeStamper(fmt="iso"))
|
|
77
78
|
|
|
79
|
+
if additional_processors:
|
|
80
|
+
shared_processors.extend(additional_processors)
|
|
81
|
+
|
|
78
82
|
if not FORCE_JSON_LOGGING and sys.stderr.isatty():
|
|
79
83
|
# Pretty printing when we run in a terminal session.
|
|
80
84
|
# Automatically prints pretty tracebacks when "rich" is installed
|
rasa/utils/openapi.py
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type
|
|
2
|
+
|
|
3
|
+
from pydantic.main import BaseModel
|
|
4
|
+
from sanic_openapi import openapi
|
|
5
|
+
from sanic_openapi.openapi3.types import Schema
|
|
6
|
+
|
|
7
|
+
_SUPPORTED_ATTRIBUTES = frozenset(["format", "enum", "required", "example"])
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _to_schema(
|
|
11
|
+
definition_stack: List[str], schema_def: Dict[str, Any], definitions: Dict[str, Any]
|
|
12
|
+
) -> Schema:
|
|
13
|
+
type = schema_def.get("type")
|
|
14
|
+
|
|
15
|
+
if type == "object":
|
|
16
|
+
properties_spec = schema_def.get("properties", {})
|
|
17
|
+
properties = {}
|
|
18
|
+
for key in properties_spec:
|
|
19
|
+
properties[key] = _to_schema(
|
|
20
|
+
definition_stack=definition_stack,
|
|
21
|
+
schema_def=properties_spec[key],
|
|
22
|
+
definitions=definitions,
|
|
23
|
+
)
|
|
24
|
+
schema = openapi.Object(
|
|
25
|
+
title=schema_def.get("title"),
|
|
26
|
+
description=schema_def.get("description"),
|
|
27
|
+
required=schema_def.get("required"),
|
|
28
|
+
properties=properties,
|
|
29
|
+
)
|
|
30
|
+
elif type == "array":
|
|
31
|
+
schema = openapi.Array(
|
|
32
|
+
description=schema_def.get("description"),
|
|
33
|
+
required=schema_def.get("required"),
|
|
34
|
+
items=_to_schema(
|
|
35
|
+
definition_stack=definition_stack,
|
|
36
|
+
schema_def=schema_def.get("items"),
|
|
37
|
+
definitions=definitions,
|
|
38
|
+
),
|
|
39
|
+
)
|
|
40
|
+
elif type is None:
|
|
41
|
+
if allof_spec := schema_def.get("allOf"): # Model, Enum
|
|
42
|
+
definition = allof_spec[0]["$ref"].split("/")[-1]
|
|
43
|
+
definition_data = definitions.get(definition)
|
|
44
|
+
if definition_data is None:
|
|
45
|
+
schema = openapi.Object(
|
|
46
|
+
title=definition, description=schema_def.get("description")
|
|
47
|
+
)
|
|
48
|
+
else:
|
|
49
|
+
schema = (
|
|
50
|
+
_to_schema(
|
|
51
|
+
definition_stack=definition_stack + [definition],
|
|
52
|
+
schema_def={**definition_data},
|
|
53
|
+
definitions=definitions,
|
|
54
|
+
)
|
|
55
|
+
if definition not in definition_stack
|
|
56
|
+
else openapi.Object(
|
|
57
|
+
title=definition, description=schema_def.get("description")
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
elif anyof_spec := schema_def.get("anyOf"): # Union
|
|
62
|
+
anyof = []
|
|
63
|
+
for any in anyof_spec:
|
|
64
|
+
if any.get("type"):
|
|
65
|
+
schema_type_obj = Schema(
|
|
66
|
+
**{
|
|
67
|
+
"type": any.get("type"),
|
|
68
|
+
"description": any.get("description"),
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
anyof.append(schema_type_obj)
|
|
72
|
+
else:
|
|
73
|
+
definition = any["$ref"].split("/")[-1]
|
|
74
|
+
if definition not in definition_stack:
|
|
75
|
+
definition_data = definitions.get(definition)
|
|
76
|
+
if definition_data is not None:
|
|
77
|
+
anyof.append(
|
|
78
|
+
_to_schema(
|
|
79
|
+
definition_stack=definition_stack + [definition],
|
|
80
|
+
schema_def=definition_data,
|
|
81
|
+
definitions=definitions,
|
|
82
|
+
)
|
|
83
|
+
)
|
|
84
|
+
else:
|
|
85
|
+
anyof.append(
|
|
86
|
+
openapi.Object(
|
|
87
|
+
title=definition,
|
|
88
|
+
description=schema_def.get(
|
|
89
|
+
"description", definition
|
|
90
|
+
),
|
|
91
|
+
properties={},
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
else:
|
|
95
|
+
anyof.append(
|
|
96
|
+
openapi.Object(
|
|
97
|
+
title=definition,
|
|
98
|
+
description=schema_def.get("description", definition),
|
|
99
|
+
properties={},
|
|
100
|
+
)
|
|
101
|
+
)
|
|
102
|
+
schema = Schema(anyOf=anyof)
|
|
103
|
+
elif ref := schema_def.get("$ref"): # $ref
|
|
104
|
+
definition = ref.split("/")[-1]
|
|
105
|
+
definition_data = definitions.get(definition)
|
|
106
|
+
if definition_data is not None:
|
|
107
|
+
schema = _to_schema(
|
|
108
|
+
definition_stack=definition_stack,
|
|
109
|
+
schema_def=definition_data,
|
|
110
|
+
definitions=definitions,
|
|
111
|
+
)
|
|
112
|
+
else:
|
|
113
|
+
schema = openapi.Object(
|
|
114
|
+
title=definition, description=schema_def.get("description")
|
|
115
|
+
)
|
|
116
|
+
else: # Any type
|
|
117
|
+
schema = Schema(
|
|
118
|
+
**{"type": "object", "description": schema_def.get("description")}
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
else:
|
|
122
|
+
schema_spec = {
|
|
123
|
+
"type": schema_def.get("type"),
|
|
124
|
+
"description": schema_def.get("description"),
|
|
125
|
+
}
|
|
126
|
+
for spec in _SUPPORTED_ATTRIBUTES:
|
|
127
|
+
if schema_def.get(spec):
|
|
128
|
+
schema_spec[spec] = schema_def.get(spec)
|
|
129
|
+
schema = Schema(**schema_spec)
|
|
130
|
+
|
|
131
|
+
return schema
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def model_to_schema(model: Type[BaseModel]) -> Schema:
|
|
135
|
+
schema = model.model_json_schema()
|
|
136
|
+
# Handle both $defs (newer JSON Schema) and definitions (older JSON Schema)
|
|
137
|
+
definitions = schema.get("$defs") or schema.get("definitions") or {}
|
|
138
|
+
return _to_schema(
|
|
139
|
+
definition_stack=[],
|
|
140
|
+
schema_def=dict(
|
|
141
|
+
filter(lambda key: key[0] not in ("definitions", "$defs"), schema.items())
|
|
142
|
+
),
|
|
143
|
+
definitions=definitions,
|
|
144
|
+
)
|
rasa/validator.py
CHANGED
|
@@ -629,11 +629,14 @@ class Validator:
|
|
|
629
629
|
flow_id: str,
|
|
630
630
|
) -> bool:
|
|
631
631
|
"""Validates that a collect step can have either an action or an utterance.
|
|
632
|
+
|
|
632
633
|
Also logs an error if neither an action nor an utterance is defined.
|
|
633
634
|
|
|
634
635
|
Args:
|
|
635
636
|
collect: the name of the slot to collect
|
|
636
637
|
all_good: boolean value indicating the validation status
|
|
638
|
+
domain_slots: the slots of the domain
|
|
639
|
+
flow_id: the id of the flow
|
|
637
640
|
|
|
638
641
|
Returns:
|
|
639
642
|
False, if validation failed, true, otherwise
|
|
@@ -682,9 +685,10 @@ class Validator:
|
|
|
682
685
|
has_action_defined=has_action_defined,
|
|
683
686
|
flow=flow_id,
|
|
684
687
|
event_info=(
|
|
685
|
-
f"The collect step '{collect.collect}' has neither
|
|
686
|
-
f"nor an action defined,
|
|
687
|
-
f"You
|
|
688
|
+
f"The collect step '{collect.collect}' has neither a response "
|
|
689
|
+
f"nor an action defined, nor an initial value defined in the "
|
|
690
|
+
f"domain. You can fix this by adding a response named "
|
|
691
|
+
f"'{collect.utter}' used in the collect step."
|
|
688
692
|
),
|
|
689
693
|
)
|
|
690
694
|
all_good = False
|
rasa/version.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.14.0.
|
|
3
|
+
Version: 3.14.0.dev5
|
|
4
4
|
Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
|
|
5
5
|
Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
|
|
6
6
|
Author: Rasa Technologies GmbH
|
|
7
7
|
Author-email: hi@rasa.com
|
|
8
8
|
Maintainer: Tom Bocklisch
|
|
9
9
|
Maintainer-email: tom@rasa.com
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.9.2,<3.12
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -67,7 +67,6 @@ Requires-Dist: langcodes (>=3.5.0,<4.0.0)
|
|
|
67
67
|
Requires-Dist: litellm (>=1.69.0,<1.70.0)
|
|
68
68
|
Requires-Dist: matplotlib (>=3.9.4,<3.10.0)
|
|
69
69
|
Requires-Dist: mattermostwrapper (>=2.2,<2.3)
|
|
70
|
-
Requires-Dist: mcp (>=1.12.0,<1.13.0)
|
|
71
70
|
Requires-Dist: networkx (>=3.1,<3.2)
|
|
72
71
|
Requires-Dist: numpy (>=1.26.4,<1.27.0)
|
|
73
72
|
Requires-Dist: onnxruntime (==1.19.2) ; extra == "pii"
|
|
@@ -111,6 +110,7 @@ Requires-Dist: safetensors (>=0.4.5,<0.5.0)
|
|
|
111
110
|
Requires-Dist: sanic (>=22.12,<22.13)
|
|
112
111
|
Requires-Dist: sanic-cors (>=2.2.0,<2.3.0)
|
|
113
112
|
Requires-Dist: sanic-jwt (>=1.8.0,<2.0.0)
|
|
113
|
+
Requires-Dist: sanic-openapi (>=21.12.0,<22.0.0)
|
|
114
114
|
Requires-Dist: sanic-routing (>=22.8.0,<23.0.0)
|
|
115
115
|
Requires-Dist: scikit-learn (>=1.6.1,<1.7.0)
|
|
116
116
|
Requires-Dist: scipy (>=1.13.1,<1.14.0)
|