Skip to content

[Bot Engine] Ability for the user to restart a conversation #2021

@Fabilin

Description

@Fabilin

Often, bots offer the ability to purge a user's history and restart a brand new conversation. However, there seems to be no feature in the TOCK bot backend to facilitate this.

Existing implementations

  • tock-react-kit has a button to erase the history on the frontend, but the backend keeps the whole conversation context
  • tock-vue-kit has a similar button to erase the history on the frontend, which regenerates a tock_user_id
  • other bots use a custom story implemented in code using integrated mode, which resets the conversation state serverside

Requirements

  • the solution should reset the conversation context: current intent, current story, entity values, RAG history
  • the solution should keep the user ID, in order to be compatible with all connectors as well as metadata like analytics and End User License Agreements
  • the solution should be pluggable, so that third parties using integrated mode with custom state are able to handle their own data deletion

Proposed solution

The solution could come in the form of a builtin restart story, which pushes a new active Dialog to the UserTimeline, then calls a list of a new interface RestartListener loaded through ServiceLoader (similar to the way KeywordService works).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions