2.1.0
Deprecations and Removals
-
#7136: The
Policy
interface was changed to return aPolicyPrediction
object when
predict_action_probabilities
is called. Returning a list of probabilities directly
is deprecated and support for this will be removed in Rasa Open Source 3.0.You can adapt your custom policy by wrapping your probabilities in a
PolicyPrediction
object:from rasa.core.policies.policy import Policy, PolicyPrediction # ... other imports def predict_action_probabilities( self, tracker: DialogueStateTracker, domain: Domain, interpreter: NaturalLanguageInterpreter, **kwargs: Any, ) -> PolicyPrediction: probabilities = ... # an action prediction of your policy return PolicyPrediction(probabilities, "policy_name", policy_priority=self.priority)
The same change was applied to the
PolicyEnsemble
interface. Instead of returning
a tuple of action probabilities and policy name, it is now returning a
PolicyPrediction
object. Support for the oldPolicyEnsemble
interface will be
removed in Rasa Open Source 3.0.:::caution
This change is model-breaking. Please retrain your models.:::
-
#7263: The Pika Event Broker no longer supports
the environment variablesRABBITMQ_SSL_CA_FILE
andRABBITMQ_SSL_KEY_PASSWORD
.
You can alternatively specifyRABBITMQ_SSL_CA_FILE
in the RabbitMQ connection URL as
described in the
RabbitMQ documentation.event_broker: type: pika url: "amqps://user:password@host?cacertfile=path_to_ca_cert&password=private_key_password" queues: - my_queue
Support for
RABBITMQ_SSL_KEY_PASSWORD
was removed entirely.The method
Event Broker.close
was changed to be asynchronous.
Support for synchronous implementations will be removed in Rasa Open Source 2.2.0.
To adapt your implementation add theasync
keyword:from rasa.core.brokers.broker import EventBroker class MyEventBroker(EventBroker): async def close(self) -> None: # clean up event broker resources
Features
- #7136: Policies can now return obligatory and optional events as part of their
prediction. Obligatory events are always applied to the current conversation tracker.
Optional events are only applied to the conversation tracker in case the policy wins.
Improvements
-
#4341: Changed
Agent.load
method to supportpathlib
paths. -
#5715: If you are using the feature Entity Roles and Groups, you should now also list the roles and groups
in your domain file if you want roles and groups to influence your conversations. For example:entities: - city: roles: - from - to - name - topping: groups: - 1 - 2 - size: groups: - 1 - 2
Entity roles and groups can now influence dialogue predictions. For more information see the section
Entity Roles and Groups influencing dialogue predictions. -
#6285: Predictions of the
FallbackClassifier
are
ignored when
evaluating the NLU model
Note that theFallbackClassifier
predictions still apply to
test stories. -
#6474: Adapt the training data reader and emulator for wit.ai to their latest format.
Update the instructions in the
migrate from wit.ai documentation
to run Rasa Open Source in wit.ai emulation mode. -
#6498: Adding configurable prefixes to Redis Tracker and Lock Stores so that a single Redis instance (and logical DB) can support multiple conversation trackers and locks.
By default, conversations will be prefixed withtracker:...
and all locks prefixed withlock:...
. Additionally, you can add an alphanumeric-onlyprefix: value
inendpoints.yml
such that keys in redis will take the formvalue:tracker:...
andvalue:lock:...
respectively. -
#6571: Log the model's relative path when using CLI commands.
-
#6852: Adds the option to configure whether extracted entities should be split by comma (
","
) or not. The default behaviour isTrue
- i.e. split any list of extracted entities by comma. This makes sense for a list of ingredients in a recipie, for example"avocado, tofu, cauliflower"
, however doesn't make sense for an address such as"Sch枚nhauser Allee 175, 10119 Berlin, Germany"
.In the latter case, add a new option to your config, e.g. if you are using the
DIETClassifier
this becomes:... - name: DIETClassifier split_entities_by_comma: False ...
in which case, none of the extracted entities will be split by comma. To switch it on/off for specific entity types you can use:
... - name: DIETClassifier split_entities_by_comma: address: True ingredient: False ...
where both
address
andingredient
are two entity types.This feature is also available for
CRFEntityExtractor
. -
#6860: Fetching test stories from the HTTP API endpoint
GET /conversations/<conversation_id>/story
no longer triggers an update
of the
conversation session.Added a new boolean query parameter
all_sessions
(default:false
) to the
HTTP API endpoint for fetching test stories
(GET /conversations/<conversation_id>/story
).When setting
?all_sessions=true
, the endpoint returns test stories for all
conversation sessions forconversation_id
.
When setting?all_sessions=all_sessions
, or when omitting theall_sessions
parameter, a single test story is returned forconversation_id
. In cases where
multiple conversation sessions exist, only the last story is returned.Specifying the
retrieve_events_from_previous_conversation_sessions
kwarg for the Tracker Store class is deprecated and will be
removed in Rasa Open Source 3.0. Please use theretrieve_full_tracker()
method
instead. -
#6865: Improve the
rasa data convert nlg
command and introduce therasa data convert responses
command
to simplify the migration from pre-2.0 response selector format to the new format. -
#6966: Added warning for when an option is provided for a component that is not listed as a key in the defaults for that component.
-
#6977: Forms no longer reject their execution before a potential custom
action for validating / extracting slots was executed.
Forms continue to reject in two cases automatically:- A slot was requested to be filled, but no slot mapping applied to the latest user
message and there was no custom action for potentially extracting other slots. - A slot was requested to be filled, but the custom action for validating / extracting
slots didn't return any slot event.
Additionally you can also reject the form execution manually by returning a
ActionExecutionRejected
event within your custom action for validating / extracting
slots. - A slot was requested to be filled, but no slot mapping applied to the latest user
-
#7027: Remove dependency between
ConveRTTokenizer
andConveRTFeaturizer
. TheConveRTTokenizer
is now deprecated, and the
ConveRTFeaturizer
can be used with any otherTokenizer
.Remove dependency between
HFTransformersNLP
,LanguageModelTokenizer
, andLanguageModelFeaturizer
. Both
HFTransformersNLP
andLanguageModelTokenizer
are now deprecated.LanguageModelFeaturizer
implements the behavior
of the stack and can be used with any otherTokenizer
. -
#7061: Gray out "Download" button in Rasa Playground when the project is not yet ready to be downloaded.
-
#7068: Slot mappings for Forms in the domain are now optional. If you do not
provide any slot mappings as part of the domain, you need to provide
custom slot mappings through a custom action.
A form without slot mappings is specified as follows:forms: my_form: # no mappings
The action for forms can now be overridden by defining a custom action
with the same name as the form. This can be used to keep using the deprecated
Rasa Open SourceFormAction
which is implemented within the Rasa SDK. Note that it is
not recommended to override the form action for anything else than using the
deprecated Rasa SDKFormAction
. -
#7102: Changed the default model weights loaded for
HFTransformersNLP
component.Use a language agnostic sentence embedding model
as the default model. These model weights should help improve performance on
intent classification and response selection. -
#7122: Add validations for slot mappings.
If a slot mapping is not valid, anInvalidDomain
error is raised. -
#7132: Adapt the training data reader and emulator for LUIS to
their latest format
and add support for roles.
Update the instructions in the
"Migrate from LUIS" documentation page
to reflect the recent changes made to the UI of LUIS. -
#7160: Adapt the training data reader and emulator for DialogFlow to
their latest format
and add support for regex entities. -
#7263: The Pika Event Broker was reimplemented with
the[aio-pika
library[(https://aio-pika.readthedocs.io/en/latest/). Messages will
now be published to RabbitMQ asynchronously which improves the prediction performance. -
#7278: The confidence of the
FallbackClassifier
predictions is set to1 - top intent confidence
.
Bugfixes
-
#5974:
ActionRestart
will now triggerActionSessionStart
as a followup action. -
#6582: Fixed a bug with
rasa data split nlu
which caused the resulting train / test ratio to sometimes differ from the ratio specified by the user or by default.The splitting algorithm ensures that every intent and response class appears in both the training and the test set. This means that each split must contain at least as many examples as there are classes, which for small datasets can contradict the requested training fraction. When this happens, the command issues a warning to the user that the requested training fraction can't be satisfied.
-
#6721: Fixed bug where slots with
influence_conversation=false
affected the action
prediction if they were set manually using the
POST /conversations/<conversation_id/tracker/events
endpoint in the
HTTP API. -
#6760: Update Pika event broker to be a separate process and make it use a
multiprocessing.Queue
to send and process messages. This change should help
avoid situations when events stop being sent after a while. -
#6973: Ignore rules when validating stories
-
#6986: - Updated Slack Connector for new Slack Events API
-
#7001: Update Rasa Playground "Download" button to work correctly depending on the current chat state.
-
#7002: Test stories can now contain both: normal intents and retrieval intents. The
failed_test_stories.yml
, generated byrasa test
, also specifies the full retrieval intent now.
Previouslyrasa test
would fail on test stories that specified retrieval intents. -
#7031: The converter tool is now able to convert test stories that contain a number as entity type.
-
#7034: The converter tool now converts test stories and stories that contain full retrieval intents correctly.
Previously the response keys were deleted during conversion to YAML. -
#7204: The slack connector requires a configuration for
slack_signing_secret
to make
the connector more secure. The configuration value needs to be added to your
credentials.yml
if you are using the slack connector. -
#7246: Fixed model fingerprinting - it should avoid some more unecessary retrainings now.
-
#7253: Fixed a problem when slots of type
text
orlist
were referenced by name only in
the training data and this was treated as an empty value. This means that the two
following stories are equivalent in case the slot type istext
:stories: - story: Story referencing slot by name steps: - intent: greet - slot_was_set: - name - story: Story referencing slot with name and value steps: - intent: greet - slot_was_set: - name: "some name"
Note that you still need to specify values for all other slot types as only
text
andlist
slots are featurized in a binary fashion.
Improved Documentation
- #6973: Correct data validation docs