notice

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

Version: 2.x

rasa.shared.core.conversation

Dialogue Objects

class Dialogue()

A dialogue comprises a list of Turn objects

__init__

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

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

__str__

| __str__() -> Text

This function returns the dialogue and turns.

as_dict

| as_dict() -> Dict

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

from_parameters

| @classmethod
| 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.