Repository navigation
Conversation
…re cleared A new restartKeyword setting (undefined by default). When it is set (to _restart_ for the default Tock configuration), the clear messages button also sends this keyword to the bot, without displaying it, so that the bot starts a new dialog while keeping the user. The restartConversation method of useTock does the same.
Contributor
Author
|
@Fabilin please review this PR ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of theopenconversationkit/tock#2164 (issue theopenconversationkit/tock#2021).
Problem
The clear messages button only erases the messages on the client side. The bot keeps the whole conversation context (current story and intent, entity values, RAG history).
Change
A new
restartKeywordsetting inTockSettings, undefined by default. When it is set (_restart_with the default Tock configuration, propertytock_bot_restart_keyword), the clear messages button:conversation restartedlabel, which is displayed.The same behaviour is exposed by the new
restartConversationmethod ofuseTock.clearMessagesis unchanged, so anafterInitcallback that calls it does not send anything.The setting is opt-in: a Tock backend without #2164 would handle
_restart_as a regular sentence.Docs:
restartKeywordin theTockSettingstable of the README.Checked with
tsc --noEmit,yarn build, eslint and prettier (no tests in this repository).