rasa-pro 3.13.1a18__py3-none-any.whl → 3.13.1.dev1__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/__init__.py +6 -0
- rasa/cli/scaffold.py +3 -22
- rasa/core/actions/action.py +3 -5
- rasa/core/channels/studio_chat.py +10 -34
- rasa/core/policies/enterprise_search_policy.py +8 -7
- rasa/core/policies/flows/flow_executor.py +1 -8
- rasa/dialogue_understanding/generator/flow_retrieval.py +9 -10
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +15 -4
- rasa/dialogue_understanding/generator/llm_command_generator.py +3 -1
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +48 -3
- rasa/dialogue_understanding/generator/single_step/single_step_based_llm_command_generator.py +15 -1
- rasa/hooks.py +55 -0
- rasa/llm_fine_tuning/utils.py +4 -2
- 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/monkey_patches.py +91 -0
- rasa/shared/constants.py +6 -0
- 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/shared/providers/constants.py +10 -0
- rasa/shared/providers/llm/_base_litellm_client.py +14 -4
- rasa/shared/providers/llm/litellm_router_llm_client.py +23 -12
- rasa/shared/providers/llm/llm_client.py +19 -15
- rasa/shared/providers/llm/self_hosted_llm_client.py +23 -18
- rasa/studio/upload.py +45 -10
- rasa/telemetry.py +1 -2
- rasa/tracing/instrumentation/attribute_extractors.py +1 -0
- 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.1.dev1.dist-info}/METADATA +9 -9
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1.dev1.dist-info}/RECORD +44 -265
- 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.1.dev1.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1.dev1.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.1.dev1.dist-info}/entry_points.txt +0 -0
rasa/builder/README.md
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# Rasa Prompt-to-Bot Service
|
|
2
|
-
|
|
3
|
-
A production-ready service that generates Rasa chatbots from natural language descriptions using LLMs.
|
|
4
|
-
|
|
5
|
-
## Architecture
|
|
6
|
-
|
|
7
|
-
The service follows functional programming principles with minimal use of classes:
|
|
8
|
-
|
|
9
|
-
### Core Modules
|
|
10
|
-
|
|
11
|
-
- **`config.py`** - Configuration management using module-level constants
|
|
12
|
-
- **`exceptions.py`** - Custom exception hierarchy for error handling
|
|
13
|
-
- **`models.py`** - Pydantic models for request/response validation
|
|
14
|
-
- **`llm_service.py`** - LLM interactions (minimal class for state management)
|
|
15
|
-
- **`validation_service.py`** - Project validation functions
|
|
16
|
-
- **`training_service.py`** - Model training functions
|
|
17
|
-
- **`project_generator.py`** - Project generation (class for bot files state)
|
|
18
|
-
- **`service.py`** - Main orchestrating service (class for app state)
|
|
19
|
-
- **`logging_utils.py`** - Thread-safe logging utilities
|
|
20
|
-
- **`llm_context.py`** - Conversation context formatting
|
|
21
|
-
- **`main.py`** - Application entry point
|
|
22
|
-
|
|
23
|
-
### Utility Scripts
|
|
24
|
-
|
|
25
|
-
- **`scrape_rasa_docs.py`** - Documentation scraping
|
|
26
|
-
- **`create_openai_vector_store.py`** - Documentation indexing
|
|
27
|
-
|
|
28
|
-
## Key Design Principles
|
|
29
|
-
|
|
30
|
-
1. **Functional First**: Use functions for stateless operations
|
|
31
|
-
2. **Minimal Classes**: Classes only when state management is needed
|
|
32
|
-
3. **Configuration**: Environment variables with sensible defaults
|
|
33
|
-
4. **Error Handling**: Structured exception hierarchy
|
|
34
|
-
5. **Type Safety**: Full type annotations and Pydantic validation
|
|
35
|
-
6. **Thread Safety**: Safe concurrent operations
|
|
36
|
-
7. **Resource Management**: Proper cleanup and lifecycle handling
|
|
37
|
-
|
|
38
|
-
## Usage
|
|
39
|
-
|
|
40
|
-
### Running the Service
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
python rasa/builder/main.py
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Environment Configuration
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
# OpenAI Settings
|
|
50
|
-
export OPENAI_MODEL="gpt-4.1-2025-04-14"
|
|
51
|
-
export OPENAI_TEMPERATURE="0.7"
|
|
52
|
-
export OPENAI_VECTOR_STORE_ID="vs_xxxxx"
|
|
53
|
-
export OPENAI_TIMEOUT="30"
|
|
54
|
-
|
|
55
|
-
# Server Settings
|
|
56
|
-
export SERVER_HOST="0.0.0.0"
|
|
57
|
-
export SERVER_PORT="5005"
|
|
58
|
-
export MAX_RETRIES="5"
|
|
59
|
-
export CORS_ORIGINS="http://localhost:3000,https://example.com"
|
|
60
|
-
|
|
61
|
-
# Validation Settings
|
|
62
|
-
export VALIDATION_FAIL_ON_WARNINGS="false"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### API Endpoints
|
|
66
|
-
|
|
67
|
-
- `POST /api/prompt-to-bot` - Generate bot from description
|
|
68
|
-
- `GET /api/bot-data` - Get current bot configuration
|
|
69
|
-
- `PUT /api/bot-data` - Update bot configuration (SSE)
|
|
70
|
-
- `POST /api/llm-builder` - LLM helper for bot development
|
|
71
|
-
- `GET /` - Health check
|
|
72
|
-
|
|
73
|
-
### Documentation Setup
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
# 1. Scrape Rasa documentation
|
|
77
|
-
python rasa/builder/scrape_rasa_docs.py
|
|
78
|
-
|
|
79
|
-
# 2. Create OpenAI vector store
|
|
80
|
-
python rasa/builder/create_openai_vector_store.py
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Benefits of Functional Approach
|
|
84
|
-
|
|
85
|
-
- **Simpler**: Easy to understand and reason about
|
|
86
|
-
- **Testable**: Functions are easier to unit test
|
|
87
|
-
- **Reusable**: Pure functions can be composed
|
|
88
|
-
- **Maintainable**: Clear separation of concerns
|
|
89
|
-
- **Performant**: No unnecessary object overhead
|
|
90
|
-
- **Debuggable**: Clear call stacks and data flow
|
|
91
|
-
|
|
92
|
-
## Error Handling
|
|
93
|
-
|
|
94
|
-
The service uses a structured exception hierarchy:
|
|
95
|
-
|
|
96
|
-
- `PromptToBotError` - Base exception
|
|
97
|
-
- `ValidationError` - Project validation failures
|
|
98
|
-
- `TrainingError` - Model training issues
|
|
99
|
-
- `LLMGenerationError` - LLM API problems
|
|
100
|
-
- `ProjectGenerationError` - Generation retry exhaustion
|
|
101
|
-
- `AgentLoadError` - Agent loading failures
|
|
102
|
-
|
|
103
|
-
## Logging
|
|
104
|
-
|
|
105
|
-
Structured logging with context using `structlog`:
|
|
106
|
-
|
|
107
|
-
```python
|
|
108
|
-
structlogger.info("operation.success", key="value")
|
|
109
|
-
structlogger.error("operation.failed", error=str(e))
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## State Management
|
|
113
|
-
|
|
114
|
-
Only classes that truly need state:
|
|
115
|
-
|
|
116
|
-
1. **`LLMService`** - Caches schemas and manages OpenAI client
|
|
117
|
-
2. **`ProjectGenerator`** - Maintains current bot files
|
|
118
|
-
3. **`BotBuilderService`** - Manages Sanic app and agent state
|
|
119
|
-
|
|
120
|
-
Everything else uses pure functions for maximum simplicity and testability.
|
rasa/builder/__init__.py
DELETED
|
File without changes
|
rasa/builder/config.py
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"""Configuration module for the prompt-to-bot service."""
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
from typing import Any, Dict
|
|
5
|
-
|
|
6
|
-
import importlib_resources
|
|
7
|
-
|
|
8
|
-
from rasa.constants import PACKAGE_NAME
|
|
9
|
-
from rasa.shared.utils.yaml import read_yaml, read_yaml_file
|
|
10
|
-
|
|
11
|
-
# OpenAI Configuration
|
|
12
|
-
OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-4.1-2025-04-14")
|
|
13
|
-
OPENAI_TEMPERATURE = float(os.getenv("OPENAI_TEMPERATURE", "0.7"))
|
|
14
|
-
OPENAI_VECTOR_STORE_ID = os.getenv(
|
|
15
|
-
"OPENAI_VECTOR_STORE_ID", "vs_685123376e288191a005b6b144d3026f"
|
|
16
|
-
)
|
|
17
|
-
OPENAI_MAX_VECTOR_RESULTS = int(os.getenv("OPENAI_MAX_VECTOR_RESULTS", "10"))
|
|
18
|
-
OPENAI_TIMEOUT = int(os.getenv("OPENAI_TIMEOUT", "30"))
|
|
19
|
-
|
|
20
|
-
# Server Configuration
|
|
21
|
-
BUILDER_SERVER_HOST = os.getenv("SERVER_HOST", "0.0.0.0")
|
|
22
|
-
BUILDER_SERVER_PORT = int(os.getenv("SERVER_PORT", "5050"))
|
|
23
|
-
MAX_RETRIES = int(os.getenv("MAX_RETRIES", "5"))
|
|
24
|
-
MAX_LOG_ENTRIES = int(os.getenv("MAX_LOG_ENTRIES", "30"))
|
|
25
|
-
|
|
26
|
-
# CORS Configuration
|
|
27
|
-
_cors_origins_env = os.getenv("CORS_ORIGINS", "*")
|
|
28
|
-
CORS_ORIGINS = _cors_origins_env.split(",") if _cors_origins_env != "*" else ["*"]
|
|
29
|
-
|
|
30
|
-
# Validation Configuration
|
|
31
|
-
VALIDATION_FAIL_ON_WARNINGS = (
|
|
32
|
-
os.getenv("VALIDATION_FAIL_ON_WARNINGS", "false").lower() == "true"
|
|
33
|
-
)
|
|
34
|
-
VALIDATION_MAX_HISTORY = None # Could be configured if needed
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def get_default_config(assistant_id: str) -> Dict[str, Any]:
|
|
38
|
-
"""Get default Rasa configuration."""
|
|
39
|
-
base_config = read_yaml_file(
|
|
40
|
-
str(
|
|
41
|
-
importlib_resources.files(PACKAGE_NAME).joinpath(
|
|
42
|
-
"cli/project_templates/default/config.yml"
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
if not isinstance(base_config, dict):
|
|
48
|
-
raise ValueError("Base config is not a dictionary")
|
|
49
|
-
|
|
50
|
-
base_config["assistant_id"] = assistant_id
|
|
51
|
-
|
|
52
|
-
return base_config
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def get_default_endpoints() -> Dict[str, Any]:
|
|
56
|
-
"""Get default endpoints configuration."""
|
|
57
|
-
endpoints_config = read_yaml_file(
|
|
58
|
-
str(
|
|
59
|
-
importlib_resources.files(PACKAGE_NAME).joinpath(
|
|
60
|
-
"cli/project_templates/default/endpoints.yml"
|
|
61
|
-
)
|
|
62
|
-
)
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
if not isinstance(endpoints_config, dict):
|
|
66
|
-
raise ValueError("Endpoints config is not a dictionary")
|
|
67
|
-
|
|
68
|
-
return endpoints_config
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def get_default_credentials() -> Dict[str, Any]:
|
|
72
|
-
"""Get default credentials configuration."""
|
|
73
|
-
default_credentials_yaml = """
|
|
74
|
-
studio_chat:
|
|
75
|
-
user_message_evt: "user_message"
|
|
76
|
-
bot_message_evt: "bot_message"
|
|
77
|
-
session_persistence: true
|
|
78
|
-
"""
|
|
79
|
-
return read_yaml(default_credentials_yaml)
|
|
@@ -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())
|
rasa/builder/exceptions.py
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"""Custom exceptions for the prompt-to-bot service."""
|
|
2
|
-
|
|
3
|
-
from typing import Any, Optional
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class PromptToBotError(Exception):
|
|
7
|
-
"""Base exception for prompt-to-bot service."""
|
|
8
|
-
|
|
9
|
-
pass
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class ValidationError(PromptToBotError):
|
|
13
|
-
"""Raised when Rasa project validation fails."""
|
|
14
|
-
|
|
15
|
-
def __init__(self, message: str, validation_logs: Optional[Any] = None):
|
|
16
|
-
super().__init__(message)
|
|
17
|
-
self.validation_logs = validation_logs
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class TrainingError(PromptToBotError):
|
|
21
|
-
"""Raised when model training fails."""
|
|
22
|
-
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class LLMGenerationError(PromptToBotError):
|
|
27
|
-
"""Raised when LLM generation fails."""
|
|
28
|
-
|
|
29
|
-
pass
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class DocumentRetrievalError(PromptToBotError):
|
|
33
|
-
"""Raised when document retrieval fails."""
|
|
34
|
-
|
|
35
|
-
pass
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class SchemaValidationError(PromptToBotError):
|
|
39
|
-
"""Raised when schema validation fails."""
|
|
40
|
-
|
|
41
|
-
pass
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class AgentLoadError(PromptToBotError):
|
|
45
|
-
"""Raised when agent loading fails."""
|
|
46
|
-
|
|
47
|
-
pass
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class ProjectGenerationError(PromptToBotError):
|
|
51
|
-
"""Raised when project generation fails after retries."""
|
|
52
|
-
|
|
53
|
-
def __init__(self, message: str, attempts: int):
|
|
54
|
-
super().__init__(f"{message} (failed after {attempts} attempts)")
|
|
55
|
-
self.attempts = attempts
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"content": {
|
|
6
|
-
"type": "array",
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"properties": {
|
|
10
|
-
"type": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"source": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"content": {
|
|
17
|
-
"type": "array",
|
|
18
|
-
"items": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"properties": {
|
|
21
|
-
"type": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"media_type": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"text": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
"data": {
|
|
31
|
-
"type": "string"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"type": {
|
|
37
|
-
"type": "string"
|
|
38
|
-
},
|
|
39
|
-
"media_type": {
|
|
40
|
-
"type": "string"
|
|
41
|
-
},
|
|
42
|
-
"data": {
|
|
43
|
-
"type": "string"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"title": {
|
|
48
|
-
"type": "string"
|
|
49
|
-
},
|
|
50
|
-
"context": {
|
|
51
|
-
"type": "string"
|
|
52
|
-
},
|
|
53
|
-
"record_type": {
|
|
54
|
-
"type": "string"
|
|
55
|
-
},
|
|
56
|
-
"url": {
|
|
57
|
-
"type": "string"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"required": ["content"]
|
|
64
|
-
}
|