This is documentation for Rasa Open Source Documentation v2.5.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.8.x).

Version: 2.5.x


InvalidSlotTypeException Objects

class InvalidSlotTypeException(RasaException)

Raised if a slot type is invalid.

InvalidSlotConfigError Objects

class InvalidSlotConfigError(RasaException, ValueError)

Raised if a slot's config is invalid.

Slot Objects

class Slot()

Key-value store for storing information during a conversation.


| __init__(name: Text, initial_value: Any = None, value_reset_delay: Optional[int] = None, auto_fill: bool = True, influence_conversation: bool = True) -> None

Create a Slot.


  • name - The name of the slot.
  • initial_value - The initial value of the slot.
  • value_reset_delay - After how many turns the slot should be reset to the initial_value. This is behavior is currently not implemented.
  • auto_fill - True if the slot should be filled automatically by entities with the same name.
  • influence_conversation - If True the slot will be featurized and hence influence the predictions of the dialogue polices.


| feature_dimensionality() -> int

How many features this single slot creates.


The number of features. 0 if the slot is unfeaturized. The dimensionality of the array returned by as_feature needs to correspond to this value.


| has_features() -> bool

Indicate if the slot creates any features.


| value_reset_delay() -> Optional[int]

After how many turns the slot should be reset to the initial_value.

If the delay is set to None, the slot will keep its value forever.


| reset() -> None

Resets the slot's value to the initial value.


| @property
| value() -> Any

Gets the slot's value.


| @value.setter
| value(value: Any) -> None

Sets the slot's value.


| @property
| has_been_set() -> bool

Indicates if the slot's value has been set.


| @staticmethod
| resolve_by_type(type_name: Text) -> Type["Slot"]

Returns a slots class by its type name.

FloatSlot Objects

class FloatSlot(Slot)


| persistence_info() -> Dict[Text, Any]

Returns relevant information to persist this slot.

BooleanSlot Objects

class BooleanSlot(Slot)

A slot storing a truth value.


bool_from_any(x: Any) -> bool

Converts bool/float/int/str to bool or raises error

CategoricalSlot Objects

class CategoricalSlot(Slot)


| persistence_info() -> Dict[Text, Any]

Returns serialized slot.

AnySlot Objects

class AnySlot(Slot)

Slot which can be used to store any value. Users need to create a subclass of Slot in case the information is supposed to get featurized.


| __eq__(other: Any) -> bool

Compares object with other object.