rasa-pro 3.13.1a18__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 (259) hide show
  1. rasa/cli/scaffold.py +3 -22
  2. rasa/core/actions/action.py +3 -5
  3. rasa/core/channels/studio_chat.py +10 -34
  4. rasa/core/channels/voice_stream/asr/asr_engine.py +5 -1
  5. rasa/core/channels/voice_stream/asr/deepgram.py +5 -0
  6. rasa/core/channels/voice_stream/audiocodes.py +9 -4
  7. rasa/core/channels/voice_stream/jambonz.py +1 -1
  8. rasa/core/channels/voice_stream/voice_channel.py +7 -0
  9. rasa/core/policies/enterprise_search_policy.py +9 -8
  10. rasa/core/policies/flows/flow_executor.py +1 -8
  11. rasa/dialogue_understanding/commands/correct_slots_command.py +0 -10
  12. rasa/dialogue_understanding/generator/command_generator.py +5 -5
  13. rasa/dialogue_understanding/generator/flow_retrieval.py +9 -10
  14. rasa/dialogue_understanding/processor/command_processor.py +6 -1
  15. rasa/model_manager/model_api.py +3 -2
  16. rasa/model_manager/runner_service.py +1 -1
  17. rasa/model_manager/trainer_service.py +9 -12
  18. rasa/model_manager/utils.py +29 -1
  19. rasa/shared/core/domain.py +15 -62
  20. rasa/shared/core/flows/flow_step.py +1 -7
  21. rasa/shared/core/flows/yaml_flows_io.py +8 -16
  22. rasa/shared/core/slots.py +0 -4
  23. rasa/shared/importers/importer.py +0 -6
  24. rasa/shared/importers/utils.py +1 -77
  25. rasa/studio/upload.py +45 -10
  26. rasa/telemetry.py +1 -2
  27. rasa/utils/io.py +9 -27
  28. rasa/utils/json_utils.py +1 -6
  29. rasa/utils/log_utils.py +1 -5
  30. rasa/utils/plotting.py +1 -1
  31. rasa/validator.py +3 -7
  32. rasa/version.py +1 -1
  33. {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.2.dist-info}/METADATA +8 -9
  34. {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.2.dist-info}/RECORD +37 -259
  35. rasa/builder/README.md +0 -120
  36. rasa/builder/__init__.py +0 -0
  37. rasa/builder/config.py +0 -79
  38. rasa/builder/create_openai_vector_store.py +0 -228
  39. rasa/builder/exceptions.py +0 -55
  40. rasa/builder/inkeep-rag-response-schema.json +0 -64
  41. rasa/builder/inkeep_document_retrieval.py +0 -212
  42. rasa/builder/llm-helper-schema.json +0 -69
  43. rasa/builder/llm_context.py +0 -81
  44. rasa/builder/llm_helper_prompt.jinja2 +0 -245
  45. rasa/builder/llm_service.py +0 -317
  46. rasa/builder/logging_utils.py +0 -51
  47. rasa/builder/main.py +0 -147
  48. rasa/builder/models.py +0 -225
  49. rasa/builder/project_generator.py +0 -282
  50. rasa/builder/scrape_rasa_docs.py +0 -97
  51. rasa/builder/service.py +0 -742
  52. rasa/builder/skill_to_bot_prompt.jinja2 +0 -164
  53. rasa/builder/training_service.py +0 -132
  54. rasa/builder/validation_service.py +0 -93
  55. rasa/cli/project_templates/finance/actions/__init__.py +0 -0
  56. rasa/cli/project_templates/finance/actions/action_add_payee.py +0 -47
  57. rasa/cli/project_templates/finance/actions/action_ask_account.py +0 -50
  58. rasa/cli/project_templates/finance/actions/action_ask_account_from.py +0 -50
  59. rasa/cli/project_templates/finance/actions/action_ask_card.py +0 -47
  60. rasa/cli/project_templates/finance/actions/action_check_balance.py +0 -40
  61. rasa/cli/project_templates/finance/actions/action_check_card_existence.py +0 -35
  62. rasa/cli/project_templates/finance/actions/action_check_payee_existence.py +0 -40
  63. rasa/cli/project_templates/finance/actions/action_check_sufficient_funds.py +0 -41
  64. rasa/cli/project_templates/finance/actions/action_list_payees.py +0 -45
  65. rasa/cli/project_templates/finance/actions/action_process_immediate_payment.py +0 -18
  66. rasa/cli/project_templates/finance/actions/action_remove_payee.py +0 -49
  67. rasa/cli/project_templates/finance/actions/action_schedule_payment.py +0 -19
  68. rasa/cli/project_templates/finance/actions/action_session_start.py +0 -69
  69. rasa/cli/project_templates/finance/actions/action_update_card_status.py +0 -45
  70. rasa/cli/project_templates/finance/actions/action_validate_payment_date.py +0 -36
  71. rasa/cli/project_templates/finance/actions/database.py +0 -276
  72. rasa/cli/project_templates/finance/config.yml +0 -32
  73. rasa/cli/project_templates/finance/credentials.yml +0 -33
  74. rasa/cli/project_templates/finance/csvs/accounts.csv +0 -8
  75. rasa/cli/project_templates/finance/csvs/advisors.csv +0 -7
  76. rasa/cli/project_templates/finance/csvs/appointments.csv +0 -211
  77. rasa/cli/project_templates/finance/csvs/branches.csv +0 -10
  78. rasa/cli/project_templates/finance/csvs/cards.csv +0 -11
  79. rasa/cli/project_templates/finance/csvs/payees.csv +0 -10
  80. rasa/cli/project_templates/finance/csvs/transactions.csv +0 -71
  81. rasa/cli/project_templates/finance/csvs/users.csv +0 -4
  82. rasa/cli/project_templates/finance/data/flows/add_payee.yml +0 -29
  83. rasa/cli/project_templates/finance/data/flows/block_card.yml +0 -66
  84. rasa/cli/project_templates/finance/data/flows/check_balance.yml +0 -9
  85. rasa/cli/project_templates/finance/data/flows/list_payees.yml +0 -5
  86. rasa/cli/project_templates/finance/data/flows/remove_payee.yml +0 -21
  87. rasa/cli/project_templates/finance/data/flows/select_card.yml +0 -12
  88. rasa/cli/project_templates/finance/data/flows/transfer_money.yml +0 -67
  89. rasa/cli/project_templates/finance/data/flows/welcome.yml +0 -14
  90. rasa/cli/project_templates/finance/data/nlu.yml +0 -29
  91. rasa/cli/project_templates/finance/data/patterns/pattern_chitchat.yml +0 -7
  92. rasa/cli/project_templates/finance/data/patterns/pattern_completed.yml +0 -6
  93. rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +0 -5
  94. rasa/cli/project_templates/finance/data/patterns/pattern_session_start.yml +0 -9
  95. rasa/cli/project_templates/finance/data/source/accounts.json +0 -51
  96. rasa/cli/project_templates/finance/data/source/advisors.json +0 -44
  97. rasa/cli/project_templates/finance/data/source/appointments.json +0 -1474
  98. rasa/cli/project_templates/finance/data/source/branches.json +0 -47
  99. rasa/cli/project_templates/finance/data/source/cards.json +0 -72
  100. rasa/cli/project_templates/finance/data/source/payees.json +0 -74
  101. rasa/cli/project_templates/finance/data/source/transactions.json +0 -492
  102. rasa/cli/project_templates/finance/data/source/users.json +0 -29
  103. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/consequences_of_blocking_card.txt +0 -8
  104. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/reasons_to_block_card.txt +0 -8
  105. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/recovering_from_card_fraud.txt +0 -8
  106. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/tips_for_card_security.txt +0 -8
  107. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/what_to_do_if_card_is_lost.txt +0 -8
  108. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/account_balance_security.txt +0 -7
  109. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/common_balance_inquiries.txt +0 -8
  110. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/methods_to_check_balance.txt +0 -8
  111. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/understanding_balance_updates.txt +0 -8
  112. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/what_to_do_if_balance_is_incorrect.txt +0 -8
  113. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/benefits_of_authorised_payees.txt +0 -8
  114. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/common_issues_with_payees.txt +0 -8
  115. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/general_payee_information.txt +0 -8
  116. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/payee_management_tips.txt +0 -8
  117. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/understanding_payee_types.txt +0 -8
  118. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/common_transfer_errors.txt +0 -8
  119. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/fees_for_transfers.txt +0 -8
  120. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/general_transfer_information.txt +0 -8
  121. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/security_tips_for_transfers.txt +0 -8
  122. rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/transfer_processing_times.txt +0 -8
  123. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part1.txt +0 -50
  124. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part10.txt +0 -50
  125. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part11.txt +0 -48
  126. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part12.txt +0 -50
  127. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part13.txt +0 -50
  128. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part14.txt +0 -47
  129. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part15.txt +0 -50
  130. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part16.txt +0 -50
  131. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part17.txt +0 -47
  132. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part18.txt +0 -50
  133. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part19.txt +0 -50
  134. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part2.txt +0 -50
  135. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part20.txt +0 -47
  136. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part21.txt +0 -50
  137. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part22.txt +0 -50
  138. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part23.txt +0 -47
  139. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part24.txt +0 -50
  140. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part25.txt +0 -50
  141. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part26.txt +0 -47
  142. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part27.txt +0 -50
  143. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part28.txt +0 -50
  144. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part29.txt +0 -47
  145. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part3.txt +0 -47
  146. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part30.txt +0 -50
  147. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part31.txt +0 -50
  148. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part32.txt +0 -47
  149. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part33.txt +0 -50
  150. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part34.txt +0 -50
  151. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part35.txt +0 -47
  152. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part36.txt +0 -50
  153. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part37.txt +0 -50
  154. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part38.txt +0 -47
  155. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part39.txt +0 -50
  156. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part4.txt +0 -50
  157. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part40.txt +0 -50
  158. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part41.txt +0 -47
  159. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part42.txt +0 -50
  160. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part43.txt +0 -50
  161. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part44.txt +0 -47
  162. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part45.txt +0 -50
  163. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part46.txt +0 -50
  164. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part47.txt +0 -47
  165. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part48.txt +0 -50
  166. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part49.txt +0 -50
  167. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part5.txt +0 -50
  168. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part50.txt +0 -47
  169. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part51.txt +0 -50
  170. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part52.txt +0 -50
  171. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part53.txt +0 -47
  172. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part54.txt +0 -50
  173. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part55.txt +0 -50
  174. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part56.txt +0 -47
  175. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part57.txt +0 -50
  176. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part58.txt +0 -50
  177. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part59.txt +0 -47
  178. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part6.txt +0 -47
  179. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part60.txt +0 -50
  180. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part61.txt +0 -50
  181. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part7.txt +0 -50
  182. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part8.txt +0 -50
  183. rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part9.txt +0 -47
  184. rasa/cli/project_templates/finance/domain/add_payee.yml +0 -47
  185. rasa/cli/project_templates/finance/domain/block_card.yml +0 -101
  186. rasa/cli/project_templates/finance/domain/check_balance.yml +0 -9
  187. rasa/cli/project_templates/finance/domain/default_actions.yml +0 -16
  188. rasa/cli/project_templates/finance/domain/default_flows.yml +0 -33
  189. rasa/cli/project_templates/finance/domain/list_payees.yml +0 -4
  190. rasa/cli/project_templates/finance/domain/remove_payee.yml +0 -16
  191. rasa/cli/project_templates/finance/domain/select_card.yml +0 -12
  192. rasa/cli/project_templates/finance/domain/transfer_money.yml +0 -79
  193. rasa/cli/project_templates/finance/endpoints.yml +0 -62
  194. rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +0 -57
  195. rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +0 -19
  196. rasa/cli/project_templates/finance/tests/conversation_repair/cancellations.yml +0 -12
  197. rasa/cli/project_templates/finance/tests/conversation_repair/cannot_handle.yml +0 -7
  198. rasa/cli/project_templates/finance/tests/conversation_repair/chitchat.yml +0 -7
  199. rasa/cli/project_templates/finance/tests/conversation_repair/clarification.yml +0 -9
  200. rasa/cli/project_templates/finance/tests/conversation_repair/completion.yml +0 -18
  201. rasa/cli/project_templates/finance/tests/conversation_repair/corrections.yml +0 -17
  202. rasa/cli/project_templates/finance/tests/conversation_repair/digressions.yml +0 -32
  203. rasa/cli/project_templates/finance/tests/conversation_repair/human_handoff.yml +0 -21
  204. rasa/cli/project_templates/finance/tests/conversation_repair/skipping_collect_steps.yml +0 -16
  205. rasa/cli/project_templates/finance/tests/demo_scripts/main.yml +0 -16
  206. rasa/cli/project_templates/finance/tests/happy_paths/balance_verification.yml +0 -15
  207. rasa/cli/project_templates/finance/tests/happy_paths/banking_questions.yml +0 -12
  208. rasa/cli/project_templates/finance/tests/happy_paths/card_blocking.yml +0 -52
  209. rasa/cli/project_templates/finance/tests/happy_paths/money_transfer.yml +0 -136
  210. rasa/cli/project_templates/finance/tests/happy_paths/payee_management.yml +0 -27
  211. rasa/cli/project_templates/finance/tests/happy_paths/user_greeted.yml +0 -5
  212. rasa/cli/project_templates/plain/actions/__init__.py +0 -0
  213. rasa/cli/project_templates/plain/config.yml +0 -17
  214. rasa/cli/project_templates/plain/credentials.yml +0 -33
  215. rasa/cli/project_templates/plain/data/patterns/pattern_session_start.yml +0 -7
  216. rasa/cli/project_templates/plain/domain.yml +0 -5
  217. rasa/cli/project_templates/plain/endpoints.yml +0 -58
  218. rasa/cli/project_templates/telco/actions/__init__.py +0 -0
  219. rasa/cli/project_templates/telco/actions/actions_billing.py +0 -197
  220. rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +0 -43
  221. rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +0 -23
  222. rasa/cli/project_templates/telco/actions/actions_session_start.py +0 -13
  223. rasa/cli/project_templates/telco/config.yml +0 -25
  224. rasa/cli/project_templates/telco/credentials.yml +0 -33
  225. rasa/cli/project_templates/telco/csvs/billing.csv +0 -10
  226. rasa/cli/project_templates/telco/csvs/customers.csv +0 -5
  227. rasa/cli/project_templates/telco/data/flows/flow_global.yml +0 -5
  228. rasa/cli/project_templates/telco/data/flows/flow_reboot_router.yml +0 -8
  229. rasa/cli/project_templates/telco/data/flows/flow_reset_router.yml +0 -7
  230. rasa/cli/project_templates/telco/data/flows/flow_solve_internet_issue.yml +0 -73
  231. rasa/cli/project_templates/telco/data/flows/flow_undertand_bill.yml +0 -45
  232. rasa/cli/project_templates/telco/data/patterns/pattern_completed.yml +0 -7
  233. rasa/cli/project_templates/telco/data/patterns/pattern_human_handoff.yml +0 -6
  234. rasa/cli/project_templates/telco/data/patterns/pattern_search.yml +0 -7
  235. rasa/cli/project_templates/telco/data/patterns/pattern_session_start.yml +0 -9
  236. rasa/cli/project_templates/telco/docs/reset_vs_rboot_router.txt +0 -1
  237. rasa/cli/project_templates/telco/docs/restart_router.txt +0 -6
  238. rasa/cli/project_templates/telco/docs/run_speed_test.txt +0 -6
  239. rasa/cli/project_templates/telco/domain/domain_global.yml +0 -29
  240. rasa/cli/project_templates/telco/domain/domain_patterns.yml +0 -17
  241. rasa/cli/project_templates/telco/domain/domain_reboot_router.yml +0 -20
  242. rasa/cli/project_templates/telco/domain/domain_reset_router.yml +0 -11
  243. rasa/cli/project_templates/telco/domain/domain_run_speed_test.yml +0 -24
  244. rasa/cli/project_templates/telco/domain/domain_solve_internet_issue.yml +0 -74
  245. rasa/cli/project_templates/telco/domain/domain_undertand_bill.yml +0 -102
  246. rasa/cli/project_templates/telco/endpoints.yml +0 -60
  247. rasa/cli/project_templates/telco/prompts/command-generator.jinja2 +0 -57
  248. rasa/cli/project_templates/telco/tests/e2e_results_failed.yml +0 -62
  249. rasa/cli/project_templates/telco/tests/e2e_results_passed.yml +0 -130
  250. rasa/cli/project_templates/telco/tests/e2e_test_cases/billing_test_cases.yml +0 -68
  251. rasa/cli/project_templates/telco/tests/e2e_test_cases/global_test_cases.yml +0 -13
  252. rasa/cli/project_templates/telco/tests/e2e_test_cases/internet_slow_test_case.yml +0 -47
  253. rasa/cli/project_templates/telco/tests/e2e_test_cases/out_of_scope_test_case.yml +0 -21
  254. rasa/cli/project_templates/telco/tests/e2e_test_cases/patterns_test_cases.yml +0 -15
  255. rasa/shared/importers/static.py +0 -63
  256. rasa/utils/openapi.py +0 -144
  257. {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.2.dist-info}/NOTICE +0 -0
  258. {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.2.dist-info}/WHEEL +0 -0
  259. {rasa_pro-3.13.1a18.dist-info → rasa_pro-3.13.2.dist-info}/entry_points.txt +0 -0
@@ -1,197 +0,0 @@
1
- import csv
2
- import logging
3
- from datetime import datetime
4
- from typing import Dict, List
5
-
6
- from rasa_sdk import Action
7
- from rasa_sdk.events import SlotSet
8
-
9
-
10
- class ActionVerifyBillByDate(Action):
11
- def name(self) -> str:
12
- return "action_verify_bill_by_date"
13
-
14
- def text_to_date(self, month_text: str) -> str:
15
- try:
16
- # Get the current year
17
- current_year = datetime.now().year
18
-
19
- # Combine user input with the current year
20
- full_text = f"{month_text} {current_year}"
21
-
22
- # Parse the text format (e.g., "March 2025")
23
- date_obj = datetime.strptime(full_text, "%B %Y")
24
-
25
- # Format as DD/MM/YYYY (defaults to the first day of the month)
26
- formatted_date = date_obj.strftime("01/%m/%Y")
27
- logging.info(f"This is an info message: formatted_date: {formatted_date}")
28
- return formatted_date
29
- except ValueError:
30
- return "Invalid format. Please use a full month name (e.g., 'March')."
31
-
32
- def run(self, dispatcher, tracker, domain) -> List[Dict]:
33
- # Get customer ID and date from slots
34
- customer_id = tracker.get_slot("customer_id")
35
- bill_month = tracker.get_slot("bill_month")
36
-
37
- bill_date = ActionVerifyBillByDate.text_to_date(bill_month)
38
-
39
- if not customer_id:
40
- dispatcher.utter_message(
41
- "I couldn't find your customer ID. Please provide it."
42
- )
43
- return []
44
-
45
- if not bill_date:
46
- dispatcher.utter_message(
47
- "Please specify the date for the bill you want to check."
48
- )
49
- return []
50
-
51
- try:
52
- # Load CSV file with billing data
53
- with open("csvs/billing.csv", "r", newline="") as csvfile:
54
- reader = csv.DictReader(csvfile)
55
-
56
- # Convert bill_date to datetime for comparison
57
- bill_date_obj = datetime.strptime(bill_date, "%d/%m/%Y")
58
-
59
- # Filter data for the given customer and date
60
- customer_bills = []
61
- specific_bill = None
62
-
63
- for row in reader:
64
- if row["customer_id"] == str(customer_id):
65
- # Parse the date from CSV
66
- row_date = datetime.strptime(row["date"], "%Y-%m-%d")
67
- row["amount"] = float(row["amount"])
68
- customer_bills.append(row)
69
-
70
- # Check if this is the specific bill we're looking for
71
- if row_date.date() == bill_date_obj.date():
72
- specific_bill = row
73
-
74
- if specific_bill is None:
75
- dispatcher.utter_message(
76
- f"No bill found for {bill_date_obj.date()}."
77
- )
78
- return []
79
-
80
- bill_amount = specific_bill["amount"]
81
-
82
- # Calculate average
83
- if customer_bills:
84
- average_bill = sum(bill["amount"] for bill in customer_bills) / len(
85
- customer_bills
86
- )
87
- else:
88
- average_bill = 0
89
-
90
- difference = bill_amount - average_bill
91
-
92
- # Generate response
93
- response = (
94
- f"Your bill for {bill_month} {bill_date_obj.date().year} is "
95
- f"${bill_amount:.2f}. \n"
96
- f"The average of your past bills is ${average_bill:.2f}. \n"
97
- f"This bill is {'higher' if difference > 0 else 'lower'} than "
98
- f"your average by ${abs(difference):.2f}."
99
- )
100
-
101
- dispatcher.utter_message(response)
102
- return [
103
- SlotSet("bill_amount", int(bill_amount)),
104
- SlotSet("average_bill", int(average_bill)),
105
- SlotSet("difference", int(difference)),
106
- ]
107
-
108
- except FileNotFoundError:
109
- dispatcher.utter_message("Billing data file not found.")
110
- return []
111
- except Exception:
112
- dispatcher.utter_message("Error retrieving billing information.")
113
- return []
114
-
115
-
116
- class ActionRecapBill(Action):
117
- def name(self) -> str:
118
- return "action_recap_bill"
119
-
120
- def run(self, dispatcher, tracker, domain) -> List[Dict]:
121
- # Get customer_id and bill_date from slots
122
- customer_id = tracker.get_slot("customer_id")
123
- bill_month = tracker.get_slot("bill_month")
124
-
125
- bill_date = ActionVerifyBillByDate.text_to_date(bill_month)
126
-
127
- if not customer_id:
128
- dispatcher.utter_message(
129
- "I need your customer ID to fetch your bill recap."
130
- )
131
- return []
132
-
133
- if not bill_date:
134
- dispatcher.utter_message(
135
- "I need a date to fetch your bill recap. Can you provide one?"
136
- )
137
- return []
138
-
139
- # Convert customer_id to int if needed
140
- try:
141
- customer_id = int(customer_id)
142
- except ValueError:
143
- dispatcher.utter_message("Invalid customer ID format.")
144
- return []
145
-
146
- try:
147
- # Load CSV file
148
- with open("csvs/billing.csv", "r", newline="") as csvfile:
149
- reader = csv.DictReader(csvfile)
150
-
151
- bill_date_obj = datetime.strptime(bill_date, "%d/%m/%Y")
152
-
153
- # Filter records for the given customer_id
154
- filtered_records = []
155
- for row in reader:
156
- if row["customer_id"] == str(customer_id):
157
- # Parse date and add to filtered records
158
- row_date = datetime.strptime(row["date"], "%Y-%m-%d")
159
- filtered_records.append(
160
- {
161
- "date": row_date,
162
- "amount": float(row["amount"]),
163
- "source": row["source"],
164
- }
165
- )
166
-
167
- if not filtered_records:
168
- dispatcher.utter_message(
169
- f"No transactions found for customer {customer_id} on "
170
- f"{bill_date_obj.date().strftime('%B %Y')}."
171
- )
172
- return []
173
-
174
- # Format the output
175
- response1 = "Here is a summary of your costs :"
176
- dispatcher.utter_message(response1)
177
- response = "\n".join(
178
- [
179
- (
180
- f"{record['date'].date()} | {record['amount']} $ "
181
- f"| {record['source']}"
182
- )
183
- for record in filtered_records
184
- ]
185
- )
186
-
187
- # Send response to user
188
- dispatcher.utter_message(response)
189
- print("response heeere", response)
190
- return []
191
-
192
- except FileNotFoundError:
193
- dispatcher.utter_message("Billing data file not found.")
194
- return []
195
- except Exception:
196
- dispatcher.utter_message("Error retrieving billing information.")
197
- return []
@@ -1,43 +0,0 @@
1
- import csv
2
- from typing import Dict, List
3
-
4
- from rasa_sdk import Action
5
- from rasa_sdk.events import SlotSet
6
-
7
-
8
- class ActionGetCustomerInfo(Action):
9
- def name(self) -> str:
10
- return "action_get_customer_info"
11
-
12
- def run(self, dispatcher, tracker, domain) -> List[Dict]:
13
- # Load CSV file
14
- file_path = "csvs/customers.csv" # get information from your DBs
15
- customer_id = tracker.get_slot("customer_id")
16
-
17
- try:
18
- with open(file_path, "r", newline="") as csvfile:
19
- reader = csv.DictReader(csvfile)
20
-
21
- # Filter data for the given customer ID
22
- customer_info = None
23
- for row in reader:
24
- if row["customer_id"] == str(customer_id):
25
- customer_info = row
26
- break
27
-
28
- if customer_info is None:
29
- dispatcher.utter_message("No customer found with this ID.")
30
- return []
31
-
32
- # Extract customer details
33
- first_name = customer_info["first_name"]
34
-
35
- # Set the retrieved name in a slot
36
- return [SlotSet("customer_first_name", first_name)]
37
-
38
- except FileNotFoundError:
39
- dispatcher.utter_message("Customer database file not found.")
40
- return []
41
- except Exception:
42
- dispatcher.utter_message("Error retrieving customer information.")
43
- return []
@@ -1,23 +0,0 @@
1
- import asyncio
2
- import random
3
-
4
- from rasa_sdk import Action
5
- from rasa_sdk.events import EventType, SlotSet
6
-
7
-
8
- class ActionSleepAndRespond(Action):
9
- def name(self) -> str:
10
- return "actions_run_speed_test"
11
-
12
- async def run(self, dispatcher, tracker, domain) -> list[EventType]:
13
- await asyncio.sleep(10)
14
- dispatcher.utter_message(
15
- text="Thank you for waiting... ✅ "
16
- ) # Send to the user
17
-
18
- random_number = random.randint(
19
- 50, 150
20
- ) # we will pick randomly the internet speed here
21
- # for local testing purposes you can define the number
22
- # for Production testing connect to the API to get this data
23
- return [SlotSet("network_speed", random_number)]
@@ -1,13 +0,0 @@
1
- import asyncio
2
-
3
- from rasa_sdk import Action
4
- from rasa_sdk.events import EventType
5
-
6
-
7
- class ActionSleepAndRespond(Action):
8
- def name(self) -> str:
9
- return "action_sleep_few_sec"
10
-
11
- async def run(self, dispatcher, tracker, domain) -> list[EventType]:
12
- await asyncio.sleep(3)
13
- return []
@@ -1,25 +0,0 @@
1
- # The config recipe.
2
- recipe: default.v1
3
-
4
- # The assistant project unique identifier
5
- # This default value must be replaced with a unique assistant name within your deployment
6
- assistant_id: placeholder_default
7
-
8
- language: en
9
- pipeline:
10
- - name: CompactLLMCommandGenerator
11
- llm:
12
- model_group: openai-gpt-4o
13
- flow_retrieval:
14
- active: false
15
- prompt_template: prompts/command-generator.jinja2
16
-
17
- # Configuration for Rasa Core.
18
- policies:
19
- - name: FlowPolicy
20
- - name: EnterpriseSearchPolicy
21
- vector_store:
22
- type: "faiss"
23
- source: "./docs"
24
- llm:
25
- model_group: openai-gpt-4o
@@ -1,33 +0,0 @@
1
- # This file contains the credentials for the voice & chat platforms
2
- # which your bot is using.
3
- # https://rasa.com/docs/rasa-pro/connectors/messaging-and-voice-channels/
4
-
5
- rest:
6
- # # you don't need to provide anything here - this channel doesn't
7
- # # require any credentials
8
-
9
-
10
- #facebook:
11
- # verify: "<verify>"
12
- # secret: "<your secret>"
13
- # page-access-token: "<your page access token>"
14
-
15
- #slack:
16
- # slack_token: "<your slack token>"
17
- # slack_channel: "<the slack channel>"
18
- # slack_signing_secret: "<your slack signing secret>"
19
-
20
- #socketio:
21
- # user_message_evt: <event name for user message>
22
- # bot_message_evt: <event name for bot messages>
23
- # session_persistence: <true/false>
24
-
25
- #mattermost:
26
- # url: "https://<mattermost instance>/api/v4"
27
- # token: "<bot token>"
28
- # webhook_url: "<callback URL>"
29
-
30
- # This entry is needed if you are using Rasa Enterprise. The entry represents credentials
31
- # for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
32
- rasa:
33
- url: "http://localhost:5002/api"
@@ -1,10 +0,0 @@
1
- customer_id,date,amount,source
2
- 123,01/01/2025,150.50,Internet
3
- 123,01/02/2025,55.00,Internet
4
- 123,01/03/2025,60.00,Internet
5
- 124,01/01/2025,53.00,TV
6
- 124,01/02/2025,53.00,TV
7
- 124,01/03/2025,53.00,TV
8
- 125,01/01/2025,89.75,Mobile
9
- 125,01/02/2025,89.75,Mobile
10
- 125,01/03/2025,89.75,Mobile
@@ -1,5 +0,0 @@
1
- customer_id,first_name,last_name
2
- 123,Serena,Williams
3
- 124,Lionel, Messi
4
- 125,Tom, Cruise
5
- 456,Beyoncé, Knowles
@@ -1,5 +0,0 @@
1
- flows:
2
- bot_challenge:
3
- description: This flow clarifies that the user is talking to a chatbot, when the user ask if they are talking to a chatbot or a human
4
- steps:
5
- - action: utter_bot_challenge
@@ -1,8 +0,0 @@
1
- flows:
2
- reboot_router: # only reboot/restart the router
3
- if: False
4
- description: Help user reboot and restart their router, the user will be doing this action
5
- steps:
6
- - action: utter_explain_reboot_router
7
- - collect: reboot_router
8
- reset_after_flow_ends: true
@@ -1,7 +0,0 @@
1
- flows:
2
- reset_router: # restet the router rometely
3
- if: False
4
- description: Help user reset their router, the bot will do this action on behalf of the user
5
- steps:
6
- - action: utter_explain_reset_router
7
- - action: utter_image_reset_router
@@ -1,73 +0,0 @@
1
- flows:
2
- fix_internet_slow: # flow name mandatory – this defines a conversational flow for running diagnostics.
3
- description: Help users solve when internet is slow and provide solutions # description another madatory field this will be sent to CALM
4
- steps:
5
- - action: utter_acknowledge_issue # an utter a response that the assistant will display to the end user.
6
- - action: action_sleep_few_sec # Adding sleep time in a chatbot conversation makes interactions feel more natural,
7
- #improves readability, and simulates processing delays for a better user experience.
8
- - call: run_diagnostics # Call a flow, this flow can be re-used multiple times.
9
- # fix_internet_slow will (parent flow) call run_diagnostics (child flow)
10
- # when you call a flow, you go to the child flow and then be back to the parent flow
11
- # first call
12
- next:
13
- - if: slots.network_speed < 100 # the syntax is important it has to be slots, this slot has to be float as well
14
- then:
15
- - action: utter_acknowledge_speed_test_not_good
16
- - action: action_sleep_few_sec
17
- - action: utter_propose_reboot_router_solution
18
- - action: action_sleep_few_sec
19
- - call: reboot_router
20
- next:
21
- - if: slots.reboot_router # this slot is boolean
22
- then:
23
- - call: run_diagnostics # Second call
24
- next:
25
- - if: slots.network_speed > 100
26
- then:
27
- - action: action_sleep_few_sec
28
- - action: utter_speed_issue_resolved
29
- next: "END" # this has to be added, either next END to explain the flow end or point to another section
30
- - else:
31
- - action: action_sleep_few_sec
32
- - action: utter_speed_issue_not_resolved
33
- - call: reset_router
34
- - action: utter_final_diagnistics_run
35
- - call: run_diagnostics # Third call
36
- next:
37
- - if: slots.network_speed < 100
38
- then:
39
- - action: utter_acknowledge_speed_test_not_good
40
- - action: utter_fail_to_find_fix
41
- - link: pattern_human_handoff # when you link a flow, you go to the child flow and then the flow ends there.
42
- - else:
43
- - action: action_sleep_few_sec
44
- - action: utter_final_try_worked
45
- - action: utter_speed_issue_resolved
46
- next: "END"
47
-
48
-
49
- - else:
50
- - link: pattern_human_handoff
51
- - else:
52
- - action: utter_speed_network_not_issue
53
- - action: action_sleep_few_sec
54
- - action: utter_propose_other_solutions
55
- - action: action_sleep_few_sec
56
- - collect: more_help_needed
57
- next:
58
- - if: slots.more_help_needed
59
- then:
60
- - link: pattern_human_handoff
61
- - else:
62
- - action: action_sleep_few_sec
63
- - action: utter_final_help
64
- next: "END"
65
-
66
-
67
- run_diagnostics:
68
- if: False # Conditional check – this flow will not run unless this condition is verified.
69
- #when it is False this means this flow will only be run if it is called by another flow, not the user.
70
- description: run diagnostics to check the internet speed for the user
71
- steps:
72
- - action: utter_communicate_run_diagnosticss
73
- - action: actions_run_speed_test
@@ -1,45 +0,0 @@
1
- flows:
2
- understand_bill:
3
- if: slots.user_authenticated # the user has to be authenticated in order to access this flow
4
- description: This flow allows users to check their bill and billing related details.
5
- steps:
6
- - collect: bill_month
7
- ask_before_filling: False
8
- - action: action_verify_bill_by_date
9
- - collect: breakdown_cost
10
- description: |
11
- This slot is boolean variable. it holds one of two possible values: true or false
12
- (breakdown_cost = True, breakdown_cost = False), and if the user says "yup," it should be considered True, while "nope" should be considered False
13
- (e.g., breakdown_cost = True for "yup", breakdown_cost = False for "nope").
14
- ask_before_filling: true # This can be useful some LLMs will prefill bool slots here we make it mandatory for the bot to ask the user
15
- next:
16
- - if: slots.breakdown_cost # it has to be 'slots' with an 's', this means breakdown_cost is True
17
- then:
18
- - action: action_recap_bill
19
- - collect: more_bill_details
20
- next:
21
- - if: slots.more_bill_details
22
- then:
23
- - action: utter_provide_bill_sources
24
- next: "END"
25
- - else: issue_solved_section # this will call "issue_solved_section" section
26
-
27
- - else: issue_solved_section
28
-
29
- - id: issue_solved_section # This will help avoid re-writting the same piece of code, this way it can be re-used
30
- collect: issue_solved
31
- description: |
32
- This slot is boolean variable. it holds one of two possible values: true or false
33
- (issue_solved = True, issue_solved = False), and if the user says "yup" it should be considered True, while "nope" should be considered False
34
- (e.g., issue_solved = True for "yup", issue_solved = False for "nope").
35
- ask_before_filling: true
36
- next:
37
- - if: not slots.issue_solved # this means issue_solved is False
38
- then:
39
- - action: utter_connect_to_human
40
- - action: action_sleep_few_sec
41
- - link: pattern_human_handoff
42
-
43
- - else:
44
- - action: utter_end_conversation
45
- next: "END"
@@ -1,7 +0,0 @@
1
- flows:
2
- pattern_completed: # this a patters that is triggered at the end of every flow
3
- description: all flows have been completed and there is nothing else to be done
4
- name: pattern completed
5
- steps:
6
- - noop: True # this means no operation and when this command is detected CALM won't do any actions. it can also be replaced by an utter.
7
- next: END
@@ -1,6 +0,0 @@
1
- flows:
2
- pattern_human_handoff:
3
- description: Conversation repair flow for switching users to a human agent if their request can't be handled
4
- name: pattern human handoff
5
- steps:
6
- - action: utter_more_help_needed_handoff_pattern
@@ -1,7 +0,0 @@
1
- flows:
2
- pattern_search: # This is a patter that triggered if we have a knowledge base question so we rely on the description we have for SearchAndReply() command
3
- description: Flow for handling how to run a speed test ## This is a description just a place holder
4
- #if you want to change it you need to update the command description in the prompt
5
- name: pattern search
6
- steps:
7
- - action: action_trigger_search
@@ -1,9 +0,0 @@
1
- flows:
2
- pattern_session_start: # this is a pattern that will be triggered in the begining of the session
3
- description: Flow for starting the conversation
4
- name: pattern session start
5
- nlu_trigger:
6
- - intent: session_start
7
- steps:
8
- - action: action_get_customer_info
9
- - action: utter_session_start
@@ -1 +0,0 @@
1
- Rebooting a router means simply turning it off and back on without changing any settings. This helps resolve temporary issues like slow speeds or dropped connections and is done by pressing the power button or unplugging the device for a few seconds before turning it back on. Resetting a router, on the other hand, restores it to factory settings, erasing all custom configurations such as the Wi-Fi name, password, and advanced settings. This is done by holding the reset button for about 10-30 seconds until the router restarts. While rebooting is a quick fix for minor issues, resetting should only be done as a last resort when troubleshooting persistent problems.
@@ -1,6 +0,0 @@
1
- Here are concise summaries of how to turn your router on and off:
2
- Using the Power Button: Press the power button to turn off the router, wait 30 seconds, then press it again to turn it back on.
3
- Unplugging Method: Disconnect the power cable, wait 30 seconds, then plug it back in to restart the router.
4
- Full Restart for Issues: Turn off the router, wait 1 minute, then turn it back on to refresh the connection.
5
-
6
- To turn your router off, press the power button (if available) or unplug it from the power source. Wait about 30 seconds to 1 minute before turning it back on by pressing the power button again or plugging it back in. This helps refresh the connection and resolve minor network issues.
@@ -1,6 +0,0 @@
1
- Speed test is run by a special software to check what is the current speed of your Internet when uploading or downloading files
2
- You can use "Fast.com", "Speedtest.net", or Google "Internet speed test"
3
- An internet speed test measures your connection's performance by evaluating download and upload speeds (Mbps), ping (latency in ms), and jitter.
4
- It helps determine how fast data is sent and received, impacting streaming, gaming, and video calls.
5
- Speed tests are useful for diagnosing slow connections and verifying ISP performance.
6
- You can use our App for a speed test. Go to the Home menu, select WLAN speed test and run it.
@@ -1,29 +0,0 @@
1
- version: "3.1"
2
-
3
- slots: # list all you slots, it can be in different files per use case for better structure
4
- customer_id:
5
- type: text
6
- mappings:
7
- - type: from_llm
8
- initial_value: 123 # suppose we always have the customer ID
9
- customer_first_name:
10
- type: text
11
- mappings:
12
- - type: controlled
13
-
14
- responses:
15
- utter_session_start:
16
- - text: |
17
- Hey {customer_first_name} 👋
18
- I am your virtual AI assistant that can check your bills or resolve issues with Internet speed.
19
- How may I help you?
20
-
21
- utter_end_conversation:
22
- - text: |
23
- Glad, I helped ✨
24
- Have a nice day!
25
-
26
- utter_bot_challenge:
27
- - text: |
28
- I'm an AI assistant designed to assist you quickly and efficiently.
29
- If you ever need to speak with a human agent, just let me know!
@@ -1,17 +0,0 @@
1
-
2
- responses:
3
- utter_more_help_needed_handoff_pattern: # add more information here, if you need this to connect to specific channel..
4
- - text: |
5
- Please hold on while I connect you to our expert 📲
6
- image: "https://cdn-icons-png.flaticon.com/512/1042/1042127.png"
7
- utter_connect_to_human:
8
- - text: |
9
- Let me connect you to our human support managers. They will help you further!
10
-
11
- utter_cannot_handle:
12
- - text: |
13
- I appreciate your question!
14
- That's a bit outside my expertise, but I'm here to help if your internet is slow or if you need help understanding your bill.
15
- Would you like assistance with that?
16
- metadata:
17
- rephrase: true
@@ -1,20 +0,0 @@
1
- slots:
2
- reboot_router:
3
- type: bool
4
- mappings:
5
- - type: from_llm
6
-
7
- responses:
8
-
9
- utter_explain_reboot_router:
10
- - text: |
11
- Please turn the router off, wait 10 seconds and turn it back on.
12
-
13
- utter_ask_reboot_router:
14
- - text: |
15
- Let me know when you are done!
16
- buttons:
17
- - title: "Done"
18
- payload: "/SetSlots(reboot_router=True)"
19
- - title: "Facing a problem"
20
- payload: "/SetSlots(reboot_router=False)"
@@ -1,11 +0,0 @@
1
-
2
- responses:
3
- utter_explain_reset_router:
4
- - text: |
5
- I will reset your router remotely to try to fix the issue.
6
- No action is needed from your end.
7
- It may take a minute. Please hold on ⏳
8
- utter_image_reset_router:
9
- - text: |
10
- Router is reset successfully! 🎉
11
- image: "https://www.creativefabrica.com/wp-content/uploads/2022/09/04/Wifi-router-outline-icon-Graphics-37782400-1.jpg"
@@ -1,24 +0,0 @@
1
- slots:
2
- how_to_run_speed_test:
3
- type: text
4
- mappings:
5
- - type: from_llm
6
-
7
- run_speed_test:
8
- type: bool
9
- mappings:
10
- - type: from_llm
11
-
12
- download_speed:
13
- type: text
14
- mappings:
15
- - type: from_llm
16
-
17
- responses:
18
-
19
- utter_ask_download_speed:
20
- - text: |
21
- Run it and let me know the download speed.
22
- utter_help_run_speed_test:
23
- - text: |
24
- You can use our Rasacom App, go to the Home menu and select WLAN speed test or use this link https://fast.com/