rasa-pro 3.13.1a18__py3-none-any.whl → 3.13.3__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/cli/project_templates/defaults.py +25 -3
- rasa/cli/scaffold.py +3 -22
- rasa/core/actions/action.py +2 -4
- rasa/core/channels/studio_chat.py +10 -34
- 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 +9 -4
- rasa/core/channels/voice_stream/jambonz.py +1 -1
- rasa/core/channels/voice_stream/voice_channel.py +7 -0
- rasa/core/nlg/callback.py +1 -1
- rasa/core/policies/enterprise_search_policy.py +9 -8
- rasa/core/policies/flows/flow_executor.py +1 -8
- rasa/dialogue_understanding/commands/correct_slots_command.py +0 -10
- rasa/dialogue_understanding/generator/command_generator.py +5 -5
- rasa/dialogue_understanding/generator/flow_retrieval.py +9 -10
- rasa/dialogue_understanding/processor/command_processor.py +6 -1
- rasa/model_manager/model_api.py +3 -2
- rasa/model_manager/runner_service.py +1 -1
- rasa/model_manager/trainer_service.py +9 -12
- rasa/model_manager/utils.py +29 -1
- rasa/shared/core/domain.py +15 -62
- rasa/shared/core/flows/flow_step.py +1 -7
- rasa/shared/core/flows/yaml_flows_io.py +8 -16
- rasa/shared/core/slots.py +0 -4
- rasa/shared/importers/importer.py +0 -6
- rasa/shared/importers/utils.py +1 -77
- rasa/studio/upload.py +45 -10
- rasa/telemetry.py +1 -2
- rasa/utils/io.py +9 -27
- rasa/utils/json_utils.py +1 -6
- rasa/utils/log_utils.py +1 -5
- rasa/utils/plotting.py +1 -1
- rasa/validator.py +3 -7
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.3.dist-info}/METADATA +8 -9
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.3.dist-info}/RECORD +39 -261
- rasa/builder/README.md +0 -120
- rasa/builder/__init__.py +0 -0
- rasa/builder/config.py +0 -79
- rasa/builder/create_openai_vector_store.py +0 -228
- rasa/builder/exceptions.py +0 -55
- rasa/builder/inkeep-rag-response-schema.json +0 -64
- rasa/builder/inkeep_document_retrieval.py +0 -212
- rasa/builder/llm-helper-schema.json +0 -69
- rasa/builder/llm_context.py +0 -81
- rasa/builder/llm_helper_prompt.jinja2 +0 -245
- rasa/builder/llm_service.py +0 -317
- rasa/builder/logging_utils.py +0 -51
- rasa/builder/main.py +0 -147
- rasa/builder/models.py +0 -225
- rasa/builder/project_generator.py +0 -282
- rasa/builder/scrape_rasa_docs.py +0 -97
- rasa/builder/service.py +0 -742
- rasa/builder/skill_to_bot_prompt.jinja2 +0 -164
- rasa/builder/training_service.py +0 -132
- rasa/builder/validation_service.py +0 -93
- rasa/cli/project_templates/finance/actions/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/action_add_payee.py +0 -47
- rasa/cli/project_templates/finance/actions/action_ask_account.py +0 -50
- rasa/cli/project_templates/finance/actions/action_ask_account_from.py +0 -50
- rasa/cli/project_templates/finance/actions/action_ask_card.py +0 -47
- rasa/cli/project_templates/finance/actions/action_check_balance.py +0 -40
- rasa/cli/project_templates/finance/actions/action_check_card_existence.py +0 -35
- rasa/cli/project_templates/finance/actions/action_check_payee_existence.py +0 -40
- rasa/cli/project_templates/finance/actions/action_check_sufficient_funds.py +0 -41
- rasa/cli/project_templates/finance/actions/action_list_payees.py +0 -45
- rasa/cli/project_templates/finance/actions/action_process_immediate_payment.py +0 -18
- rasa/cli/project_templates/finance/actions/action_remove_payee.py +0 -49
- rasa/cli/project_templates/finance/actions/action_schedule_payment.py +0 -19
- rasa/cli/project_templates/finance/actions/action_session_start.py +0 -69
- rasa/cli/project_templates/finance/actions/action_update_card_status.py +0 -45
- rasa/cli/project_templates/finance/actions/action_validate_payment_date.py +0 -36
- rasa/cli/project_templates/finance/actions/database.py +0 -276
- rasa/cli/project_templates/finance/config.yml +0 -32
- rasa/cli/project_templates/finance/credentials.yml +0 -33
- rasa/cli/project_templates/finance/csvs/accounts.csv +0 -8
- rasa/cli/project_templates/finance/csvs/advisors.csv +0 -7
- rasa/cli/project_templates/finance/csvs/appointments.csv +0 -211
- rasa/cli/project_templates/finance/csvs/branches.csv +0 -10
- rasa/cli/project_templates/finance/csvs/cards.csv +0 -11
- rasa/cli/project_templates/finance/csvs/payees.csv +0 -10
- rasa/cli/project_templates/finance/csvs/transactions.csv +0 -71
- rasa/cli/project_templates/finance/csvs/users.csv +0 -4
- rasa/cli/project_templates/finance/data/flows/add_payee.yml +0 -29
- rasa/cli/project_templates/finance/data/flows/block_card.yml +0 -66
- rasa/cli/project_templates/finance/data/flows/check_balance.yml +0 -9
- rasa/cli/project_templates/finance/data/flows/list_payees.yml +0 -5
- rasa/cli/project_templates/finance/data/flows/remove_payee.yml +0 -21
- rasa/cli/project_templates/finance/data/flows/select_card.yml +0 -12
- rasa/cli/project_templates/finance/data/flows/transfer_money.yml +0 -67
- rasa/cli/project_templates/finance/data/flows/welcome.yml +0 -14
- rasa/cli/project_templates/finance/data/nlu.yml +0 -29
- rasa/cli/project_templates/finance/data/patterns/pattern_chitchat.yml +0 -7
- rasa/cli/project_templates/finance/data/patterns/pattern_completed.yml +0 -6
- rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +0 -5
- rasa/cli/project_templates/finance/data/patterns/pattern_session_start.yml +0 -9
- rasa/cli/project_templates/finance/data/source/accounts.json +0 -51
- rasa/cli/project_templates/finance/data/source/advisors.json +0 -44
- rasa/cli/project_templates/finance/data/source/appointments.json +0 -1474
- rasa/cli/project_templates/finance/data/source/branches.json +0 -47
- rasa/cli/project_templates/finance/data/source/cards.json +0 -72
- rasa/cli/project_templates/finance/data/source/payees.json +0 -74
- rasa/cli/project_templates/finance/data/source/transactions.json +0 -492
- rasa/cli/project_templates/finance/data/source/users.json +0 -29
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/consequences_of_blocking_card.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/reasons_to_block_card.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/recovering_from_card_fraud.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/tips_for_card_security.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/what_to_do_if_card_is_lost.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/account_balance_security.txt +0 -7
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/common_balance_inquiries.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/methods_to_check_balance.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/understanding_balance_updates.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/what_to_do_if_balance_is_incorrect.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/benefits_of_authorised_payees.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/common_issues_with_payees.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/general_payee_information.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/payee_management_tips.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/understanding_payee_types.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/common_transfer_errors.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/fees_for_transfers.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/general_transfer_information.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/security_tips_for_transfers.txt +0 -8
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/transfer_processing_times.txt +0 -8
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part1.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part10.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part11.txt +0 -48
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part12.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part13.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part14.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part15.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part16.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part17.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part18.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part19.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part2.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part20.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part21.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part22.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part23.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part24.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part25.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part26.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part27.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part28.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part29.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part3.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part30.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part31.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part32.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part33.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part34.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part35.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part36.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part37.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part38.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part39.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part4.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part40.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part41.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part42.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part43.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part44.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part45.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part46.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part47.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part48.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part49.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part5.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part50.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part51.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part52.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part53.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part54.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part55.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part56.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part57.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part58.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part59.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part6.txt +0 -47
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part60.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part61.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part7.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part8.txt +0 -50
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part9.txt +0 -47
- rasa/cli/project_templates/finance/domain/add_payee.yml +0 -47
- rasa/cli/project_templates/finance/domain/block_card.yml +0 -101
- rasa/cli/project_templates/finance/domain/check_balance.yml +0 -9
- rasa/cli/project_templates/finance/domain/default_actions.yml +0 -16
- rasa/cli/project_templates/finance/domain/default_flows.yml +0 -33
- rasa/cli/project_templates/finance/domain/list_payees.yml +0 -4
- rasa/cli/project_templates/finance/domain/remove_payee.yml +0 -16
- rasa/cli/project_templates/finance/domain/select_card.yml +0 -12
- rasa/cli/project_templates/finance/domain/transfer_money.yml +0 -79
- rasa/cli/project_templates/finance/endpoints.yml +0 -62
- rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +0 -57
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +0 -19
- 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/actions/__init__.py +0 -0
- rasa/cli/project_templates/plain/config.yml +0 -17
- rasa/cli/project_templates/plain/credentials.yml +0 -33
- rasa/cli/project_templates/plain/data/patterns/pattern_session_start.yml +0 -7
- rasa/cli/project_templates/plain/domain.yml +0 -5
- rasa/cli/project_templates/plain/endpoints.yml +0 -58
- rasa/cli/project_templates/telco/actions/__init__.py +0 -0
- rasa/cli/project_templates/telco/actions/actions_billing.py +0 -197
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +0 -43
- rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +0 -23
- rasa/cli/project_templates/telco/actions/actions_session_start.py +0 -13
- rasa/cli/project_templates/telco/config.yml +0 -25
- rasa/cli/project_templates/telco/credentials.yml +0 -33
- rasa/cli/project_templates/telco/csvs/billing.csv +0 -10
- rasa/cli/project_templates/telco/csvs/customers.csv +0 -5
- rasa/cli/project_templates/telco/data/flows/flow_global.yml +0 -5
- rasa/cli/project_templates/telco/data/flows/flow_reboot_router.yml +0 -8
- rasa/cli/project_templates/telco/data/flows/flow_reset_router.yml +0 -7
- rasa/cli/project_templates/telco/data/flows/flow_solve_internet_issue.yml +0 -73
- rasa/cli/project_templates/telco/data/flows/flow_undertand_bill.yml +0 -45
- rasa/cli/project_templates/telco/data/patterns/pattern_completed.yml +0 -7
- rasa/cli/project_templates/telco/data/patterns/pattern_human_handoff.yml +0 -6
- rasa/cli/project_templates/telco/data/patterns/pattern_search.yml +0 -7
- rasa/cli/project_templates/telco/data/patterns/pattern_session_start.yml +0 -9
- rasa/cli/project_templates/telco/docs/reset_vs_rboot_router.txt +0 -1
- rasa/cli/project_templates/telco/docs/restart_router.txt +0 -6
- rasa/cli/project_templates/telco/docs/run_speed_test.txt +0 -6
- rasa/cli/project_templates/telco/domain/domain_global.yml +0 -29
- rasa/cli/project_templates/telco/domain/domain_patterns.yml +0 -17
- rasa/cli/project_templates/telco/domain/domain_reboot_router.yml +0 -20
- rasa/cli/project_templates/telco/domain/domain_reset_router.yml +0 -11
- rasa/cli/project_templates/telco/domain/domain_run_speed_test.yml +0 -24
- rasa/cli/project_templates/telco/domain/domain_solve_internet_issue.yml +0 -74
- rasa/cli/project_templates/telco/domain/domain_undertand_bill.yml +0 -102
- rasa/cli/project_templates/telco/endpoints.yml +0 -60
- rasa/cli/project_templates/telco/prompts/command-generator.jinja2 +0 -57
- rasa/cli/project_templates/telco/tests/e2e_results_failed.yml +0 -62
- rasa/cli/project_templates/telco/tests/e2e_results_passed.yml +0 -130
- rasa/cli/project_templates/telco/tests/e2e_test_cases/billing_test_cases.yml +0 -68
- rasa/cli/project_templates/telco/tests/e2e_test_cases/global_test_cases.yml +0 -13
- rasa/cli/project_templates/telco/tests/e2e_test_cases/internet_slow_test_case.yml +0 -47
- rasa/cli/project_templates/telco/tests/e2e_test_cases/out_of_scope_test_case.yml +0 -21
- rasa/cli/project_templates/telco/tests/e2e_test_cases/patterns_test_cases.yml +0 -15
- rasa/shared/importers/static.py +0 -63
- rasa/utils/openapi.py +0 -144
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.3.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.3.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.3.dist-info}/entry_points.txt +0 -0
|
@@ -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.
|