tock / ai.tock.bot.engine.dialog / Dialog

# Dialog

`data class Dialog` (source)

A dialog is a conversation between users and bots. Conversation history is split into a list of stories. The dialog has a (current) state.

### Constructors

#### <init> | A dialog is a conversation between users and bots. Conversation history is split into a list of stories. The dialog has a (current) state. `Dialog(playerIds: Set<PlayerId>, id: Id<Dialog> = newId(), state: DialogState = DialogState(), stories: MutableList<Story> = mutableListOf(), groupId: String? = null)`

### Properties

#### actionsSize | Current number of actions in dialog history. `val actionsSize: Int`
#### currentStory | The current story if any. `val currentStory: Story?`
#### groupId | An optional group identifier. `val groupId: String?`
#### id | The id of the dialog. `var id: Id<Dialog>`
#### lastAction | Returns last action. `val lastAction: Action?`
#### lastDateUpdate | The last update date. `val lastDateUpdate: Instant`
#### lastUserAction | Returns last user action. `val lastUserAction: Action?`
#### playerIds | The players of the dialog. `val playerIds: Set<PlayerId>`
#### snapshots | The Snapshots of the dialog. `val snapshots: List<Snapshot>`
#### state | The state of the dialog. `val state: DialogState`
#### stories | The history of stories in the dialog. `val stories: MutableList<Story>`

### Functions

#### allActions | All old actions. `fun allActions(): List<Action>`

### Companion Object Functions

#### initFromDialog | Init a new dialog from the specified dialog. `fun initFromDialog(dialog: Dialog): Dialog`