Version: 3.x

Rasa SDK Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning starting with version 0.11.0.

[3.3.0] - 2022-10-06

Rasa_Sdk 3.3.0 (2022-10-06) No significant changes.

[3.2.1] - 2022-08-30 No significant changes.

[3.2.0] - 2022-06-14 No significant changes.

[3.1.2] - 2022-06-08 No significant changes.

[3.1.1] - 2022-03-24 No significant changes.

[3.1.0] - 2022-03-23 No significant changes.

[3.0.6] - 2022-03-07

Bugfixes

  • #719: Remove no longer necessary dependency pin for uvloop.

[3.0.5] - 2022-02-09

No significant changes.

[3.0.4] - 2022-01-27

No significant changes.

[3.0.3] - 2022-01-19

Miscellaneous internal changes

[3.0.2] - 2021-12-06

No significant changes.

[3.0.1] - 2021-12-03

No significant changes.

[3.0.0] - 2021-11-23

Deprecations and Removals

  • #501: Removed Python 3.6 support

Improvements

  • #529: Support for global slot mappings.

[2.8.10] - 2022-08-30

Improvements

  • #836: Return a json response when encountering action execution exceptions. Log exceptions using logger rather than sanic default print.

[2.8.9] - 2022-08-30 No significant changes.

[2.8.8] - 2022-07-12 No significant changes.

[2.8.7] - 2022-07-01

Deprecations and Removals

  • #810: Removed Python 3.6 support. Updated several dependencies: sanic, httpx, websockets.

[2.8.6] - 2022-06-01 No significant changes.

[2.8.5] - 2022-04-05 No significant changes.

[2.8.4] - 2022-01-19

Miscellaneous internal changes

[2.8.3] - 2021-11-25

Miscellaneous internal changes

[2.8.2] - 2021-09-02 No significant changes.

[2.8.1] - 2021-07-22

Miscellaneous internal changes

[2.8.0] - 2021-07-08

Improvements

  • #441: Slots will be validated in order they are requested. Previously, they were validated in reverse order.

    Already extracted slots are now immediately visible during extraction of subsequent slots. Same goes for validation.

[2.7.0] - 2021-06-03

No significant changes.

[2.6.0] - 2021-05-06

Improvements

  • #261: Adding support for forms with the required_slots key which is introduced as part of Rasa Open Source 2.6.
  • #434: - The action server can now listen on a specific network address using the environment variable SANIC_HOST instead of listening on all host interfaces by default
    • Corrected url which is logged at action server startup

[2.5.0] - 2021-04-12

Miscellaneous internal changes

[2.4.1] - 2021-03-23

Bugfixes

  • #419: Missing typing_extensions module added

    Minor dependency updates

  • #8223: utter_message in CollectingDispatcher now explicitly takes in both response and template. Note that the parameter template will be deprecated in Rasa SDK 3.0.0. Please use dispatcher.utter_message(response=...) instead.

[2.4.0] - 2021-03-11

Bugfixes

  • #406: Fix bug where ActionQueryKnowledgeBase incorrectly issues a template message with the string representation of the function for getting the string representation of the knowledge base item and not the actual string representation of the knowledge base item.

    For example, before the fix, the query knowledge base demo bot would utter this

    '<function ActionMyKB.init.. at 0x7fb23b7fddd0>' has the value 'True' for attribute 'breakfast-included'.

    instead of this:

    'Hilton (Berlin)' has the value 'True' for attribute 'breakfast-included'.

[2.3.1] - 2021-02-11

Bugfixes

  • #404: Only pin the uvloop dependency for non-Windows systems as uvloop is not available for Windows.

[2.3.0] - 2021-02-11

Features

  • #306: Added command line argument option --log-file for the action server to save logs to a log file.

    Usage : rasa run actions --log-file log_file.log

[2.2.0] - 2020-12-15

No significant changes.

[2.1.2] - 2020-11-19

No significant changes.

[2.1.1] - 2020-11-17

Bugfixes

  • #344: Fix a bug in the FormValidationAction which immediately deactivated the form.

[2.1.0] - 2020-11-17

Features

  • #329: Extend FormValidationAction with support for extracting slots. If you want to extract an additional slot, add the slot's name to the list of required_slots and add a method extract_<slot name> to your action:
from typing import Text, Dict, Any, List, Optional
from rasa_sdk.forms import (
FormValidationAction,
)
class FormWithSlotExtractions(FormValidationAction):
def name(self) -> Text:
return "some_form"
async def required_slots(
self,
slots_mapped_in_domain: List[Text],
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: "DomainDict",
) -> Optional[List[Text]]:
return slots_mapped_in_domain + ["my_slot"]
async def extract_my_slot(
self,
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: "DomainDict",
) -> Dict[Text, Any]:
return {"my_slot": "some value"}

If all slots returned by required_slots are filled, the action will automatically return an event to disable the form. If not all required slots are filled, the SDK will return an event to Rasa Open Source to fill the first missing slot next.

Improvements

  • #7078: Adds the method get_intent_of_latest_message to the Tracker allowing easier access to the user's latest intent in case of an nlu_fallback.

[2.0.0] - 2020-10-07

Deprecations and Removals

  • #246: Using the Form event is deprecated. Please use the new ActiveLoop event instead. Using the active_form property of the Tracker object is now deprecated. Please use the active_loop property instead.

    The usage of the FormAction is deprecated. Please see the migration guide for Rasa Open Source 2.0 for instructions how to migrate your FormActions.

  • #250: Removed support for the rasa_core_sdk python module: use import rasa_sdk syntax instead.

  • #6463: The FormValidation event was renamed to LoopInterrupted as part of Rasa Open Source 2.0. Using the FormValidation is now deprecated and will be removed in the future. Please use LoopInterrupted instead.

Features

  • #238: Added the method slots_to_validate to Tracker. This method is helpful when using a custom action to validate slots which were extracted by a form as shown by the following example.

    from typing import Text, Dict, List, Any
    from rasa_sdk import Action, Tracker
    from rasa_sdk.events import EventType, SlotSet
    from rasa_sdk.types import DomainDict
    from rasa_sdk.executor import CollectingDispatcher
    class ValidateSlots(Action):
    def name(self) -> Text:
    return "validate_your_form"
    def run(
    self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: DomainDict
    ) -> List[EventType]:
    extracted_slots: Dict[Text, Any] = tracker.slots_to_validate()
    validation_events = []
    for slot_name, slot_value in extracted_slots.items():
    # Check if slot is valid.
    if self.is_valid(slot_value):
    validation_events.append(SlotSet(slot_name, slot_value))
    else:
    # Return a `SlotSet` event with value `None` to indicate that this
    # slot still needs to be filled.
    validation_events.append(SlotSet(slot_name, None))
    return validation_events
    def is_valid(self, slot_value: Any) -> bool:
    # Implementation of the validate function.
    return True

    Please note that tracker.form_slots_to_validate only works with Rasa Open Source 2.

Improvements

  • #239: Validate user input during form activation even if there is an action in between.

  • #246: Rasa Open Source 2.0 renamed the Form event to ActiveLoop. The ActiveLoop event was added to the SDK and support for the active_loop field in JSON payloads was added.

  • #267: The actions package in a Rasa project may contain multiple files containing custom action code. The Rasa SDK Docker container now loads the entire actions package.

  • #288: Add the FormValidationAction abstract class that can be used to validate slots which were extracted by a Form.

    Example:

from typing import Text, Any, Dict
from rasa_sdk import FormValidationAction, Tracker
from rasa_sdk.types import DomainDict
from rasa_sdk.executor import CollectingDispatcher
class MyFormValidationAction(FormValidationAction):
def name(self) -> Text:
return "some_form"
def validate_slot1(
self,
slot_value: Any,
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: "DomainDict",
) -> Dict[Text, Any]:
if slot_value == "correct_value":
return {
"slot1": "validated_value",
}
return {
"slot1": None,
}
  • #6463: Added support for the LoopInterrupted event.

Bugfixes

  • #280: tracker.applied_events now correctly deals with restart, undo, and rewind events

Miscellaneous internal changes

[1.10.3] - 2020-09-23

Bugfixes

  • #273: Only fill other slots if slot mapping contains a role or group restriction and the entity type matches.

[1.10.2] - 2020-06-25

Bugfixes

  • #220: Re-added an Action endpoint is up and running log that was removed in Rasa SDK 1.6.0.

[1.10.1] - 2020-05-11

Bugfixes

  • #212: Fix ActionExecutor sometimes not loading user-defined actions that inherit from other user-defined ones.

[1.10.0] - 2020-04-28

Features

  • #164: Added new --auto-reload CLI argument. When specified, modules containing Action subclasses will be automatically reloaded if they have been modified since the last HTTP request. By using this, one can avoid having to re-start the actions server when developing new actions.

  • #3765: Add support for entities with role and group labels.

    If you use from_entity in your custom slot mapping, you can now also specify a role and group label. If you set a role or group label, the slot is only filled if the entity has the specific role or group label set. If you don’t specify a role or group label, the function behaves as before.

Improvements

  • #176: The Rasa SDK image now uses Python 3.7 instead of Python 3.6.

Bugfixes

[1.9.0] - 2020-03-24

Bugfixes

  • #110: Exit program (python -m rasa_sdk --actions actions or rasa run actions --actions actions) if a requested module under the --actions command-line option cannot be found.

[1.8.1] - 2020-03-09

Bugfixes

  • #153: Make it possible to use the requests library inside the default Rasa SDK container.

[1.8.0] - 2020-02-26

Improvements

  • #130: Copied over instance methods last_executed_action_has(), get_last_event_for() and applied_events from the Rasa DialogueStateTracker class to the SDK Tracker class.

  • #145: Add poetry for dependency management and reduce the size of Docker image.

Miscellaneous internal changes

  • #148, #149

[1.7.0] - 2020-01-29

Improvements

  • ReminderScheduled and ReminderCancelled now take intent and entities as options, instead of action. This is because starting with Rasa 1.7 reminders trigger intents (with entities) instead of actions.

  • The following FormAction methods are now async by default: validate_slots, validate, submit and run. User-defined classes inheriting from FormAction should be adapted to use async for these methods. Existing synchronous implementations will continue to work as normal, but this behaviour will be deprecated in the future.

  • The following ActionQueryKnowledgeBase methods are now async: utter_objects and run.

  • The following KnowledgeBase methods are now async: get_attributes_of_object, get_key_attribute_of_object, get_representation_function_of_object, get_objects and get_object. Same warning for FormAction applies here - user-defined classes should be updated to use async, but will continue to work for the moment.

  • The following InMemoryKnowledgeBase methods are now async: get_attributes_of_object, get_objects and get_object.

[1.6.1] - 2020-01-07

Bugfixes

  • Pinned sanic~=19.9.0 to fix breaking changes introduced in sanic 19.9.12.

[1.6.0] - 2019-12-18

Features

  • Added SessionStarted event for compatibility with conversation sessions in Rasa 1.6.0.

[1.5.2] - 2019-12-11

Bugfixes

[1.5.1] - 2019-11-27

Features

  • Added LOG_LEVEL_LIBRARIES environment variable to set log level of libraries, such as sanic

Improvements

  • DeprecationWarnings are now FutureWarnings, as they should be seen by end users

  • text is now the first positional argument in utter_message instead of image

Bugfixes

  • The deprecated utter_elements now correctly uses utter_message

[1.5.0] - 2019-11-22

Features

  • Add support for multiple sanic workers (configurable with the ACTION_SERVER_SANIC_WORKERS environment variable).

  • Add support for async run methods in the Action class.

  • Return status code 404 in case requested action was not found.

  • Return status code 400 in case an empty request body was sent to the /webhook endpoint.

Improvements

  • Replace flask server framework with sanic.

  • Replace flask_cors with sanic-cors.

  • CollectingDispatcher.utter_message can now do anything that other dispatcher methods can do.

  • The CollectingDispatcher methods utter_custom_message, utter_elements, utter_button_message, utter_attachment, utter_button_template, utter_template, utter_custom_json and utter_image_url were deprecated in favor of utter_message.

  • Updated format strings to f-strings where appropriate.

Deprecations and Removals

  • Remove requests dependency

  • Remove gevent dependency

[1.4.0] - 2019-10-19

Features

  • Added Python 3.7 support.

Deprecations and Removals

  • Removed Python 2.7 support.

  • Removed Python 3.5 support.

[1.3.3] - 2019-09-28

Features

  • SSL support, certificates can be passed with –ssl-certificate and –ssl-keyfile

[1.3.2] - 2019-09-06

Bugfixes

  • fixed TypeError on request_next_slot method of FormAction class

[1.3.1] - 2019-09-05

Bugfixes

  • undid Removed unused tracker argument from utter_template and utter_button_template methods as it resulted in compatibility issues

[1.3.0] - 2019-09-05

Compatibility release for Rasa 1.3.0.

Features

  • add InMemoryKnowledgeBase implementation as a default KnowledgeBase

  • add ActionQueryKnowledgeBase as a default action to interact with a knowledge base

Improvements

  • Removed unused tracker argument from utter_template and utter_button_template methods

[1.2.0] - 2019-08-13

Compatibility release for Rasa 1.2.0. There have not been any additional changes.

[1.1.1] - 2019-07-25

Features

  • dispatcher.utter_image_url() to dispatch images from custom actions

Bugfixes

  • correct slots print in debug mode before submitting a form

[1.1.0] - 2019-06-13

Compatibility release for Rasa 1.1.0. There have not been any additional changes.

[1.0.0] - 2019-05-21

Features

  • validate events returned from action - checks for sanity

  • endpoint to retrieve all registered actions at /actions

Improvements

  • package renamed from rasa_core_sdk to rasa_sdk - please make sure to update your imports accordingly

[0.14.0] - 2019-04-26

Compatibility release for Rasa Core 0.14.0. There have not been any additional changes when compared to 0.13.1.

[0.13.1] - 2019-04-16

Features

  • add formatter ‘black’

  • Slots filled before the start of a form are now validated upon form start

  • In debug mode, the values of required slots for a form are now printed before submitting

Improvements

  • validate_{} functions for slots now return dictionaries of form {slot: value} instead of value

Bugfixes

  • Slots extracted from entities in user input upon calling form activation are now correctly validated

[0.13.0] - 2019-03-26

Features

  • Abstract Actions can now be subclassed

  • add warning in case of mismatched version of rasa_core and rasa_core_sdk

  • FormAction.from_trigger_intent allows slot extraction from message triggering the FormAction

  • Tracker.active_form now includes trigger_message attribute to allow access to message triggering the form

[0.12.2] - 2019-02-17

Features

  • add optional validate_{slot} methods to FormAction

  • forms can now be deactivated during the validation function by returning self.deactivate()

  • Function to get latest input channel from the tracker with tracker.get_latest_input_channel()

Improvements

  • self._deactivate() method from the FormAction class has been renamed to self.deactivate()

  • changed endpoint function so that it is now accessible with Python as well

[0.12.1] - 2018-11-11

Bugfixes

  • doc formatting preventing successful rasa core travis build

[0.12.0] - 2018-11-11

Features

  • added Dockerfile for rasa_core_sdk

  • add active_form and latest_action_name properties to Tracker

  • add FormAction.slot_mapping() method to specify the mapping between user input and requested slot in the form

  • add helper methods FormAction.from_entity(...), FormAction.from_intent(...) and FormAction.from_text(...)

  • add FormAction.validate(...) method to validate user input

  • add warning in case of mismatched version of rasa_core and rasa_core_sdk

Improvements

  • FormAction class was completely refactored

  • required_fields() is changed to required_slots(tracker)

  • moved FormAction.get_other_slots(...) functionality to FormAction.extract_other_slots(...)

  • moved FormAction.get_requested_slot(...) functionality to FormAction.extract_requested_slot(...)

  • logic of requesting next slot can be customized in FormAction.request_next_slot(...) method

Deprecations and Removals

  • FormField class and its subclasses

Bugfixes

[0.11.5] - 2018-09-24

Bugfixes

  • current state call in tracker

[0.11.4] - 2018-09-17

Bugfixes

  • wrong event name for the AgentUttered event - due to the wrong name, rasa core would deserialise the wrong event.