From 9e8f06872451d8cb42477330f954bb2706ccce1f Mon Sep 17 00:00:00 2001 From: Tom Bocklisch Date: Thu, 24 Aug 2023 10:18:46 +0200 Subject: [PATCH 01/10] only submit telemetry data if there is a license --- changelog/1493.improvement.md | 1 + rasa/telemetry.py | 5 +++++ tests/test_telemetry.py | 22 ++++++++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 changelog/1493.improvement.md diff --git a/changelog/1493.improvement.md b/changelog/1493.improvement.md new file mode 100644 index 000000000000..f2b43d85714f --- /dev/null +++ b/changelog/1493.improvement.md @@ -0,0 +1 @@ +Telemetry data is only send for licensed users. diff --git a/rasa/telemetry.py b/rasa/telemetry.py index 700f483522fd..0a3b35c934ca 100644 --- a/rasa/telemetry.py +++ b/rasa/telemetry.py @@ -402,6 +402,11 @@ def _send_event( logger.debug("Skipping request to external service: telemetry key not set.") return + if not "license_hash" in context: + # only send telemetry data for customers + logger.debug("Skipping telemetry reporting: no license hash found.") + return + headers = segment_request_header(write_key) resp = requests.post( diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index 0c0447ae5a33..c189345bdbcf 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -251,7 +251,9 @@ def test_segment_gets_called(monkeypatch: MonkeyPatch): with responses.RequestsMock() as rsps: rsps.add(responses.POST, "https://api.segment.io/v1/track", json={}) - telemetry._track("test event", {"foo": "bar"}, {"foobar": "baz"}) + telemetry._track( + "test event", {"foo": "bar"}, {"foobar": "baz", "license_hash": "foobar"} + ) assert len(rsps.calls) == 1 r = rsps.calls[0] @@ -274,11 +276,27 @@ def test_segment_does_not_raise_exception_on_failure(monkeypatch: MonkeyPatch): rsps.add(responses.POST, "https://api.segment.io/v1/track", body="", status=505) # this call should complete without throwing an exception - telemetry._track("test event", {"foo": "bar"}, {"foobar": "baz"}) + telemetry._track( + "test event", {"foo": "bar"}, {"foobar": "baz", "license_hash": "foobar"} + ) assert rsps.assert_call_count("https://api.segment.io/v1/track", 1) +def test_segment_does_not_get_called_without_license(monkeypatch: MonkeyPatch): + monkeypatch.setenv("RASA_TELEMETRY_ENABLED", "true") + monkeypatch.setenv("RASA_TELEMETRY_WRITE_KEY", "foobar") + telemetry.initialize_telemetry() + + with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: + rsps.add(responses.POST, "https://api.segment.io/v1/track", body="", status=505) + + # this call should complete without throwing an exception + telemetry._track("test event", {"foo": "bar"}, {"foobar": "baz"}) + + assert rsps.assert_call_count("https://api.segment.io/v1/track", 0) + + def test_environment_write_key_overwrites_key_file(monkeypatch: MonkeyPatch): monkeypatch.setenv("RASA_TELEMETRY_WRITE_KEY", "foobar") assert telemetry.telemetry_write_key() == "foobar" From 4b442746caf7c557d89341fad2ac84bf990e4aff Mon Sep 17 00:00:00 2001 From: John Trammell <22057+trammell@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:23:04 -0500 Subject: [PATCH 02/10] remove requirements_file from CICD documentation [rasa-train-test-gha](https://github.com/RasaHQ/rasa-train-test-gha) does not have a `requirements_file` parameter. --- docs/docs/setting-up-ci-cd.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/docs/setting-up-ci-cd.mdx b/docs/docs/setting-up-ci-cd.mdx index 95b644779245..420994870272 100644 --- a/docs/docs/setting-up-ci-cd.mdx +++ b/docs/docs/setting-up-ci-cd.mdx @@ -68,7 +68,6 @@ jobs: - name: Rasa Train and Test GitHub Action uses: RasaHQ/rasa-train-test-gha@main with: - requirements_file: requirements.txt data_validate: true rasa_train: true cross_validation: true From 80501f24c0585674b277581b950a3ccdba38b69a Mon Sep 17 00:00:00 2001 From: Tawakalt Date: Wed, 30 Aug 2023 15:30:30 +0200 Subject: [PATCH 03/10] prepared release of version 3.6.8 --- CHANGELOG.mdx | 7 +++++++ pyproject.toml | 4 +--- rasa/version.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.mdx b/CHANGELOG.mdx index 7dcb05f9bf4c..76a11c955bed 100644 --- a/CHANGELOG.mdx +++ b/CHANGELOG.mdx @@ -16,6 +16,13 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . --> +## [3.6.8] - 2023-08-30 + +Rasa 3.6.8 (2023-08-30) + +No significant changes. + + ## [3.6.7] - 2023-08-29 Rasa 3.6.7 (2023-08-29) diff --git a/pyproject.toml b/pyproject.toml index 4b2434a59505..be1438fbeebd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .pytest_cache | build | dist))" [tool.poetry] name = "rasa" -version = "3.6.7" +version = "3.6.8" description = "Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants" authors = [ "Rasa Technologies GmbH ",] maintainers = [ "Tom Bocklisch ",] @@ -151,8 +151,6 @@ confluent-kafka = ">=1.9.2,<3.0.0" portalocker = "^2.7.0" structlog = "^23.1.0" structlog-sentry = "^2.0.2" -# pin dnspython to avoid dependency incompatibility -# in order to fix https://rasahq.atlassian.net/browse/ATO-1419 dnspython = "2.3.0" wheel = ">=0.38.1" certifi = ">=2023.7.22" diff --git a/rasa/version.py b/rasa/version.py index be14066b7078..1b535485740c 100644 --- a/rasa/version.py +++ b/rasa/version.py @@ -1,3 +1,3 @@ # this file will automatically be changed, # do not add anything but the version number here! -__version__ = "3.6.7" +__version__ = "3.6.8" From 04875e083ad48587b88cf5a1c7beb2a47e1e74de Mon Sep 17 00:00:00 2001 From: Tawakalt Date: Wed, 30 Aug 2023 15:36:05 +0200 Subject: [PATCH 04/10] re-add comment --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index be1438fbeebd..04e2055d1edf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,6 +151,8 @@ confluent-kafka = ">=1.9.2,<3.0.0" portalocker = "^2.7.0" structlog = "^23.1.0" structlog-sentry = "^2.0.2" +# pin dnspython to avoid dependency incompatibility +# in order to fix https://rasahq.atlassian.net/browse/ATO-1419 dnspython = "2.3.0" wheel = ">=0.38.1" certifi = ">=2023.7.22" From 9715708b1fe77c38163216487407590f15ed3f7c Mon Sep 17 00:00:00 2001 From: Tawakalt Date: Mon, 4 Sep 2023 14:32:42 +0200 Subject: [PATCH 05/10] add a default value of None to domain_responses --- rasa/core/nlg/callback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/core/nlg/callback.py b/rasa/core/nlg/callback.py index a8d0e681e055..d997f6ace092 100644 --- a/rasa/core/nlg/callback.py +++ b/rasa/core/nlg/callback.py @@ -73,7 +73,7 @@ async def generate( **kwargs: Any, ) -> Dict[Text, Any]: """Retrieve a named response from the domain using an endpoint.""" - domain_responses = kwargs.pop("domain_responses") + domain_responses = kwargs.pop("domain_responses", None) response_id = self.fetch_response_id( utter_action, tracker, output_channel, domain_responses ) From f2766695f4b4039688919c1e98d3f6c074584dbb Mon Sep 17 00:00:00 2001 From: Tawakalt Date: Mon, 4 Sep 2023 16:45:20 +0200 Subject: [PATCH 06/10] add changelog entry --- changelog/12790.bugfix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/12790.bugfix.md diff --git a/changelog/12790.bugfix.md b/changelog/12790.bugfix.md new file mode 100644 index 000000000000..4715d8ac618a --- /dev/null +++ b/changelog/12790.bugfix.md @@ -0,0 +1 @@ +Fixed `KeyError` which resulted when `domain_responses` doesn't exist as a keyword argument while using a custom action dispatcher with nlg server. \ No newline at end of file From 705d28508f2a80291eab1581a36531a5340fa02d Mon Sep 17 00:00:00 2001 From: m-vdb Date: Tue, 5 Sep 2023 10:29:48 +0200 Subject: [PATCH 07/10] bye bye playground --- .../installing-rasa-open-source.mdx | 15 +- docs/docs/playground.mdx | 267 --------- docs/netlify.toml | 190 +++---- docs/package.json | 2 - docs/sidebars.js | 513 +++++++++--------- docs/themes/theme-custom/index.js | 24 +- .../theme/AssistantBuilder/index.jsx | 104 ---- .../theme/AssistantBuilder/styles.module.css | 90 --- .../theme-custom/theme/CodeBlock/index.jsx | 28 - .../theme-custom/theme/Playground/index.jsx | 64 --- .../theme/Playground/styles.module.css | 37 -- .../theme-custom/theme/Prototyper/context.js | 5 - .../theme/Prototyper/download-button.jsx | 20 - .../theme-custom/theme/Prototyper/index.jsx | 6 - .../theme/Prototyper/prototyper.jsx | 189 ------- .../theme/Prototyper/train-button.jsx | 21 - .../theme-custom/theme/RasaButton/index.jsx | 20 - .../theme/RasaButton/styles.module.css | 25 - .../theme/RasaProBanner/index.jsx | 2 +- .../theme/ReactLiveScope/index.js | 9 - docs/yarn.lock | 107 +--- 21 files changed, 363 insertions(+), 1375 deletions(-) delete mode 100644 docs/docs/playground.mdx delete mode 100644 docs/themes/theme-custom/theme/AssistantBuilder/index.jsx delete mode 100755 docs/themes/theme-custom/theme/AssistantBuilder/styles.module.css delete mode 100755 docs/themes/theme-custom/theme/CodeBlock/index.jsx delete mode 100755 docs/themes/theme-custom/theme/Playground/index.jsx delete mode 100755 docs/themes/theme-custom/theme/Playground/styles.module.css delete mode 100644 docs/themes/theme-custom/theme/Prototyper/context.js delete mode 100644 docs/themes/theme-custom/theme/Prototyper/download-button.jsx delete mode 100644 docs/themes/theme-custom/theme/Prototyper/index.jsx delete mode 100644 docs/themes/theme-custom/theme/Prototyper/prototyper.jsx delete mode 100644 docs/themes/theme-custom/theme/Prototyper/train-button.jsx delete mode 100644 docs/themes/theme-custom/theme/RasaButton/index.jsx delete mode 100644 docs/themes/theme-custom/theme/RasaButton/styles.module.css delete mode 100644 docs/themes/theme-custom/theme/ReactLiveScope/index.js diff --git a/docs/docs/installation/installing-rasa-open-source.mdx b/docs/docs/installation/installing-rasa-open-source.mdx index b94051f93f4c..1a87e35696a1 100644 --- a/docs/docs/installation/installing-rasa-open-source.mdx +++ b/docs/docs/installation/installing-rasa-open-source.mdx @@ -9,19 +9,6 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; import { Button } from "@theme/Button"; -:::note Want to explore first? -You can explore Rasa Open Source online using the Rasa Playground even before you install it. -At the end of the tutorial, you can download the resulting assistant, install Rasa on -your machine and continue development locally. - - - Rasa Playground - -::: - ## Install Rasa Open Source @@ -147,7 +134,7 @@ python3 -m spacy download en_core_web_md :::tip Using `zsh`? -In zsh, square brackets are interpreted as patterns on the command line. +In zsh, square brackets are interpreted as patterns on the command line. To run commands with square brackets, you can either enclose the arguments with square brackets in quotes, like `pip3 install 'rasa[spacy]'`, or escape the square brackets using backslashes, like `pip3 install rasa\[spacy\]`. diff --git a/docs/docs/playground.mdx b/docs/docs/playground.mdx deleted file mode 100644 index ea4f19d3f0e3..000000000000 --- a/docs/docs/playground.mdx +++ /dev/null @@ -1,267 +0,0 @@ ---- -id: playground -sidebar_label: "Rasa Playground" -title: "Rasa Playground" -abstract: Learn the basics of building an assistant with Rasa with this interactive guide. You will be able to customize the assistant, talk to it and download the project so you can continue to build. -hide_table_of_contents: true ---- - -import useBaseUrl from "@docusaurus/useBaseUrl"; -import Prototyper, { DownloadButton, TrainButton } from "@theme/Prototyper"; -import AssistantBuilder from "@theme/AssistantBuilder"; - - - -## Build your assistant - -In this guide, we are creating an assistant that helps users subscribe to a newsletter. Go through each of the steps below to see how a simple assistant is created: - - - - - -What are the various things people might say to an assistant that can help them subscribe to a newsletter? - -For an assistant to recognize what a user is saying no matter how the user phrases their message, we need to provide example messages the assistant can learn from. -We group these examples according to the idea or the goal the message is expressing, which is also called the intent. -In the code block on the right, we have added an intent called greet, which contains example -messages like “Hi”, “Hey”, and “good morning”. - -Intents and their examples are used as training data for the assistant's Natural Language Understanding (NLU) model. - -[Learn more about NLU data and its format](./training-data-format.mdx) - - - - -```yaml-rasa live noResult assistantBuilder name=nlu -nlu: -- intent: greet - examples: | - - Hi - - Hey! - - Hallo - - Good day - - Good morning - -- intent: subscribe - examples: | - - I want to get the newsletter - - Can you send me the newsletter? - - Can you sign me up for the newsletter? - -- intent: inform - examples: | - - My email is example@example.com - - random@example.com - - Please send it to anything@example.com - - Email is something@example.com -``` - - - - - - - -Now that the assistant understands a few messages users might say, it needs responses it can send back to the user. - -“Hello, how can I help you?” and “what’s your email address?” are some of the responses our assistant will use. You’ll see how to connect user messages and responses in the next steps. - -In the code block below, we have listed some responses and added one or more text -options for each of them. If a response has multiple text options, one of these options will be chosen at random whenever that response is predicted. - -[Learn more about responses](./responses.mdx) - - - - -```yaml-rasa live noResult assistantBuilder name=responses -responses: - utter_greet: - - text: | - Hello! How can I help you? - - text: | - Hi! - utter_ask_email: - - text: | - What is your email address? - utter_subscribed: - - text: | - Check your inbox at {email} in order to finish subscribing to the newsletter! - - text: | - You're all set! Check your inbox at {email} to confirm your subscription. -``` - - - - - - - -[Stories](./stories.mdx) are example conversations that train an assistant to respond correctly depending on what the user has said previously in the conversation. -The story format shows the intent of the user message followed by the assistant’s action or response. - -Your first story should show a conversation flow where the assistant helps the user accomplish their goal in a straightforward way. Later, you can add stories for situations where the user doesn't want to provide their information or switches to another topic. - -In the code block below, we have added a story where the user and assistant exchange greetings, the user asks to subscribe to the newsletter, and the assistant starts collecting the information it needs through the newsletter_form. You will learn about forms in the next step. - -[Learn more about stories](./writing-stories.mdx) - - - - -```yaml-rasa live noResult assistantBuilder name=stories -stories: - - story: greet and subscribe - steps: - - intent: greet - - action: utter_greet - - intent: subscribe - - action: newsletter_form - - active_loop: newsletter_form -``` - - - - - - - -There are many situations where an assistant needs to collect information from the user. For example, when a user wants to subscribe to a newsletter, the assistant must ask for their email address. - -You can do this in Rasa using a form. In the code block below, we added the -`newsletter_form` and used it to collect an email address from the user. - -[Learn more about forms here](./forms.mdx) - - - - -```yaml-rasa live noResult assistantBuilder name=forms -slots: - email: - type: text - mappings: - - type: from_text - conditions: - - active_loop: newsletter_form - requested_slot: email -forms: - newsletter_form: - required_slots: - - email -``` - - - - - - - -Rules describe parts of conversations that should always follow the same path no matter what has been said previously in the conversation. - -We want our assistant to always respond to a certain intent with a specific action, so we use a rule to map that action to the intent. - -In the code block below, we have added a rule that triggers the -`newsletter_form` whenever the user expresses the intent “subscribe”. -We’ve also added a rule that triggers the `utter_subscribed` action once all the -required information has been provided. -The second rule only applies when the `newsletter_form` is active to begin with; once -it is no longer active (`active_loop: null`), the form is complete. - -[Learn more about rules and how to write them.](./rules.mdx) - -Now that you've gone through all the steps, scroll down to talk to your assistant. - - - - -```yaml-rasa live noResult assistantBuilder name=rules -rules: - - rule: activate subscribe form - steps: - - intent: subscribe - - action: newsletter_form - - active_loop: newsletter_form - - - rule: submit form - condition: - - active_loop: newsletter_form - steps: - - action: newsletter_form - - active_loop: null - - action: utter_subscribed -``` - - - - - -## Train and talk to your assistant - -Once you have reviewed the steps above, you’re ready to train your assistant. The training process generates a new machine learning model based on the training data you’ve provided. - -To train the assistant on the NLU data, stories, forms, rules and responses above, click the `Train` button: - -
- -## Looking for a challenge? Customize your assistant - -You can use this page to create an assistant that does something other than helping users subscribe to a newsletter. - -Try choosing a simple task for your assistant to do, like ordering a pizza or booking an appointment. Adapt the code blocks at each step to fit the new scenario, then train your assistant again to see it in action. - -## You have built your assistant! What’s next? - -You can download this project and continue building to create a more advanced assistant. - - - -[Install Rasa to keep building.](./installation/installing-rasa-open-source.mdx) - -
- -When you train a model, you always want to check that your assistant still behaves as -you expect. You can do that by talking to your assistant and seeing that it works. -However, as your assistant becomes more complex, you will want to use test stories to -ensure your model makes correct predictions. - -
- -Try running `rasa test` to make sure that your assistant passes your tests: - -```yaml-rasa noResult name=rules -stories: -- story: test for greet and subscribe - steps: - - user: | - Hello there - intent: greet - - action: utter_greet - - user: | - I want to subscribe to the newsletter. My email is example@email.com - intent: subscribe - - action: utter_subscribed -``` - -Check out other docs pages to learn more about -[Rasa’s CLI](./command-line-interface.mdx), -[Domains](./domain.mdx), -[Actions](./actions.mdx), -and your config’s [Pipeline](./tuning-your-model.mdx) and [Policies](./policies.mdx). - -
diff --git a/docs/netlify.toml b/docs/netlify.toml index 956b79eac95f..d7bac10afa58 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,198 +1,198 @@ ## CONTENT 301 REDIRECTIONS [[redirects]] - from = "/docs/rasa/user-guide/running-rasa-with-docker/" - to = "/docs/rasa/user-guide/docker/building-in-docker/" +from = "/docs/rasa/user-guide/running-rasa-with-docker/" +to = "/docs/rasa/user-guide/docker/building-in-docker/" [[redirects]] - from = "/docs/rasa/user-guide/running-the-server/" - to = "/docs/rasa/user-guide/configuring-http-api/" +from = "/docs/rasa/user-guide/running-the-server/" +to = "/docs/rasa/user-guide/configuring-http-api/" [[redirects]] - from = "/docs/rasa/user-guide/running-rasa-with-docker/#adding-custom-actions" - to = "/docs/rasa/user-guide/how-to-deploy/#deploying-your-action-server" +from = "/docs/rasa/user-guide/running-rasa-with-docker/#adding-custom-actions" +to = "/docs/rasa/user-guide/how-to-deploy/#deploying-your-action-server" [[redirects]] - from = "/docs/rasa/user-guide/how-to-deploy/#adding-custom-actions" - to = "/docs/rasa/user-guide/how-to-deploy/#deploying-your-action-server" +from = "/docs/rasa/user-guide/how-to-deploy/#adding-custom-actions" +to = "/docs/rasa/user-guide/how-to-deploy/#deploying-your-action-server" [[redirects]] - from = "/docs/rasa/user-guide/how-to-deploy/#using-docker-compose-to-run-multiple-services" - to = "/docs/rasa/user-guide/docker/deploying-in-docker-compose/" +from = "/docs/rasa/user-guide/how-to-deploy/#using-docker-compose-to-run-multiple-services" +to = "/docs/rasa/user-guide/docker/deploying-in-docker-compose/" [[redirects]] - from = "/docs/rasa/user-guide/evaluating-models/" - to = "/docs/rasa/user-guide/testing-your-assistant/" +from = "/docs/rasa/user-guide/evaluating-models/" +to = "/docs/rasa/user-guide/testing-your-assistant/" [[redirects]] - from = "/docs/rasa/user-guide/evaluating-models/#end-to-end-evaluation" - to = "/docs/rasa/user-guide/testing-your-assistant/#end-to-end-testing" +from = "/docs/rasa/user-guide/evaluating-models/#end-to-end-evaluation" +to = "/docs/rasa/user-guide/testing-your-assistant/#end-to-end-testing" [[redirects]] - from = "/docs/rasa/user-guide/installation/" - to = "/docs/rasa/installation/" +from = "/docs/rasa/user-guide/installation/" +to = "/docs/rasa/installation/" [[redirects]] - from = "/docs/rasa/nlu/training-data-format/" - to = "/docs/rasa/nlu-training-data/" +from = "/docs/rasa/nlu/training-data-format/" +to = "/docs/rasa/nlu-training-data/" [[redirects]] - from = "/docs/rasa/core/domains/" - to = "/docs/rasa/domain/" +from = "/docs/rasa/core/domains/" +to = "/docs/rasa/domain/" [[redirects]] - from = "/docs/rasa/user-guide/testing-your-assistant/" - to = "/docs/rasa/testing-your-assistant/" +from = "/docs/rasa/user-guide/testing-your-assistant/" +to = "/docs/rasa/testing-your-assistant/" [[redirects]] - from = "/docs/rasa/user-guide/command-line-interface/" - to = "/docs/rasa/command-line-interface/" +from = "/docs/rasa/user-guide/command-line-interface/" +to = "/docs/rasa/command-line-interface/" [[redirects]] - from = "/docs/rasa/user-guide/setting-up-ci-cd/" - to = "/docs/rasa/setting-up-ci-cd/" +from = "/docs/rasa/user-guide/setting-up-ci-cd/" +to = "/docs/rasa/setting-up-ci-cd/" [[redirects]] - from = "/docs/rasa/user-guide/rasa-tutorial/" - to = "/docs/rasa/prototype-an-assistant/" +from = "/docs/rasa/user-guide/rasa-tutorial/" +to = "/docs/rasa/prototype-an-assistant/" [[redirects]] - from = "/docs/rasa/user-guide/building-assistants/" - to = "/docs/rasa/chitchat-faqs/" +from = "/docs/rasa/user-guide/building-assistants/" +to = "/docs/rasa/chitchat-faqs/" [[redirects]] - from = "/docs/rasa/core/stories/" - to = "/docs/rasa/stories/" +from = "/docs/rasa/core/stories/" +to = "/docs/rasa/stories/" [[redirects]] - from = "/docs/rasa/user-guide/messaging-and-voice-channels/" - to = "/docs/rasa/messaging-and-voice-channels/" +from = "/docs/rasa/user-guide/messaging-and-voice-channels/" +to = "/docs/rasa/messaging-and-voice-channels/" [[redirects]] - from = "/docs/rasa/user-guide/configuring-http-api/" - to = "/docs/rasa/http-api/" +from = "/docs/rasa/user-guide/configuring-http-api/" +to = "/docs/rasa/http-api/" [[redirects]] - from = "/docs/rasa/user-guide/how-to-deploy/" - to = "/docs/rasa/how-to-deploy/" +from = "/docs/rasa/user-guide/how-to-deploy/" +to = "/docs/rasa/how-to-deploy/" [[redirects]] - from = "/docs/rasa/user-guide/cloud-storage/" - to = "/docs/rasa/model-storage/" +from = "/docs/rasa/user-guide/cloud-storage/" +to = "/docs/rasa/model-storage/" [[redirects]] - from = "/docs/rasa/nlu/choosing-a-pipeline/" - to = "/docs/rasa/tuning-your-model/" +from = "/docs/rasa/nlu/choosing-a-pipeline/" +to = "/docs/rasa/tuning-your-model/" [[redirects]] - from = "/docs/rasa/nlu/components/" - to = "/docs/rasa/components/" +from = "/docs/rasa/nlu/components/" +to = "/docs/rasa/components/" [[redirects]] - from = "/docs/rasa/user-guide/connectors/*" - to = "/docs/rasa/connectors/:splat" +from = "/docs/rasa/user-guide/connectors/*" +to = "/docs/rasa/connectors/:splat" [[redirects]] - from = "/docs/rasa/nlu/entity-extraction/" - to = "/docs/rasa/nlu-training-data/" +from = "/docs/rasa/nlu/entity-extraction/" +to = "/docs/rasa/nlu-training-data/" [[redirects]] - from = "/docs/rasa/core/responses/" - to = "/docs/rasa/domain/#responses" +from = "/docs/rasa/core/responses/" +to = "/docs/rasa/domain/#responses" [[redirects]] - from = "/docs/rasa/core/actions/" - to = "/docs/rasa/actions/" +from = "/docs/rasa/core/actions/" +to = "/docs/rasa/actions/" [[redirects]] - from = "/docs/rasa/core/reminders-and-external-events/" - to = "/docs/rasa/reaching-out-to-user/" +from = "/docs/rasa/core/reminders-and-external-events/" +to = "/docs/rasa/reaching-out-to-user/" [[redirects]] - from = "/docs/rasa/core/policies/" - to = "/docs/rasa/policies/" +from = "/docs/rasa/core/policies/" +to = "/docs/rasa/policies/" [[redirects]] - from = "/docs/rasa/core/slots/" - to = "/docs/rasa/domain/#slots" +from = "/docs/rasa/core/slots/" +to = "/docs/rasa/domain/#slots" [[redirects]] - from = "/docs/rasa/core/retrieval-actions/" - to = "/docs/rasa/retrieval-actions/" +from = "/docs/rasa/core/retrieval-actions/" +to = "/docs/rasa/retrieval-actions/" [[redirects]] - from = "/docs/rasa/core/forms/" - to = "/docs/rasa/forms/" +from = "/docs/rasa/core/forms/" +to = "/docs/rasa/forms/" [[redirects]] - from = "/docs/rasa/core/interactive-learning/" - to = "/docs/rasa/writing-stories/#using-interactive-learning" +from = "/docs/rasa/core/interactive-learning/" +to = "/docs/rasa/writing-stories/#using-interactive-learning" [[redirects]] - from = "/docs/rasa/core/fallback-actions/" - to = "/docs/rasa/fallback-handoff/#fallbacks" +from = "/docs/rasa/core/fallback-actions/" +to = "/docs/rasa/fallback-handoff/#fallbacks" [[redirects]] - from = "/docs/rasa/dialogue-elements/small-talk/" - to = "/docs/rasa/chitchat-faqs/" +from = "/docs/rasa/dialogue-elements/small-talk/" +to = "/docs/rasa/chitchat-faqs/" [[redirects]] - from = "/docs/rasa/api/action-server/" - to = "/docs/rasa/pages/action-server-api/" +from = "/docs/rasa/api/action-server/" +to = "/docs/rasa/pages/action-server-api/" [[redirects]] - from = "/docs/rasa/api/http-api/" - to = "/docs/rasa/pages/http-api/" +from = "/docs/rasa/api/http-api/" +to = "/docs/rasa/pages/http-api/" [[redirects]] - from = "/docs/rasa/api/jupyter-notebooks/" - to = "/docs/rasa/jupyter-notebooks/" +from = "/docs/rasa/api/jupyter-notebooks/" +to = "/docs/rasa/jupyter-notebooks/" [[redirects]] - from = "/docs/rasa/api/custom-nlu-components/" - to = "/docs/rasa/components/#custom-components" +from = "/docs/rasa/api/custom-nlu-components/" +to = "/docs/rasa/components/#custom-components" [[redirects]] - from = "/docs/rasa/api/tracker-stores/" - to = "/docs/rasa/tracker-stores/" +from = "/docs/rasa/api/tracker-stores/" +to = "/docs/rasa/tracker-stores/" [[redirects]] - from = "/docs/rasa/api/event-brokers/" - to = "/docs/rasa/event-brokers/" +from = "/docs/rasa/api/event-brokers/" +to = "/docs/rasa/event-brokers/" [[redirects]] - from = "/docs/rasa/api/lock-stores/" - to = "/docs/rasa/lock-stores/" +from = "/docs/rasa/api/lock-stores/" +to = "/docs/rasa/lock-stores/" [[redirects]] - from = "/docs/rasa/api/training-data-importers/" - to = "/docs/rasa/training-data-importers/" +from = "/docs/rasa/api/training-data-importers/" +to = "/docs/rasa/training-data-importers/" [[redirects]] - from = "/docs/rasa/retrieval-actions" - to = "/docs/rasa/chitchat-faqs/" +from = "/docs/rasa/retrieval-actions" +to = "/docs/rasa/chitchat-faqs/" [[redirects]] - from = "/docs/rasa/prototype-an-assistant" - to = "/docs/rasa/playground/" +from = "/docs/rasa/playground/" +to = "/docs/rasa/" # Redirects for latest version permalinks # this needs to be updated when we cut a new version [[redirects]] - from = "/docs/rasa/3.x/*" - to = "/docs/rasa/:splat" +from = "/docs/rasa/3.x/*" +to = "/docs/rasa/:splat" # end permalink section # FIXME: this requires some feedback as to the 404, like in the website [[redirects]] - from = "/docs/rasa/*" - to = "/docs/rasa/index.html" - status = 404 +from = "/docs/rasa/*" +to = "/docs/rasa/index.html" +status = 404 [[redirects]] - from = "/docs/rasa/installation" - to = "/docs/rasa/installation/environment-set-up/" +from = "/docs/rasa/installation" +to = "/docs/rasa/installation/environment-set-up/" [[redirects]] from = "/docs/rasa/deploy/deploy-rasa-plus/" diff --git a/docs/package.json b/docs/package.json index a3110cf737e3..2f45cb80ab85 100644 --- a/docs/package.json +++ b/docs/package.json @@ -45,7 +45,6 @@ "@lunelson/sass-u": "^0.11.0", "@mdx-js/mdx": "^1.6.22", "@mdx-js/react": "^1.6.22", - "@philpl/buble": "^0.19.7", "@rasahq/docusaurus-theme-tabula": "^0.8.3", "classnames": "^2.3.1", "clsx": "^1.1.1", @@ -58,7 +57,6 @@ "postcss-pseudo-any": "^1.0.1", "react": "^16.8.4", "react-dom": "^16.8.4", - "react-live": "^2.2.3", "react-promise": "^3.0.2", "react-router-dom": "^5.2.0", "redoc": "^2.0.0-rc.31", diff --git a/docs/sidebars.js b/docs/sidebars.js index 297eb0026c65..346bdb0a244e 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -1,283 +1,278 @@ module.exports = { - default: [ - 'introduction', - 'rasa-pro', - 'playground', + default: [ + "introduction", + "rasa-pro", + { + type: "category", + label: "Installation", + collapsed: true, + items: [ + "installation/environment-set-up", + "installation/installing-rasa-open-source", { - type: 'category', - label: 'Installation', - collapsed: true, - items: [ - 'installation/environment-set-up', - 'installation/installing-rasa-open-source', - { - label: 'Installing Rasa Pro', - collapsed: true, - type: 'category', - items: [ - 'installation/rasa-pro/rasa-pro-artifacts', - 'installation/rasa-pro/installation', - ], - }, - ], + label: "Installing Rasa Pro", + collapsed: true, + type: "category", + items: [ + "installation/rasa-pro/rasa-pro-artifacts", + "installation/rasa-pro/installation", + ], }, + ], + }, + { + type: "category", + label: "Building Assistants", + collapsed: false, + items: [ + "migrate-from", + "command-line-interface", { - type: 'category', - label: 'Building Assistants', - collapsed: false, - items: [ - 'migrate-from', - 'command-line-interface', - { - type: 'category', - label: 'Best Practices', - collapsed: true, - items: [ - 'conversation-driven-development', - 'generating-nlu-data', - 'writing-stories', - ], - }, - { - type: 'category', - label: 'Conversation Patterns', - collapsed: true, - items: [ - 'chitchat-faqs', - 'business-logic', - 'fallback-handoff', - 'unexpected-input', - 'contextual-conversations', - 'reaching-out-to-user', - ], - }, - { - type: 'category', - label: 'Preparing For Production', - collapsed: true, - items: [ - 'messaging-and-voice-channels', - 'tuning-your-model', - 'testing-your-assistant', - 'setting-up-ci-cd', - ], - }, - 'glossary', - ], + type: "category", + label: "Best Practices", + collapsed: true, + items: [ + "conversation-driven-development", + "generating-nlu-data", + "writing-stories", + ], }, { - type: 'category', - label: 'Deploying Assistants', - collapsed: true, - items: [ - 'deploy/introduction', - 'deploy/deploy-rasa', - 'deploy/deploy-action-server', - 'deploy/deploy-rasa-pro-services', - ], + type: "category", + label: "Conversation Patterns", + collapsed: true, + items: [ + "chitchat-faqs", + "business-logic", + "fallback-handoff", + "unexpected-input", + "contextual-conversations", + "reaching-out-to-user", + ], }, { - type: 'category', - label: 'Monitoring and Analyzing Assistants', - collapsed: true, - items: [ - { - type: 'category', - label: 'Analytics', - collapsed: true, - items: [ - 'monitoring/analytics/getting-started-with-analytics', - 'monitoring/analytics/realtime-markers', - 'monitoring/analytics/example-queries', - 'monitoring/analytics/data-structure-reference', - ], - }, - 'monitoring/tracing', - 'monitoring/load-testing-guidelines', - ], + type: "category", + label: "Preparing For Production", + collapsed: true, + items: [ + "messaging-and-voice-channels", + "tuning-your-model", + "testing-your-assistant", + "setting-up-ci-cd", + ], }, - 'pii-management', + "glossary", + ], + }, + { + type: "category", + label: "Deploying Assistants", + collapsed: true, + items: [ + "deploy/introduction", + "deploy/deploy-rasa", + "deploy/deploy-action-server", + "deploy/deploy-rasa-pro-services", + ], + }, + { + type: "category", + label: "Monitoring and Analyzing Assistants", + collapsed: true, + items: [ { - type: 'category', - label: 'Concepts', - collapsed: false, - items: [ - { - type: 'category', - label: 'Training Data', - items: [ - 'training-data-format', - 'nlu-training-data', - 'stories', - 'rules', - ], - }, - 'domain', - { - type: 'category', - label: 'Config', - items: [ - 'model-configuration', - 'components', - 'policies', - 'custom-graph-components', - 'training-data-importers', - 'language-support', - 'graph-recipe', - 'spaces', - ], - }, - { - type: 'category', - label: 'Actions', - items: [ - 'actions', - 'responses', - 'custom-actions', - 'forms', - 'default-actions', - 'slot-validation-actions', - ], - }, - { - type: 'category', - label: 'Evaluation', - items: ['markers'], - }, - { - type: 'category', - label: 'Channel Connectors', - items: [ - { - type: 'category', - label: 'Text & Chat', - items: [ - 'connectors/facebook-messenger', - 'connectors/slack', - 'connectors/telegram', - 'connectors/twilio', - 'connectors/hangouts', - 'connectors/microsoft-bot-framework', - 'connectors/cisco-webex-teams', - 'connectors/rocketchat', - 'connectors/mattermost', - ], - }, - { - type: 'category', - label: 'Voice', - items: ['connectors/audiocodes-voiceai-connect'], - }, - 'connectors/custom-connectors', - ], - }, - { - type: 'category', - label: 'Architecture', // name still confusing with architecture page elsewhere - items: [ - 'arch-overview', - 'tracker-stores', - 'event-brokers', - 'model-storage', - 'lock-stores', - 'secrets-managers', - 'nlu-only', - 'nlg', - ], - }, - ], + type: "category", + label: "Analytics", + collapsed: true, + items: [ + "monitoring/analytics/getting-started-with-analytics", + "monitoring/analytics/realtime-markers", + "monitoring/analytics/example-queries", + "monitoring/analytics/data-structure-reference", + ], }, + "monitoring/tracing", + "monitoring/load-testing-guidelines", + ], + }, + "pii-management", + { + type: "category", + label: "Concepts", + collapsed: false, + items: [ { - type: 'category', - label: 'Action Server', - collapsed: true, - items: [ - 'action-server/index', - { - 'Action Server Fundamentals': [ - 'action-server/actions', - 'action-server/events', - ], - }, - { - 'Using the Rasa SDK': [ - 'action-server/running-action-server', - { - type: 'category', - label: 'Writing Custom Actions', - collapsed: true, - items: [ - 'action-server/sdk-actions', - 'action-server/sdk-tracker', - 'action-server/sdk-dispatcher', - 'action-server/sdk-events', - { - type: 'category', - label: 'Special Action Types', - collapsed: true, - items: [ - 'action-server/knowledge-bases', - 'action-server/validation-action', - ], - }, - ], - }, - 'action-server/sanic-extensions', - ], - }, - ], + type: "category", + label: "Training Data", + items: [ + "training-data-format", + "nlu-training-data", + "stories", + "rules", + ], + }, + "domain", + { + type: "category", + label: "Config", + items: [ + "model-configuration", + "components", + "policies", + "custom-graph-components", + "training-data-importers", + "language-support", + "graph-recipe", + "spaces", + ], + }, + { + type: "category", + label: "Actions", + items: [ + "actions", + "responses", + "custom-actions", + "forms", + "default-actions", + "slot-validation-actions", + ], + }, + { + type: "category", + label: "Evaluation", + items: ["markers"], + }, + { + type: "category", + label: "Channel Connectors", + items: [ + { + type: "category", + label: "Text & Chat", + items: [ + "connectors/facebook-messenger", + "connectors/slack", + "connectors/telegram", + "connectors/twilio", + "connectors/hangouts", + "connectors/microsoft-bot-framework", + "connectors/cisco-webex-teams", + "connectors/rocketchat", + "connectors/mattermost", + ], + }, + { + type: "category", + label: "Voice", + items: ["connectors/audiocodes-voiceai-connect"], + }, + "connectors/custom-connectors", + ], }, { - type: 'category', - label: 'APIs', - collapsed: true, - items: [ - 'http-api', - 'nlu-only-server', - // 'jupyter-notebooks', - ], + type: "category", + label: "Architecture", // name still confusing with architecture page elsewhere + items: [ + "arch-overview", + "tracker-stores", + "event-brokers", + "model-storage", + "lock-stores", + "secrets-managers", + "nlu-only", + "nlg", + ], }, + ], + }, + { + type: "category", + label: "Action Server", + collapsed: true, + items: [ + "action-server/index", { - type: 'category', - label: 'Reference', - collapsed: true, - items: [ - 'telemetry/telemetry', - 'telemetry/reference', - require('./docs/reference/sidebar.json'), - ], + "Action Server Fundamentals": [ + "action-server/actions", + "action-server/events", + ], }, { - type: 'category', - label: 'Change Log', - collapsed: true, - items: [ - 'rasa-pro-changelog', - 'changelog', - 'sdk_changelog', - 'compatibility-matrix', - 'migration-guide', + "Using the Rasa SDK": [ + "action-server/running-action-server", + { + type: "category", + label: "Writing Custom Actions", + collapsed: true, + items: [ + "action-server/sdk-actions", + "action-server/sdk-tracker", + "action-server/sdk-dispatcher", + "action-server/sdk-events", { - type: 'link', - label: 'Actively Maintained Versions', - href: 'https://rasa.com/rasa-product-release-and-maintenance-policy/', + type: "category", + label: "Special Action Types", + collapsed: true, + items: [ + "action-server/knowledge-bases", + "action-server/validation-action", + ], }, - ], + ], + }, + "action-server/sanic-extensions", + ], }, - ], - "llms": [ - 'llms/large-language-models', - 'llms/llm-setup', + ], + }, + { + type: "category", + label: "APIs", + collapsed: true, + items: [ + "http-api", + "nlu-only-server", + // 'jupyter-notebooks', + ], + }, + { + type: "category", + label: "Reference", + collapsed: true, + items: [ + "telemetry/telemetry", + "telemetry/reference", + require("./docs/reference/sidebar.json"), + ], + }, + { + type: "category", + label: "Change Log", + collapsed: true, + items: [ + "rasa-pro-changelog", + "changelog", + "sdk_changelog", + "compatibility-matrix", + "migration-guide", { - type: 'category', - label: 'LLM Components', - collapsed: false, - items: [ - 'llms/llm-intent', - 'llms/llm-nlg', - 'llms/llm-intentless', - ], + type: "link", + label: "Actively Maintained Versions", + href: "https://rasa.com/rasa-product-release-and-maintenance-policy/", }, - 'llms/llm-custom', - ] + ], + }, + ], + llms: [ + "llms/large-language-models", + "llms/llm-setup", + { + type: "category", + label: "LLM Components", + collapsed: false, + items: ["llms/llm-intent", "llms/llm-nlg", "llms/llm-intentless"], + }, + "llms/llm-custom", + ], }; diff --git a/docs/themes/theme-custom/index.js b/docs/themes/theme-custom/index.js index 8a0e8195f310..c0038ecb87b5 100644 --- a/docs/themes/theme-custom/index.js +++ b/docs/themes/theme-custom/index.js @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require("path"); // FIXME: this package is copied from // https://github.com/facebook/docusaurus/tree/afe9ff91a4247316f0081c9b080655d575298416/packages/docusaurus-theme-live-codeblock/src @@ -8,36 +8,24 @@ module.exports = function (context) { } = context; return { - name: 'theme-custom', + name: "theme-custom", getThemePath() { - return path.resolve(__dirname, './theme'); + return path.resolve(__dirname, "./theme"); }, // FIXME: this needs to be fixed in the theme, see https://github.com/RasaHQ/docusaurus-tabula/issues/11 getClientModules() { - return [require.resolve('./custom.css')]; - }, - - configureWebpack() { - return { - resolve: { - alias: { - // fork of Buble which removes Buble's large dependency and weighs in at a smaller size of ~51kB - // https://github.com/FormidableLabs/react-live#what-bundle-size-can-i-expect - buble: '@philpl/buble', - }, - }, - }; + return [require.resolve("./custom.css")]; }, injectHtmlTags() { return { headTags: [ { - tagName: 'meta', + tagName: "meta", attributes: { - property: 'og:image', + property: "og:image", content: `${siteUrl}${baseUrl}img/og-image.png`, }, }, diff --git a/docs/themes/theme-custom/theme/AssistantBuilder/index.jsx b/docs/themes/theme-custom/theme/AssistantBuilder/index.jsx deleted file mode 100644 index ae9dcbed8a70..000000000000 --- a/docs/themes/theme-custom/theme/AssistantBuilder/index.jsx +++ /dev/null @@ -1,104 +0,0 @@ -import * as React from 'react'; -import clsx from 'clsx'; - -import RasaButton from "../RasaButton"; -import styles from './styles.module.css'; - -function Text({values, selectedValue, setSelectedValue, children, ...props}) { - const index = values.findIndex((v) => v.value === selectedValue); - - const onButtonClick = () => { - if (index < values.length - 1) { - setSelectedValue(values[index + 1].value); - } - }; - - return ( -
-
- {children} -
- - { - index !== -1 && index !== values.length - 1 && -
- -
- } -
- ) -} - -function Code({children}) { - return ( -
- {children} -
- ) -} - -function Section({children, ...props}) { - return ( -
- {React.Children.toArray(children).map( - (child) => React.cloneElement(child, props) - )} -
- ) -} - -function NextStepButton(props) { - return ( - - Next step >> - - ) -} - -function Container({children, values, defaultValue, ...props}) { - const [selectedValue, setSelectedValue] = React.useState(defaultValue); - const tabRefs = []; - - const changeSelectedValue = (newValue) => { - setSelectedValue(newValue); - }; - - return ( -
-
    - {values.map(({value, label}) => ( -
  • tabRefs.push(tabControl)} - onFocus={() => changeSelectedValue(value)} - onClick={() => { - changeSelectedValue(value); - }} - > - {label} -
  • - ))} -
-
- { - React.Children.toArray(children).map( - (child) => React.cloneElement(child, - {values, selectedValue, setSelectedValue, ...props} - ) - ) - } -
-
- ) -} - -export default { - Container, - Section, - Text, - Code -}; diff --git a/docs/themes/theme-custom/theme/AssistantBuilder/styles.module.css b/docs/themes/theme-custom/theme/AssistantBuilder/styles.module.css deleted file mode 100755 index c4a983a6c8d2..000000000000 --- a/docs/themes/theme-custom/theme/AssistantBuilder/styles.module.css +++ /dev/null @@ -1,90 +0,0 @@ -.container { - border: 1px solid var(--global-border-color); - border-radius: 10px; - margin-top: 40px !important; - word-break: normal; -} - -.containerTabs { - display: flex; - flex-direction: row; - padding: 0 16px; - font-size: 80%; -} - -.tab { - padding: 16px 24px; - border-bottom: 3px solid transparent; - cursor: pointer; - outline: none; - margin-top: 0 !important; -} - -.tab::before { - content: '' !important; -} - -.tabActive { - border-bottom: 3px solid var(--ifm-color-primary); - cursor: default; - font-weight: 500; -} - -.containerSections { - hyphens: none; - overflow: hidden; - height: 680px; -} - -.containerSections p { - margin-bottom: 27px; -} - -.section { - display: none; - flex-direction: row; -} - -.sectionActive { - display: flex; -} - -.text { - flex: 1; - font-size: 85%; - height: 680px; - display: flex; - flex-direction: column; -} - -.textTop { - flex: 1; - overflow-y: scroll; - padding: 24px; - border-top: 1px solid var(--global-border-color); -} - -.textButtons { - padding: 32px 24px; -} - -.code { - flex: 1; - display: flex; - font-size: 17px; - line-height: 27px; - overflow: scroll; - height: 680px; -} - -.code > div { - flex: 1; - margin-bottom: 0 !important; - display: flex; - flex-direction: column; - overflow: scroll; -} - -.code > div > div { - overflow: scroll !important; -} diff --git a/docs/themes/theme-custom/theme/CodeBlock/index.jsx b/docs/themes/theme-custom/theme/CodeBlock/index.jsx deleted file mode 100755 index 28ce514dcbaa..000000000000 --- a/docs/themes/theme-custom/theme/CodeBlock/index.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import usePrismTheme from '@theme/hooks/usePrismTheme'; -import Playground from '@theme/Playground'; -import ReactLiveScope from '@theme/ReactLiveScope'; -import CodeBlock from '@theme-init/CodeBlock'; - -const withLiveEditor = (Component) => { - return (props) => { - const {isClient} = useDocusaurusContext(); - const prismTheme = usePrismTheme(); - - if (props.live) { - return ( - - ); - } - - return ; - }; -}; - -export default withLiveEditor(CodeBlock); diff --git a/docs/themes/theme-custom/theme/Playground/index.jsx b/docs/themes/theme-custom/theme/Playground/index.jsx deleted file mode 100755 index 7df1f551120e..000000000000 --- a/docs/themes/theme-custom/theme/Playground/index.jsx +++ /dev/null @@ -1,64 +0,0 @@ -import * as React from 'react'; -import {LiveProvider, LiveEditor, LiveError, LivePreview} from 'react-live'; -import clsx from 'clsx'; -import ThemeContext from '@theme/_contexts/ThemeContext'; - -import styles from './styles.module.css'; - - -function Playground({children, theme, transformCode, noResult, assistantBuilder, name, ...props}) { - const code = children.replace(/\n$/, ''); - const themeContext = React.useContext(ThemeContext); - - // only run this when mounting - React.useEffect(() => { - themeContext.onLiveCodeStart(name, code); - }, []); - - return ( - `${code};`)} - theme={theme} - {...props}> - { - !assistantBuilder && -
- Live Editor -
- } - themeContext.onLiveCodeChange(name, value)} - /> - - { - !noResult && -
- Result -
- } - - { - !noResult && -
- - -
- } -
- ); -} - -export default Playground; diff --git a/docs/themes/theme-custom/theme/Playground/styles.module.css b/docs/themes/theme-custom/theme/Playground/styles.module.css deleted file mode 100755 index 98e7d2dea8bc..000000000000 --- a/docs/themes/theme-custom/theme/Playground/styles.module.css +++ /dev/null @@ -1,37 +0,0 @@ -.playgroundHeader { - letter-spacing: 0.08rem; - padding: 0.75rem; - text-transform: uppercase; - font-weight: bold; -} - -.playgroundEditorHeader { - background: rgb(32, 35, 42); - color: #999; -} - -.playgroundPreviewHeader { - background: rgb(236, 236, 236); - color: rgb(109, 109, 109); -} - -.playgroundPreview { - border: 1px solid #f0f0f0; - border-bottom-left-radius: var(--ifm-global-radius); - border-bottom-right-radius: var(--ifm-global-radius); - position: relative; - padding: 1rem; -} - -.playgroundEditor { - flex: 1; - overflow-y: scroll; -} - -.playgroundEditorAssistantBuilder { - border-radius: 0 0 8px 0; -} - -.playgroundEditorAssistantBuilder pre, .playgroundEditorAssistantBuilder textarea { - padding: 28px 24px !important; -} \ No newline at end of file diff --git a/docs/themes/theme-custom/theme/Prototyper/context.js b/docs/themes/theme-custom/theme/Prototyper/context.js deleted file mode 100644 index 3c746fd0ead3..000000000000 --- a/docs/themes/theme-custom/theme/Prototyper/context.js +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -const PrototyperContext = React.createContext(); - -export default PrototyperContext; diff --git a/docs/themes/theme-custom/theme/Prototyper/download-button.jsx b/docs/themes/theme-custom/theme/Prototyper/download-button.jsx deleted file mode 100644 index da4a5a0b608f..000000000000 --- a/docs/themes/theme-custom/theme/Prototyper/download-button.jsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; - -import RasaButton from '../RasaButton'; -import PrototyperContext from './context'; - -const DownloadButton = (props) => { - const prototyperContext = React.useContext(PrototyperContext); - - return ( - - Download project - - ); -}; - -export default DownloadButton; diff --git a/docs/themes/theme-custom/theme/Prototyper/index.jsx b/docs/themes/theme-custom/theme/Prototyper/index.jsx deleted file mode 100644 index e1ce9a07ee52..000000000000 --- a/docs/themes/theme-custom/theme/Prototyper/index.jsx +++ /dev/null @@ -1,6 +0,0 @@ -import DownloadButton from './download-button'; -import Prototyper from './prototyper'; -import TrainButton from './train-button'; - -export default Prototyper; -export { DownloadButton, TrainButton }; diff --git a/docs/themes/theme-custom/theme/Prototyper/prototyper.jsx b/docs/themes/theme-custom/theme/Prototyper/prototyper.jsx deleted file mode 100644 index e3f464c1d379..000000000000 --- a/docs/themes/theme-custom/theme/Prototyper/prototyper.jsx +++ /dev/null @@ -1,189 +0,0 @@ -import React from 'react'; -import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; -import ThemeContext from '@theme/_contexts/ThemeContext'; -import { isProductionBuild, uuidv4 } from '@theme/_utils'; - -import PrototyperContext from './context'; - -const jsonHeaders = { - Accept: 'application/json', - 'Content-Type': 'application/json', -}; -const trackerPollingInterval = 2000; - -const Prototyper = ({ - children, - startPrototyperApi, - trainModelApi, - chatBlockSelector, - chatBlockScriptUrl, -}) => { - const [hasStarted, setHasStarted] = React.useState(false); - const [trackingId, setTrackingId] = React.useState(null); - const [projectDownloadUrl, setProjectDownloadUrl] = React.useState(null); - const [trainingData, setTrainingData] = React.useState({}); - const [pollingIntervalId, setPollingIntervalId] = React.useState(null); - - const [baseUrl, setBaseUrl] = React.useState(""); - const [tracker, setTracker] = React.useState({}); - const [chatState, setChatState] = React.useState("not_trained"); - - // FIXME: once we can use `rasa-ui` outside of `rasa-x`, we can remove this - const insertChatBlockScript = () => { - if (ExecutionEnvironment.canUseDOM) { - const scriptElement = document.createElement('script'); - scriptElement.src = chatBlockScriptUrl; - document.body.appendChild(scriptElement); - } - }; - - // update tracking id when component is mounting - React.useEffect(() => { - setTrackingId(isProductionBuild() ? uuidv4() : 'the-hash'); - insertChatBlockScript(); - updateChatBlock(); - }, []); - - // update chat block when chatState or tracker changes - React.useEffect(() => { - updateChatBlock(); - }, [chatState, tracker, trainingData]); - - const clearPollingInterval = React.useCallback(() => { - if (pollingIntervalId) { - clearInterval(pollingIntervalId); - setPollingIntervalId(null); - } - }, [pollingIntervalId, setPollingIntervalId]); - - const onLiveCodeStart = React.useCallback((name, value) => { - setTrainingData((prevTrainingData) => ({...prevTrainingData, [name]: value})); - }, [setTrainingData]); - - const onLiveCodeChange = React.useCallback((name, value) => { - setTrainingData((prevTrainingData) => ({ ...prevTrainingData, [name]: value })); - - if (chatState === "ready") { - clearPollingInterval(); - setChatState("needs_to_be_retrained"); - updateChatBlock(); - } - - if (!hasStarted) { - // track the start here - setHasStarted(true); - fetch(startPrototyperApi, { - method: 'POST', - headers: jsonHeaders, - body: JSON.stringify({ - tracking_id: trackingId, - editor: 'main', - }), - }); - } - }, [ - clearPollingInterval, - hasStarted, - setHasStarted, - trackingId, - chatState, - setChatState, - setTrainingData, - jsonHeaders - ]); - - const trainModel = (trainingData) => { - setChatState("training"); - clearPollingInterval(); - - fetch(trainModelApi, { - method: 'POST', - headers: jsonHeaders, - body: JSON.stringify({ tracking_id: trackingId, ...trainingData }), - }) - .then((response) => response.json()) - .then((data) => { - setProjectDownloadUrl(data.project_download_url); - if (data.rasa_service_url) { - startFetchingTracker(data.rasa_service_url); - } - }); - }; - - const downloadProject = () => { - if (projectDownloadUrl) { - location.href = projectDownloadUrl; - } - }; - - const updateChatBlock = () => { - if (!ExecutionEnvironment.canUseDOM) { - return; - } - - if (!window.ChatBlock) { - setTimeout(() => updateChatBlock(baseUrl, tracker), 500); - return; - } - - window.ChatBlock.default.init({ - onSendMessage: (message) => { - sendMessage(baseUrl, message); - }, - onTrainClick: () => { - trainModel(trainingData); - }, - username: trackingId, - tracker: tracker, - selector: chatBlockSelector, - state: chatState, - }); - }; - - const fetchTracker = (baseUrl) => { - fetch(`${baseUrl}/conversations/${trackingId}/tracker`, { - method: 'GET', - header: 'jsonHeaders', - }) - .then((response) => response.json()) - .then((tracker) => { - setBaseUrl(baseUrl); - setTracker(tracker); - setChatState("ready"); - }); - }; - - const sendMessage = (baseUrl, message) => { - fetch(`${baseUrl}/webhooks/rest/webhook`, { - method: 'POST', - headers: jsonHeaders, - body: JSON.stringify({ - sender: trackingId, - message: message, - }), - }).then(() => { - fetchTracker(baseUrl); - }); - }; - - const startFetchingTracker = (baseUrl) => { - setChatState("deploying"); - fetchTracker(baseUrl); - - const updateIntervalId = setInterval(() => { - fetchTracker(baseUrl); - }, trackerPollingInterval); - - setPollingIntervalId(updateIntervalId); - }; - - return ( - - - {children} - - - ); -}; - -export default Prototyper; diff --git a/docs/themes/theme-custom/theme/Prototyper/train-button.jsx b/docs/themes/theme-custom/theme/Prototyper/train-button.jsx deleted file mode 100644 index 96741a004d3e..000000000000 --- a/docs/themes/theme-custom/theme/Prototyper/train-button.jsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; - -import RasaButton from '../RasaButton'; -import PrototyperContext from './context'; - -const TrainButton = (props) => { - const prototyperContext = React.useContext(PrototyperContext); - - return ( - - Train - - ); -}; - -export default TrainButton; diff --git a/docs/themes/theme-custom/theme/RasaButton/index.jsx b/docs/themes/theme-custom/theme/RasaButton/index.jsx deleted file mode 100644 index 7d777d2252f2..000000000000 --- a/docs/themes/theme-custom/theme/RasaButton/index.jsx +++ /dev/null @@ -1,20 +0,0 @@ -import * as React from 'react'; -import clsx from 'clsx'; - -import styles from './styles.module.css'; -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; -import {faCircleNotch} from "@fortawesome/free-solid-svg-icons"; - -function Button({isLoading, ...props}) { - return ( -
-
- ) -} - -export default Button; diff --git a/docs/themes/theme-custom/theme/RasaButton/styles.module.css b/docs/themes/theme-custom/theme/RasaButton/styles.module.css deleted file mode 100644 index b3dd54238d4c..000000000000 --- a/docs/themes/theme-custom/theme/RasaButton/styles.module.css +++ /dev/null @@ -1,25 +0,0 @@ -.buttonContainer { - display: flex; - align-items: center; -} - -.button { - background-color: var(--ifm-color-primary); - border: 1px solid transparent; - color: var(--ifm-color-white); - border-radius: 8px; - padding: 8px 24px; - font-size: 15px !important; - font-weight: 600; - cursor: pointer; -} - -.button[disabled] { - background-color: var(--ifm-color-gray-500); - cursor: default; -} - -.buttonSpinner { - margin: 8px; - color: var(--ifm-color-gray-500); -} diff --git a/docs/themes/theme-custom/theme/RasaProBanner/index.jsx b/docs/themes/theme-custom/theme/RasaProBanner/index.jsx index 64b3019e4384..ef975c61942f 100644 --- a/docs/themes/theme-custom/theme/RasaProBanner/index.jsx +++ b/docs/themes/theme-custom/theme/RasaProBanner/index.jsx @@ -18,7 +18,7 @@ function RasaProBanner({isLoading, ...props}) {
-

You'll need a license to get started with Rasa Pro. +

You'll need a license to get started with Rasa Pro. {' '} Talk with Sales diff --git a/docs/themes/theme-custom/theme/ReactLiveScope/index.js b/docs/themes/theme-custom/theme/ReactLiveScope/index.js deleted file mode 100644 index e0e07d4e31eb..000000000000 --- a/docs/themes/theme-custom/theme/ReactLiveScope/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Add react-live imports you need here -const ReactLiveScope = { - React, - ...React, -}; - -export default ReactLiveScope; diff --git a/docs/yarn.lock b/docs/yarn.lock index e9b5e167147c..7b3d6d6da0e0 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -3670,21 +3670,6 @@ dependencies: "@octokit/openapi-types" "^7.3.5" -"@philpl/buble@^0.19.7": - version "0.19.7" - resolved "https://registry.yarnpkg.com/@philpl/buble/-/buble-0.19.7.tgz#27231e6391393793b64bc1c982fc7b593198b893" - integrity sha512-wKTA2DxAGEW+QffRQvOhRQ0VBiYU2h2p8Yc1oBNlqSKws48/8faxqKNIuub0q4iuyTuLwtB8EkwiKwhlfV1PBA== - dependencies: - acorn "^6.1.1" - acorn-class-fields "^0.2.1" - acorn-dynamic-import "^4.0.0" - acorn-jsx "^5.0.1" - chalk "^2.4.2" - magic-string "^0.25.2" - minimist "^1.2.0" - os-homedir "^1.0.1" - regexpu-core "^4.5.4" - "@rasahq/docusaurus-theme-tabula@^0.8.3": version "0.8.3" resolved "https://registry.yarnpkg.com/@rasahq/docusaurus-theme-tabula/-/docusaurus-theme-tabula-0.8.3.tgz#42169bbb334a8efaaafb87f3daac283fe879a0e6" @@ -4396,27 +4381,12 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-class-fields@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/acorn-class-fields/-/acorn-class-fields-0.2.1.tgz#748058bceeb0ef25164bbc671993984083f5a085" - integrity sha512-US/kqTe0H8M4LN9izoL+eykVAitE68YMuYZ3sHn3i1fjniqR7oQ3SPvuMK/VT1kjOQHrx5Q88b90TtOKgAv2hQ== - -acorn-dynamic-import@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" - integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== - -acorn-jsx@^5.0.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" - integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== - acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn@^6.1.1, acorn@^6.4.1: +acorn@^6.4.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -5319,18 +5289,6 @@ browserslist@^4.16.6: escalade "^3.1.1" node-releases "^1.1.71" -buble@0.19.6: - version "0.19.6" - resolved "https://registry.yarnpkg.com/buble/-/buble-0.19.6.tgz#915909b6bd5b11ee03b1c885ec914a8b974d34d3" - integrity sha512-9kViM6nJA1Q548Jrd06x0geh+BG2ru2+RMDkIHHgJY/8AcyCs34lTHwra9BX7YdPrZXd5aarkpr/SY8bmPgPdg== - dependencies: - chalk "^2.4.1" - magic-string "^0.25.1" - minimist "^1.2.0" - os-homedir "^1.0.1" - regexpu-core "^4.2.0" - vlq "^1.0.0" - buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -6224,16 +6182,6 @@ component-emitter@^1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== -component-props@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/component-props/-/component-props-1.1.1.tgz#f9b7df9b9927b6e6d97c9bd272aa867670f34944" - integrity sha1-+bffm5kntubZfJvScqqGdnDzSUQ= - -component-xor@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/component-xor/-/component-xor-0.0.4.tgz#c55d83ccc1b94cd5089a4e93fa7891c7263e59aa" - integrity sha1-xV2DzMG5TNUImk6T+niRxyY+Wao= - compress-commons@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" @@ -6467,7 +6415,7 @@ core-js-pure@^3.0.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813" integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA== -core-js@^2.4.1, core-js@^2.6.5: +core-js@^2.6.5: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== @@ -7329,14 +7277,6 @@ dom-converter@^0.2: dependencies: utila "~0.4" -dom-iterator@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dom-iterator/-/dom-iterator-1.0.0.tgz#9c09899846ec41c2d257adc4d6015e4759ef05ad" - integrity sha512-7dsMOQI07EMU98gQM8NSB3GsAiIeBYIPKpnxR3c9xOvdvBjChAcOM0iJ222I3p5xyiZO9e5oggkNaCusuTdYig== - dependencies: - component-props "1.1.1" - component-xor "0.0.4" - dom-serializer@0: version "0.2.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" @@ -11010,7 +10950,7 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== -magic-string@^0.25.1, magic-string@^0.25.2, magic-string@^0.25.3, magic-string@^0.25.5, magic-string@^0.25.7: +magic-string@^0.25.3, magic-string@^0.25.5, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -12447,11 +12387,6 @@ os-browserify@^0.3.0: resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= -os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" @@ -13770,7 +13705,7 @@ printj@~1.1.0: resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== -prism-react-renderer@^1.0.1, prism-react-renderer@^1.1.0: +prism-react-renderer@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.1.1.tgz#1c1be61b1eb9446a146ca7a50b7bcf36f2a70a44" integrity sha512-MgMhSdHuHymNRqD6KM3eGS0PNqgK9q4QF5P0yoQQvpB6jNjeSAi3jcSAz0Sua/t9fa4xDOMar9HJbLa08gl9ug== @@ -13822,7 +13757,7 @@ prompts@2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.4, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -14150,19 +14085,6 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-live@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/react-live/-/react-live-2.2.3.tgz#260f99194213799f0005e473e7a4154c699d6a7c" - integrity sha512-tpKruvfytNETuzO3o1mrQUj180GVrq35IE8F5gH1NJVPt4szYCx83/dOSCOyjgRhhc3gQvl0pQ3k/CjOjwJkKQ== - dependencies: - buble "0.19.6" - core-js "^2.4.1" - dom-iterator "^1.0.0" - prism-react-renderer "^1.0.1" - prop-types "^15.5.8" - react-simple-code-editor "^0.10.0" - unescape "^1.0.1" - react-loadable-ssr-addon@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/react-loadable-ssr-addon/-/react-loadable-ssr-addon-0.3.0.tgz#ae9b2d3b11721930f8d8255476d288c0e9f9290f" @@ -14223,11 +14145,6 @@ react-side-effect@^2.1.0: resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.0.tgz#1ce4a8b4445168c487ed24dab886421f74d380d3" integrity sha512-IgmcegOSi5SNX+2Snh1vqmF0Vg/CbkycU9XZbOHJlZ6kMzTmi3yc254oB1WCkgA7OQtIAoLmcSFuHTc/tlcqXg== -react-simple-code-editor@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/react-simple-code-editor/-/react-simple-code-editor-0.10.0.tgz#73e7ac550a928069715482aeb33ccba36efe2373" - integrity sha512-bL5W5mAxSW6+cLwqqVWY47Silqgy2DKDTR4hDBrLrUqC5BXc29YVx17l2IZk5v36VcDEq1Bszu2oHm1qBwKqBA== - react-tabs@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/react-tabs/-/react-tabs-3.1.1.tgz#b363a239f76046bb2158875a1e5921b11064052f" @@ -14438,7 +14355,7 @@ regexp.prototype.flags@^1.2.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -regexpu-core@^4.2.0, regexpu-core@^4.5.4, regexpu-core@^4.7.0: +regexpu-core@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== @@ -16580,13 +16497,6 @@ unbzip2-stream@^1.0.9: buffer "^5.2.1" through "^2.3.8" -unescape@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unescape/-/unescape-1.0.1.tgz#956e430f61cad8a4d57d82c518f5e6cc5d0dda96" - integrity sha512-O0+af1Gs50lyH1nUu3ZyYS1cRh01Q/kUKatTOkSs7jukXE6/NebucDVxyiDsA9AQ4JC1V1jUH9EO8JX2nMDgGQ== - dependencies: - extend-shallow "^2.0.1" - unherit@^1.0.4: version "1.1.3" resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22" @@ -17146,11 +17056,6 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" -vlq@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" - integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== - vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" From fbd21ddcec3bc6b50a8b0be0143fd09172f2e7b8 Mon Sep 17 00:00:00 2001 From: sancharigr Date: Mon, 11 Sep 2023 10:42:13 +0200 Subject: [PATCH 08/10] Update dependencies --- .github/workflows/continous-integration.yml | 4 ++-- .github/workflows/nightly_release.yml | 2 +- poetry.lock | 24 ++++++++++----------- pyproject.toml | 4 ++-- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index dc1fbbe3f046..13fc9bd19b27 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -861,7 +861,7 @@ jobs: uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2.7.0 + uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.7.0 - name: Read Poetry Version 🔢 run: | @@ -1046,7 +1046,7 @@ jobs: uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2.7.0 + uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.7.0 - name: Free disk space if: needs.changes.outputs.docker == 'true' diff --git a/.github/workflows/nightly_release.yml b/.github/workflows/nightly_release.yml index 93c1008da5f3..4521fbf34474 100644 --- a/.github/workflows/nightly_release.yml +++ b/.github/workflows/nightly_release.yml @@ -141,7 +141,7 @@ jobs: shell: bash - name: Set up Docker Buildx - uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c + uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 id: buildx with: version: v0.5.1 diff --git a/poetry.lock b/poetry.lock index f0ce6ec09356..2bcdba8915e0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1510,14 +1510,14 @@ testing = ["pre-commit"] [[package]] name = "fakeredis" -version = "2.16.0" +version = "2.18.1" description = "Python implementation of redis API, can be used for testing purposes." category = "dev" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "fakeredis-2.16.0-py3-none-any.whl", hash = "sha256:188514cbd7120ff28c88f2a31e2fddd18fb1b28504478dfa3669c683134c4d82"}, - {file = "fakeredis-2.16.0.tar.gz", hash = "sha256:5abdd734de4ead9d6c7acbd3add1c4aa9b3ab35219339530472d9dd2bdf13057"}, + {file = "fakeredis-2.18.1-py3-none-any.whl", hash = "sha256:d780da2519b2e9d741056cf2b68604a4e59286bc6fde78b40a2b2b1367a51b30"}, + {file = "fakeredis-2.18.1.tar.gz", hash = "sha256:9742d6d4673df0f5f6ade4e4eee763b7f3517178ffa82508310325a6305651ec"}, ] [package.dependencies] @@ -1526,7 +1526,7 @@ sortedcontainers = ">=2,<3" [package.extras] json = ["jsonpath-ng (>=1.5,<2.0)"] -lua = ["lupa (>=1.14,<2.0)"] +lua = ["lupa (>=1.14,<3.0)"] [[package]] name = "fbmessenger" @@ -1837,14 +1837,14 @@ uritemplate = ">=3.0.0" [[package]] name = "gitpython" -version = "3.1.32" +version = "3.1.35" description = "GitPython is a Python library used to interact with Git repositories" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "GitPython-3.1.32-py3-none-any.whl", hash = "sha256:e3d59b1c2c6ebb9dfa7a184daf3b6dd4914237e7488a1730a6d8f6f5d0b4187f"}, - {file = "GitPython-3.1.32.tar.gz", hash = "sha256:8d9b8cb1e80b9735e8717c9362079d3ce4c6e5ddeebedd0361b228c3a67a62f6"}, + {file = "GitPython-3.1.35-py3-none-any.whl", hash = "sha256:c19b4292d7a1d3c0f653858db273ff8a6614100d1eb1528b014ec97286193c09"}, + {file = "GitPython-3.1.35.tar.gz", hash = "sha256:9cbefbd1789a5fe9bcf621bb34d3f441f3a90c8461d377f84eda73e721d9b06b"}, ] [package.dependencies] @@ -4798,10 +4798,8 @@ prompt-toolkit = ">=3.0,<3.0.29" "ruamel.yaml" = ">=0.16.5,<0.18.0" sanic = ">=21.12.0,<22.0.0" Sanic-Cors = ">=2.0.0,<3.0.0" -setuptools = ">=65.5.1" typing-extensions = ">=4.1.1,<5.0.0" websockets = ">=10.0,<12.0" -wheel = ">=0.38.1" [[package]] name = "redis" @@ -6763,14 +6761,14 @@ files = [ [[package]] name = "types-redis" -version = "4.6.0.2" +version = "4.6.0.5" description = "Typing stubs for redis" category = "dev" optional = false python-versions = "*" files = [ - {file = "types-redis-4.6.0.2.tar.gz", hash = "sha256:d0efcd96f65fd2036437c29d8c12566cfdc549345d73eddacb0488b81aff9f9e"}, - {file = "types_redis-4.6.0.2-py3-none-any.whl", hash = "sha256:a98f3386f44d045057696f3efc8869c53dda0060610e0fe3d8a4d391e2a8916a"}, + {file = "types-redis-4.6.0.5.tar.gz", hash = "sha256:5f179d10bd3ca995a8134aafcddfc3e12d52b208437c4529ef27e68acb301f38"}, + {file = "types_redis-4.6.0.5-py3-none-any.whl", hash = "sha256:4f662060247a2363c7a8f0b7e52915d68960870ff16a749a891eabcf87ed0be4"}, ] [package.dependencies] @@ -7472,4 +7470,4 @@ transformers = ["sentencepiece", "transformers"] [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.11" -content-hash = "fc18a426fdee095f6db39860dad769054861b71bbe52b74666e1248fedcef825" +content-hash = "0e75fc02296707b1b066835582885f8da368da37666445cd7cf2b7ef47e5dc53" diff --git a/pyproject.toml b/pyproject.toml index 29481b1450bf..cbe4c8b1125a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ attrs = ">=19.3,<22.2" jsonpickle = ">=1.3,<3.1" redis = ">=4.5.3, <5.0" absl-py = ">=0.9,<1.5" -apscheduler = ">=3.6,<3.10.2" +apscheduler = ">=3.6,<3.11" tqdm = "^4.31" networkx = ">=2.4,<3.2" fbmessenger = "~6.0.0" @@ -144,7 +144,7 @@ typing-utils = "^0.1.0" tarsafe = ">=0.0.3,<0.0.6" google-auth = "<3" CacheControl = "^0.12.9" -randomname = "^0.1.5" +randomname = ">=0.1.5,<0.3.0" pluggy = "^1.0.0" slack-sdk = "^3.19.2" confluent-kafka = ">=1.9.2,<3.0.0" From a4a2aa78f4afb7528dd24057d6c864c9a5ee0543 Mon Sep 17 00:00:00 2001 From: m-vdb Date: Mon, 18 Sep 2023 14:34:11 +0200 Subject: [PATCH 09/10] fix lint --- rasa/telemetry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/telemetry.py b/rasa/telemetry.py index 0a3b35c934ca..eaaf2b711fde 100644 --- a/rasa/telemetry.py +++ b/rasa/telemetry.py @@ -402,7 +402,7 @@ def _send_event( logger.debug("Skipping request to external service: telemetry key not set.") return - if not "license_hash" in context: + if "license_hash" not in context: # only send telemetry data for customers logger.debug("Skipping telemetry reporting: no license hash found.") return From b837a3b79bea6855cec44e265734faaa12fd4fbd Mon Sep 17 00:00:00 2001 From: Radovan Zivkovic Date: Tue, 12 Sep 2023 15:00:59 +0200 Subject: [PATCH 10/10] Set IMAGE_TAG when tagging the image for GA version --- .github/workflows/continous-integration.yml | 12 ++++++------ 3.7.0b1/main_plain/.config/rasa/global.yml | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 3.7.0b1/main_plain/.config/rasa/global.yml diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index 13fc9bd19b27..8813c17b9006 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -906,7 +906,7 @@ jobs: # Base MITIE image BASE_MITIE_IMAGE_HASH=${{ hashFiles('docker/Dockerfile.base-mitie') }} MAKEFILE_MITIE_HASH=${{ hashFiles('Makefile') }} - echo "base_mitie_image_hash=${BASE_MITIE_IMAGE_HASH:0:50}-${MAKEFILE_MITIE_HASH:0:50}" >> $GITHUB_OUTPUT + echo "base_mitie_image_hash=${BASE_MITIE_IMAGE_HASH}" >> $GITHUB_OUTPUT BASE_IMAGE_MITIE_EXISTS=$((docker manifest inspect rasa/rasa:base-mitie-${BASE_MITIE_IMAGE_HASH:0:50}-${MAKEFILE_MITIE_HASH:0:50} &> /dev/null && echo true || echo false) || true) echo "base_mitie_exists=${BASE_IMAGE_MITIE_EXISTS}" >> $GITHUB_OUTPUT @@ -1095,8 +1095,6 @@ jobs: IS_NEWEST_VERSION=${{ needs.build_docker_base_images_and_set_env.outputs.is_newest_version }} docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} --push - docker buildx bake --set *.platform=linux/amd64 -f docker/docker-bake.hcl ${{ matrix.image }} --load - docker buildx bake --set *.platform=linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} --load # Tag the image as latest if [[ "${IS_NEWEST_VERSION}" == "true" ]]; then @@ -1107,9 +1105,11 @@ jobs: fi LATEST_TAG=$(echo $RELEASE_TAG | sed 's/'$IMAGE_TAG'/latest/g') - - docker tag rasa/rasa:${RELEASE_TAG} rasa/rasa:${LATEST_TAG} - docker push rasa/rasa:${LATEST_TAG} + + # This will not build the image from ground up, but will only tag the existing image with LATEST_TAG + IMAGE_TAG=${LATEST_TAG} docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} + # Push tagged image + IMAGE_TAG=${LATEST_TAG} docker buildx bake --set *.platform=linux/amd64,linux/arm64 -f docker/docker-bake.hcl ${{ matrix.image }} --push fi deploy: diff --git a/3.7.0b1/main_plain/.config/rasa/global.yml b/3.7.0b1/main_plain/.config/rasa/global.yml new file mode 100644 index 000000000000..c5dcee2da8c9 --- /dev/null +++ b/3.7.0b1/main_plain/.config/rasa/global.yml @@ -0,0 +1,4 @@ +metrics: + enabled: true + rasa_user_id: 003ff8fbd6e04031b5597b37356022d4 + date: 2023-09-12 13:20:59.423434