rasa-pro 3.13.1a19__py3-none-any.whl → 3.13.1a20__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/__main__.py +8 -0
- rasa/builder/auth.py +71 -0
- rasa/builder/config.py +16 -0
- rasa/builder/copilot/constants.py +15 -0
- rasa/builder/copilot/copilot.py +342 -0
- rasa/builder/copilot/copilot_response_handler.py +471 -0
- rasa/builder/copilot/exceptions.py +20 -0
- rasa/builder/copilot/models.py +344 -0
- rasa/builder/copilot/prompts/copilot_system_prompt.jinja2 +495 -0
- rasa/builder/copilot/telemetry.py +195 -0
- rasa/builder/document_retrieval/__init__.py +0 -0
- rasa/builder/document_retrieval/constants.py +16 -0
- rasa/builder/{inkeep_document_retrieval.py → document_retrieval/inkeep_document_retrieval.py} +24 -30
- rasa/builder/document_retrieval/models.py +62 -0
- rasa/builder/download.py +140 -0
- rasa/builder/guardrails/__init__.py +1 -0
- rasa/builder/guardrails/constants.py +4 -0
- rasa/builder/guardrails/exceptions.py +4 -0
- rasa/builder/guardrails/lakera.py +188 -0
- rasa/builder/guardrails/models.py +199 -0
- rasa/builder/guardrails/utils.py +305 -0
- rasa/builder/job_manager.py +87 -0
- rasa/builder/jobs.py +232 -0
- rasa/builder/llm_service.py +59 -7
- rasa/builder/logging_utils.py +162 -4
- rasa/builder/main.py +29 -16
- rasa/builder/models.py +90 -233
- rasa/builder/project_generator.py +91 -7
- rasa/builder/scrape_rasa_docs.py +1 -1
- rasa/builder/service.py +632 -440
- rasa/builder/shared/tracker_context.py +212 -0
- rasa/builder/validation_service.py +4 -4
- rasa/cli/data.py +8 -3
- rasa/cli/project_templates/basic/actions/action_api.py +15 -0
- rasa/cli/project_templates/basic/actions/action_human_handoff.py +44 -0
- rasa/cli/project_templates/basic/config.yml +23 -0
- rasa/cli/project_templates/{plain → basic}/credentials.yml +8 -7
- rasa/cli/project_templates/basic/data/general/feedback.yml +20 -0
- rasa/cli/project_templates/basic/data/general/goodbye.yml +6 -0
- rasa/cli/project_templates/basic/data/general/hello.yml +7 -0
- rasa/cli/project_templates/basic/data/general/help.yml +6 -0
- rasa/cli/project_templates/basic/data/general/human_handoff.yml +16 -0
- rasa/cli/project_templates/basic/data/general/welcome.yml +9 -0
- rasa/cli/project_templates/{finance/data/patterns → basic/data/system}/pattern_completed.yml +2 -1
- rasa/cli/project_templates/basic/data/system/pattern_correction.yml +7 -0
- rasa/cli/project_templates/basic/data/system/pattern_search.yml +8 -0
- rasa/cli/project_templates/basic/data/system/pattern_session_start.yml +8 -0
- rasa/cli/project_templates/basic/docs/rasa_assistant_qa.txt +65 -0
- rasa/cli/project_templates/basic/docs/template.txt +7 -0
- rasa/cli/project_templates/basic/domain/general/assistant_details.yml +12 -0
- rasa/cli/project_templates/basic/domain/general/bot_identity.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/cannot_handle.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/feedback.yml +28 -0
- rasa/cli/project_templates/basic/domain/general/goodbye.yml +7 -0
- rasa/cli/project_templates/basic/domain/general/help.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/human_handoff_domain.yml +35 -0
- rasa/cli/project_templates/{finance/domain/default_actions.yml → basic/domain/general/utils.yml} +0 -3
- rasa/cli/project_templates/basic/domain/general/welcome.yml +7 -0
- rasa/cli/project_templates/{plain → basic}/endpoints.yml +42 -27
- rasa/cli/project_templates/basic/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/defaults.py +25 -3
- rasa/cli/project_templates/finance/actions/__init__.py +46 -0
- rasa/cli/project_templates/finance/actions/accounts/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_ask_account.py → accounts/action_ask_account.py} +6 -9
- rasa/cli/project_templates/finance/actions/{action_check_balance.py → accounts/action_check_balance.py} +4 -4
- rasa/cli/project_templates/finance/actions/action_session_start.py +11 -6
- rasa/cli/project_templates/finance/actions/cards/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_ask_card.py → cards/action_ask_card.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_check_card_existence.py → cards/action_check_card_existence.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_update_card_status.py → cards/action_update_card_status.py} +18 -9
- rasa/cli/project_templates/finance/actions/database.py +1 -0
- rasa/cli/project_templates/finance/actions/transfers/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_add_payee.py → transfers/action_add_payee.py} +8 -3
- rasa/cli/project_templates/finance/actions/{action_ask_account_from.py → transfers/action_ask_account_from.py} +5 -4
- rasa/cli/project_templates/finance/actions/{action_check_payee_existence.py → transfers/action_check_payee_existence.py} +3 -3
- rasa/cli/project_templates/finance/actions/{action_check_sufficient_funds.py → transfers/action_check_sufficient_funds.py} +3 -4
- rasa/cli/project_templates/finance/actions/{action_list_payees.py → transfers/action_list_payees.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_remove_payee.py → transfers/action_remove_payee.py} +4 -4
- rasa/cli/project_templates/finance/config.yml +8 -19
- rasa/cli/project_templates/finance/credentials.yml +6 -7
- rasa/cli/project_templates/finance/csvs/cards.csv +10 -10
- rasa/cli/project_templates/finance/csvs/payees.csv +10 -9
- rasa/cli/project_templates/finance/data/{flows → accounts}/check_balance.yml +2 -1
- rasa/cli/project_templates/finance/data/general/bot_identity.yml +6 -0
- rasa/cli/project_templates/finance/data/general/feedback.yml +20 -0
- rasa/cli/project_templates/finance/data/general/goodbye.yml +6 -0
- rasa/cli/project_templates/finance/data/general/hello.yml +7 -0
- rasa/cli/project_templates/finance/data/{flows/welcome.yml → general/help.yml} +2 -7
- rasa/cli/project_templates/finance/data/general/human_handoff.yml +16 -0
- rasa/cli/project_templates/finance/data/general/welcome.yml +9 -0
- rasa/cli/project_templates/finance/data/{patterns → system/patterns}/pattern_chitchat.yml +0 -2
- rasa/cli/project_templates/finance/data/system/patterns/pattern_completed.yml +7 -0
- rasa/cli/project_templates/finance/data/system/patterns/pattern_correction.yml +7 -0
- rasa/cli/project_templates/finance/data/system/patterns/pattern_search.yml +8 -0
- rasa/cli/project_templates/finance/data/{patterns → system/patterns}/pattern_session_start.yml +0 -1
- rasa/cli/project_templates/finance/domain/{check_balance.yml → accounts/check_balance.yml} +2 -0
- rasa/cli/project_templates/finance/domain/general/assistant_details.yml +12 -0
- rasa/cli/project_templates/finance/domain/general/bot_identity.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/cannot_handle.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/defaults.yml +24 -0
- rasa/cli/project_templates/finance/domain/general/feedback.yml +28 -0
- rasa/cli/project_templates/finance/domain/general/goodbye.yml +7 -0
- rasa/cli/project_templates/finance/domain/general/help.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/human_handoff.yml +30 -0
- rasa/cli/project_templates/finance/domain/general/utils.yml +13 -0
- rasa/cli/project_templates/finance/domain/general/welcome.yml +8 -0
- rasa/cli/project_templates/finance/endpoints.yml +1 -0
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +3 -3
- rasa/cli/project_templates/telco/actions/actions_billing.py +24 -17
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +6 -1
- rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +6 -1
- rasa/cli/project_templates/telco/actions/actions_session_start.py +6 -1
- rasa/cli/project_templates/tutorial/config.yml +2 -1
- rasa/cli/scaffold.py +27 -2
- rasa/cli/train.py +8 -0
- rasa/cli/utils.py +31 -15
- rasa/core/actions/action.py +28 -41
- rasa/core/actions/action_run_slot_rejections.py +1 -1
- rasa/core/channels/development_inspector.py +47 -14
- rasa/core/channels/inspector/dist/assets/{arc-371401b1.js → arc-1ddec37b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-3f126156.js → blockDiagram-38ab4fdb-18af387c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-12f22eb7.js → c4Diagram-3d4e48cf-250127a3.js} +1 -1
- rasa/core/channels/inspector/dist/assets/channel-59f6d54b.js +1 -0
- rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-03b1d386.js → classDiagram-70f12bd4-c3388b34.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-84f69d63.js → classDiagram-v2-f2320105-9c893a82.js} +1 -1
- rasa/core/channels/inspector/dist/assets/clone-26177ddb.js +1 -0
- rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-ca47fd38.js → createText-2e5e7dd3-c111213b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-f837ca8a.js → edges-e0da2a9e-812a729d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-8717ac54.js → erDiagram-9861fffd-fd5051bc.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-94f38b83.js → flowDb-956e92f1-3287ac02.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-b616f9fb.js → flowDiagram-66a62f08-692fb0b2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-29c03f5a.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-f5d24bb8.js → flowchart-elk-definition-4a651766-008376f1.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-b43ba8d9.js → ganttDiagram-c361ad54-df330a69.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-c3aafaa5.js → gitGraphDiagram-72cf32ee-e03676fb.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{graph-0d0a2c10.js → graph-46fad2ba.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-3862675e-58ea0305.js → index-3862675e-a484ac55.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-cce6f8a1.js → index-a003633f.js} +179 -179
- rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-b8f60461.js → infoDiagram-f8f76790-3f9e6ec2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-95be5545.js → journeyDiagram-49397b02-79f72383.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-da885b9b.js → layout-aad098e5.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-f1c817d3.js → line-219ab7ae.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-d42801e6.js → linear-2cddbe62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-a38923a6.js → mindmap-definition-fc14e90a-1d41ed99.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-ca6e71e9.js → pieDiagram-8a3498a8-cc496ee8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-b290dae9.js → quadrantDiagram-120e2f19-84d32884.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-03f02ceb.js → requirementDiagram-deff3bca-c0deb984.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-c49eee40.js → sankeyDiagram-04a897e0-b9d7fd62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-b2cd6a3d.js → sequenceDiagram-704730f1-7d517565.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-e53a2028.js → stateDiagram-587899a1-98ef9b27.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-e1982a03.js → stateDiagram-v2-d93cdb3a-cee70748.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-d0226ca5.js → styles-6aaf32cf-3f9d1c96.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9a916d00-0e21dc00.js → styles-9a916d00-67471923.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-c10674c1-9588494e.js → styles-c10674c1-bd093fb7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-be478d4f.js → svgDrawCommon-08f97a94-675794e8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-74631749.js → timeline-definition-85554ec2-0ac67617.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-a043552f.js → xychartDiagram-e933f94c-c018dc37.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +2 -2
- rasa/core/channels/inspector/index.html +1 -1
- rasa/core/channels/inspector/package.json +4 -3
- rasa/core/channels/inspector/src/App.tsx +53 -7
- rasa/core/channels/inspector/src/components/Chat.tsx +3 -2
- rasa/core/channels/inspector/src/components/DiagramFlow.tsx +1 -1
- rasa/core/channels/inspector/src/components/LatencyDisplay.tsx +268 -0
- rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +6 -2
- rasa/core/channels/inspector/src/helpers/audio/audiostream.ts +8 -3
- rasa/core/channels/inspector/src/types.ts +8 -0
- rasa/core/channels/inspector/yarn.lock +12 -12
- rasa/core/channels/studio_chat.py +119 -34
- rasa/core/channels/voice_ready/twilio_voice.py +1 -1
- rasa/core/channels/voice_stream/asr/asr_engine.py +5 -1
- rasa/core/channels/voice_stream/asr/deepgram.py +5 -0
- rasa/core/channels/voice_stream/audiocodes.py +16 -8
- rasa/core/channels/voice_stream/browser_audio.py +39 -4
- rasa/core/channels/voice_stream/call_state.py +13 -2
- rasa/core/channels/voice_stream/genesys.py +16 -13
- rasa/core/channels/voice_stream/jambonz.py +14 -12
- rasa/core/channels/voice_stream/twilio_media_streams.py +14 -13
- rasa/core/channels/voice_stream/util.py +11 -1
- rasa/core/channels/voice_stream/voice_channel.py +108 -29
- rasa/core/nlg/callback.py +1 -1
- rasa/core/nlg/contextual_response_rephraser.py +19 -9
- rasa/core/nlg/generator.py +21 -5
- rasa/core/nlg/response.py +43 -6
- rasa/core/nlg/translate.py +8 -0
- rasa/core/policies/enterprise_search_policy.py +16 -21
- rasa/dialogue_understanding/commands/correct_slots_command.py +38 -10
- rasa/dialogue_understanding/generator/command_generator.py +5 -5
- rasa/dialogue_understanding/generator/command_parser.py +9 -13
- rasa/dialogue_understanding/processor/command_processor.py +149 -55
- rasa/dialogue_understanding/stack/utils.py +13 -3
- rasa/dialogue_understanding_test/du_test_schema.yml +3 -3
- rasa/dialogue_understanding_test/validation.py +9 -10
- rasa/e2e_test/e2e_config.py +18 -11
- rasa/e2e_test/e2e_test_schema.yml +3 -3
- rasa/e2e_test/utils/validation.py +17 -19
- rasa/engine/validation.py +86 -91
- rasa/exceptions.py +26 -1
- rasa/model_manager/model_api.py +2 -2
- rasa/model_manager/socket_bridge.py +8 -2
- rasa/shared/providers/_configs/default_litellm_client_config.py +3 -7
- rasa/shared/utils/cli.py +2 -0
- rasa/shared/utils/common.py +2 -1
- rasa/shared/utils/health_check/health_check.py +10 -14
- rasa/studio/upload.py +6 -2
- rasa/studio/utils.py +33 -22
- rasa/telemetry.py +95 -22
- rasa/utils/licensing.py +21 -10
- rasa/utils/log_utils.py +1 -1
- rasa/utils/tensorflow/transformer.py +3 -3
- rasa/validator.py +7 -5
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a19.dist-info → rasa_pro-3.13.1a20.dist-info}/METADATA +7 -7
- {rasa_pro-3.13.1a19.dist-info → rasa_pro-3.13.1a20.dist-info}/RECORD +242 -205
- rasa/builder/constants.py +0 -4
- rasa/builder/copilot-llm-structured-output-response-schema.json +0 -69
- rasa/builder/copilot.py +0 -233
- rasa/builder/copilot_system_prompt.jinja2 +0 -245
- rasa/builder/create_openai_vector_store.py +0 -228
- rasa/builder/llm_context.py +0 -81
- rasa/cli/project_templates/finance/data/nlu.yml +0 -29
- rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +0 -5
- rasa/cli/project_templates/finance/domain/default_flows.yml +0 -33
- rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +0 -57
- rasa/cli/project_templates/finance/tests/conversation_repair/cancellations.yml +0 -12
- rasa/cli/project_templates/finance/tests/conversation_repair/cannot_handle.yml +0 -7
- rasa/cli/project_templates/finance/tests/conversation_repair/chitchat.yml +0 -7
- rasa/cli/project_templates/finance/tests/conversation_repair/clarification.yml +0 -9
- rasa/cli/project_templates/finance/tests/conversation_repair/completion.yml +0 -18
- rasa/cli/project_templates/finance/tests/conversation_repair/corrections.yml +0 -17
- rasa/cli/project_templates/finance/tests/conversation_repair/digressions.yml +0 -32
- rasa/cli/project_templates/finance/tests/conversation_repair/human_handoff.yml +0 -21
- rasa/cli/project_templates/finance/tests/conversation_repair/skipping_collect_steps.yml +0 -16
- rasa/cli/project_templates/finance/tests/demo_scripts/main.yml +0 -16
- rasa/cli/project_templates/finance/tests/happy_paths/balance_verification.yml +0 -15
- rasa/cli/project_templates/finance/tests/happy_paths/banking_questions.yml +0 -12
- rasa/cli/project_templates/finance/tests/happy_paths/card_blocking.yml +0 -52
- rasa/cli/project_templates/finance/tests/happy_paths/money_transfer.yml +0 -136
- rasa/cli/project_templates/finance/tests/happy_paths/payee_management.yml +0 -27
- rasa/cli/project_templates/finance/tests/happy_paths/user_greeted.yml +0 -5
- rasa/cli/project_templates/plain/config.yml +0 -17
- rasa/cli/project_templates/plain/data/patterns/pattern_session_start.yml +0 -7
- rasa/cli/project_templates/plain/domain.yml +0 -5
- rasa/core/channels/inspector/dist/assets/channel-f1efda17.js +0 -1
- rasa/core/channels/inspector/dist/assets/clone-fdf164e2.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-7d7a1629.js +0 -1
- rasa/shared/importers/static.py +0 -63
- /rasa/{cli/project_templates/plain/actions → builder/copilot}/__init__.py +0 -0
- /rasa/builder/{inkeep-rag-response-schema.json → document_retrieval/inkeep-rag-response-schema.json} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_process_immediate_payment.py → transfers/action_process_immediate_payment.py} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_schedule_payment.py → transfers/action_schedule_payment.py} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_validate_payment_date.py → transfers/action_validate_payment_date.py} +0 -0
- /rasa/cli/project_templates/finance/data/{flows → cards}/block_card.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → cards}/select_card.yml +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/accounts.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/advisors.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/appointments.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/branches.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/cards.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/payees.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/transactions.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/users.json +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/add_payee.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/list_payees.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/remove_payee.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/transfer_money.yml +0 -0
- /rasa/cli/project_templates/finance/domain/{block_card.yml → cards/block_card.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{select_card.yml → cards/select_card.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{add_payee.yml → transfers/add_payee.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{list_payees.yml → transfers/list_payees.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{remove_payee.yml → transfers/remove_payee.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{transfer_money.yml → transfers/transfer_money.yml} +0 -0
- {rasa_pro-3.13.1a19.dist-info → rasa_pro-3.13.1a20.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a19.dist-info → rasa_pro-3.13.1a20.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a19.dist-info → rasa_pro-3.13.1a20.dist-info}/entry_points.txt +0 -0
rasa/builder/constants.py
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"content_blocks": {
|
|
6
|
-
"type": "array",
|
|
7
|
-
"items": {
|
|
8
|
-
"oneOf": [
|
|
9
|
-
{
|
|
10
|
-
"type": "object",
|
|
11
|
-
"required": ["type", "text"],
|
|
12
|
-
"properties": {
|
|
13
|
-
"type": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"enum": ["text"]
|
|
16
|
-
},
|
|
17
|
-
"text": {
|
|
18
|
-
"type": "string"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"type": "object",
|
|
24
|
-
"required": ["type", "text"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"type": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"enum": ["link"]
|
|
29
|
-
},
|
|
30
|
-
"text": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"format": "uri"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "object",
|
|
38
|
-
"required": ["type", "file_path", "file_content"],
|
|
39
|
-
"properties": {
|
|
40
|
-
"type": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"enum": ["file"]
|
|
43
|
-
},
|
|
44
|
-
"file_path": {
|
|
45
|
-
"type": "string"
|
|
46
|
-
},
|
|
47
|
-
"file_content": {
|
|
48
|
-
"type": "string"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"type": "object",
|
|
54
|
-
"required": ["type", "text"],
|
|
55
|
-
"properties": {
|
|
56
|
-
"type": {
|
|
57
|
-
"type": "string",
|
|
58
|
-
"enum": ["code"]
|
|
59
|
-
},
|
|
60
|
-
"text": {
|
|
61
|
-
"type": "string"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
rasa/builder/copilot.py
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
import importlib
|
|
3
|
-
import json
|
|
4
|
-
from contextlib import asynccontextmanager
|
|
5
|
-
from typing import Any, Dict, List
|
|
6
|
-
|
|
7
|
-
import importlib_resources
|
|
8
|
-
import openai
|
|
9
|
-
import structlog
|
|
10
|
-
from jinja2 import Template
|
|
11
|
-
from pydantic import ValidationError
|
|
12
|
-
from typing_extensions import AsyncGenerator
|
|
13
|
-
|
|
14
|
-
from rasa.builder import config
|
|
15
|
-
from rasa.builder.constants import ROLE_SYSTEM, ROLE_USER
|
|
16
|
-
from rasa.builder.exceptions import DocumentRetrievalError, LLMGenerationError
|
|
17
|
-
from rasa.builder.inkeep_document_retrieval import InKeepDocumentRetrieval
|
|
18
|
-
from rasa.builder.llm_context import tracker_as_llm_context
|
|
19
|
-
from rasa.builder.models import CopilotChatMessage, CopilotContext, Document
|
|
20
|
-
from rasa.shared.constants import PACKAGE_NAME
|
|
21
|
-
from rasa.shared.utils.io import read_json_file
|
|
22
|
-
|
|
23
|
-
COPILOT_LLM_STRUCTURED_OUTPUT_SCHEMA_PATH = str(
|
|
24
|
-
importlib_resources.files(PACKAGE_NAME).joinpath(
|
|
25
|
-
"builder/copilot-llm-structured-output-response-schema.json"
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
structlogger = structlog.get_logger()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class Copilot:
|
|
33
|
-
def __init__(self):
|
|
34
|
-
self._client = None
|
|
35
|
-
self._copilot_response_schema = read_json_file(
|
|
36
|
-
COPILOT_LLM_STRUCTURED_OUTPUT_SCHEMA_PATH
|
|
37
|
-
)
|
|
38
|
-
self._inkeep_document_retrieval = InKeepDocumentRetrieval()
|
|
39
|
-
self._system_message_prompt_template = Template(
|
|
40
|
-
importlib.resources.read_text(
|
|
41
|
-
"rasa.builder",
|
|
42
|
-
"copilot_system_prompt.jinja2",
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
@asynccontextmanager
|
|
47
|
-
async def _get_client(self) -> AsyncGenerator[openai.AsyncOpenAI, None]:
|
|
48
|
-
"""Get or lazy create OpenAI client with proper resource management."""
|
|
49
|
-
if self._client is None:
|
|
50
|
-
self._client = openai.AsyncOpenAI(timeout=config.OPENAI_TIMEOUT)
|
|
51
|
-
|
|
52
|
-
try:
|
|
53
|
-
yield self._client
|
|
54
|
-
except Exception as e:
|
|
55
|
-
structlogger.error("copilot.llm_client_error", error=str(e))
|
|
56
|
-
raise
|
|
57
|
-
|
|
58
|
-
async def generate_response(self, context: CopilotContext) -> CopilotChatMessage:
|
|
59
|
-
"""Generate copilot response using OpenAI."""
|
|
60
|
-
try:
|
|
61
|
-
async with self._get_client() as client:
|
|
62
|
-
response_format = {
|
|
63
|
-
"type": "json_schema",
|
|
64
|
-
"json_schema": {
|
|
65
|
-
"name": "copilot_response",
|
|
66
|
-
"schema": self._copilot_response_schema,
|
|
67
|
-
},
|
|
68
|
-
} # type: ignore[arg-type]
|
|
69
|
-
messages = await self._create_llm_request_messages(context)
|
|
70
|
-
|
|
71
|
-
response = await client.chat.completions.create(
|
|
72
|
-
model=config.OPENAI_MODEL,
|
|
73
|
-
messages=messages,
|
|
74
|
-
response_format=response_format,
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
content = response.choices[0].message.content
|
|
78
|
-
if not content:
|
|
79
|
-
structlogger.error(
|
|
80
|
-
"copilot.generate_response.empty_llm_response",
|
|
81
|
-
event_info="Copilot: Empty response from LLM",
|
|
82
|
-
messages=messages,
|
|
83
|
-
response=response,
|
|
84
|
-
)
|
|
85
|
-
raise LLMGenerationError("Copilot: Empty response from LLM")
|
|
86
|
-
|
|
87
|
-
try:
|
|
88
|
-
# Parse the JSON response and create a CopilotChatMessage
|
|
89
|
-
llm_response = json.loads(content)
|
|
90
|
-
structlogger.debug(
|
|
91
|
-
"copilot.generate_response.llm_response",
|
|
92
|
-
event_info="Copilot: LLM response",
|
|
93
|
-
llm_response=llm_response,
|
|
94
|
-
)
|
|
95
|
-
return CopilotChatMessage.from_llm_response(llm_response)
|
|
96
|
-
except (json.JSONDecodeError, ValidationError) as e:
|
|
97
|
-
structlogger.error(
|
|
98
|
-
"copilot.generate_response.llm_response_invalid_json_format",
|
|
99
|
-
content=content,
|
|
100
|
-
event_info=f"Copilot: Invalid JSON from LLM: {e}",
|
|
101
|
-
error=str(e),
|
|
102
|
-
)
|
|
103
|
-
raise LLMGenerationError(f"Copilot: Invalid JSON from LLM: {e}")
|
|
104
|
-
|
|
105
|
-
except openai.OpenAIError as e:
|
|
106
|
-
structlogger.error(
|
|
107
|
-
"copilot.generate_response.openai_api_error",
|
|
108
|
-
event_info="Copilot: OpenAI API error",
|
|
109
|
-
messages=messages,
|
|
110
|
-
error=str(e),
|
|
111
|
-
)
|
|
112
|
-
raise LLMGenerationError(f"Copilot: OpenAI API error: {e}")
|
|
113
|
-
except asyncio.TimeoutError:
|
|
114
|
-
structlogger.error(
|
|
115
|
-
"copilot.generate_response.llm_request_timeout",
|
|
116
|
-
event_info="Copilot: LLM request timed out.",
|
|
117
|
-
messages=messages,
|
|
118
|
-
)
|
|
119
|
-
raise LLMGenerationError("Copilot: LLM request timed out.")
|
|
120
|
-
|
|
121
|
-
async def _create_llm_request_messages(
|
|
122
|
-
self, context: CopilotContext
|
|
123
|
-
) -> List[Dict[str, Any]]:
|
|
124
|
-
"""Constructs the full list of messages to send to the LLM.
|
|
125
|
-
|
|
126
|
-
This includes:
|
|
127
|
-
- System instructions that utilizes logs, relevant documentation bits, and
|
|
128
|
-
the current tracker state of the Rasa assistant to generate a response.
|
|
129
|
-
- Chat history between the user and the copilot.
|
|
130
|
-
|
|
131
|
-
Args:
|
|
132
|
-
context: Context object containing chat history, current tracker
|
|
133
|
-
state, logs, and file references.
|
|
134
|
-
|
|
135
|
-
Returns:
|
|
136
|
-
A full list of messages to pass to the LLM (system + chronological message
|
|
137
|
-
history).
|
|
138
|
-
"""
|
|
139
|
-
system_message = await self._create_system_message(context)
|
|
140
|
-
chat_history_messages = self._create_chat_history_messages(context)
|
|
141
|
-
return [system_message, *chat_history_messages]
|
|
142
|
-
|
|
143
|
-
async def _create_system_message(
|
|
144
|
-
self,
|
|
145
|
-
context: CopilotContext,
|
|
146
|
-
) -> Dict[str, Any]:
|
|
147
|
-
"""Create the system message with the instructions and context for the copilot.
|
|
148
|
-
|
|
149
|
-
Args:
|
|
150
|
-
context: The context of the copilot.
|
|
151
|
-
|
|
152
|
-
Returns:
|
|
153
|
-
The system message for the copilot.
|
|
154
|
-
"""
|
|
155
|
-
# Retrieve relevant documents from Rasa documentation and format them
|
|
156
|
-
documentation_results = await self._search_rasa_documentation(context)
|
|
157
|
-
formatted_docs = self._format_documents(documentation_results)
|
|
158
|
-
|
|
159
|
-
# Format the current conversation between the user and the Rasa assistant
|
|
160
|
-
current_conversation_with_assistant = tracker_as_llm_context(context.tracker)
|
|
161
|
-
|
|
162
|
-
# Render the system message prompt template
|
|
163
|
-
rendered_prompt = self._system_message_prompt_template.render(
|
|
164
|
-
current_conversation=current_conversation_with_assistant,
|
|
165
|
-
assistant_logs=context.assistant_logs,
|
|
166
|
-
assistant_files=context.assistant_files,
|
|
167
|
-
documentation_results=formatted_docs,
|
|
168
|
-
)
|
|
169
|
-
return {"role": ROLE_SYSTEM, "content": rendered_prompt}
|
|
170
|
-
|
|
171
|
-
def _create_chat_history_messages(
|
|
172
|
-
self,
|
|
173
|
-
context: CopilotContext,
|
|
174
|
-
) -> List[Dict[str, Any]]:
|
|
175
|
-
"""Create the chat history messages for the copilot."""
|
|
176
|
-
return [message.to_openai_format() for message in context.copilot_chat_history]
|
|
177
|
-
|
|
178
|
-
async def _search_rasa_documentation(
|
|
179
|
-
self,
|
|
180
|
-
context: CopilotContext,
|
|
181
|
-
) -> List[Document]:
|
|
182
|
-
"""Search Rasa documentation for relevant information.
|
|
183
|
-
|
|
184
|
-
Args:
|
|
185
|
-
context: The context of the copilot.
|
|
186
|
-
|
|
187
|
-
Returns:
|
|
188
|
-
A list of Document objects. Empty list is returned if the search fails.
|
|
189
|
-
"""
|
|
190
|
-
try:
|
|
191
|
-
query = self._create_documentation_search_query(context)
|
|
192
|
-
return await self._inkeep_document_retrieval.retrieve_documents(query)
|
|
193
|
-
except DocumentRetrievalError as e:
|
|
194
|
-
structlogger.error(
|
|
195
|
-
"copilot.search_rasa_documentation.error",
|
|
196
|
-
event_info=(
|
|
197
|
-
f"Copilot: Searching Rasa documentation for query '{query}' "
|
|
198
|
-
f"failed with the following error: {e}. Returning empty list."
|
|
199
|
-
),
|
|
200
|
-
query=query,
|
|
201
|
-
error=str(e),
|
|
202
|
-
)
|
|
203
|
-
return []
|
|
204
|
-
|
|
205
|
-
@staticmethod
|
|
206
|
-
def _create_documentation_search_query(context: CopilotContext) -> str:
|
|
207
|
-
"""Format chat messages between user and copilot for documentation search."""
|
|
208
|
-
result = ""
|
|
209
|
-
user_prefix = "User"
|
|
210
|
-
assistant_prefix = "Assistant"
|
|
211
|
-
for message in context.copilot_chat_history:
|
|
212
|
-
text = message.get_text_content().strip()
|
|
213
|
-
if not text:
|
|
214
|
-
continue
|
|
215
|
-
if message.role == ROLE_USER:
|
|
216
|
-
result += f"{user_prefix}: {text}\n"
|
|
217
|
-
else:
|
|
218
|
-
result += f"{assistant_prefix}: {text}\n"
|
|
219
|
-
return result
|
|
220
|
-
|
|
221
|
-
@staticmethod
|
|
222
|
-
def _format_documents(results: List[Document]) -> str:
|
|
223
|
-
"""Format documentation search results."""
|
|
224
|
-
if not results:
|
|
225
|
-
return "<sources>No relevant documentation found.</sources>"
|
|
226
|
-
|
|
227
|
-
formatted_results = ""
|
|
228
|
-
for result in results:
|
|
229
|
-
formatted_result = f"<result url='{result.url}'>"
|
|
230
|
-
formatted_result += f"<content>{result.content}</content>"
|
|
231
|
-
formatted_results += formatted_result + "</result>"
|
|
232
|
-
|
|
233
|
-
return f"<sources>{formatted_results}</sources>"
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
You are an expert Rasa chatbot development assistant. Your role is to help users build, debug, customize, and improve
|
|
2
|
-
their Rasa chatbots through conversational guidance and practical code solutions.
|
|
3
|
-
|
|
4
|
-
## Your Capabilities
|
|
5
|
-
|
|
6
|
-
You can help users with:
|
|
7
|
-
- **Debugging & Explanation**: Analyze conversations and logs to explain bot behavior
|
|
8
|
-
- **Customization & Branding**: Modify responses, styling, and bot personality
|
|
9
|
-
- **Skill Development**: Create new intents, entities, actions, and conversation flows
|
|
10
|
-
- **Knowledge Integration**: Connect external documents and knowledge bases
|
|
11
|
-
- **Code Generation**: Provide specific YAML configs, Python actions, and file modifications
|
|
12
|
-
- **Flow Design**: Design complex multi-turn conversations and business logic
|
|
13
|
-
- **Error Resolution**: Diagnose and fix training issues, deployment problems, and runtime errors
|
|
14
|
-
|
|
15
|
-
## Context Available to You
|
|
16
|
-
|
|
17
|
-
You have access to:
|
|
18
|
-
{% if current_conversation %}
|
|
19
|
-
**Current Bot Conversation:**
|
|
20
|
-
```
|
|
21
|
-
{{ current_conversation }}
|
|
22
|
-
```
|
|
23
|
-
{% endif %}
|
|
24
|
-
|
|
25
|
-
{% if assistant_logs %}
|
|
26
|
-
**Bot Logs:**
|
|
27
|
-
```
|
|
28
|
-
{{ assistant_logs }}
|
|
29
|
-
```
|
|
30
|
-
{% endif %}
|
|
31
|
-
|
|
32
|
-
{% if assistant_files %}
|
|
33
|
-
**Bot Configuration Files:**
|
|
34
|
-
{% for file_name, file_content in assistant_files.items() %}
|
|
35
|
-
**{{ file_name }}:**
|
|
36
|
-
```
|
|
37
|
-
{{ file_content }}
|
|
38
|
-
```
|
|
39
|
-
{% endfor %}
|
|
40
|
-
{% endif %}
|
|
41
|
-
|
|
42
|
-
{% if documentation_results %}
|
|
43
|
-
**Relevant Documentation:**
|
|
44
|
-
```
|
|
45
|
-
{{documentation_results}}
|
|
46
|
-
```
|
|
47
|
-
{% endif %}
|
|
48
|
-
|
|
49
|
-
## Response Guidelines
|
|
50
|
-
|
|
51
|
-
### When Explaining Bot Behavior ("Why did the assistant say that?")
|
|
52
|
-
1. **Identify the trigger**: Point to the specific intent, entity, or context that caused the response
|
|
53
|
-
2. **Trace the flow**: Show the path through flows that led to this response
|
|
54
|
-
3. **Provide code references**: Show exact lines in domain.yml, flows.yml, or actions.py
|
|
55
|
-
4. **Suggest improvements**: Offer specific ways to modify the behavior if needed
|
|
56
|
-
|
|
57
|
-
Example response format:
|
|
58
|
-
```
|
|
59
|
-
The assistant said that because:
|
|
60
|
-
|
|
61
|
-
1. **Intent triggered**: `ask_balance` (confidence: 0.95)
|
|
62
|
-
2. **Flow matched**: Line 23 in flows.yml - "balance inquiry flow"
|
|
63
|
-
3. **Response used**: `utter_ask_for_account_details` from domain.yml line 45
|
|
64
|
-
|
|
65
|
-
The response is defined in your domain.yml:
|
|
66
|
-
```yaml
|
|
67
|
-
responses:
|
|
68
|
-
utter_ask_for_account_details:
|
|
69
|
-
- text: "I'll help you check your balance. Could you please provide your account number?"
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
To customize this, you can modify the text in domain.yml or create a custom action.
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### When Helping with Customization ("Make it branded")
|
|
76
|
-
1. **Identify customization points**: Show specific files and sections to modify
|
|
77
|
-
2. **Provide exact code**: Give complete, ready-to-use YAML or Python code
|
|
78
|
-
3. **Explain the impact**: Describe how changes affect user experience
|
|
79
|
-
4. **Suggest best practices**: Recommend consistent branding approaches
|
|
80
|
-
|
|
81
|
-
### When Generating New Skills
|
|
82
|
-
1. **Gather requirements**: Ask clarifying questions about the skill's purpose
|
|
83
|
-
2. **Design the flow**: Outline the conversation structure
|
|
84
|
-
3. **Provide complete implementation**: Include intents, entities, flows, responses, and actions
|
|
85
|
-
4. **Test scenarios**: Suggest test cases to validate the skill
|
|
86
|
-
5. **Handle edge cases**: Include error handling and fallback responses
|
|
87
|
-
|
|
88
|
-
### When Integrating Knowledge
|
|
89
|
-
1. **Assess integration options**: Vector databases, retrieval actions, custom connectors
|
|
90
|
-
2. **Provide implementation steps**: Complete setup instructions with code
|
|
91
|
-
3. **Show preview changes**: Demonstrate how responses will change
|
|
92
|
-
4. **Optimize for performance**: Suggest caching and efficiency improvements
|
|
93
|
-
|
|
94
|
-
### Code Quality Standards
|
|
95
|
-
- **Always provide complete, runnable code**
|
|
96
|
-
- **Follow Rasa best practices** (proper intent naming, entity extraction, etc.)
|
|
97
|
-
- **Include error handling** in custom actions
|
|
98
|
-
- **Add inline comments** for complex logic
|
|
99
|
-
- **Validate YAML syntax** before suggesting changes
|
|
100
|
-
- **Consider conversation context** and maintain flow continuity
|
|
101
|
-
- **Do not use stories, rules or forms** These are deprecated Rasa concepts.
|
|
102
|
-
- **Do not refer to Rasa Studio**, the bot you are building is build with Rasa Pro.
|
|
103
|
-
|
|
104
|
-
### Using Documentation Context
|
|
105
|
-
When documentation context is provided:
|
|
106
|
-
1. **Reference relevant sections**: Quote or paraphrase documentation that directly answers the user's question
|
|
107
|
-
2. **Provide source links**: Always include links to the full documentation page when available
|
|
108
|
-
3. **Combine with bot context**: Merge documentation guidance with the user's specific bot configuration
|
|
109
|
-
4. **Clarify concepts**: Use documentation to explain Rasa concepts the user might not understand
|
|
110
|
-
5. **Stay current**: Prioritize documentation context over general knowledge when there are conflicts
|
|
111
|
-
|
|
112
|
-
### When You Need More Information
|
|
113
|
-
Ask specific questions like:
|
|
114
|
-
- "Could you share the exact error message you're seeing?"
|
|
115
|
-
- "What should happen when the user says [specific phrase]?"
|
|
116
|
-
- "Do you want this to work for all users or specific user types?"
|
|
117
|
-
- "Should this integrate with any external systems?"
|
|
118
|
-
|
|
119
|
-
### File Modification Format
|
|
120
|
-
When suggesting file changes, use this format:
|
|
121
|
-
|
|
122
|
-
**File: domain.yml**
|
|
123
|
-
```yaml
|
|
124
|
-
# Add this to your responses section:
|
|
125
|
-
responses:
|
|
126
|
-
utter_welcome_branded:
|
|
127
|
-
- text: "Welcome to [Your Company Name]! I'm here to help with your banking needs."
|
|
128
|
-
- text: "Hi there! I'm [Bot Name], your personal banking assistant."
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**File: actions.py**
|
|
132
|
-
```python
|
|
133
|
-
# Add this new action:
|
|
134
|
-
class ActionCustomBalance(Action):
|
|
135
|
-
def name(self) -> Text:
|
|
136
|
-
return "action_get_balance"
|
|
137
|
-
|
|
138
|
-
def run(self, dispatcher, tracker, domain):
|
|
139
|
-
# Your implementation here
|
|
140
|
-
return []
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Error Handling
|
|
144
|
-
When users encounter errors:
|
|
145
|
-
1. **Reproduce the issue**: Show understanding of the problem
|
|
146
|
-
2. **Identify root cause**: Point to specific configuration issues
|
|
147
|
-
3. **Provide step-by-step fix**: Clear instructions with code examples
|
|
148
|
-
4. **Prevent future issues**: Suggest validation steps and best practices
|
|
149
|
-
|
|
150
|
-
### Conversation Flow
|
|
151
|
-
- **Stay in character** as a helpful Rasa expert
|
|
152
|
-
- **Be conversational** but precise
|
|
153
|
-
- **Anticipate next steps** and offer proactive suggestions
|
|
154
|
-
- **Reference specific files and line numbers** when possible
|
|
155
|
-
- **Offer multiple solutions** when appropriate (simple vs. advanced)
|
|
156
|
-
|
|
157
|
-
## Response Format
|
|
158
|
-
|
|
159
|
-
You must return your response as a JSON array of content blocks. Each content block should follow this structure:
|
|
160
|
-
|
|
161
|
-
### Text Blocks
|
|
162
|
-
Use for explanations, instructions, and general content. Supports markdown formatting:
|
|
163
|
-
```json
|
|
164
|
-
{
|
|
165
|
-
"type": "text",
|
|
166
|
-
"text": "Great question! The assistant said that because it triggered the `ask_balance` intent. Here's what happened:\n\n1. **Intent Recognition**: Your message matched the `ask_balance` intent\n2. **Flow Flow**: This triggered the flow defined in your `flows.yml`\n3. **Response**: The bot used `utter_ask_for_account_details` from your domain"
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Code Blocks
|
|
171
|
-
Use for generic code examples and snippets:
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"type": "code",
|
|
175
|
-
"text": "responses:\n utter_greet:\n - text: \"Hello! How can I help you today?\"\n - text: \"Hi there! I'm here to assist you.\"",
|
|
176
|
-
"language": "yaml"
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### File Blocks
|
|
181
|
-
**Use whenever possible** to provide specific changes that apply to the user's bot:
|
|
182
|
-
```json
|
|
183
|
-
{
|
|
184
|
-
"type": "file",
|
|
185
|
-
"file_path": "domain.yml",
|
|
186
|
-
"file_content": "responses:\n utter_welcome_branded:\n - text: \"Welcome to [Your Company Name]! I'm here to help.\"\n - text: \"Hi! I'm [Bot Name], your personal assistant.\""
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### Link Blocks
|
|
191
|
-
Use to reference Rasa documentation:
|
|
192
|
-
```json
|
|
193
|
-
{
|
|
194
|
-
"type": "link",
|
|
195
|
-
"text": "https://rasa.com/docs/rasa/domain"
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Response Guidelines:
|
|
200
|
-
- **Always return a JSON array** of content blocks
|
|
201
|
-
- **Prefer file blocks** over code blocks when providing bot-specific changes
|
|
202
|
-
- **Use multiple content blocks** as needed to fully answer the question
|
|
203
|
-
- **Include relevant documentation links** from https://rasa.com/docs
|
|
204
|
-
- **Format text blocks with markdown** for better readability
|
|
205
|
-
|
|
206
|
-
### Example Multi-Block Response:
|
|
207
|
-
```json
|
|
208
|
-
[
|
|
209
|
-
{
|
|
210
|
-
"type": "text",
|
|
211
|
-
"text": "I can help you create a new skill for handling KYC verification. According to the Rasa documentation, flows provide a structured way to define conversation patterns. This will require several components:"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"type": "file",
|
|
215
|
-
"file_path": "domain.yml",
|
|
216
|
-
"file_content": "intents:\n - request_kyc\n - provide_document\n\nentities:\n - document_type\n\nresponses:\n utter_request_documents:\n - text: \"To verify your identity, please provide a government-issued ID.\""
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"type": "file",
|
|
220
|
-
"file_path": "flows.yml",
|
|
221
|
-
"file_content": "flows:\n kyc_verification:\n description: Handle KYC document verification\n start_conditions:\n - intent: request_kyc\n steps:\n - action: utter_request_documents\n - intent: provide_document\n - action: action_process_kyc_document"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"type": "file",
|
|
225
|
-
"file_path": "data/nlu.yml",
|
|
226
|
-
"file_content": "- intent: request_kyc\n examples: |\n - I need to verify my identity\n - How do I complete KYC\n - What documents do you need"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"type": "text",
|
|
230
|
-
"text": "For more detailed information about flows and custom actions, check out these documentation pages:"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"type": "link",
|
|
234
|
-
"text": "https://rasa.com/docs/rasa/flows"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"type": "link",
|
|
238
|
-
"text": "https://rasa.com/docs/rasa/custom-actions"
|
|
239
|
-
}
|
|
240
|
-
]
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Remember: Your goal is to make Rasa development accessible and efficient. Always
|
|
244
|
-
provide actionable, specific guidance that users can immediately implement in the
|
|
245
|
-
structured content block format. Keep your response short and concise.
|