rasa-pro 3.11.0__py3-none-any.whl → 3.11.0a1__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 (220) hide show
  1. README.md +396 -17
  2. rasa/__main__.py +15 -31
  3. rasa/api.py +1 -5
  4. rasa/cli/arguments/default_arguments.py +2 -1
  5. rasa/cli/arguments/shell.py +1 -5
  6. rasa/cli/arguments/train.py +0 -14
  7. rasa/cli/e2e_test.py +1 -1
  8. rasa/cli/evaluate.py +8 -8
  9. rasa/cli/inspect.py +7 -15
  10. rasa/cli/interactive.py +0 -1
  11. rasa/cli/llm_fine_tuning.py +1 -1
  12. rasa/cli/project_templates/calm/config.yml +7 -5
  13. rasa/cli/project_templates/calm/endpoints.yml +2 -15
  14. rasa/cli/project_templates/tutorial/config.yml +5 -8
  15. rasa/cli/project_templates/tutorial/data/flows.yml +1 -1
  16. rasa/cli/project_templates/tutorial/data/patterns.yml +0 -5
  17. rasa/cli/project_templates/tutorial/domain.yml +0 -14
  18. rasa/cli/project_templates/tutorial/endpoints.yml +0 -5
  19. rasa/cli/run.py +1 -1
  20. rasa/cli/scaffold.py +2 -4
  21. rasa/cli/studio/studio.py +8 -18
  22. rasa/cli/studio/upload.py +15 -0
  23. rasa/cli/train.py +0 -3
  24. rasa/cli/utils.py +1 -6
  25. rasa/cli/x.py +8 -8
  26. rasa/constants.py +1 -3
  27. rasa/core/actions/action.py +33 -75
  28. rasa/core/actions/e2e_stub_custom_action_executor.py +1 -5
  29. rasa/core/actions/http_custom_action_executor.py +0 -4
  30. rasa/core/channels/__init__.py +0 -2
  31. rasa/core/channels/channel.py +0 -20
  32. rasa/core/channels/development_inspector.py +3 -10
  33. rasa/core/channels/inspector/dist/assets/{arc-bc141fb2.js → arc-86942a71.js} +1 -1
  34. rasa/core/channels/inspector/dist/assets/{c4Diagram-d0fbc5ce-be2db283.js → c4Diagram-d0fbc5ce-b0290676.js} +1 -1
  35. rasa/core/channels/inspector/dist/assets/{classDiagram-936ed81e-55366915.js → classDiagram-936ed81e-f6405f6e.js} +1 -1
  36. rasa/core/channels/inspector/dist/assets/{classDiagram-v2-c3cb15f1-bb529518.js → classDiagram-v2-c3cb15f1-ef61ac77.js} +1 -1
  37. rasa/core/channels/inspector/dist/assets/{createText-62fc7601-b0ec81d6.js → createText-62fc7601-f0411e58.js} +1 -1
  38. rasa/core/channels/inspector/dist/assets/{edges-f2ad444c-6166330c.js → edges-f2ad444c-7dcc4f3b.js} +1 -1
  39. rasa/core/channels/inspector/dist/assets/{erDiagram-9d236eb7-5ccc6a8e.js → erDiagram-9d236eb7-e0c092d7.js} +1 -1
  40. rasa/core/channels/inspector/dist/assets/{flowDb-1972c806-fca3bfe4.js → flowDb-1972c806-fba2e3ce.js} +1 -1
  41. rasa/core/channels/inspector/dist/assets/{flowDiagram-7ea5b25a-4739080f.js → flowDiagram-7ea5b25a-7a70b71a.js} +1 -1
  42. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-24a5f41a.js +1 -0
  43. rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-abe16c3d-7c1b0e0f.js → flowchart-elk-definition-abe16c3d-00a59b68.js} +1 -1
  44. rasa/core/channels/inspector/dist/assets/{ganttDiagram-9b5ea136-772fd050.js → ganttDiagram-9b5ea136-293c91fa.js} +1 -1
  45. rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-99d0ae7c-8eae1dc9.js → gitGraphDiagram-99d0ae7c-07b2d68c.js} +1 -1
  46. rasa/core/channels/inspector/dist/assets/{index-2c4b9a3b-f55afcdf.js → index-2c4b9a3b-bc959fbd.js} +1 -1
  47. rasa/core/channels/inspector/dist/assets/{index-e7cef9de.js → index-3a8a5a28.js} +143 -143
  48. rasa/core/channels/inspector/dist/assets/{infoDiagram-736b4530-124d4a14.js → infoDiagram-736b4530-4a350f72.js} +1 -1
  49. rasa/core/channels/inspector/dist/assets/{journeyDiagram-df861f2b-7c4fae44.js → journeyDiagram-df861f2b-af464fb7.js} +1 -1
  50. rasa/core/channels/inspector/dist/assets/{layout-b9885fb6.js → layout-0071f036.js} +1 -1
  51. rasa/core/channels/inspector/dist/assets/{line-7c59abb6.js → line-2f73cc83.js} +1 -1
  52. rasa/core/channels/inspector/dist/assets/{linear-4776f780.js → linear-f014b4cc.js} +1 -1
  53. rasa/core/channels/inspector/dist/assets/{mindmap-definition-beec6740-2332c46c.js → mindmap-definition-beec6740-d2426fb6.js} +1 -1
  54. rasa/core/channels/inspector/dist/assets/{pieDiagram-dbbf0591-8fb39303.js → pieDiagram-dbbf0591-776f01a2.js} +1 -1
  55. rasa/core/channels/inspector/dist/assets/{quadrantDiagram-4d7f4fd6-3c7180a2.js → quadrantDiagram-4d7f4fd6-82e00b57.js} +1 -1
  56. rasa/core/channels/inspector/dist/assets/{requirementDiagram-6fc4c22a-e910bcb8.js → requirementDiagram-6fc4c22a-ea13c6bb.js} +1 -1
  57. rasa/core/channels/inspector/dist/assets/{sankeyDiagram-8f13d901-ead16c89.js → sankeyDiagram-8f13d901-1feca7e9.js} +1 -1
  58. rasa/core/channels/inspector/dist/assets/{sequenceDiagram-b655622a-29a02a19.js → sequenceDiagram-b655622a-070c61d2.js} +1 -1
  59. rasa/core/channels/inspector/dist/assets/{stateDiagram-59f0c015-042b3137.js → stateDiagram-59f0c015-24f46263.js} +1 -1
  60. rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-2b26beab-2178c0f3.js → stateDiagram-v2-2b26beab-c9056051.js} +1 -1
  61. rasa/core/channels/inspector/dist/assets/{styles-080da4f6-23ffa4fc.js → styles-080da4f6-08abc34a.js} +1 -1
  62. rasa/core/channels/inspector/dist/assets/{styles-3dcbcfbf-94f59763.js → styles-3dcbcfbf-bc74c25a.js} +1 -1
  63. rasa/core/channels/inspector/dist/assets/{styles-9c745c82-78a6bebc.js → styles-9c745c82-4e5d66de.js} +1 -1
  64. rasa/core/channels/inspector/dist/assets/{svgDrawCommon-4835440b-eae2a6f6.js → svgDrawCommon-4835440b-849c4517.js} +1 -1
  65. rasa/core/channels/inspector/dist/assets/{timeline-definition-5b62e21b-5c968d92.js → timeline-definition-5b62e21b-d0fb1598.js} +1 -1
  66. rasa/core/channels/inspector/dist/assets/{xychartDiagram-2b33534f-fd3db0d5.js → xychartDiagram-2b33534f-04d115e2.js} +1 -1
  67. rasa/core/channels/inspector/dist/index.html +1 -1
  68. rasa/core/channels/inspector/src/App.tsx +1 -1
  69. rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +3 -6
  70. rasa/core/channels/socketio.py +2 -7
  71. rasa/core/channels/telegram.py +1 -1
  72. rasa/core/channels/twilio.py +1 -1
  73. rasa/core/channels/voice_ready/audiocodes.py +4 -15
  74. rasa/core/channels/voice_ready/jambonz.py +4 -15
  75. rasa/core/channels/voice_ready/twilio_voice.py +21 -6
  76. rasa/core/channels/voice_ready/utils.py +5 -6
  77. rasa/core/channels/voice_stream/asr/asr_engine.py +1 -19
  78. rasa/core/channels/voice_stream/asr/asr_event.py +0 -5
  79. rasa/core/channels/voice_stream/asr/deepgram.py +15 -28
  80. rasa/core/channels/voice_stream/audio_bytes.py +0 -1
  81. rasa/core/channels/voice_stream/tts/azure.py +3 -9
  82. rasa/core/channels/voice_stream/tts/cartesia.py +8 -12
  83. rasa/core/channels/voice_stream/tts/tts_engine.py +1 -11
  84. rasa/core/channels/voice_stream/twilio_media_streams.py +19 -28
  85. rasa/core/channels/voice_stream/util.py +4 -4
  86. rasa/core/channels/voice_stream/voice_channel.py +42 -222
  87. rasa/core/featurizers/single_state_featurizer.py +1 -22
  88. rasa/core/featurizers/tracker_featurizers.py +18 -115
  89. rasa/core/information_retrieval/qdrant.py +0 -1
  90. rasa/core/nlg/contextual_response_rephraser.py +25 -44
  91. rasa/core/persistor.py +34 -191
  92. rasa/core/policies/enterprise_search_policy.py +60 -119
  93. rasa/core/policies/flows/flow_executor.py +4 -7
  94. rasa/core/policies/intentless_policy.py +22 -82
  95. rasa/core/policies/ted_policy.py +33 -58
  96. rasa/core/policies/unexpected_intent_policy.py +7 -15
  97. rasa/core/processor.py +13 -89
  98. rasa/core/run.py +2 -2
  99. rasa/core/training/interactive.py +35 -34
  100. rasa/core/utils.py +22 -58
  101. rasa/dialogue_understanding/coexistence/llm_based_router.py +12 -39
  102. rasa/dialogue_understanding/commands/__init__.py +0 -4
  103. rasa/dialogue_understanding/commands/change_flow_command.py +0 -6
  104. rasa/dialogue_understanding/commands/utils.py +0 -5
  105. rasa/dialogue_understanding/generator/constants.py +0 -2
  106. rasa/dialogue_understanding/generator/flow_retrieval.py +4 -49
  107. rasa/dialogue_understanding/generator/llm_based_command_generator.py +23 -37
  108. rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +10 -57
  109. rasa/dialogue_understanding/generator/nlu_command_adapter.py +1 -19
  110. rasa/dialogue_understanding/generator/single_step/command_prompt_template.jinja2 +0 -3
  111. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +10 -90
  112. rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +0 -53
  113. rasa/dialogue_understanding/processor/command_processor.py +1 -21
  114. rasa/e2e_test/assertions.py +16 -133
  115. rasa/e2e_test/assertions_schema.yml +0 -23
  116. rasa/e2e_test/e2e_test_case.py +6 -85
  117. rasa/e2e_test/e2e_test_runner.py +4 -6
  118. rasa/e2e_test/utils/io.py +1 -3
  119. rasa/engine/loader.py +0 -12
  120. rasa/engine/validation.py +11 -541
  121. rasa/keys +1 -0
  122. rasa/llm_fine_tuning/notebooks/unsloth_finetuning.ipynb +407 -0
  123. rasa/model_training.py +7 -29
  124. rasa/nlu/classifiers/diet_classifier.py +25 -38
  125. rasa/nlu/classifiers/logistic_regression_classifier.py +9 -22
  126. rasa/nlu/classifiers/sklearn_intent_classifier.py +16 -37
  127. rasa/nlu/extractors/crf_entity_extractor.py +50 -93
  128. rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py +16 -45
  129. rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py +17 -52
  130. rasa/nlu/featurizers/sparse_featurizer/regex_featurizer.py +3 -5
  131. rasa/nlu/tokenizers/whitespace_tokenizer.py +14 -3
  132. rasa/server.py +1 -3
  133. rasa/shared/constants.py +0 -61
  134. rasa/shared/core/constants.py +0 -9
  135. rasa/shared/core/domain.py +5 -8
  136. rasa/shared/core/flows/flow.py +0 -5
  137. rasa/shared/core/flows/flows_list.py +1 -5
  138. rasa/shared/core/flows/flows_yaml_schema.json +0 -10
  139. rasa/shared/core/flows/validation.py +0 -96
  140. rasa/shared/core/flows/yaml_flows_io.py +4 -13
  141. rasa/shared/core/slots.py +0 -5
  142. rasa/shared/importers/importer.py +2 -19
  143. rasa/shared/importers/rasa.py +1 -5
  144. rasa/shared/nlu/training_data/features.py +2 -120
  145. rasa/shared/nlu/training_data/formats/rasa_yaml.py +3 -18
  146. rasa/shared/providers/_configs/azure_openai_client_config.py +3 -5
  147. rasa/shared/providers/_configs/openai_client_config.py +1 -1
  148. rasa/shared/providers/_configs/self_hosted_llm_client_config.py +0 -1
  149. rasa/shared/providers/_configs/utils.py +0 -16
  150. rasa/shared/providers/embedding/_base_litellm_embedding_client.py +29 -18
  151. rasa/shared/providers/embedding/azure_openai_embedding_client.py +21 -54
  152. rasa/shared/providers/embedding/default_litellm_embedding_client.py +0 -24
  153. rasa/shared/providers/llm/_base_litellm_client.py +31 -63
  154. rasa/shared/providers/llm/azure_openai_llm_client.py +29 -50
  155. rasa/shared/providers/llm/default_litellm_llm_client.py +0 -24
  156. rasa/shared/providers/llm/self_hosted_llm_client.py +29 -17
  157. rasa/shared/providers/mappings.py +0 -19
  158. rasa/shared/utils/common.py +2 -37
  159. rasa/shared/utils/io.py +6 -28
  160. rasa/shared/utils/llm.py +46 -353
  161. rasa/shared/utils/yaml.py +82 -181
  162. rasa/studio/auth.py +5 -3
  163. rasa/studio/config.py +4 -13
  164. rasa/studio/constants.py +0 -1
  165. rasa/studio/data_handler.py +4 -13
  166. rasa/studio/upload.py +80 -175
  167. rasa/telemetry.py +17 -94
  168. rasa/tracing/config.py +1 -3
  169. rasa/tracing/instrumentation/attribute_extractors.py +17 -94
  170. rasa/tracing/instrumentation/instrumentation.py +0 -121
  171. rasa/utils/common.py +0 -5
  172. rasa/utils/endpoints.py +1 -27
  173. rasa/utils/io.py +81 -7
  174. rasa/utils/log_utils.py +2 -9
  175. rasa/utils/tensorflow/model_data.py +193 -2
  176. rasa/validator.py +4 -110
  177. rasa/version.py +1 -1
  178. rasa_pro-3.11.0a1.dist-info/METADATA +576 -0
  179. {rasa_pro-3.11.0.dist-info → rasa_pro-3.11.0a1.dist-info}/RECORD +182 -216
  180. rasa/core/actions/action_repeat_bot_messages.py +0 -89
  181. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-736177bf.js +0 -1
  182. rasa/core/channels/inspector/src/helpers/audiostream.ts +0 -165
  183. rasa/core/channels/voice_stream/asr/azure.py +0 -129
  184. rasa/core/channels/voice_stream/browser_audio.py +0 -107
  185. rasa/core/channels/voice_stream/call_state.py +0 -23
  186. rasa/dialogue_understanding/commands/repeat_bot_messages_command.py +0 -60
  187. rasa/dialogue_understanding/commands/user_silence_command.py +0 -59
  188. rasa/dialogue_understanding/patterns/repeat.py +0 -37
  189. rasa/dialogue_understanding/patterns/user_silence.py +0 -37
  190. rasa/model_manager/__init__.py +0 -0
  191. rasa/model_manager/config.py +0 -40
  192. rasa/model_manager/model_api.py +0 -559
  193. rasa/model_manager/runner_service.py +0 -286
  194. rasa/model_manager/socket_bridge.py +0 -146
  195. rasa/model_manager/studio_jwt_auth.py +0 -86
  196. rasa/model_manager/trainer_service.py +0 -325
  197. rasa/model_manager/utils.py +0 -87
  198. rasa/model_manager/warm_rasa_process.py +0 -187
  199. rasa/model_service.py +0 -112
  200. rasa/shared/core/flows/utils.py +0 -39
  201. rasa/shared/providers/_configs/litellm_router_client_config.py +0 -220
  202. rasa/shared/providers/_configs/model_group_config.py +0 -167
  203. rasa/shared/providers/_configs/rasa_llm_client_config.py +0 -73
  204. rasa/shared/providers/_utils.py +0 -79
  205. rasa/shared/providers/embedding/litellm_router_embedding_client.py +0 -135
  206. rasa/shared/providers/llm/litellm_router_llm_client.py +0 -182
  207. rasa/shared/providers/llm/rasa_llm_client.py +0 -112
  208. rasa/shared/providers/router/__init__.py +0 -0
  209. rasa/shared/providers/router/_base_litellm_router_client.py +0 -183
  210. rasa/shared/providers/router/router_client.py +0 -73
  211. rasa/shared/utils/health_check/__init__.py +0 -0
  212. rasa/shared/utils/health_check/embeddings_health_check_mixin.py +0 -31
  213. rasa/shared/utils/health_check/health_check.py +0 -258
  214. rasa/shared/utils/health_check/llm_health_check_mixin.py +0 -31
  215. rasa/utils/sanic_error_handler.py +0 -32
  216. rasa/utils/tensorflow/feature_array.py +0 -366
  217. rasa_pro-3.11.0.dist-info/METADATA +0 -198
  218. {rasa_pro-3.11.0.dist-info → rasa_pro-3.11.0a1.dist-info}/NOTICE +0 -0
  219. {rasa_pro-3.11.0.dist-info → rasa_pro-3.11.0a1.dist-info}/WHEEL +0 -0
  220. {rasa_pro-3.11.0.dist-info → rasa_pro-3.11.0a1.dist-info}/entry_points.txt +0 -0
README.md CHANGED
@@ -10,32 +10,411 @@
10
10
 
11
11
  <hr />
12
12
 
13
+ <img align="right" height="255" src="https://www.rasa.com/assets/img/sara/sara-open-source-2.0.png" alt="An image of Sara, the Rasa mascot bird, holding a flag that reads Open Source with one wing, and a wrench in the other" title="Rasa Pro">
13
14
 
14
- Rasa Pro is a framework for building scalable, dynamic conversational AI assistants that integrate large language models (LLMs) to enable more contextually aware and agentic interactions. Whether you’re new to conversational AI or an experienced developer, Rasa Pro offers enhanced flexibility, control, and performance for mission-critical applications.
15
+ Rasa Pro is an open core product that extends Rasa Open Source. With over 50 million downloads, Rasa Open Source is the most popular open source framework for building chat and voice-based AI assistants.
15
16
 
16
- Building on the foundation of Rasa Open Source, Rasa Pro adds advanced features like CALM (Conversational AI with Language Models) and Dialogue Understanding (DU), which enable developers to shift from traditional intent-driven systems to LLM-based agents. This allows for more robust, responsive interactions that adhere strictly to business logic, while reducing risks like prompt injection and minimizing hallucinations.
17
+ Rasa Pro introduces CALM, a generative AI-native approach to developing assistants, combined with enterprise-ready analytics, security, and observability capabilities. A paid license is required to run Rasa Pro, but all Rasa Pro code is visible to end users and can be customized as needed.
17
18
 
18
- **Key Features:**
19
+ Rasa Pro is the pro-code component of our enterprise solution, Rasa Platform, for implementing resilient and trustworthy AI assistants at scale. Rasa Studio complements Rasa Pro with a low-code user interface, enabling anyone on your team to create and improve your assistant.
19
20
 
20
- - **Flows for Business Logic:** Easily define business logic through Flows, a simplified way to describe how your AI assistant should handle conversations. Flows help streamline the development process, focusing on key tasks and reducing the complexity involved in managing conversations.
21
- - **Automatic Conversation Repair:** Ensure seamless interactions by automatically handling interruptions or unexpected inputs. Developers have full control to customize these repairs based on specific use cases.
22
- - **Customizable and Open:** Fully customizable code that allows developers to modify Rasa Pro to meet specific requirements, ensuring flexibility and adaptability to various conversational AI needs.
23
- - **Robustness and Control:** Maintain strict adherence to business logic, preventing unwanted behaviors like prompt injection and hallucinations, leading to more reliable responses and secure interactions.
24
- - **Built-in Security:** Safeguard sensitive data, control access, and ensure secure deployment, essential for production environments that demand high levels of security and compliance.
21
+ ---
22
+ - 🤓 [Read The Docs](https://rasa.com/docs/rasa-pro/)
25
23
 
24
+ - 😁 [Install Rasa Pro](https://rasa.com/docs/rasa-pro/installation/python/installation)
26
25
 
26
+ ---
27
27
 
28
- A [free developer license](https://rasa.com/docs/rasa-pro/developer-edition/) is available so you can explore and get to know Rasa Pro. For small production deployments, the Extended Developer License allows you to take your assistant live in a limited capacity. A paid license is required for larger-scale production use, but all code is visible and can be customized as needed.
28
+ ## README Contents:
29
+ - [Development Internals](#development-internals)
30
+ - [Releases](#releases)
31
+ - [Troubleshooting](#troubleshooting)
29
32
 
30
- To get started right now, you can
33
+ ## Development Internals
31
34
 
32
- `pip install rasa-pro`
35
+ ### Installing Poetry
33
36
 
34
- Check out our
37
+ Rasa uses Poetry for packaging and dependency management. If you want to build it from source,
38
+ you have to install Poetry first. Please follow
39
+ [the official guide](https://python-poetry.org/docs/#installation) to see all possible options.
35
40
 
36
- - [Rasa-pro Quickstart](https://rasa.com/docs/rasa-pro/installation/quickstart/),
37
- - [Conversational AI with Language Models (CALM) conceptual rundown](https://rasa.com/docs/rasa-pro/calm/),
38
- - [Rasa Pro / CALM tutorial](https://rasa.com/docs/rasa-pro/tutorial), and
39
- - [Rasa pro changelog](https://rasa.com/docs/rasa/rasa-pro-changelog/)
41
+ To update an existing poetry version to the [version](.github/poetry_version.txt), currently used in rasa, run:
42
+ ```shell
43
+ poetry self update <version>
44
+ ```
40
45
 
41
- for more. Also feel free to reach out to us on the [Rasa forum](https://forum.rasa.com/).
46
+ ### Managing environments
47
+
48
+ The official [Poetry guide](https://python-poetry.org/docs/managing-environments/) suggests to use
49
+ [pyenv](https://github.com/pyenv/pyenv) or any other similar tool to easily switch between Python versions.
50
+ This is how it can be done:
51
+
52
+ ```bash
53
+ pyenv install 3.10.10
54
+ pyenv local 3.10.10 # Activate Python 3.10.10 for the current project
55
+ ```
56
+ *Note*: If you have trouble installing a specific version of python on your system
57
+ it might be worth trying other supported versions.
58
+
59
+ By default, Poetry will try to use the currently activated Python version to create the virtual environment
60
+ for the current project automatically. You can also create and activate a virtual environment manually — in this
61
+ case, Poetry should pick it up and use it to install the dependencies. For example:
62
+
63
+ ```bash
64
+ python -m venv .venv
65
+ source .venv/bin/activate
66
+ ```
67
+
68
+ You can make sure that the environment is picked up by executing
69
+
70
+ ```bash
71
+ poetry env info
72
+ ```
73
+
74
+ ### Building from source
75
+
76
+ To install dependencies and `rasa` itself in editable mode execute
77
+
78
+ ```bash
79
+ make install
80
+ ```
81
+
82
+ *Note for macOS users*: under macOS Big Sur we've seen some compiler issues for
83
+ dependencies. Using `export SYSTEM_VERSION_COMPAT=1` before the installation helped.
84
+
85
+
86
+ #### Installing optional dependencies
87
+
88
+ In order to install rasa's optional dependencies, you need to run:
89
+
90
+ ```bash
91
+ make install-full
92
+ ```
93
+
94
+ *Note for macOS users*: The command `make install-full` could result in a failure while installing `tokenizers`
95
+ (issue described in depth [here](https://github.com/huggingface/tokenizers/issues/1050)).
96
+
97
+ In order to resolve it, you must follow these steps to install a Rust compiler:
98
+ ```bash
99
+ brew install rustup
100
+ rustup-init
101
+ ```
102
+
103
+ After initialising the Rust compiler, you should restart the console and check its installation:
104
+ ```bash
105
+ rustc --version
106
+ ```
107
+
108
+ In case the PATH variable had not been automatically setup, run:
109
+ ```bash
110
+ export PATH="$HOME/.cargo/bin:$PATH"
111
+ ```
112
+
113
+ #### Installing from published Python package
114
+
115
+ We have a private package registry running at **europe-west3-docker.pkg.dev/rasa-releases/** which hosts python packages as well
116
+ as docker containers. To use it, you need to be authenticated.
117
+ Follow the steps in the [google documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring)
118
+ to make sure `pip` has the necessary credentials to authenticate with the registry.
119
+ Afterwards, you should be able to run `pip install rasa`.
120
+
121
+ To be able to pull the docker image via `docker pull europe-west3-docker.pkg.dev/rasa-releases/rasa/rasa`,
122
+ you’ll need to authenticate using the `gcloud auth` command: `gcloud auth configure-docker europe-west3-docker.pkg.dev`.
123
+
124
+ More information is available in our [public documentation](https://rasa.com/docs/rasa-pro/installation/python/installation).
125
+
126
+ ### Running the Tests
127
+
128
+ In order to run the tests, make sure that you have set locally the environment variable `RASA_PRO_LICENSE` to a valid license available in 1Password.
129
+ You should ensure to install the development requirements:
130
+
131
+ ```bash
132
+ make prepare-tests-ubuntu # Only on Ubuntu and Debian based systems
133
+ make prepare-tests-macos # Only on macOS
134
+ ```
135
+
136
+ Then, run the tests:
137
+
138
+ ```bash
139
+ make test
140
+ ```
141
+
142
+ They can also be run at multiple jobs to save some time:
143
+
144
+ ```bash
145
+ JOBS=[n] make test
146
+ ```
147
+
148
+ Where `[n]` is the number of jobs desired. If omitted, `[n]` will be automatically chosen by pytest.
149
+
150
+
151
+ ### Running the Integration Tests
152
+
153
+ In order to run the integration tests, make sure that you have the development requirements installed:
154
+
155
+ ```bash
156
+ make prepare-tests-ubuntu # Only on Ubuntu and Debian based systems
157
+ make prepare-tests-macos # Only on macOS
158
+ ```
159
+
160
+ Then, you'll need to start services with the following command which uses
161
+ [Docker Compose](https://docs.docker.com/compose/install/):
162
+
163
+ ```bash
164
+ make run-integration-containers
165
+ ```
166
+
167
+ Finally, you can run the integration tests like this:
168
+
169
+ ```bash
170
+ make test-integration
171
+ ```
172
+
173
+ In order to run locally the integration tests for the tracing capability, you must first build the rasa image locally.
174
+ You can do so using the `docker buildx bake` command.
175
+ Note that the rasa image build requires a few base images, which must be built prior to building the rasa image.
176
+ The Dockerfiles for these base images are located in the `docker` subdirectory.
177
+
178
+ You must also set the following environment variables to build the rasa image locally:
179
+ - `TARGET_IMAGE_REGISTRY`, e.g. you can either use `rasa` or the private registry `europe-west3-docker.pkg.dev/rasa-releases/rasa-docker`.
180
+ - `IMAGE_TAG`, e.g. `localdev`, `latest` or PR ID.
181
+ - `BASE_IMAGE_HASH`, e.g. `localdev`
182
+ - `BASE_MITIE_IMAGE_HASH`, e.g. `localdev`
183
+ - `BASE_BUILDER_IMAGE_HASH`, e.g. `localdev`
184
+
185
+
186
+ ### Resolving merge conflicts
187
+
188
+ Poetry doesn't include any solution that can help to resolve merge conflicts in
189
+ the lock file `poetry.lock` by default.
190
+ However, there is a great tool called [poetry-merge-lock](https://poetry-merge-lock.readthedocs.io/en/latest/).
191
+ Here is how you can install it:
192
+
193
+ ```bash
194
+ pip install poetry-merge-lock
195
+ ```
196
+
197
+ Just execute this command to resolve merge conflicts in `poetry.lock` automatically:
198
+
199
+ ```bash
200
+ poetry-merge-lock
201
+ ```
202
+
203
+ ### Build a Docker image locally
204
+
205
+ In order to build a Docker image on your local machine execute the following command:
206
+
207
+ ```bash
208
+ make build-docker
209
+ ```
210
+
211
+ The Docker image is available on your local machine as `rasa-private-dev`.
212
+
213
+ ### Code Style
214
+
215
+ To ensure a standardized code style we use the [ruff](https://docs.astral.sh/ruff/formatter/) formatter.
216
+ To ensure our type annotations are correct we use the type checker [mypy](https://mypy.readthedocs.io/en/stable/).
217
+ If your code is not formatted properly or doesn't type check, GitHub will fail to build.
218
+
219
+ #### Formatting
220
+
221
+ If you want to automatically format your code on every commit, you can use [pre-commit](https://pre-commit.com/).
222
+ Just install it via `pip install pre-commit` and execute `pre-commit install` in the root folder.
223
+ This will add a hook to the repository, which reformats files on every commit.
224
+
225
+ If you want to set it up manually, install `ruff` via `poetry install`.
226
+ To reformat files execute
227
+ ```
228
+ make formatter
229
+ ```
230
+
231
+ #### Type Checking
232
+
233
+ If you want to check types on the codebase, install `mypy` using `poetry install`.
234
+ To check the types execute
235
+ ```
236
+ make types
237
+ ```
238
+
239
+ ### Backporting
240
+
241
+ In order to port changes to `main` and across release branches, we use the `backport` workflow located at
242
+ the `.github/workflows/backport.yml` path.
243
+ This workflow is triggered by the `backport-to-<release-branch>` label applied to a PR, for example `backport-to-3.8.x`.
244
+ Current available target branches are `main` and maintained release branches.
245
+
246
+ When a PR gets labelled `backport-to-<release-branch>`, a PR is opened by the `backport-github-action` as soon as the
247
+ source PR gets closed (by merging). If you want to close the PR without merging changes, make sure to remove the `backport-to-<release-branch>` label.
248
+
249
+ The PR author which the action assigns to the backporting PR has to resolve any conflicts before approving and merging.
250
+ Release PRs should also be labelled with `backport-to-main` to backport the `CHANGELOG.md` updates to `main`.
251
+ Backporting version updates should be accepted to the `main` branch from the latest release branch only.
252
+
253
+ Here are some guidelines to follow when backporting changes and resolving conflicts:
254
+
255
+ a) for conflicts in `version.py`: accept only the version from the latest release branch. Do not merge version changes
256
+ from earlier release branches into `main` because this could cause issues when trying to make the next minor release.
257
+
258
+ b) for conflicts in `pyproject.toml`: if related to the `rasa-pro` version, accept only the latest release branch;
259
+ if related to other dependencies, accept `main` or whichever is the higher upgrade (main usually has the updated
260
+ dependencies because we only do housekeeping on `main`, apart from vulnerability updates). Be mindful of dependencies that
261
+ are removed from `main` but still exist in former release branches (for example `langchain`).
262
+
263
+ c) for conflicts in `poetry.lock`: accept changes which were already present on the target branch, then run
264
+ `poetry lock --no-update` so that the lock file contains your changes from `pyproject.toml` too.
265
+
266
+ d) for conflicts in `CHANGELOG.md`: Manually place the changelog in their allocated section (e.g. 3.8.10 will go under the
267
+ 3.8 section with the other releases, rather than go at the top of the file)
268
+
269
+ If the backporting workflow fails, you are encouraged to cherry-pick the commits manually and create a PR to
270
+ the target branch. Alternatively, you can install the backporting CLI tool as described [here](https://github.com/sorenlouv/backport?tab=readme-ov-file#install).
271
+
272
+ ## Releases
273
+ Rasa has implemented robust policies governing version naming, as well as release pace for major, minor, and patch releases.
274
+
275
+ The values for a given version number (MAJOR.MINOR.PATCH) are incremented as follows:
276
+ - MAJOR version for incompatible API changes or other breaking changes.
277
+ - MINOR version for functionality added in a backward compatible manner.
278
+ - PATCH version for backward compatible bug fixes.
279
+
280
+ The following table describes the version types and their expected *release cadence*:
281
+
282
+ | Version Type | Description | Target Cadence |
283
+ |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
284
+ | Major | For significant changes, or when any backward-incompatible changes are introduced to the API or data model. | Every 1 - 2 yrs |
285
+ | Minor | For when new backward-compatible functionality is introduced, a minor feature is introduced, or when a set of smaller features is rolled out. | +/- Quarterly |
286
+ | Patch | For backward-compatible bug fixes that fix incorrect behavior. | As needed |
287
+
288
+ While this table represents our target release frequency, we reserve the right to modify it based on changing market conditions and technical requirements.
289
+
290
+ ### Maintenance Policy
291
+ Our End of Life policy defines how long a given release is considered supported, as well as how long a release is
292
+ considered to be still in active development or maintenance.
293
+
294
+ The maintenance duration and end of life for every release are shown on our website as part of the [Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/).
295
+
296
+ ### Cutting a Major / Minor release
297
+ #### A week before release day
298
+
299
+ **Post a message on the engineering Slack channel**, letting the team know you'll be the one cutting the upcoming
300
+ release, as well as:
301
+ 1. Reminding everyone to go over their issues and PRs and prioritise reviews and merges
302
+ 2. Reminding everyone of the scheduled date for the release
303
+
304
+ #### A day before release day
305
+
306
+ 1. **Evaluate the status of any PR merging that's happening. Follow up with people on their
307
+ bugs and fixes.** If the release introduces new bugs or regressions that can't be fixed in time, we should discuss on
308
+ Slack about this and take a decision on how to move forward. If the issue is not ready to be merged in time, we remove the issue / PR from the release and notify the PR owner and the product manager on Slack about it. The PR / issue owners are responsible for
309
+ communicating any issues which might be release relevant. Postponing the release should be considered as an edge case scenario.
310
+
311
+ #### Release day! 🚀
312
+
313
+ 1. **At the start of the day, post a small message on slack announcing release day!** Communicate you'll be handling
314
+ the release, and the time you're aiming to start releasing (again, no later than 4pm, as issues may arise and
315
+ cause delays). This message should be posted early in the morning and before moving forward with any of the steps of the release,
316
+ in order to give enough time to people to check their PRs and issues. That way they can plan any remaining work. A template of the slack message can be found [here](https://rasa-hq.slack.com/archives/C36SS4N8M/p1613032208137500?thread_ts=1612876410.068400&cid=C36SS4N8M).
317
+ The release time should be communicated transparently so that others can plan potentially necessary steps accordingly. If there are bigger changes this should be communicated.
318
+ 2. Once everything in the release is taken care of, post a small message on Slack communicating you are about to
319
+ start the release process (in case anything is missing).
320
+ 3. **You may now do the release by following the instructions outlined in the
321
+ [Rasa Pro README](#steps-to-release-a-new-version) !**
322
+
323
+ ### Steps to release a new version
324
+ Releasing a new version is quite simple, as the packages are build and distributed by GitHub Actions.
325
+
326
+ *Release steps*:
327
+ 1. Make sure all dependencies are up to date (**especially Rasa SDK**)
328
+ - For Rasa SDK, except in the case of a patch release, that means first creating a [new Rasa SDK release](https://github.com/RasaHQ/rasa-sdk#steps-to-release-a-new-version) (make sure the version numbers between the new Rasa and Rasa SDK releases match)
329
+ - Once the tag with the new Rasa SDK release is pushed and the package appears on [pypi](https://pypi.org/project/rasa-sdk/), the dependency in the rasa repository can be resolved (see below).
330
+ 2. If this is a minor / major release: Make sure all fixes from currently supported minor versions have been merged from their respective release branches (e.g. 3.8.x) back into main.
331
+ 3. In case of a minor release, create a new branch that corresponds to the new release, e.g.
332
+ ```bash
333
+ git checkout -b 3.8.x
334
+ git push origin 3.8.x
335
+ ```
336
+ 4. Switch to the branch you want to cut the release from (`main` in case of a major, the `<major>.<minor>.x` branch for minors and patches)
337
+ - Update the `rasa-sdk` entry in `pyproject.toml` with the new release version and run `poetry update`. This creates a new `poetry.lock` file with all dependencies resolved.
338
+ - Commit the changes with `git commit -am "bump rasa-sdk dependency"` but do not push them. They will be automatically picked up by the following step.
339
+ 5. Run `make release`
340
+ 6. Create a PR against the release branch (e.g. `3.8.x`)
341
+ 7. Once your PR is merged, [this](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) workflow runs and an automatic tag is created and pushed to remote.
342
+ (If this fails for some reason, then run the following manually on the release branch) :
343
+ ```bash
344
+ git checkout 3.8.x
345
+ git pull origin 3.8.x
346
+ git tag 3.8.0 -m "next release"
347
+ git push origin 3.8.0 --tags
348
+ ```
349
+ GitHub will build this tag and publish the build artifacts.
350
+ 8. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
351
+ 9. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
352
+ (In this case do the following checks):
353
+ - Check the workflows in [Github Actions](https://github.com/RasaHQ/rasa-private/actions) and make sure that the merged PR of the current release is completed successfully. To easily find your PR you can use the filters `event: push` and `branch: <version number>` (example on release 2.4 you can see [here](https://github.com/RasaHQ/rasa/actions/runs/643344876))
354
+ - If the workflow is not completed, then try to re-run the workflow in case that solves the problem
355
+ - If the problem persists, check also the log files and try to find the root cause of the issue
356
+ - If you still cannot resolve the error, contact the infrastructure team by providing any helpful information from your investigation
357
+ 10. If the release is successful, add the newly created release branch to the backporting configuration in the `.backportrc.json` file to
358
+ the `targetBranchesChoices` list. This is necessary for the backporting workflow to work correctly with new release branches.
359
+
360
+
361
+ ### Cutting a Patch release
362
+
363
+ Patch releases are simpler to cut, since they are meant to contain only bugfixes.
364
+
365
+ **The only things you need to do to cut a patch release are:**
366
+
367
+ 1. Notify the engineering team on Slack that you are planning to cut a patch, in case someone has an important fix
368
+ to add.
369
+ 2. Make sure the bugfix(es) are in the release branch you will use (p.e if you are cutting a `3.8.2` patch, you will
370
+ need your fixes to be on the `3.8.x` release branch). All patch releases must come from a `.x` branch!
371
+ 3. Once you're ready to release the Rasa Pro patch, checkout the branch, run `make release` and follow the
372
+ steps + get the PR merged.
373
+ 4. Once the PR is in, wait for the [tag release workflow](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) to create the tag.
374
+ (If this fails for some reason, then run the following manually on the release branch) :
375
+ ```bash
376
+ git checkout 3.8.x
377
+ git pull origin 3.8.x
378
+ git tag 3.8.0 -m "next release"
379
+ git push origin 3.8.0 --tags
380
+ ```
381
+ 5. After this you should see the CI workflow "Continuous Integration" in the Actions tab with the relevant tag name. Keep an eye on it to make sure it is successful as sometimes retries might be required.
382
+ 6. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
383
+ 7. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
384
+
385
+ Make sure to merge the branch `3.7.x` after your PR with `main`. This needs to be done manually until Roberto is added (see [ATO-2091](https://rasahq.atlassian.net/browse/ATO-2091))
386
+
387
+ ### Cutting a Pre release version
388
+
389
+ A Pre release version is an alpha, beta, dev or rc version. For more details on which version you require refer to the [Rasa Software Release Lifecycle](https://www.notion.so/rasa/Rasa-Software-Release-Lifecycle-eb704d75f87646a9a9aca1f3fbe71fb3#6e26ac9a15b64f91bb94d6bfea9306a0)
390
+
391
+ 1. Make sure you are using the right branch for the release, for instance pre releases are always made from either the main or a feature branch (especially for a dev release)
392
+ 2. Once you're ready to release, checkout the branch, run `make release` and follow the
393
+ steps.
394
+ 3. Only in case of a pre release, the release branch created will be prefixed with 'prepare-release-pre-'
395
+ 4. Note that when releasing from a feature branch the 'prepare-release-pre' branch will not be created automatically and has to be done manually. This is done to ensure all major/minor/patch releases only happens from the correct branches.
396
+ (In this case the version updates will be added to the same branch as a commit, and you will have to manually create a `prepare-release-pre-' branch and push to remote)
397
+ 5. Only in case of a pre release, we currently skip all test runs and docker image builds on a 'prepare-release-pre-' PR. This was done to speed up the pre release process.
398
+ 6. Once your PR gets merged, the [tag release workflow](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) will create the tag.
399
+ 7. After this you should see the CI workflow "Continuous Integration" in the Actions tab with the relevant tag name. Keep an eye on it to make sure it is successful as sometimes retries might be required.
400
+ 8. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
401
+ 9. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
402
+
403
+
404
+ ### Actively maintained versions
405
+
406
+ Please refer to the [Rasa Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/) page.
407
+
408
+ ### Active workflows on the CI
409
+
410
+ Please refer to the [WORKFLOW_README FILE](https://github.com/RasaHQ/rasa-private/blob/main/WORKFLOW_README.md)
411
+
412
+ ## Troubleshooting
413
+
414
+ - When running docker commands, if you encounter this error: `OSError No space left on device`, consider running:
415
+
416
+ ```shell
417
+ docker system prune --all
418
+ ```
419
+
420
+ For more information on this command, please see the [Official Docker Documentation](https://docs.docker.com/engine/reference/commandline/system_prune/).
rasa/__main__.py CHANGED
@@ -1,6 +1,5 @@
1
1
  import argparse
2
- from typing import Optional, List
3
- import structlog
2
+ import logging
4
3
  import os
5
4
  import platform
6
5
  import sys
@@ -36,9 +35,10 @@ from rasa.cli.utils import (
36
35
  )
37
36
  from rasa.plugin import plugin_manager
38
37
  from rasa.shared.exceptions import RasaException
38
+ from rasa.shared.utils.cli import print_error
39
39
  from rasa.utils.common import configure_logging_and_warnings
40
40
 
41
- structlogger = structlog.get_logger()
41
+ logger = logging.getLogger(__name__)
42
42
 
43
43
 
44
44
  def create_argument_parser() -> argparse.ArgumentParser:
@@ -89,7 +89,7 @@ def print_version() -> None:
89
89
  """Prints version information of rasa tooling and python."""
90
90
  from rasa.utils.licensing import get_license_expiration_date
91
91
 
92
- print(f"Rasa Pro Version : {version.__version__}")
92
+ print(f"Rasa Version : {version.__version__}")
93
93
  print(f"Minimum Compatible Version: {MINIMUM_COMPATIBLE_VERSION}")
94
94
  print(f"Rasa SDK Version : {rasa_sdk_version}")
95
95
  print(f"Python Version : {platform.python_version()}")
@@ -98,27 +98,18 @@ def print_version() -> None:
98
98
  print(f"License Expires : {get_license_expiration_date()}")
99
99
 
100
100
 
101
- def main(raw_arguments: Optional[List[str]] = None) -> None:
102
- """Run as standalone python application.
103
-
104
- Args:
105
- raw_arguments: Arguments to parse. If not provided,
106
- arguments will be taken from the command line.
107
- """
101
+ def main() -> None:
102
+ """Run as standalone python application."""
108
103
  warn_if_rasa_plus_package_installed()
109
104
  parse_last_positional_argument_as_model_path()
110
105
  arg_parser = create_argument_parser()
111
- cmdline_arguments = arg_parser.parse_args(raw_arguments)
106
+ cmdline_arguments = arg_parser.parse_args()
112
107
 
113
108
  log_level = getattr(cmdline_arguments, "loglevel", None)
114
109
  logging_config_file = getattr(cmdline_arguments, "logging_config_file", None)
115
110
  configure_logging_and_warnings(
116
111
  log_level, logging_config_file, warn_only_once=True, filter_repeated_logs=True
117
112
  )
118
- # TODO: we shouldn't configure colored logging, since we are using structlog
119
- # for logging - should be removed as part of logs cleanup
120
- rasa.utils.io.configure_colored_logging(log_level)
121
- configure_structlog(log_level)
122
113
 
123
114
  tf_env.setup_tf_environment()
124
115
  tf_env.check_deterministic_ops()
@@ -128,6 +119,8 @@ def main(raw_arguments: Optional[List[str]] = None) -> None:
128
119
 
129
120
  try:
130
121
  if hasattr(cmdline_arguments, "func"):
122
+ rasa.utils.io.configure_colored_logging(log_level)
123
+
131
124
  is_studio_command = check_if_studio_command()
132
125
 
133
126
  if not is_studio_command:
@@ -144,32 +137,23 @@ def main(raw_arguments: Optional[List[str]] = None) -> None:
144
137
  plugin_manager().hook.init_anonymization_pipeline(
145
138
  endpoints_file=endpoints_file
146
139
  )
140
+ # configure structlog
141
+ configure_structlog(log_level)
147
142
 
148
143
  cmdline_arguments.func(cmdline_arguments)
149
144
  elif hasattr(cmdline_arguments, "version"):
150
145
  print_version()
151
146
  else:
152
147
  # user has not provided a subcommand, let's print the help
153
- structlogger.error("cli.no_command", event_info="No command specified.")
148
+ logger.error("No command specified.")
154
149
  arg_parser.print_help()
155
150
  sys.exit(1)
156
- except RasaException as exc:
151
+ except RasaException as e:
157
152
  # these are exceptions we expect to happen (e.g. invalid training data format)
158
153
  # it doesn't make sense to print a stacktrace for these if we are not in
159
154
  # debug mode
160
- structlogger.debug(
161
- "cli.exception.details",
162
- event_info="Failed to run CLI command due to an exception.",
163
- exc_info=exc,
164
- )
165
- structlogger.error("cli.exception.rasa_exception", event_info=f"{exc}")
166
- sys.exit(1)
167
- except Exception as exc:
168
- structlogger.error(
169
- "cli.exception.general_exception",
170
- event_info=f"{exc.__class__.__name__}: {exc}",
171
- exc_info=exc,
172
- )
155
+ logger.debug("Failed to run CLI command due to an exception.", exc_info=e)
156
+ print_error(f"{e.__class__.__name__}: {e}")
173
157
  sys.exit(1)
174
158
 
175
159
 
rasa/api.py CHANGED
@@ -42,7 +42,7 @@ def run(
42
42
  from rasa.shared.constants import DOCS_BASE_URL
43
43
  from rasa.shared.utils.cli import print_warning
44
44
 
45
- _endpoints = AvailableEndpoints.get_instance(endpoints)
45
+ _endpoints = AvailableEndpoints.read_endpoints(endpoints)
46
46
 
47
47
  if not connector and not credentials:
48
48
  connector = "rest"
@@ -80,7 +80,6 @@ def train(
80
80
  finetuning_epoch_fraction: float = 1.0,
81
81
  remote_storage: Optional[StorageType] = None,
82
82
  file_importer: Optional["TrainingDataImporter"] = None,
83
- keep_local_model_copy: bool = False,
84
83
  ) -> "TrainingResult":
85
84
  """Runs Rasa Core and NLU training in `async` loop.
86
85
 
@@ -106,8 +105,6 @@ def train(
106
105
  use for storing the model.
107
106
  file_importer: Instance of `TrainingDataImporter` to use for training.
108
107
  If it is not provided, a new instance will be created.
109
- keep_local_model_copy: If `True` the model will be stored locally even if
110
- remote storage is configured.
111
108
 
112
109
  Returns:
113
110
  An instance of `TrainingResult`.
@@ -130,7 +127,6 @@ def train(
130
127
  finetuning_epoch_fraction=finetuning_epoch_fraction,
131
128
  remote_storage=remote_storage,
132
129
  file_importer=file_importer,
133
- keep_local_model_copy=keep_local_model_copy,
134
130
  )
135
131
  )
136
132
 
@@ -7,6 +7,7 @@ from rasa.core.persistor import RemoteStorageType, StorageType, parse_remote_sto
7
7
  from rasa.shared.constants import (
8
8
  DEFAULT_CONFIG_PATH,
9
9
  DEFAULT_DATA_PATH,
10
+ DEFAULT_DOMAIN_PATH,
10
11
  DEFAULT_ENDPOINTS_PATH,
11
12
  DEFAULT_MODELS_PATH,
12
13
  )
@@ -52,7 +53,7 @@ def add_nlu_data_param(
52
53
 
53
54
  def add_domain_param(
54
55
  parser: Union[argparse.ArgumentParser, argparse._ActionsContainer],
55
- default: Optional[Text] = None,
56
+ default: Optional[Text] = DEFAULT_DOMAIN_PATH,
56
57
  ) -> None:
57
58
  parser.add_argument(
58
59
  "-d",
@@ -1,16 +1,12 @@
1
1
  import argparse
2
2
 
3
- from rasa.cli.arguments.default_arguments import (
4
- add_model_param,
5
- add_skip_validation_flag,
6
- )
3
+ from rasa.cli.arguments.default_arguments import add_model_param
7
4
  from rasa.cli.arguments.run import add_server_arguments
8
5
 
9
6
 
10
7
  def set_shell_arguments(parser: argparse.ArgumentParser) -> None:
11
8
  add_model_param(parser)
12
9
  add_server_arguments(parser)
13
- add_skip_validation_flag(parser)
14
10
 
15
11
 
16
12
  def set_shell_nlu_arguments(parser: argparse.ArgumentParser) -> None:
@@ -34,7 +34,6 @@ def set_train_arguments(parser: argparse.ArgumentParser) -> None:
34
34
 
35
35
  _add_model_name_param(parser)
36
36
  add_persist_nlu_data_param(parser)
37
- add_keep_local_model_copy_param(parser)
38
37
  add_force_param(parser)
39
38
  add_finetune_params(parser)
40
39
  add_endpoint_param(
@@ -242,19 +241,6 @@ def add_persist_nlu_data_param(
242
241
  )
243
242
 
244
243
 
245
- def add_keep_local_model_copy_param(
246
- parser: Union[argparse.ArgumentParser, argparse._ActionsContainer],
247
- ) -> None:
248
- """Adds parameters for keeping a local copy of the model."""
249
- parser.add_argument(
250
- "--keep-local-model-copy",
251
- action="store_true",
252
- help="Keep a copy of the model in the model directory if remote "
253
- "model upload is configured. Defaults to `false`, which "
254
- "deletes the local copy of the model after upload.",
255
- )
256
-
257
-
258
244
  def add_finetune_params(
259
245
  parser: Union[argparse.ArgumentParser, argparse._ActionsContainer],
260
246
  ) -> None:
rasa/cli/e2e_test.py CHANGED
@@ -164,7 +164,7 @@ def execute_e2e_tests(args: argparse.Namespace) -> None:
164
164
  args.endpoints = rasa.cli.utils.get_validated_path(
165
165
  args.endpoints, "endpoints", DEFAULT_ENDPOINTS_PATH, True
166
166
  )
167
- endpoints = AvailableEndpoints.get_instance(args.endpoints)
167
+ endpoints = AvailableEndpoints.read_endpoints(args.endpoints)
168
168
 
169
169
  # Ignore all endpoints apart from action server, model, nlu and nlg
170
170
  # to ensure InMemoryTrackerStore is being used instead of production