rasa-pro 3.13.1a17__py3-none-any.whl → 3.13.2__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.

Files changed (260) hide show
  1. rasa/cli/scaffold.py +3 -22
  2. rasa/core/actions/action.py +3 -5
  3. rasa/core/actions/direct_custom_actions_executor.py +8 -15
  4. rasa/core/channels/studio_chat.py +10 -34
  5. rasa/core/channels/voice_stream/asr/asr_engine.py +5 -1
  6. rasa/core/channels/voice_stream/asr/deepgram.py +5 -0
  7. rasa/core/channels/voice_stream/audiocodes.py +9 -4
  8. rasa/core/channels/voice_stream/jambonz.py +1 -1
  9. rasa/core/channels/voice_stream/voice_channel.py +7 -0
  10. rasa/core/policies/enterprise_search_policy.py +9 -8
  11. rasa/core/policies/flows/flow_executor.py +1 -8
  12. rasa/dialogue_understanding/commands/correct_slots_command.py +0 -10
  13. rasa/dialogue_understanding/generator/command_generator.py +5 -5
  14. rasa/dialogue_understanding/generator/flow_retrieval.py +9 -10
  15. rasa/dialogue_understanding/processor/command_processor.py +6 -1
  16. rasa/model_manager/model_api.py +3 -2
  17. rasa/model_manager/runner_service.py +1 -1
  18. rasa/model_manager/trainer_service.py +9 -12
  19. rasa/model_manager/utils.py +29 -1
  20. rasa/shared/core/domain.py +15 -62
  21. rasa/shared/core/flows/flow_step.py +1 -7
  22. rasa/shared/core/flows/yaml_flows_io.py +8 -16
  23. rasa/shared/core/slots.py +0 -4
  24. rasa/shared/importers/importer.py +0 -6
  25. rasa/shared/importers/utils.py +1 -77
  26. rasa/studio/upload.py +45 -10
  27. rasa/telemetry.py +1 -2
  28. rasa/utils/io.py +9 -27
  29. rasa/utils/json_utils.py +1 -6
  30. rasa/utils/log_utils.py +1 -5
  31. rasa/utils/plotting.py +1 -1
  32. rasa/validator.py +3 -7
  33. rasa/version.py +1 -1
  34. {rasa_pro-3.13.1a17.dist-info → rasa_pro-3.13.2.dist-info}/METADATA +8 -9
  35. {rasa_pro-3.13.1a17.dist-info → rasa_pro-3.13.2.dist-info}/RECORD +38 -260
  36. rasa/builder/README.md +0 -120
  37. rasa/builder/__init__.py +0 -0
  38. rasa/builder/config.py +0 -79
  39. rasa/builder/create_openai_vector_store.py +0 -228
  40. rasa/builder/exceptions.py +0 -55
  41. rasa/builder/inkeep-rag-response-schema.json +0 -64
  42. rasa/builder/inkeep_document_retrieval.py +0 -212
  43. rasa/builder/llm-helper-schema.json +0 -69
  44. rasa/builder/llm_context.py +0 -81
  45. rasa/builder/llm_helper_prompt.jinja2 +0 -245
  46. rasa/builder/llm_service.py +0 -317
  47. rasa/builder/logging_utils.py +0 -51
  48. rasa/builder/main.py +0 -147
  49. rasa/builder/models.py +0 -225
  50. rasa/builder/project_generator.py +0 -282
  51. rasa/builder/scrape_rasa_docs.py +0 -97
  52. rasa/builder/service.py +0 -742
  53. rasa/builder/skill_to_bot_prompt.jinja2 +0 -164
  54. rasa/builder/training_service.py +0 -132
  55. rasa/builder/validation_service.py +0 -93
  56. rasa/cli/project_templates/finance/actions/__init__.py +0 -0
  57. rasa/cli/project_templates/finance/actions/action_add_payee.py +0 -47
  58. rasa/cli/project_templates/finance/actions/action_ask_account.py +0 -50
  59. rasa/cli/project_templates/finance/actions/action_ask_account_from.py +0 -50
  60. rasa/cli/project_templates/finance/actions/action_ask_card.py +0 -47
  61. rasa/cli/project_templates/finance/actions/action_check_balance.py +0 -40
  62. rasa/cli/project_templates/finance/actions/action_check_card_existence.py +0 -35
  63. rasa/cli/project_templates/finance/actions/action_check_payee_existence.py +0 -40
  64. rasa/cli/project_templates/finance/actions/action_check_sufficient_funds.py +0 -41
  65. rasa/cli/project_templates/finance/actions/action_list_payees.py +0 -45
  66. rasa/cli/project_templates/finance/actions/action_process_immediate_payment.py +0 -18
  67. rasa/cli/project_templates/finance/actions/action_remove_payee.py +0 -49
  68. rasa/cli/project_templates/finance/actions/action_schedule_payment.py +0 -19
  69. rasa/cli/project_templates/finance/actions/action_session_start.py +0 -69
  70. rasa/cli/project_templates/finance/actions/action_update_card_status.py +0 -45
  71. rasa/cli/project_templates/finance/actions/action_validate_payment_date.py +0 -36
  72. rasa/cli/project_templates/finance/actions/database.py +0 -276
  73. rasa/cli/project_templates/finance/config.yml +0 -32
  74. rasa/cli/project_templates/finance/credentials.yml +0 -33
  75. rasa/cli/project_templates/finance/csvs/accounts.csv +0 -8
  76. rasa/cli/project_templates/finance/csvs/advisors.csv +0 -7
  77. rasa/cli/project_templates/finance/csvs/appointments.csv +0 -211
  78. rasa/cli/project_templates/finance/csvs/branches.csv +0 -10
  79. rasa/cli/project_templates/finance/csvs/cards.csv +0 -11
  80. rasa/cli/project_templates/finance/csvs/payees.csv +0 -10
  81. rasa/cli/project_templates/finance/csvs/transactions.csv +0 -71
  82. rasa/cli/project_templates/finance/csvs/users.csv +0 -4
  83. rasa/cli/project_templates/finance/data/flows/add_payee.yml +0 -29
  84. rasa/cli/project_templates/finance/data/flows/block_card.yml +0 -66
  85. rasa/cli/project_templates/finance/data/flows/check_balance.yml +0 -9
  86. rasa/cli/project_templates/finance/data/flows/list_payees.yml +0 -5
  87. rasa/cli/project_templates/finance/data/flows/remove_payee.yml +0 -21
  88. rasa/cli/project_templates/finance/data/flows/select_card.yml +0 -12
  89. rasa/cli/project_templates/finance/data/flows/transfer_money.yml +0 -67
  90. rasa/cli/project_templates/finance/data/flows/welcome.yml +0 -14
  91. rasa/cli/project_templates/finance/data/nlu.yml +0 -29
  92. rasa/cli/project_templates/finance/data/patterns/pattern_chitchat.yml +0 -7
  93. rasa/cli/project_templates/finance/data/patterns/pattern_completed.yml +0 -6
  94. rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +0 -5
  95. rasa/cli/project_templates/finance/data/patterns/pattern_session_start.yml +0 -9
  96. rasa/cli/project_templates/finance/data/source/accounts.json +0 -51
  97. rasa/cli/project_templates/finance/data/source/advisors.json +0 -44
  98. rasa/cli/project_templates/finance/data/source/appointments.json +0 -1474
  99. rasa/cli/project_templates/finance/data/source/branches.json +0 -47
  100. rasa/cli/project_templates/finance/data/source/cards.json +0 -72
  101. rasa/cli/project_templates/finance/data/source/payees.json +0 -74
  102. rasa/cli/project_templates/finance/data/source/transactions.json +0 -492
  103. rasa/cli/project_templates/finance/data/source/users.json +0 -29
  104. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/consequences_of_blocking_card.txt +0 -8
  105. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/reasons_to_block_card.txt +0 -8
  106. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/recovering_from_card_fraud.txt +0 -8
  107. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/tips_for_card_security.txt +0 -8
  108. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/what_to_do_if_card_is_lost.txt +0 -8
  109. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/account_balance_security.txt +0 -7
  110. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/common_balance_inquiries.txt +0 -8
  111. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/methods_to_check_balance.txt +0 -8
  112. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/understanding_balance_updates.txt +0 -8
  113. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/what_to_do_if_balance_is_incorrect.txt +0 -8
  114. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/benefits_of_authorised_payees.txt +0 -8
  115. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/common_issues_with_payees.txt +0 -8
  116. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/general_payee_information.txt +0 -8
  117. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/payee_management_tips.txt +0 -8
  118. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/understanding_payee_types.txt +0 -8
  119. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/common_transfer_errors.txt +0 -8
  120. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/fees_for_transfers.txt +0 -8
  121. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/general_transfer_information.txt +0 -8
  122. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/security_tips_for_transfers.txt +0 -8
  123. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/transfer_processing_times.txt +0 -8
  124. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part1.txt +0 -50
  125. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part10.txt +0 -50
  126. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part11.txt +0 -48
  127. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part12.txt +0 -50
  128. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part13.txt +0 -50
  129. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part14.txt +0 -47
  130. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part15.txt +0 -50
  131. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part16.txt +0 -50
  132. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part17.txt +0 -47
  133. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part18.txt +0 -50
  134. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part19.txt +0 -50
  135. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part2.txt +0 -50
  136. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part20.txt +0 -47
  137. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part21.txt +0 -50
  138. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part22.txt +0 -50
  139. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part23.txt +0 -47
  140. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part24.txt +0 -50
  141. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part25.txt +0 -50
  142. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part26.txt +0 -47
  143. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part27.txt +0 -50
  144. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part28.txt +0 -50
  145. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part29.txt +0 -47
  146. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part3.txt +0 -47
  147. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part30.txt +0 -50
  148. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part31.txt +0 -50
  149. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part32.txt +0 -47
  150. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part33.txt +0 -50
  151. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part34.txt +0 -50
  152. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part35.txt +0 -47
  153. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part36.txt +0 -50
  154. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part37.txt +0 -50
  155. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part38.txt +0 -47
  156. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part39.txt +0 -50
  157. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part4.txt +0 -50
  158. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part40.txt +0 -50
  159. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part41.txt +0 -47
  160. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part42.txt +0 -50
  161. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part43.txt +0 -50
  162. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part44.txt +0 -47
  163. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part45.txt +0 -50
  164. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part46.txt +0 -50
  165. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part47.txt +0 -47
  166. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part48.txt +0 -50
  167. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part49.txt +0 -50
  168. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part5.txt +0 -50
  169. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part50.txt +0 -47
  170. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part51.txt +0 -50
  171. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part52.txt +0 -50
  172. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part53.txt +0 -47
  173. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part54.txt +0 -50
  174. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part55.txt +0 -50
  175. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part56.txt +0 -47
  176. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part57.txt +0 -50
  177. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part58.txt +0 -50
  178. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part59.txt +0 -47
  179. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part6.txt +0 -47
  180. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part60.txt +0 -50
  181. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part61.txt +0 -50
  182. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part7.txt +0 -50
  183. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part8.txt +0 -50
  184. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part9.txt +0 -47
  185. rasa/cli/project_templates/finance/domain/add_payee.yml +0 -47
  186. rasa/cli/project_templates/finance/domain/block_card.yml +0 -101
  187. rasa/cli/project_templates/finance/domain/check_balance.yml +0 -9
  188. rasa/cli/project_templates/finance/domain/default_actions.yml +0 -16
  189. rasa/cli/project_templates/finance/domain/default_flows.yml +0 -33
  190. rasa/cli/project_templates/finance/domain/list_payees.yml +0 -4
  191. rasa/cli/project_templates/finance/domain/remove_payee.yml +0 -16
  192. rasa/cli/project_templates/finance/domain/select_card.yml +0 -12
  193. rasa/cli/project_templates/finance/domain/transfer_money.yml +0 -79
  194. rasa/cli/project_templates/finance/endpoints.yml +0 -62
  195. rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +0 -57
  196. rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +0 -19
  197. rasa/cli/project_templates/finance/tests/conversation_repair/cancellations.yml +0 -12
  198. rasa/cli/project_templates/finance/tests/conversation_repair/cannot_handle.yml +0 -7
  199. rasa/cli/project_templates/finance/tests/conversation_repair/chitchat.yml +0 -7
  200. rasa/cli/project_templates/finance/tests/conversation_repair/clarification.yml +0 -9
  201. rasa/cli/project_templates/finance/tests/conversation_repair/completion.yml +0 -18
  202. rasa/cli/project_templates/finance/tests/conversation_repair/corrections.yml +0 -17
  203. rasa/cli/project_templates/finance/tests/conversation_repair/digressions.yml +0 -32
  204. rasa/cli/project_templates/finance/tests/conversation_repair/human_handoff.yml +0 -21
  205. rasa/cli/project_templates/finance/tests/conversation_repair/skipping_collect_steps.yml +0 -16
  206. rasa/cli/project_templates/finance/tests/demo_scripts/main.yml +0 -16
  207. rasa/cli/project_templates/finance/tests/happy_paths/balance_verification.yml +0 -15
  208. rasa/cli/project_templates/finance/tests/happy_paths/banking_questions.yml +0 -12
  209. rasa/cli/project_templates/finance/tests/happy_paths/card_blocking.yml +0 -52
  210. rasa/cli/project_templates/finance/tests/happy_paths/money_transfer.yml +0 -136
  211. rasa/cli/project_templates/finance/tests/happy_paths/payee_management.yml +0 -27
  212. rasa/cli/project_templates/finance/tests/happy_paths/user_greeted.yml +0 -5
  213. rasa/cli/project_templates/plain/actions/__init__.py +0 -0
  214. rasa/cli/project_templates/plain/config.yml +0 -17
  215. rasa/cli/project_templates/plain/credentials.yml +0 -33
  216. rasa/cli/project_templates/plain/data/patterns/pattern_session_start.yml +0 -7
  217. rasa/cli/project_templates/plain/domain.yml +0 -5
  218. rasa/cli/project_templates/plain/endpoints.yml +0 -58
  219. rasa/cli/project_templates/telco/actions/__init__.py +0 -0
  220. rasa/cli/project_templates/telco/actions/actions_billing.py +0 -197
  221. rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +0 -43
  222. rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +0 -23
  223. rasa/cli/project_templates/telco/actions/actions_session_start.py +0 -13
  224. rasa/cli/project_templates/telco/config.yml +0 -25
  225. rasa/cli/project_templates/telco/credentials.yml +0 -33
  226. rasa/cli/project_templates/telco/csvs/billing.csv +0 -10
  227. rasa/cli/project_templates/telco/csvs/customers.csv +0 -5
  228. rasa/cli/project_templates/telco/data/flows/flow_global.yml +0 -5
  229. rasa/cli/project_templates/telco/data/flows/flow_reboot_router.yml +0 -8
  230. rasa/cli/project_templates/telco/data/flows/flow_reset_router.yml +0 -7
  231. rasa/cli/project_templates/telco/data/flows/flow_solve_internet_issue.yml +0 -73
  232. rasa/cli/project_templates/telco/data/flows/flow_undertand_bill.yml +0 -45
  233. rasa/cli/project_templates/telco/data/patterns/pattern_completed.yml +0 -7
  234. rasa/cli/project_templates/telco/data/patterns/pattern_human_handoff.yml +0 -6
  235. rasa/cli/project_templates/telco/data/patterns/pattern_search.yml +0 -7
  236. rasa/cli/project_templates/telco/data/patterns/pattern_session_start.yml +0 -9
  237. rasa/cli/project_templates/telco/docs/reset_vs_rboot_router.txt +0 -1
  238. rasa/cli/project_templates/telco/docs/restart_router.txt +0 -6
  239. rasa/cli/project_templates/telco/docs/run_speed_test.txt +0 -6
  240. rasa/cli/project_templates/telco/domain/domain_global.yml +0 -29
  241. rasa/cli/project_templates/telco/domain/domain_patterns.yml +0 -17
  242. rasa/cli/project_templates/telco/domain/domain_reboot_router.yml +0 -20
  243. rasa/cli/project_templates/telco/domain/domain_reset_router.yml +0 -11
  244. rasa/cli/project_templates/telco/domain/domain_run_speed_test.yml +0 -24
  245. rasa/cli/project_templates/telco/domain/domain_solve_internet_issue.yml +0 -74
  246. rasa/cli/project_templates/telco/domain/domain_undertand_bill.yml +0 -102
  247. rasa/cli/project_templates/telco/endpoints.yml +0 -60
  248. rasa/cli/project_templates/telco/prompts/command-generator.jinja2 +0 -57
  249. rasa/cli/project_templates/telco/tests/e2e_results_failed.yml +0 -62
  250. rasa/cli/project_templates/telco/tests/e2e_results_passed.yml +0 -130
  251. rasa/cli/project_templates/telco/tests/e2e_test_cases/billing_test_cases.yml +0 -68
  252. rasa/cli/project_templates/telco/tests/e2e_test_cases/global_test_cases.yml +0 -13
  253. rasa/cli/project_templates/telco/tests/e2e_test_cases/internet_slow_test_case.yml +0 -47
  254. rasa/cli/project_templates/telco/tests/e2e_test_cases/out_of_scope_test_case.yml +0 -21
  255. rasa/cli/project_templates/telco/tests/e2e_test_cases/patterns_test_cases.yml +0 -15
  256. rasa/shared/importers/static.py +0 -63
  257. rasa/utils/openapi.py +0 -144
  258. {rasa_pro-3.13.1a17.dist-info → rasa_pro-3.13.2.dist-info}/NOTICE +0 -0
  259. {rasa_pro-3.13.1a17.dist-info → rasa_pro-3.13.2.dist-info}/WHEEL +0 -0
  260. {rasa_pro-3.13.1a17.dist-info → rasa_pro-3.13.2.dist-info}/entry_points.txt +0 -0
@@ -1,164 +0,0 @@
1
- # Rasa CALM Flow and Domain YAML Generator
2
-
3
- You are an expert in creating Rasa CALM flows and domain JSON configurations. Your task is to generate these JSON files based on a user's description of a conversational skill. The user may not be familiar with Rasa, so it's crucial to interpret their requirements accurately and create a well-structured, functional Rasa configuration.
4
-
5
- ## Input
6
- You will receive a description of a conversational skill. This description will be inserted where you see [USER_SKILL_DESCRIPTION] in this prompt.
7
-
8
- ## Output
9
- Generate a JSON configurations that includes:
10
- 1. A Rasa CALM flow JSON
11
- 2. A corresponding Rasa domain JSON
12
-
13
- Ensure that both parts of the JSONs are complete, well-structured, and compatible with each other.
14
-
15
- ## Example
16
- Here's an example of a skill description and the corresponding JSON outputs and custom action code
17
-
18
- Skill Description: "Create a skill for transferring money. It should ask for the recipient and amount, check the user has enough balance, and then confirm with the user before finalizing the transfer."
19
-
20
- CALM BOT JSON:
21
- ```json
22
- {
23
- "flows": {
24
- "transfer_money": {
25
- "description": "This flow lets users send money to friends and family.",
26
- "steps": [
27
- {
28
- "collect": "recipient"
29
- },
30
- {
31
- "collect": "amount",
32
- "description": "the number of US dollars to send"
33
- },
34
- {
35
- "action": "action_check_sufficient_funds",
36
- "next": [
37
- {
38
- "if": "not slots.has_sufficient_funds",
39
- "then": [
40
- {
41
- "action": "utter_insufficient_funds",
42
- "next": "END"
43
- }
44
- ]
45
- },
46
- {
47
- "else": "final_confirmation"
48
- }
49
- ]
50
- },
51
- {
52
- "collect": "final_confirmation",
53
- "id": "final_confirmation",
54
- "next": [
55
- {
56
- "if": "not slots.final_confirmation",
57
- "then": [
58
- {
59
- "action": "utter_transfer_cancelled",
60
- "next": "END"
61
- }
62
- ]
63
- },
64
- {
65
- "else": "transfer_successful"
66
- }
67
- ]
68
- },
69
- {
70
- "action": "utter_transfer_complete",
71
- "id": "transfer_successful"
72
- }
73
- ]
74
- }
75
- },
76
- "domain": {
77
- "actions": [
78
- "action_check_sufficient_funds"
79
- ],
80
- "slots": {
81
- "recipient": {
82
- "type": "Text",
83
- "mappings": [
84
- {
85
- "type": "from_llm"
86
- }
87
- ]
88
- },
89
- "has_sufficient_funds": {
90
- "type": "bool",
91
- "mappings": [
92
- {
93
- "type": "custom"
94
- }
95
- ]
96
- }
97
- },
98
- "responses": {
99
- "utter_ask_recipient": [
100
- {
101
- "text": "Who would you like to send money to?"
102
- }
103
- ],
104
- "utter_ask_final_confirmation": [
105
- {
106
- "text": "Please confirm: you want to transfer {amount} to {recipient}?"
107
- }
108
- ],
109
- "utter_transfer_cancelled": [
110
- {
111
- "text": "Your transfer has been cancelled."
112
- }
113
- ],
114
- "utter_insufficient_funds": [
115
- {
116
- "text": "You do not have enough funds to make this transaction."
117
- }
118
- ]
119
- }
120
- }
121
- }
122
- ```
123
-
124
- ## Guidelines for CALM Flow JSON:
125
- - Start a `flow` with the name of the flow as the key in `flows`
126
- - Include a `description` for the skill
127
- - Use `steps` to outline the conversation flow
128
- - Implement `collect` steps for gathering information
129
- - `collect` steps should reference an existing slot
130
- - For a collect step referencing a slot `A`, there should be a corresponding `utter_ask_A`
131
- utterance that is used in the collect step to ask for the information to be stored in `A`
132
- - Use `action` steps for custom actions
133
- - Implement conditional logic with `if`, `then`, and `else` where appropriate
134
- - Use `next` to define the flow between steps. If the flow should end after a step, add next: END.
135
- - The content after `then` or `else` can be: the id of another step defined in the flow, a list of steps, or an END
136
- - End the flow with an appropriate action or message
137
-
138
- ## Guidelines for Domain JSON:
139
- - Include all necessary `actions`
140
- - Define all required `slots` with appropriate types. Type should be one of 'float', 'bool', 'text', or 'categorical'
141
- - Slots filled by a 'collect' step should have mapping 'from_llm' and slots set by custom actions should have a 'custom' mapping
142
- - Provide `responses` for all bot turns
143
-
144
- ## Guidelines for Custom Actions
145
- - Ensure all actions mentioned in the flow are properly defined in the domains list of actions.
146
-
147
- ## Important Notes:
148
- - Ensure that the flow logic is coherent and follows a natural conversation pattern
149
- - All custom actions in the flow should be listed in the domain's `actions` section
150
- - All slots collected in the flow should be defined in the domain's `slots` section
151
- - Provide appropriate `utter_` responses for each user interaction
152
- - Use realistic and appropriate names for actions, slots, and responses
153
- - Consider error handling and alternative conversation paths
154
- - Aim for a balance between simplicity and functionality
155
-
156
- Now, please generate Rasa CALM flow and domain JSON based on the initial bot data.
157
- Modify the initial bot data where it makes sense based on the users description
158
- of the skill (e.g. the initial bot greeting utter_greet).
159
-
160
- INITIAL BOT DATA:
161
- {{project_data|tojson}}
162
-
163
- USER_SKILL_DESCRIPTION:
164
- {{skill_description}}
@@ -1,132 +0,0 @@
1
- """Functions for training and loading Rasa models."""
2
-
3
- import os
4
- import tempfile
5
-
6
- import structlog
7
-
8
- from rasa.builder import config
9
- from rasa.builder.exceptions import AgentLoadError, TrainingError
10
- from rasa.core import agent
11
- from rasa.core.utils import AvailableEndpoints, read_endpoints_from_path
12
- from rasa.model_training import TrainingResult, train
13
- from rasa.shared.importers.importer import TrainingDataImporter
14
- from rasa.shared.utils.yaml import dump_obj_as_yaml_to_string
15
-
16
- structlogger = structlog.get_logger()
17
-
18
-
19
- async def train_and_load_agent(importer: TrainingDataImporter) -> agent.Agent:
20
- """Train a model and load an agent.
21
-
22
- Args:
23
- importer: Training data importer with domain, flows, and config
24
-
25
- Returns:
26
- Loaded and ready agent
27
-
28
- Raises:
29
- TrainingError: If training fails
30
- AgentLoadError: If agent loading fails
31
- """
32
- try:
33
- # Setup endpoints for training validation
34
- await _setup_endpoints()
35
-
36
- # Train the model
37
- training_result = await _train_model(importer)
38
-
39
- # Load the agent
40
- agent_instance = await _load_agent(training_result.model)
41
-
42
- # Verify agent is ready
43
- if not agent_instance.is_ready():
44
- raise AgentLoadError("Agent failed to load properly - model is not ready")
45
-
46
- structlogger.info("training.agent_ready", model_path=training_result.model)
47
-
48
- return agent_instance
49
-
50
- except (TrainingError, AgentLoadError):
51
- raise
52
- except Exception as e:
53
- raise TrainingError(f"Unexpected error during training: {e}")
54
- except SystemExit as e:
55
- raise TrainingError(f"SystemExit during training: {e}")
56
-
57
-
58
- async def _setup_endpoints() -> None:
59
- """Setup endpoints configuration for training."""
60
- try:
61
- with tempfile.NamedTemporaryFile(
62
- mode="w", suffix=".yml", delete=False
63
- ) as temp_file:
64
- endpoints_yaml = dump_obj_as_yaml_to_string(config.get_default_endpoints())
65
- temp_file.write(endpoints_yaml)
66
- temp_file.flush()
67
-
68
- # Reset and load endpoints
69
- AvailableEndpoints.reset_instance()
70
- read_endpoints_from_path(temp_file.name)
71
-
72
- structlogger.debug("training.endpoints_setup", temp_file=temp_file.name)
73
-
74
- except Exception as e:
75
- raise TrainingError(f"Failed to setup endpoints: {e}")
76
-
77
-
78
- async def _train_model(importer: TrainingDataImporter) -> TrainingResult:
79
- """Train the Rasa model."""
80
- try:
81
- structlogger.info("training.started")
82
-
83
- training_result = await train(
84
- domain="",
85
- config="",
86
- training_files=None,
87
- file_importer=importer,
88
- )
89
-
90
- if not training_result or not training_result.model:
91
- raise TrainingError("Training completed but no model was produced")
92
-
93
- structlogger.info("training.completed", model_path=training_result.model)
94
-
95
- return training_result
96
-
97
- except Exception as e:
98
- raise TrainingError(f"Model training failed: {e}")
99
-
100
-
101
- async def _load_agent(model_path: str) -> agent.Agent:
102
- """Load the trained agent."""
103
- try:
104
- structlogger.info("training.loading_agent", model_path=model_path)
105
-
106
- available_endpoints = AvailableEndpoints.get_instance()
107
- if available_endpoints is None:
108
- raise AgentLoadError("No endpoints available for agent loading")
109
-
110
- structlogger.debug(
111
- "training.loading_agent.cwd",
112
- cwd=os.getcwd(),
113
- model_path=model_path,
114
- )
115
-
116
- agent_instance = await agent.load_agent(
117
- model_path=model_path,
118
- remote_storage=None,
119
- endpoints=available_endpoints,
120
- )
121
-
122
- if agent_instance is None:
123
- raise AgentLoadError("Agent loading returned None")
124
-
125
- structlogger.info("training.agent_loaded", model_path=model_path)
126
-
127
- return agent_instance
128
-
129
- except AgentLoadError:
130
- raise
131
- except Exception as e:
132
- raise AgentLoadError(f"Failed to load agent: {e}")
@@ -1,93 +0,0 @@
1
- """Functions for validating Rasa projects."""
2
-
3
- import sys
4
- from contextlib import contextmanager
5
- from typing import Optional
6
-
7
- import structlog
8
- from structlog.testing import capture_logs
9
-
10
- from rasa.builder import config
11
- from rasa.builder.exceptions import ValidationError
12
- from rasa.cli.utils import validate_files
13
- from rasa.shared.importers.importer import TrainingDataImporter
14
-
15
- structlogger = structlog.get_logger()
16
-
17
-
18
- @contextmanager
19
- def _mock_sys_exit():
20
- """Context manager to prevent sys.exit from being called during validation."""
21
- was_sys_exit_called = {"value": False}
22
-
23
- def sys_exit_mock(code: int = 0):
24
- was_sys_exit_called["value"] = True
25
-
26
- original_exit = sys.exit
27
- sys.exit = sys_exit_mock
28
-
29
- try:
30
- yield was_sys_exit_called
31
- finally:
32
- sys.exit = original_exit
33
-
34
-
35
- async def validate_project(importer: TrainingDataImporter) -> Optional[str]:
36
- """Validate a Rasa project.
37
-
38
- Args:
39
- importer: Training data importer with domain, flows, and config
40
-
41
- Returns:
42
- None if validation passes, error message if validation fails.
43
-
44
- Raises:
45
- ValidationError: If validation fails
46
- """
47
- try:
48
- with _mock_sys_exit() as exit_tracker:
49
- with capture_logs() as cap_logs:
50
- validate_files(
51
- fail_on_warnings=config.VALIDATION_FAIL_ON_WARNINGS,
52
- max_history=config.VALIDATION_MAX_HISTORY,
53
- importer=importer,
54
- )
55
-
56
- if exit_tracker["value"]:
57
- error_logs = [
58
- log for log in cap_logs if log.get("log_level") != "debug"
59
- ]
60
- structlogger.error(
61
- "validation.failed.sys_exit",
62
- error_logs=error_logs,
63
- )
64
- raise ValidationError(
65
- "Validation failed with sys.exit", validation_logs=error_logs
66
- )
67
-
68
- structlogger.info("validation.success")
69
- return None
70
-
71
- except ValidationError:
72
- raise
73
-
74
- except Exception as e:
75
- error_msg = f"Validation failed with exception: {e}"
76
-
77
- error_logs = [log for log in cap_logs if log.get("log_level") != "debug"]
78
-
79
- structlogger.error(
80
- "validation.failed.exception", error=str(e), validation_logs=error_logs
81
- )
82
- raise ValidationError(error_msg, validation_logs=error_logs)
83
-
84
- except SystemExit as e:
85
- error_logs = [log for log in cap_logs if log.get("log_level") != "debug"]
86
-
87
- structlogger.error(
88
- "validation.failed.sys_exit",
89
- error_logs=error_logs,
90
- )
91
- raise ValidationError(
92
- f"SystemExit during validation: {e}", validation_logs=error_logs
93
- )
File without changes
@@ -1,47 +0,0 @@
1
- from typing import Any, Dict, List, Text
2
-
3
- from rasa_sdk import Action, Tracker
4
- from rasa_sdk.events import SlotSet
5
- from rasa_sdk.executor import CollectingDispatcher
6
-
7
- from actions.database import Database
8
-
9
-
10
- class ActionAddPayee(Action):
11
- def name(self) -> Text:
12
- return "action_add_payee"
13
-
14
- def run(
15
- self,
16
- dispatcher: CollectingDispatcher,
17
- tracker: Tracker,
18
- domain: Dict[Text, Any],
19
- ) -> List[Dict[Text, Any]]:
20
- username = tracker.get_slot("username")
21
- payee_name = tracker.get_slot("payee_name")
22
- account_number = tracker.get_slot("account_number")
23
- sort_code = tracker.get_slot("sort_code")
24
- payee_type = tracker.get_slot("payee_type")
25
- reference = tracker.get_slot("reference") or ""
26
-
27
- db = Database()
28
-
29
- # Get user information
30
- user = db.get_user_by_name(username)
31
- if not user:
32
- dispatcher.utter_message(text="User not found.")
33
- return []
34
-
35
- # Add the payee
36
- success = db.add_payee(
37
- user["id"], payee_name, sort_code, account_number, payee_type, reference
38
- )
39
-
40
- if success:
41
- dispatcher.utter_message(
42
- text=f"Payee {payee_name} has been added successfully."
43
- )
44
- return [SlotSet("payee_added", True)]
45
- else:
46
- dispatcher.utter_message(text="Failed to add payee. Please try again.")
47
- return [SlotSet("payee_added", False)]
@@ -1,50 +0,0 @@
1
- from typing import Any, Dict, List, Text
2
-
3
- from rasa_sdk import Action, Tracker
4
- from rasa_sdk.events import SlotSet
5
- from rasa_sdk.executor import CollectingDispatcher
6
-
7
- from actions.database import Database
8
-
9
-
10
- class ActionAskAccount(Action):
11
- def name(self) -> Text:
12
- return "action_ask_account"
13
-
14
- def run(
15
- self,
16
- dispatcher: CollectingDispatcher,
17
- tracker: Tracker,
18
- domain: Dict[Text, Any],
19
- ) -> List[Dict[Text, Any]]:
20
- username = tracker.get_slot("username")
21
-
22
- db = Database()
23
-
24
- # Get user information
25
- user = db.get_user_by_name(username)
26
- if not user:
27
- dispatcher.utter_message(text="User not found.")
28
- return []
29
-
30
- # Get all accounts for the user
31
- accounts = db.get_accounts_by_user(user["id"])
32
-
33
- if not accounts:
34
- dispatcher.utter_message(text="No accounts found for this user.")
35
- return []
36
-
37
- buttons = [
38
- {
39
- "content_type": "text",
40
- "title": f"{account['number']} ({account['type'].title()})",
41
- "payload": str(account["number"]),
42
- }
43
- for account in accounts
44
- ]
45
- message = "Which account would you like the balance for?"
46
- dispatcher.utter_message(text=message, buttons=buttons)
47
-
48
- selected_account = tracker.get_slot("account")
49
-
50
- return [SlotSet("account", selected_account)]
@@ -1,50 +0,0 @@
1
- from typing import Any, Dict, List, Text
2
-
3
- from rasa_sdk import Action, Tracker
4
- from rasa_sdk.executor import CollectingDispatcher
5
-
6
- from actions.database import Database
7
-
8
-
9
- class ActionAskAccountFrom(Action):
10
- def name(self) -> Text:
11
- return "action_ask_account_from"
12
-
13
- def run(
14
- self,
15
- dispatcher: CollectingDispatcher,
16
- tracker: Tracker,
17
- domain: Dict[Text, Any],
18
- ) -> List[Dict[Text, Any]]:
19
- username = tracker.get_slot("username")
20
-
21
- db = Database()
22
-
23
- # Get user information
24
- user = db.get_user_by_name(username)
25
- if not user:
26
- dispatcher.utter_message(text="User not found.")
27
- return []
28
-
29
- # Get all accounts for the user
30
- accounts = db.get_accounts_by_user(user["id"])
31
-
32
- if not accounts:
33
- dispatcher.utter_message(text="No accounts found for this user.")
34
- return []
35
-
36
- buttons = [
37
- {
38
- "content_type": "text",
39
- "title": (
40
- f"{account['type'].title()} (Balance: "
41
- f"${float(account['balance']):.2f})"
42
- ),
43
- "payload": str(account["number"]),
44
- }
45
- for account in accounts
46
- ]
47
- message = "Which account would you like to transfer money from?"
48
- dispatcher.utter_message(text=message, buttons=buttons)
49
-
50
- return []
@@ -1,47 +0,0 @@
1
- from typing import Any, Dict, List, Text
2
-
3
- from rasa_sdk import Action, Tracker
4
- from rasa_sdk.executor import CollectingDispatcher
5
-
6
- from actions.database import Database
7
-
8
-
9
- class ActionAskCard(Action):
10
- def name(self) -> Text:
11
- return "action_ask_card"
12
-
13
- def run(
14
- self,
15
- dispatcher: CollectingDispatcher,
16
- tracker: Tracker,
17
- domain: Dict[Text, Any],
18
- ) -> List[Dict[Text, Any]]:
19
- username = tracker.get_slot("username")
20
-
21
- db = Database()
22
-
23
- # Get user information
24
- user = db.get_user_by_name(username)
25
- if not user:
26
- dispatcher.utter_message(text="User not found.")
27
- return []
28
-
29
- # Get all cards for the user
30
- cards = db.get_cards_by_user(user["id"])
31
-
32
- if not cards:
33
- dispatcher.utter_message(text="No cards found for this user.")
34
- return []
35
-
36
- buttons = [
37
- {
38
- "content_type": "text",
39
- "title": f"{i + 1}: x{card['number'][-4:]} ({card['type'].title()})",
40
- "payload": f"/SetSlots(card_selection={card['number']!s})",
41
- }
42
- for i, card in enumerate(cards)
43
- ]
44
- message = "Select the card you require assistance with:"
45
- dispatcher.utter_message(text=message, buttons=buttons)
46
-
47
- return []
@@ -1,40 +0,0 @@
1
- from typing import Any, Dict, List, Text
2
-
3
- from rasa_sdk import Action, Tracker
4
- from rasa_sdk.executor import CollectingDispatcher
5
-
6
- from actions.database import Database
7
-
8
-
9
- class ActionCheckBalance(Action):
10
- def name(self) -> Text:
11
- return "action_check_balance"
12
-
13
- def run(
14
- self,
15
- dispatcher: CollectingDispatcher,
16
- tracker: Tracker,
17
- domain: Dict[Text, Any],
18
- ) -> List[Dict[Text, Any]]:
19
- username = tracker.get_slot("username")
20
- account_number = tracker.get_slot("account")
21
-
22
- db = Database()
23
-
24
- # Get user information
25
- user = db.get_user_by_name(username)
26
- if not user:
27
- dispatcher.utter_message(text="User not found.")
28
- return []
29
-
30
- # Get account information
31
- account = db.get_account_by_user_and_number(user["id"], account_number)
32
- if not account:
33
- dispatcher.utter_message(text="Account not found.")
34
- return []
35
-
36
- current_balance = float(account["balance"])
37
-
38
- message = f"The balance is: ${current_balance}"
39
- dispatcher.utter_message(text=message)
40
- return []
@@ -1,35 +0,0 @@
1
- from typing import Any, Dict, List, Text
2
-
3
- from rasa_sdk import Action, Tracker
4
- from rasa_sdk.events import SlotSet
5
- from rasa_sdk.executor import CollectingDispatcher
6
-
7
- from actions.database import Database
8
-
9
-
10
- class ActionCheckCardExistence(Action):
11
- def name(self) -> str:
12
- return "action_check_card_existence"
13
-
14
- def run(
15
- self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[str, Any]
16
- ) -> List[Dict[Text, Any]]:
17
- username = tracker.get_slot("username")
18
- card_number = tracker.get_slot("card_number")
19
-
20
- db = Database()
21
-
22
- # Get user information
23
- user = db.get_user_by_name(username)
24
- if not user:
25
- dispatcher.utter_message(text="User not found.")
26
- return []
27
-
28
- # Get all cards for the user
29
- cards = db.get_cards_by_user(user["id"])
30
- card_numbers = [card["number"] for card in cards]
31
-
32
- if card_number in card_numbers:
33
- return [SlotSet("card_found", True)]
34
- else:
35
- return [SlotSet("card_found", False)]