rasa-pro 3.11.0a2__py3-none-any.whl → 3.11.0a4.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rasa-pro might be problematic. Click here for more details.

Files changed (51) hide show
  1. README.md +17 -396
  2. rasa/api.py +4 -0
  3. rasa/cli/arguments/train.py +14 -0
  4. rasa/cli/inspect.py +1 -1
  5. rasa/cli/interactive.py +1 -0
  6. rasa/cli/project_templates/calm/endpoints.yml +7 -2
  7. rasa/cli/project_templates/tutorial/endpoints.yml +7 -2
  8. rasa/cli/train.py +3 -0
  9. rasa/constants.py +2 -0
  10. rasa/core/actions/action.py +75 -33
  11. rasa/core/actions/action_repeat_bot_messages.py +72 -0
  12. rasa/core/actions/e2e_stub_custom_action_executor.py +5 -1
  13. rasa/core/actions/http_custom_action_executor.py +4 -0
  14. rasa/core/channels/socketio.py +5 -1
  15. rasa/core/channels/voice_ready/utils.py +6 -5
  16. rasa/core/channels/voice_stream/browser_audio.py +1 -1
  17. rasa/core/channels/voice_stream/twilio_media_streams.py +1 -1
  18. rasa/core/nlg/contextual_response_rephraser.py +19 -2
  19. rasa/core/persistor.py +87 -21
  20. rasa/core/utils.py +53 -22
  21. rasa/dialogue_understanding/commands/__init__.py +4 -0
  22. rasa/dialogue_understanding/commands/repeat_bot_messages_command.py +60 -0
  23. rasa/dialogue_understanding/generator/single_step/command_prompt_template.jinja2 +3 -0
  24. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +19 -0
  25. rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +5 -0
  26. rasa/dialogue_understanding/patterns/repeat.py +37 -0
  27. rasa/e2e_test/utils/io.py +2 -0
  28. rasa/model_manager/__init__.py +0 -0
  29. rasa/model_manager/config.py +18 -0
  30. rasa/model_manager/model_api.py +469 -0
  31. rasa/model_manager/runner_service.py +279 -0
  32. rasa/model_manager/socket_bridge.py +143 -0
  33. rasa/model_manager/studio_jwt_auth.py +86 -0
  34. rasa/model_manager/trainer_service.py +332 -0
  35. rasa/model_manager/utils.py +66 -0
  36. rasa/model_service.py +109 -0
  37. rasa/model_training.py +25 -7
  38. rasa/shared/constants.py +6 -0
  39. rasa/shared/core/constants.py +2 -0
  40. rasa/shared/providers/llm/self_hosted_llm_client.py +15 -3
  41. rasa/shared/utils/yaml.py +10 -1
  42. rasa/utils/endpoints.py +27 -1
  43. rasa/version.py +1 -1
  44. rasa_pro-3.11.0a4.dev1.dist-info/METADATA +197 -0
  45. {rasa_pro-3.11.0a2.dist-info → rasa_pro-3.11.0a4.dev1.dist-info}/RECORD +48 -38
  46. rasa/keys +0 -1
  47. rasa/llm_fine_tuning/notebooks/unsloth_finetuning.ipynb +0 -407
  48. rasa_pro-3.11.0a2.dist-info/METADATA +0 -576
  49. {rasa_pro-3.11.0a2.dist-info → rasa_pro-3.11.0a4.dev1.dist-info}/NOTICE +0 -0
  50. {rasa_pro-3.11.0a2.dist-info → rasa_pro-3.11.0a4.dev1.dist-info}/WHEEL +0 -0
  51. {rasa_pro-3.11.0a2.dist-info → rasa_pro-3.11.0a4.dev1.dist-info}/entry_points.txt +0 -0
README.md CHANGED
@@ -10,411 +10,32 @@
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">
14
13
 
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.
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.
16
15
 
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.
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.
18
17
 
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.
18
+ **Key Features:**
20
19
 
21
- ---
22
- - 🤓 [Read The Docs](https://rasa.com/docs/rasa-pro/)
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.
23
25
 
24
- - 😁 [Install Rasa Pro](https://rasa.com/docs/rasa-pro/installation/python/installation)
25
26
 
26
- ---
27
27
 
28
- ## README Contents:
29
- - [Development Internals](#development-internals)
30
- - [Releases](#releases)
31
- - [Troubleshooting](#troubleshooting)
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.
32
29
 
33
- ## Development Internals
30
+ To get started right now, you can
34
31
 
35
- ### Installing Poetry
32
+ `pip install rasa-pro`
36
33
 
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.
34
+ Check out our
40
35
 
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
- ```
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/)
45
40
 
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/).
41
+ for more. Also feel free to reach out to us on the [Rasa forum](https://forum.rasa.com/).
rasa/api.py CHANGED
@@ -80,6 +80,7 @@ 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,
83
84
  ) -> "TrainingResult":
84
85
  """Runs Rasa Core and NLU training in `async` loop.
85
86
 
@@ -105,6 +106,8 @@ def train(
105
106
  use for storing the model.
106
107
  file_importer: Instance of `TrainingDataImporter` to use for training.
107
108
  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.
108
111
 
109
112
  Returns:
110
113
  An instance of `TrainingResult`.
@@ -127,6 +130,7 @@ def train(
127
130
  finetuning_epoch_fraction=finetuning_epoch_fraction,
128
131
  remote_storage=remote_storage,
129
132
  file_importer=file_importer,
133
+ keep_local_model_copy=keep_local_model_copy,
130
134
  )
131
135
  )
132
136
 
@@ -34,6 +34,7 @@ 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)
37
38
  add_force_param(parser)
38
39
  add_finetune_params(parser)
39
40
  add_endpoint_param(
@@ -241,6 +242,19 @@ def add_persist_nlu_data_param(
241
242
  )
242
243
 
243
244
 
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
+
244
258
  def add_finetune_params(
245
259
  parser: Union[argparse.ArgumentParser, argparse._ActionsContainer],
246
260
  ) -> None:
rasa/cli/inspect.py CHANGED
@@ -58,7 +58,7 @@ def inspect(args: argparse.Namespace) -> None:
58
58
  async def after_start_hook_open_inspector(_: Sanic, __: AbstractEventLoop) -> None:
59
59
  """Hook to open the browser on server start."""
60
60
  server_url = constants.DEFAULT_SERVER_FORMAT.format("http", args.port)
61
- await open_inspector_in_browser(server_url, True)
61
+ await open_inspector_in_browser(server_url, args.voice)
62
62
 
63
63
  # the following arguments are not exposed to the user
64
64
  if args.voice:
rasa/cli/interactive.py CHANGED
@@ -109,6 +109,7 @@ def _set_not_required_args(args: argparse.Namespace) -> None:
109
109
  args.fail_on_validation_warnings = False
110
110
  args.validation_max_history = None
111
111
  args.remote_storage = None
112
+ args.keep_local_model_copy = False
112
113
 
113
114
 
114
115
  def perform_interactive_learning(
@@ -41,5 +41,10 @@ action_endpoint:
41
41
  # password: password
42
42
  # queue: queue
43
43
 
44
- nlg:
45
- type: rephrase
44
+ # The lines below activate contextual rephrasing, using the default OpenAI language model.
45
+ # Ensure the OPENAI_API_KEY is set to prevent any missing API key errors.
46
+ # For more details, refer to the documentation:
47
+ # https://rasa.com/docs/rasa-pro/concepts/contextual-response-rephraser
48
+ # To enable the rephraser, remove the comment symbols in the lines below.
49
+ #nlg:
50
+ # type: rephrase
@@ -41,5 +41,10 @@ action_endpoint:
41
41
  # password: password
42
42
  # queue: queue
43
43
 
44
- nlg:
45
- type: rephrase
44
+ # The lines below activate contextual rephrasing, using the default OpenAI language model.
45
+ # Ensure the OPENAI_API_KEY is set to prevent any missing API key errors.
46
+ # For more details, refer to the documentation:
47
+ # https://rasa.com/docs/rasa-pro/concepts/contextual-response-rephraser
48
+ # To enable the rephraser, remove the comment symbols in the lines below.
49
+ #nlg:
50
+ # type: rephrase
rasa/cli/train.py CHANGED
@@ -143,6 +143,7 @@ def run_training(args: argparse.Namespace, can_exit: bool = False) -> Optional[T
143
143
  finetuning_epoch_fraction=args.epoch_fraction,
144
144
  remote_storage=args.remote_storage,
145
145
  file_importer=training_data_importer,
146
+ keep_local_model_copy=args.keep_local_model_copy,
146
147
  )
147
148
  if training_result.code != 0 and can_exit:
148
149
  sys.exit(training_result.code)
@@ -201,6 +202,7 @@ def run_core_training(args: argparse.Namespace) -> Optional[Text]:
201
202
  additional_arguments=additional_arguments,
202
203
  model_to_finetune=_model_for_finetuning(args),
203
204
  finetuning_epoch_fraction=args.epoch_fraction,
205
+ keep_local_model_copy=args.keep_local_model_copy,
204
206
  )
205
207
  )
206
208
  else:
@@ -242,6 +244,7 @@ def run_nlu_training(args: argparse.Namespace) -> Optional[Text]:
242
244
  domain=args.domain,
243
245
  model_to_finetune=_model_for_finetuning(args),
244
246
  finetuning_epoch_fraction=args.epoch_fraction,
247
+ keep_local_model_copy=args.keep_local_model_copy,
245
248
  )
246
249
  )
247
250
 
rasa/constants.py CHANGED
@@ -39,5 +39,7 @@ ENV_CPU_INTRA_OP_CONFIG = "TF_INTRA_OP_PARALLELISM_THREADS"
39
39
 
40
40
  MODEL_ARCHIVE_EXTENSION = "tar.gz"
41
41
 
42
+ DEFAULT_BUCKET_NAME = "rasa-models"
43
+
42
44
  HTTP_STATUS_FORBIDDEN = 403
43
45
  HTTP_STATUS_NOT_FOUND = 404