Skip to content

Commit

Permalink
merged main
Browse files Browse the repository at this point in the history
  • Loading branch information
ancalita committed Jul 21, 2023
2 parents 31a5c16 + 37cbbd7 commit f8e421a
Show file tree
Hide file tree
Showing 71 changed files with 2,354 additions and 98 deletions.
34 changes: 0 additions & 34 deletions .codeclimate.yml

This file was deleted.

35 changes: 27 additions & 8 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ jobs:
path: |
${{ github.workspace }}/${{ matrix.test }}-coverage
upload_coverage_reports:
name: Upload coverage reports to codeclimate
prepare_coverage_reports:
name: Prepare coverage reports
if: github.ref_type != 'tag'
runs-on: ubuntu-22.04
# Always upload results even if tests failed
Expand Down Expand Up @@ -561,15 +561,34 @@ jobs:
coverage combine "${final_dir}/"*
coverage xml
- name: Upload reports to codeclimate
sonarcloud:
name: SonarCloud Scan
if: github.ref_type != 'tag'
runs-on: ubuntu-22.04
needs:
- prepare_coverage_reports

steps:
- name: Checkout git repository 🕝
if: needs.changes.outputs.backend == 'true'
uses: paambaati/codeclimate-action@b649ad206d2e83dafb9ed130deba698aa1b41d78
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
# Disabling shallow clone is recommended for improving relevancy of coverage reporting
fetch-depth: 0

- name: Analyse code with SonarCloud
uses: sonarsource/sonarcloud-github-action@5875562561d22a34be0c657405578705a169af6c
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
coverageLocations: |
${{ github.workspace }}/coverage.xml:coverage.py
debug: true
args: >
-Dsonar.organization=rasahq
-Dsonar.projectKey=RasaHQ_rasa
-Dsonar.sources=.
-Dsonar.python.coverage.reportPaths=tests_coverage/coverage.xml
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.verbose=true
integration_test:
name: Run Non-Sequential Integration Tests
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/nightly_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Python module
run: |
python3 -m pip install pluggy
python3 -m pip install ruamel.yaml
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }} 🐍
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Compose tag name
id: set_tagname
Expand All @@ -31,7 +31,8 @@ jobs:
# Find latest rasa-oss version
echo "Trying to find the latest rasa-oss version..."
LATEST_RASA_MINOR=$(python -c "import sys; import os; sys.path.append('${{ github.workspace }}/rasa'); from rasa.version import __version__; print(__version__)")
pip install toml
LATEST_RASA_MINOR=$(python scripts/get_version_from_toml.py)
echo "Current RASA version: ${LATEST_RASA_MINOR}"
LATEST_NIGHTLY_VERSION=$(echo ${LATEST_RASA_MINOR})
Expand Down Expand Up @@ -61,10 +62,10 @@ jobs:
- name: Checkout git repository 🕝
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Set up Python 3.9 🐍
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }} 🐍
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: 3.9
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Read Poetry Version 🔢
run: |
Expand Down Expand Up @@ -176,3 +177,22 @@ jobs:
- name: Push image to release registry
run: |
docker push ${{env.DEV_REGISTRY}}/rasa:${IMAGE_TAG}
send_slack_notification_on_failure:
name: Notify Slack
runs-on: ubuntu-22.04
if: always()
needs:
- docker
- deploy

steps:
- name: Notify Slack of failure ⛔️
# send notification if 'deploy' or 'docker' is skipped (previous needed job failed) or failed
if: needs.docker.result != 'success' || needs.deploy.result != 'success'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASE_ASSISTANT_ATOM_ALERTS_WEBHOOK }}
uses: Ilshidur/action-slack@689ad44a9c9092315abd286d0e3a9a74d31ab78a
with:
args: "⛔️ *Rasa nightly release* failed 😱! Please check out GitHub Actions: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

10 changes: 10 additions & 0 deletions .github/workflows/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Organization and project keys are displayed in the right sidebar of the project homepage
sonar.organization=rasahq
sonar.projectKey=RasaHQ_rasa
sonar.host.url=https://sonarcloud.io/project/overview?id=RasaHQ_rasa

sonar.python.coverage.reportPaths=./tests_coverage/coverage.xml

# relative paths to source directories. More details and properties are described
sonar.tests=./tests/
sonar.verbose=true
1 change: 1 addition & 0 deletions .typo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ excluded_words:
- knowledgebase
- knowledgebasebot
- linenos
- llm
- luis
- matmul
- mattermost
Expand Down
15 changes: 13 additions & 2 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Rasa 3.6.1 (2023-07-03)


## [3.6.0] - 2023-06-14
Rasa 3.6.0 (2023-06-14)

Rasa 3.6.0 (2023-06-14)
### Deprecations and Removals
- [#12355](https://github.com/rasahq/rasa/issues/12355): Removed Python 3.7 support as [it reaches its end of life in June 2023](https://devguide.python.org/versions/)

Expand Down Expand Up @@ -121,6 +121,17 @@ Rasa 3.6.0 (2023-06-14)
- [#12291](https://github.com/rasahq/rasa/issues/12291), [#12329](https://github.com/rasahq/rasa/issues/12329), [#12332](https://github.com/rasahq/rasa/issues/12332), [#12365](https://github.com/rasahq/rasa/issues/12365), [#12372](https://github.com/rasahq/rasa/issues/12372), [#12386](https://github.com/rasahq/rasa/issues/12386), [#12492](https://github.com/rasahq/rasa/issues/12492)


## [3.5.12] - 2023-06-23

Rasa 3.5.12 (2023-06-23)
### Bugfixes
- [#12534](https://github.com/rasahq/rasa/issues/12534): Rich responses containing buttons with parentheses characters are now correctly parsed.
Previously any characters found between the first identified pair of `()` in response button took precedence.

### Miscellaneous internal changes
- [#12512](https://github.com/rasahq/rasa/issues/12512)


## [3.5.11] - 2023-06-08

Rasa 3.5.11 (2023-06-08)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![PyPI version](https://badge.fury.io/py/rasa.svg)](https://badge.fury.io/py/rasa)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/rasa.svg)](https://pypi.python.org/pypi/rasa)
[![Build Status](https://github.com/RasaHQ/rasa/workflows/Continuous%20Integration/badge.svg)](https://github.com/RasaHQ/rasa/actions)
[![Coverage Status](https://api.codeclimate.com/v1/badges/756dc6fea1d5d3e127f7/test_coverage)](https://codeclimate.com/github/RasaHQ/rasa/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RasaHQ_rasa&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=RasaHQ_rasa)
[![Documentation Status](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://rasa.com/docs)
![Documentation Build](https://img.shields.io/netlify/d2e447e4-5a5e-4dc7-be5d-7c04ae7ff706?label=Documentation%20Build)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B8141%2Fgit%40github.com%3ARasaHQ%2Frasa.git.svg?type=shield)](https://app.fossa.com/projects/custom%2B8141%2Fgit%40github.com%3ARasaHQ%2Frasa.git?ref=badge_shield)
Expand Down
1 change: 1 addition & 0 deletions changelog/12371.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update wording in Rasa Pro installation page.
1 change: 1 addition & 0 deletions changelog/12480.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Skip executing the pipeline when the user message is of the form /intent or /intent + entities.
1 change: 1 addition & 0 deletions changelog/12514.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove tensorflow-addons from dependencies as it is now deprecated.
1 change: 1 addition & 0 deletions changelog/12516.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `rasa_events` to the list of anonymizable structlog keys and rename structlog keys.
1 change: 1 addition & 0 deletions changelog/12521.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Introduce a validation step in `rasa data validate` and `rasa train` commands to identify non-existent paths and empty domains.
1 change: 1 addition & 0 deletions changelog/12533.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add building multi-platform Docker image (amd64/arm64)
1 change: 1 addition & 0 deletions changelog/12543.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch struct log to `FilteringBoundLogger` in order to retain log level set in the config.
2 changes: 2 additions & 0 deletions changelog/12556.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Rich responses containing buttons with parentheses characters are now correctly parsed.
Previously any characters found between the first identified pair of `()` in response button took precedence.
8 changes: 8 additions & 0 deletions changelog/12558.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Added metadata as an additional argument as an additional parameter to an
`Action`s `run` method.

Added an additional default action called `action_send_text` which allows
a policy to respond with a text. The text is passed to the action using the
metadata, e.g. `metadata={"message": {"text": "Hello"}}`.

Added LLM utility functions.
1 change: 1 addition & 0 deletions changelog/12677.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated docs on sending Conversation Events to Multiple DBs.
1 change: 1 addition & 0 deletions changelog/12685.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Corrected [action server api](https://rasa.com/docs/rasa/pages/action-server-api/) sample in docs.
2 changes: 1 addition & 1 deletion docs/docs/custom-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ the action server, with the following information:
```json
{
"next_action": "string",
"sender_id": "string",
"tracker": {
"conversation_id": "default",
"sender_id": "string",
"slots": {},
"latest_message": {},
"latest_event_time": 1537645578.314389,
Expand Down
13 changes: 13 additions & 0 deletions docs/docs/event-brokers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ if __name__ == "__main__":
channel.start_consuming()
```

### Sending Events to Multiple Queues

You can specify multiple event queues to publish events to.
This should work for all event brokers supported by Pika (e.g. RabbitMQ)

## Kafka Event Broker

While RabbitMQ is the default event broker, it is possible to use [Kafka](https://kafka.apache.org/) as the main broker for your
Expand Down Expand Up @@ -190,6 +195,14 @@ If using the `SASL_SSL` protocol, the endpoints file should look like:
```yaml-rasa (docs/sources/data/test_endpoints/event_brokers/kafka_sasl_ssl_endpoint.yml)
```

### Sending Events to Multiple Queues

Kafka does not allow you to configure multiple topics.

However, multiple consumers can read from the same queue as long as they are in different consumer groups.
Each consumer group will process all events independent of each other
(in a sense, each group has their own reference to the last event they have processed). [Kafka: The Definitive Guide](https://www.oreilly.com/library/view/kafka-the-definitive/9781491936153/ch04.html#:~:text=Kafka%20consumers%20are%20typically%20part,the%20partitions%20in%20the%20topic.)

## SQL Event Broker

It is possible to use an SQL database as an event broker. Connections to databases are established using
Expand Down
Binary file added docs/docs/llms/intentless-meaning-compounds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/llms/intentless-policy-interaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions docs/docs/llms/large-language-models.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
id: large-language-models
sidebar_label: LLMs in Rasa
title: Using LLMs with Rasa
className: hide
abstract:
---

import RasaLabsLabel from "@theme/RasaLabsLabel";
import RasaLabsBanner from "@theme/RasaLabsBanner";

<RasaLabsLabel />

<RasaLabsBanner version="3.7.0b1" />

As part of a beta release, we have released multiple components
which make use of the latest generation of Large Language Models (LLMs).
This document offers an overview of what you can do with them.
We encourage you to experiment with these components and share your findings with us.
We are working on some larger changes to the platform that leverage LLMs natively.
Please reach out to us if you'd like to learn more about upcoming changes.


## LLMs can do more than just NLU

The recent advances in large language models (LLMs) have opened up new
possibilities for conversational AI. LLMs are pretrained models that can be
used to perform a variety of tasks, including intent classification,
dialogue handling, and natural language generation (NLG). The components described
here all use in-context learning. In other words, instructions and examples are
provided in a prompt which are sent to a general-purpose LLM. They do not require
fine-tuning of large models.

### Plug & Play LLMs of your choice

Just like our NLU pipeline, the LLM components here can be configured to use different
LLMs. There is no one-size-fits-all best model, and new models are being released every
week. We encourage you to try out different models and evaluate their performance on
different languages in terms of fluency, accuracy, and latency.

### An adjustable risk profile

The potential and risks of LLMs vary per use case. For customer-facing use cases,
you may not ever want to send generated text to your users. Rasa gives you full
control over where and when you want to make use of LLMs. You can use LLMs for NLU and
dialogue, and still only send messages that were authored by a human.
You can also allow an LLM to rephrase your existing messages to account for context.

It's essential that your system provides full
control over these processes. Understanding how LLMs and other components
behave and have the power to override any decision.

## Where to go from here

This section of the documentation guides you through the diverse ways you can
integrate LLMs into Rasa. We will delve into the following topics:

1. [Setting up LLMs](./llm-setup.mdx)
2. [Intentless Policy](./llm-intentless.mdx)
4. [LLM Intent Classification](./llm-intent.mdx)
5. [Response Rephrasing](./llm-nlg.mdx)

Each link will direct you to a detailed guide on the respective topic, offering
further depth and information about using LLMs with Rasa. By the end of this
series, you'll be equipped to effectively use LLMs to augment your Rasa
applications.
Binary file added docs/docs/llms/llm-IntentClassifier-docs.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f8e421a

Please sign in to comment.