rasa-pro 3.13.1a18__py3-none-any.whl → 3.13.1a20__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/__main__.py +8 -0
- rasa/builder/auth.py +71 -0
- rasa/builder/config.py +16 -0
- rasa/builder/copilot/constants.py +15 -0
- rasa/builder/copilot/copilot.py +342 -0
- rasa/builder/copilot/copilot_response_handler.py +471 -0
- rasa/builder/copilot/exceptions.py +20 -0
- rasa/builder/copilot/models.py +344 -0
- rasa/builder/copilot/prompts/copilot_system_prompt.jinja2 +495 -0
- rasa/builder/copilot/telemetry.py +195 -0
- rasa/builder/document_retrieval/__init__.py +0 -0
- rasa/builder/document_retrieval/constants.py +16 -0
- rasa/builder/{inkeep_document_retrieval.py → document_retrieval/inkeep_document_retrieval.py} +53 -44
- rasa/builder/document_retrieval/models.py +62 -0
- rasa/builder/download.py +140 -0
- rasa/builder/guardrails/__init__.py +1 -0
- rasa/builder/guardrails/constants.py +4 -0
- rasa/builder/guardrails/exceptions.py +4 -0
- rasa/builder/guardrails/lakera.py +188 -0
- rasa/builder/guardrails/models.py +199 -0
- rasa/builder/guardrails/utils.py +305 -0
- rasa/builder/job_manager.py +87 -0
- rasa/builder/jobs.py +232 -0
- rasa/builder/llm_service.py +89 -173
- rasa/builder/logging_utils.py +162 -4
- rasa/builder/main.py +29 -16
- rasa/builder/models.py +93 -121
- rasa/builder/project_generator.py +91 -7
- rasa/builder/scrape_rasa_docs.py +1 -1
- rasa/builder/service.py +650 -452
- rasa/builder/shared/tracker_context.py +212 -0
- rasa/builder/validation_service.py +4 -4
- rasa/cli/data.py +8 -3
- rasa/cli/project_templates/basic/actions/action_api.py +15 -0
- rasa/cli/project_templates/basic/actions/action_human_handoff.py +44 -0
- rasa/cli/project_templates/basic/config.yml +23 -0
- rasa/cli/project_templates/{plain → basic}/credentials.yml +8 -7
- rasa/cli/project_templates/basic/data/general/feedback.yml +20 -0
- rasa/cli/project_templates/basic/data/general/goodbye.yml +6 -0
- rasa/cli/project_templates/basic/data/general/hello.yml +7 -0
- rasa/cli/project_templates/basic/data/general/help.yml +6 -0
- rasa/cli/project_templates/basic/data/general/human_handoff.yml +16 -0
- rasa/cli/project_templates/basic/data/general/welcome.yml +9 -0
- rasa/cli/project_templates/{finance/data/patterns → basic/data/system}/pattern_completed.yml +2 -1
- rasa/cli/project_templates/basic/data/system/pattern_correction.yml +7 -0
- rasa/cli/project_templates/basic/data/system/pattern_search.yml +8 -0
- rasa/cli/project_templates/basic/data/system/pattern_session_start.yml +8 -0
- rasa/cli/project_templates/basic/docs/rasa_assistant_qa.txt +65 -0
- rasa/cli/project_templates/basic/docs/template.txt +7 -0
- rasa/cli/project_templates/basic/domain/general/assistant_details.yml +12 -0
- rasa/cli/project_templates/basic/domain/general/bot_identity.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/cannot_handle.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/feedback.yml +28 -0
- rasa/cli/project_templates/basic/domain/general/goodbye.yml +7 -0
- rasa/cli/project_templates/basic/domain/general/help.yml +5 -0
- rasa/cli/project_templates/basic/domain/general/human_handoff_domain.yml +35 -0
- rasa/cli/project_templates/{finance/domain/default_actions.yml → basic/domain/general/utils.yml} +0 -3
- rasa/cli/project_templates/basic/domain/general/welcome.yml +7 -0
- rasa/cli/project_templates/{plain → basic}/endpoints.yml +42 -27
- rasa/cli/project_templates/basic/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/defaults.py +25 -3
- rasa/cli/project_templates/finance/actions/__init__.py +46 -0
- rasa/cli/project_templates/finance/actions/accounts/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_ask_account.py → accounts/action_ask_account.py} +6 -9
- rasa/cli/project_templates/finance/actions/{action_check_balance.py → accounts/action_check_balance.py} +4 -4
- rasa/cli/project_templates/finance/actions/action_session_start.py +11 -6
- rasa/cli/project_templates/finance/actions/cards/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_ask_card.py → cards/action_ask_card.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_check_card_existence.py → cards/action_check_card_existence.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_update_card_status.py → cards/action_update_card_status.py} +18 -9
- rasa/cli/project_templates/finance/actions/database.py +1 -0
- rasa/cli/project_templates/finance/actions/transfers/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/{action_add_payee.py → transfers/action_add_payee.py} +8 -3
- rasa/cli/project_templates/finance/actions/{action_ask_account_from.py → transfers/action_ask_account_from.py} +5 -4
- rasa/cli/project_templates/finance/actions/{action_check_payee_existence.py → transfers/action_check_payee_existence.py} +3 -3
- rasa/cli/project_templates/finance/actions/{action_check_sufficient_funds.py → transfers/action_check_sufficient_funds.py} +3 -4
- rasa/cli/project_templates/finance/actions/{action_list_payees.py → transfers/action_list_payees.py} +4 -3
- rasa/cli/project_templates/finance/actions/{action_remove_payee.py → transfers/action_remove_payee.py} +4 -4
- rasa/cli/project_templates/finance/config.yml +8 -19
- rasa/cli/project_templates/finance/credentials.yml +6 -7
- rasa/cli/project_templates/finance/csvs/cards.csv +10 -10
- rasa/cli/project_templates/finance/csvs/payees.csv +10 -9
- rasa/cli/project_templates/finance/data/{flows → accounts}/check_balance.yml +2 -1
- rasa/cli/project_templates/finance/data/general/bot_identity.yml +6 -0
- rasa/cli/project_templates/finance/data/general/feedback.yml +20 -0
- rasa/cli/project_templates/finance/data/general/goodbye.yml +6 -0
- rasa/cli/project_templates/finance/data/general/hello.yml +7 -0
- rasa/cli/project_templates/finance/data/{flows/welcome.yml → general/help.yml} +2 -7
- rasa/cli/project_templates/finance/data/general/human_handoff.yml +16 -0
- rasa/cli/project_templates/finance/data/general/welcome.yml +9 -0
- rasa/cli/project_templates/finance/data/{patterns → system/patterns}/pattern_chitchat.yml +0 -2
- rasa/cli/project_templates/finance/data/system/patterns/pattern_completed.yml +7 -0
- rasa/cli/project_templates/finance/data/system/patterns/pattern_correction.yml +7 -0
- rasa/cli/project_templates/finance/data/system/patterns/pattern_search.yml +8 -0
- rasa/cli/project_templates/finance/data/{patterns → system/patterns}/pattern_session_start.yml +0 -1
- rasa/cli/project_templates/finance/domain/{check_balance.yml → accounts/check_balance.yml} +2 -0
- rasa/cli/project_templates/finance/domain/general/assistant_details.yml +12 -0
- rasa/cli/project_templates/finance/domain/general/bot_identity.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/cannot_handle.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/defaults.yml +24 -0
- rasa/cli/project_templates/finance/domain/general/feedback.yml +28 -0
- rasa/cli/project_templates/finance/domain/general/goodbye.yml +7 -0
- rasa/cli/project_templates/finance/domain/general/help.yml +5 -0
- rasa/cli/project_templates/finance/domain/general/human_handoff.yml +30 -0
- rasa/cli/project_templates/finance/domain/general/utils.yml +13 -0
- rasa/cli/project_templates/finance/domain/general/welcome.yml +8 -0
- rasa/cli/project_templates/finance/endpoints.yml +1 -0
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +3 -3
- rasa/cli/project_templates/telco/actions/actions_billing.py +24 -17
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +6 -1
- rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +6 -1
- rasa/cli/project_templates/telco/actions/actions_session_start.py +6 -1
- rasa/cli/project_templates/tutorial/config.yml +2 -1
- rasa/cli/scaffold.py +27 -2
- rasa/cli/train.py +8 -0
- rasa/cli/utils.py +31 -15
- rasa/core/actions/action.py +28 -41
- rasa/core/actions/action_run_slot_rejections.py +1 -1
- rasa/core/channels/development_inspector.py +47 -14
- rasa/core/channels/inspector/dist/assets/{arc-371401b1.js → arc-1ddec37b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-3f126156.js → blockDiagram-38ab4fdb-18af387c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-12f22eb7.js → c4Diagram-3d4e48cf-250127a3.js} +1 -1
- rasa/core/channels/inspector/dist/assets/channel-59f6d54b.js +1 -0
- rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-03b1d386.js → classDiagram-70f12bd4-c3388b34.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-84f69d63.js → classDiagram-v2-f2320105-9c893a82.js} +1 -1
- rasa/core/channels/inspector/dist/assets/clone-26177ddb.js +1 -0
- rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-ca47fd38.js → createText-2e5e7dd3-c111213b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-f837ca8a.js → edges-e0da2a9e-812a729d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-8717ac54.js → erDiagram-9861fffd-fd5051bc.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-94f38b83.js → flowDb-956e92f1-3287ac02.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-b616f9fb.js → flowDiagram-66a62f08-692fb0b2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-29c03f5a.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-f5d24bb8.js → flowchart-elk-definition-4a651766-008376f1.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-b43ba8d9.js → ganttDiagram-c361ad54-df330a69.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-c3aafaa5.js → gitGraphDiagram-72cf32ee-e03676fb.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{graph-0d0a2c10.js → graph-46fad2ba.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-3862675e-58ea0305.js → index-3862675e-a484ac55.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-cce6f8a1.js → index-a003633f.js} +179 -179
- rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-b8f60461.js → infoDiagram-f8f76790-3f9e6ec2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-95be5545.js → journeyDiagram-49397b02-79f72383.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-da885b9b.js → layout-aad098e5.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-f1c817d3.js → line-219ab7ae.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-d42801e6.js → linear-2cddbe62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-a38923a6.js → mindmap-definition-fc14e90a-1d41ed99.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-ca6e71e9.js → pieDiagram-8a3498a8-cc496ee8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-b290dae9.js → quadrantDiagram-120e2f19-84d32884.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-03f02ceb.js → requirementDiagram-deff3bca-c0deb984.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-c49eee40.js → sankeyDiagram-04a897e0-b9d7fd62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-b2cd6a3d.js → sequenceDiagram-704730f1-7d517565.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-e53a2028.js → stateDiagram-587899a1-98ef9b27.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-e1982a03.js → stateDiagram-v2-d93cdb3a-cee70748.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-d0226ca5.js → styles-6aaf32cf-3f9d1c96.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9a916d00-0e21dc00.js → styles-9a916d00-67471923.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-c10674c1-9588494e.js → styles-c10674c1-bd093fb7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-be478d4f.js → svgDrawCommon-08f97a94-675794e8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-74631749.js → timeline-definition-85554ec2-0ac67617.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-a043552f.js → xychartDiagram-e933f94c-c018dc37.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +2 -2
- rasa/core/channels/inspector/index.html +1 -1
- rasa/core/channels/inspector/package.json +4 -3
- rasa/core/channels/inspector/src/App.tsx +53 -7
- rasa/core/channels/inspector/src/components/Chat.tsx +3 -2
- rasa/core/channels/inspector/src/components/DiagramFlow.tsx +1 -1
- rasa/core/channels/inspector/src/components/LatencyDisplay.tsx +268 -0
- rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +6 -2
- rasa/core/channels/inspector/src/helpers/audio/audiostream.ts +8 -3
- rasa/core/channels/inspector/src/types.ts +8 -0
- rasa/core/channels/inspector/yarn.lock +12 -12
- rasa/core/channels/studio_chat.py +119 -34
- rasa/core/channels/voice_ready/twilio_voice.py +1 -1
- rasa/core/channels/voice_stream/asr/asr_engine.py +5 -1
- rasa/core/channels/voice_stream/asr/deepgram.py +5 -0
- rasa/core/channels/voice_stream/audiocodes.py +16 -8
- rasa/core/channels/voice_stream/browser_audio.py +39 -4
- rasa/core/channels/voice_stream/call_state.py +13 -2
- rasa/core/channels/voice_stream/genesys.py +16 -13
- rasa/core/channels/voice_stream/jambonz.py +14 -12
- rasa/core/channels/voice_stream/twilio_media_streams.py +14 -13
- rasa/core/channels/voice_stream/util.py +11 -1
- rasa/core/channels/voice_stream/voice_channel.py +108 -29
- rasa/core/nlg/callback.py +1 -1
- rasa/core/nlg/contextual_response_rephraser.py +19 -9
- rasa/core/nlg/generator.py +21 -5
- rasa/core/nlg/response.py +43 -6
- rasa/core/nlg/translate.py +8 -0
- rasa/core/policies/enterprise_search_policy.py +16 -21
- rasa/dialogue_understanding/commands/correct_slots_command.py +38 -10
- rasa/dialogue_understanding/generator/command_generator.py +5 -5
- rasa/dialogue_understanding/generator/command_parser.py +9 -13
- rasa/dialogue_understanding/processor/command_processor.py +149 -55
- rasa/dialogue_understanding/stack/utils.py +13 -3
- rasa/dialogue_understanding_test/du_test_schema.yml +3 -3
- rasa/dialogue_understanding_test/validation.py +9 -10
- rasa/e2e_test/e2e_config.py +18 -11
- rasa/e2e_test/e2e_test_schema.yml +3 -3
- rasa/e2e_test/utils/validation.py +17 -19
- rasa/engine/validation.py +86 -91
- rasa/exceptions.py +26 -1
- rasa/model_manager/model_api.py +2 -2
- rasa/model_manager/socket_bridge.py +8 -2
- rasa/shared/providers/_configs/default_litellm_client_config.py +3 -7
- rasa/shared/utils/cli.py +2 -0
- rasa/shared/utils/common.py +2 -1
- rasa/shared/utils/health_check/health_check.py +10 -14
- rasa/studio/upload.py +6 -2
- rasa/studio/utils.py +33 -22
- rasa/telemetry.py +95 -22
- rasa/utils/licensing.py +21 -10
- rasa/utils/log_utils.py +1 -1
- rasa/utils/tensorflow/transformer.py +3 -3
- rasa/validator.py +7 -5
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/METADATA +7 -7
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/RECORD +242 -203
- rasa/builder/create_openai_vector_store.py +0 -228
- rasa/builder/llm-helper-schema.json +0 -69
- rasa/builder/llm_context.py +0 -81
- rasa/builder/llm_helper_prompt.jinja2 +0 -245
- rasa/cli/project_templates/finance/data/nlu.yml +0 -29
- rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +0 -5
- rasa/cli/project_templates/finance/domain/default_flows.yml +0 -33
- rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +0 -57
- rasa/cli/project_templates/finance/tests/conversation_repair/cancellations.yml +0 -12
- rasa/cli/project_templates/finance/tests/conversation_repair/cannot_handle.yml +0 -7
- rasa/cli/project_templates/finance/tests/conversation_repair/chitchat.yml +0 -7
- rasa/cli/project_templates/finance/tests/conversation_repair/clarification.yml +0 -9
- rasa/cli/project_templates/finance/tests/conversation_repair/completion.yml +0 -18
- rasa/cli/project_templates/finance/tests/conversation_repair/corrections.yml +0 -17
- rasa/cli/project_templates/finance/tests/conversation_repair/digressions.yml +0 -32
- rasa/cli/project_templates/finance/tests/conversation_repair/human_handoff.yml +0 -21
- rasa/cli/project_templates/finance/tests/conversation_repair/skipping_collect_steps.yml +0 -16
- rasa/cli/project_templates/finance/tests/demo_scripts/main.yml +0 -16
- rasa/cli/project_templates/finance/tests/happy_paths/balance_verification.yml +0 -15
- rasa/cli/project_templates/finance/tests/happy_paths/banking_questions.yml +0 -12
- rasa/cli/project_templates/finance/tests/happy_paths/card_blocking.yml +0 -52
- rasa/cli/project_templates/finance/tests/happy_paths/money_transfer.yml +0 -136
- rasa/cli/project_templates/finance/tests/happy_paths/payee_management.yml +0 -27
- rasa/cli/project_templates/finance/tests/happy_paths/user_greeted.yml +0 -5
- rasa/cli/project_templates/plain/config.yml +0 -17
- rasa/cli/project_templates/plain/data/patterns/pattern_session_start.yml +0 -7
- rasa/cli/project_templates/plain/domain.yml +0 -5
- rasa/core/channels/inspector/dist/assets/channel-f1efda17.js +0 -1
- rasa/core/channels/inspector/dist/assets/clone-fdf164e2.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-7d7a1629.js +0 -1
- rasa/shared/importers/static.py +0 -63
- /rasa/{cli/project_templates/plain/actions → builder/copilot}/__init__.py +0 -0
- /rasa/builder/{inkeep-rag-response-schema.json → document_retrieval/inkeep-rag-response-schema.json} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_process_immediate_payment.py → transfers/action_process_immediate_payment.py} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_schedule_payment.py → transfers/action_schedule_payment.py} +0 -0
- /rasa/cli/project_templates/finance/actions/{action_validate_payment_date.py → transfers/action_validate_payment_date.py} +0 -0
- /rasa/cli/project_templates/finance/data/{flows → cards}/block_card.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → cards}/select_card.yml +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/accounts.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/advisors.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/appointments.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/branches.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/cards.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/payees.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/transactions.json +0 -0
- /rasa/cli/project_templates/finance/data/{source → system/source}/users.json +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/add_payee.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/list_payees.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/remove_payee.yml +0 -0
- /rasa/cli/project_templates/finance/data/{flows → transfers}/transfer_money.yml +0 -0
- /rasa/cli/project_templates/finance/domain/{block_card.yml → cards/block_card.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{select_card.yml → cards/select_card.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{add_payee.yml → transfers/add_payee.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{list_payees.yml → transfers/list_payees.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{remove_payee.yml → transfers/remove_payee.yml} +0 -0
- /rasa/cli/project_templates/finance/domain/{transfer_money.yml → transfers/transfer_money.yml} +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1a20.dist-info}/entry_points.txt +0 -0
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Script to create and populate OpenAI vector store with Rasa documentation."""
|
|
3
|
-
|
|
4
|
-
import json
|
|
5
|
-
import sys
|
|
6
|
-
from pathlib import Path
|
|
7
|
-
from typing import Dict, List
|
|
8
|
-
|
|
9
|
-
import openai
|
|
10
|
-
import structlog
|
|
11
|
-
|
|
12
|
-
structlogger = structlog.get_logger()
|
|
13
|
-
|
|
14
|
-
# Configuration
|
|
15
|
-
DOCS_DIR = "rasa_docs_md"
|
|
16
|
-
FILE_IDS_FILE = "file_ids.json"
|
|
17
|
-
MARKDOWN_TO_URL_FILE = "markdown_to_url.json"
|
|
18
|
-
ASSISTANT_NAME = "Rasa Docs Assistant"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def load_url_mapping() -> Dict[str, str]:
|
|
22
|
-
"""Load the markdown filename to URL mapping."""
|
|
23
|
-
markdown_to_url_file = Path(MARKDOWN_TO_URL_FILE)
|
|
24
|
-
|
|
25
|
-
if not markdown_to_url_file.exists():
|
|
26
|
-
raise FileNotFoundError(
|
|
27
|
-
f"URL mapping file {markdown_to_url_file} not found. "
|
|
28
|
-
"Please run scrape_rasa_docs.py first."
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
with open(markdown_to_url_file, "r") as f:
|
|
32
|
-
return json.load(f)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def get_markdown_files(docs_dir: str = DOCS_DIR) -> List[Path]:
|
|
36
|
-
"""Get all markdown files in the docs directory."""
|
|
37
|
-
docs_path = Path(docs_dir)
|
|
38
|
-
|
|
39
|
-
if not docs_path.exists():
|
|
40
|
-
raise FileNotFoundError(f"Documentation directory {docs_dir} not found")
|
|
41
|
-
|
|
42
|
-
md_files = list(docs_path.glob("*.md"))
|
|
43
|
-
if not md_files:
|
|
44
|
-
raise FileNotFoundError(f"No markdown files found in {docs_dir}")
|
|
45
|
-
|
|
46
|
-
structlogger.info("vector_store.found_files", count=len(md_files))
|
|
47
|
-
return md_files
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def load_or_upload_files(client: openai.OpenAI) -> List[Dict[str, str]]:
|
|
51
|
-
"""Load existing file IDs or upload files to OpenAI."""
|
|
52
|
-
file_ids_file = Path(FILE_IDS_FILE)
|
|
53
|
-
|
|
54
|
-
if file_ids_file.exists():
|
|
55
|
-
structlogger.info("vector_store.loading_existing_files")
|
|
56
|
-
with open(file_ids_file, "r") as f:
|
|
57
|
-
return json.load(f)
|
|
58
|
-
|
|
59
|
-
return upload_files(client)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def upload_files(client: openai.OpenAI) -> List[Dict[str, str]]:
|
|
63
|
-
"""Upload markdown files to OpenAI."""
|
|
64
|
-
structlogger.info("vector_store.uploading_files")
|
|
65
|
-
|
|
66
|
-
md_files = get_markdown_files()
|
|
67
|
-
uploaded_files = []
|
|
68
|
-
|
|
69
|
-
for md_file in md_files:
|
|
70
|
-
try:
|
|
71
|
-
with open(md_file, "rb") as f:
|
|
72
|
-
uploaded = client.files.create(file=f, purpose="assistants")
|
|
73
|
-
|
|
74
|
-
file_info = {"file_id": uploaded.id, "file_name": md_file.name}
|
|
75
|
-
uploaded_files.append(file_info)
|
|
76
|
-
|
|
77
|
-
structlogger.info(
|
|
78
|
-
"vector_store.file_uploaded",
|
|
79
|
-
file_name=md_file.name,
|
|
80
|
-
file_id=uploaded.id,
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
except Exception as e:
|
|
84
|
-
structlogger.error(
|
|
85
|
-
"vector_store.upload_failed", file_name=md_file.name, error=str(e)
|
|
86
|
-
)
|
|
87
|
-
raise
|
|
88
|
-
|
|
89
|
-
# Save file IDs for future use
|
|
90
|
-
with open(FILE_IDS_FILE, "w") as f:
|
|
91
|
-
json.dump(uploaded_files, f, indent=2)
|
|
92
|
-
|
|
93
|
-
structlogger.info("vector_store.upload_complete", count=len(uploaded_files))
|
|
94
|
-
return uploaded_files
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
def prepare_files_with_metadata(files: List[Dict[str, str]]) -> List[Dict[str, str]]:
|
|
98
|
-
"""Prepare files with URL metadata."""
|
|
99
|
-
url_mapping = load_url_mapping()
|
|
100
|
-
|
|
101
|
-
files_with_metadata = []
|
|
102
|
-
for file_info in files:
|
|
103
|
-
file_name = file_info["file_name"]
|
|
104
|
-
url = url_mapping.get(file_name, "")
|
|
105
|
-
|
|
106
|
-
if not url:
|
|
107
|
-
structlogger.warning("vector_store.missing_url", file_name=file_name)
|
|
108
|
-
|
|
109
|
-
files_with_metadata.append(
|
|
110
|
-
{"file_id": file_info["file_id"], "file_name": file_name, "url": url}
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
return files_with_metadata
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def create_vector_store(
|
|
117
|
-
client: openai.OpenAI, files_with_metadata: List[Dict[str, str]]
|
|
118
|
-
) -> str:
|
|
119
|
-
"""Create vector store and add files."""
|
|
120
|
-
try:
|
|
121
|
-
# Create vector store
|
|
122
|
-
structlogger.info("vector_store.creating")
|
|
123
|
-
vector_store = client.vector_stores.create(name=ASSISTANT_NAME)
|
|
124
|
-
|
|
125
|
-
# Add files to vector store
|
|
126
|
-
for file_meta in files_with_metadata:
|
|
127
|
-
try:
|
|
128
|
-
client.vector_stores.files.create(
|
|
129
|
-
vector_store_id=vector_store.id,
|
|
130
|
-
file_id=file_meta["file_id"],
|
|
131
|
-
attributes={"url": file_meta["url"]},
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
structlogger.info(
|
|
135
|
-
"vector_store.file_added",
|
|
136
|
-
file_name=file_meta["file_name"],
|
|
137
|
-
url=file_meta["url"],
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
except Exception as e:
|
|
141
|
-
structlogger.error(
|
|
142
|
-
"vector_store.file_add_failed",
|
|
143
|
-
file_name=file_meta["file_name"],
|
|
144
|
-
error=str(e),
|
|
145
|
-
)
|
|
146
|
-
# Continue with other files
|
|
147
|
-
|
|
148
|
-
structlogger.info(
|
|
149
|
-
"vector_store.created",
|
|
150
|
-
vector_store_id=vector_store.id,
|
|
151
|
-
files_count=len(files_with_metadata),
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
return vector_store.id
|
|
155
|
-
|
|
156
|
-
except Exception as e:
|
|
157
|
-
structlogger.error("vector_store.creation_failed", error=str(e))
|
|
158
|
-
raise
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
def run_vector_store_creation() -> str:
|
|
162
|
-
"""Run the complete vector store creation process."""
|
|
163
|
-
client = openai.OpenAI()
|
|
164
|
-
|
|
165
|
-
try:
|
|
166
|
-
# Load or upload files
|
|
167
|
-
files = load_or_upload_files(client)
|
|
168
|
-
|
|
169
|
-
# Prepare files with metadata
|
|
170
|
-
files_with_metadata = prepare_files_with_metadata(files)
|
|
171
|
-
|
|
172
|
-
# Create vector store
|
|
173
|
-
vector_store_id = create_vector_store(client, files_with_metadata)
|
|
174
|
-
|
|
175
|
-
print("\n🎉 Vector store created successfully!")
|
|
176
|
-
print(f"Vector store ID: {vector_store_id}")
|
|
177
|
-
print(f"Files processed: {len(files_with_metadata)}")
|
|
178
|
-
|
|
179
|
-
return vector_store_id
|
|
180
|
-
|
|
181
|
-
except Exception as e:
|
|
182
|
-
structlogger.error("vector_store.process_failed", error=str(e))
|
|
183
|
-
print(f"\n❌ Vector store creation failed: {e}")
|
|
184
|
-
raise
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
def setup_logging():
|
|
188
|
-
"""Setup basic logging."""
|
|
189
|
-
import logging.config
|
|
190
|
-
|
|
191
|
-
logging_config = {
|
|
192
|
-
"version": 1,
|
|
193
|
-
"disable_existing_loggers": False,
|
|
194
|
-
"formatters": {
|
|
195
|
-
"standard": {"format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s"},
|
|
196
|
-
},
|
|
197
|
-
"handlers": {
|
|
198
|
-
"default": {
|
|
199
|
-
"level": "INFO",
|
|
200
|
-
"formatter": "standard",
|
|
201
|
-
"class": "logging.StreamHandler",
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
"loggers": {"": {"handlers": ["default"], "level": "INFO", "propagate": False}},
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
logging.config.dictConfig(logging_config)
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
def main():
|
|
211
|
-
"""Main entry point for the script."""
|
|
212
|
-
setup_logging()
|
|
213
|
-
|
|
214
|
-
try:
|
|
215
|
-
run_vector_store_creation()
|
|
216
|
-
return 0
|
|
217
|
-
|
|
218
|
-
except KeyboardInterrupt:
|
|
219
|
-
print("\n⏹️ Process interrupted by user")
|
|
220
|
-
return 1
|
|
221
|
-
|
|
222
|
-
except Exception as e:
|
|
223
|
-
print(f"\n💥 Unexpected error: {e}")
|
|
224
|
-
return 1
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if __name__ == "__main__":
|
|
228
|
-
sys.exit(main())
|
|
@@ -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", "content"],
|
|
39
|
-
"properties": {
|
|
40
|
-
"type": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"enum": ["file"]
|
|
43
|
-
},
|
|
44
|
-
"file": {
|
|
45
|
-
"type": "string"
|
|
46
|
-
},
|
|
47
|
-
"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/llm_context.py
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from typing import Optional
|
|
3
|
-
|
|
4
|
-
from rasa.shared.core.constants import DEFAULT_SLOT_NAMES
|
|
5
|
-
from rasa.shared.core.events import (
|
|
6
|
-
ActionExecuted,
|
|
7
|
-
BotUttered,
|
|
8
|
-
FlowCompleted,
|
|
9
|
-
FlowStarted,
|
|
10
|
-
SlotSet,
|
|
11
|
-
UserUttered,
|
|
12
|
-
)
|
|
13
|
-
from rasa.shared.core.trackers import DialogueStateTracker
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def tracker_as_llm_context(tracker: Optional[DialogueStateTracker]) -> str:
|
|
17
|
-
"""Convert a tracker to a string that can be used as context for the LLM."""
|
|
18
|
-
if not tracker or not tracker.events:
|
|
19
|
-
return "No conversation history available."
|
|
20
|
-
|
|
21
|
-
context_parts = []
|
|
22
|
-
current_turn = []
|
|
23
|
-
|
|
24
|
-
for event in tracker.events:
|
|
25
|
-
if isinstance(event, UserUttered):
|
|
26
|
-
if current_turn:
|
|
27
|
-
context_parts.append(" | ".join(current_turn))
|
|
28
|
-
current_turn = []
|
|
29
|
-
current_turn.append(f"User: {event.text}")
|
|
30
|
-
if event.intent:
|
|
31
|
-
current_turn.append(f"Intent: {event.intent.get('name')}")
|
|
32
|
-
if event.entities:
|
|
33
|
-
current_turn.append(
|
|
34
|
-
f"Entities: {[e.get('entity') for e in event.entities]}"
|
|
35
|
-
)
|
|
36
|
-
if event.commands:
|
|
37
|
-
current_turn.append(
|
|
38
|
-
f"Commands: {[cmd.get('name') for cmd in event.commands]}"
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
elif isinstance(event, BotUttered):
|
|
42
|
-
if event.text:
|
|
43
|
-
current_turn.append(f"Bot: {event.text}")
|
|
44
|
-
|
|
45
|
-
elif isinstance(event, ActionExecuted):
|
|
46
|
-
current_turn.append(f"Action: {event.action_name}")
|
|
47
|
-
if event.confidence:
|
|
48
|
-
current_turn.append(f"Confidence: {event.confidence:.2f}")
|
|
49
|
-
|
|
50
|
-
elif isinstance(event, SlotSet) and event.key not in DEFAULT_SLOT_NAMES:
|
|
51
|
-
current_turn.append(f"Slot Set: {event.key}={event.value}")
|
|
52
|
-
|
|
53
|
-
elif isinstance(event, FlowStarted):
|
|
54
|
-
current_turn.append(f"# Flow Started: {event.flow_id}")
|
|
55
|
-
|
|
56
|
-
elif isinstance(event, FlowCompleted):
|
|
57
|
-
current_turn.append(f"# Flow Completed: {event.flow_id}")
|
|
58
|
-
|
|
59
|
-
if current_turn:
|
|
60
|
-
context_parts.append(" | ".join(current_turn))
|
|
61
|
-
|
|
62
|
-
# Add final state information
|
|
63
|
-
context_parts.append("\nCurrent State:")
|
|
64
|
-
context_parts.append(f"Latest Message: {tracker.latest_message.text or '-'}")
|
|
65
|
-
|
|
66
|
-
# Add active flows from stack
|
|
67
|
-
if tracker.active_flow:
|
|
68
|
-
context_parts.append(f"Active Flow: {tracker.active_flow}")
|
|
69
|
-
if tracker.stack:
|
|
70
|
-
context_parts.append(f"Flow Stack: {json.dumps(tracker.stack.as_dict())}")
|
|
71
|
-
|
|
72
|
-
# Add slot values that are not None
|
|
73
|
-
non_empty_slots = {
|
|
74
|
-
k: str(v.value)
|
|
75
|
-
for k, v in tracker.slots.items()
|
|
76
|
-
if v is not None and k not in DEFAULT_SLOT_NAMES
|
|
77
|
-
}
|
|
78
|
-
if non_empty_slots:
|
|
79
|
-
context_parts.append(f"Slots: {json.dumps(non_empty_slots)}")
|
|
80
|
-
|
|
81
|
-
return "\n".join(context_parts)
|
|
@@ -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 bot_logs %}
|
|
26
|
-
**Bot Logs:**
|
|
27
|
-
```
|
|
28
|
-
{{ bot_logs }}
|
|
29
|
-
```
|
|
30
|
-
{% endif %}
|
|
31
|
-
|
|
32
|
-
{% if chat_bot_files %}
|
|
33
|
-
**Bot Configuration Files:**
|
|
34
|
-
{% for file_name, file_content in chat_bot_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": "domain.yml",
|
|
186
|
-
"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": "domain.yml",
|
|
216
|
-
"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": "flows.yml",
|
|
221
|
-
"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": "data/nlu.yml",
|
|
226
|
-
"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.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
version: "3.1"
|
|
2
|
-
|
|
3
|
-
nlu:
|
|
4
|
-
- intent: greet
|
|
5
|
-
examples: |
|
|
6
|
-
- Hello!
|
|
7
|
-
- Hi there
|
|
8
|
-
- Good morning
|
|
9
|
-
- Good afternoon
|
|
10
|
-
- Good evening
|
|
11
|
-
- Hey!
|
|
12
|
-
- Hi
|
|
13
|
-
- Greetings
|
|
14
|
-
- How are you?
|
|
15
|
-
- What's up?
|
|
16
|
-
|
|
17
|
-
- intent: help
|
|
18
|
-
examples: |
|
|
19
|
-
- Who are you?
|
|
20
|
-
- What can you do?
|
|
21
|
-
- How can you assist me?
|
|
22
|
-
- Please list your skills.
|
|
23
|
-
- What services do you provide?
|
|
24
|
-
- Can you explain your capabilities?
|
|
25
|
-
- What do you specialise in?
|
|
26
|
-
- What kind of support can you offer?
|
|
27
|
-
- Can you tell me about your expertise?
|
|
28
|
-
- How do you help users?
|
|
29
|
-
- What tasks are you capable of doing?
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
version: "3.1"
|
|
2
|
-
|
|
3
|
-
intents:
|
|
4
|
-
- welcome
|
|
5
|
-
- help
|
|
6
|
-
|
|
7
|
-
responses:
|
|
8
|
-
utter_greeting:
|
|
9
|
-
- text: "Hey! I'm Rasano, your helpful banking assistant."
|
|
10
|
-
metadata:
|
|
11
|
-
rephrase: True
|
|
12
|
-
utter_help:
|
|
13
|
-
- text: "I am your Banking assistant. I can help you with transferring money, managing authorised payees, checking an account balance, blocking a card, and answering your general finance enquiries"
|
|
14
|
-
metadata:
|
|
15
|
-
rephrase: True
|
|
16
|
-
utter_show_greeting_accordion:
|
|
17
|
-
- custom:
|
|
18
|
-
type: "accordion"
|
|
19
|
-
elements:
|
|
20
|
-
- title: "Money Transfer"
|
|
21
|
-
text: 'I can send money to friends, family, or businesses. You can say, “send $100” or “transfer from my savings account”.'
|
|
22
|
-
- title: "Account Balance Verification"
|
|
23
|
-
text: 'I can check your account balance. For example, “what is my checking balance?” or “how much money do I have?”.'
|
|
24
|
-
- title: "Payee Management"
|
|
25
|
-
text: 'I can help you manage your payees, including adding new payees or listing your existing ones. For instance, “add a new payee” or “show me my payees.”'
|
|
26
|
-
- title: "Card Blocking"
|
|
27
|
-
text: 'I can permanently or temporarily block your card in case it is lost, stolen, or if you are traveling. Tell me, “block my card” or “temporarily disable my card”.'
|
|
28
|
-
- title: "Banking Questions"
|
|
29
|
-
text: 'I can also answer your general finance questions, such as how to dispute a charge or how to increase your credit limit.'
|
|
30
|
-
utter_chitchat:
|
|
31
|
-
- text: "Hello, how can I help you today?"
|
|
32
|
-
metadata:
|
|
33
|
-
rephrase: True
|