Version: 3.x

rasa.shared.core.conversation

Dialogue Objects

class Dialogue()

A dialogue comprises a list of Turn objects

__init__

def __init__(name: Text, events: List["Event"]) -> None

This function initialises the dialogue with the dialogue name and the event list.

__str__

def __str__() -> Text

This function returns the dialogue and turns.

as_dict

def as_dict() -> Dict

This function returns the dialogue as a dictionary to assist in serialization.

from_parameters

@classmethod
def from_parameters(cls, parameters: Dict[Text, Any]) -> "Dialogue"

Create Dialogue from parameters.

Arguments:

  • parameters - Serialised dialogue, should contain keys 'name' and 'events'.

Returns:

Deserialised Dialogue.