Violet v0.8: Conversation Engine Improvements
We focused on the core of Violet — the Conversation Engine — in this release. As we have been using Violet, we collected a number of scenarios where it was hard to do things that would be common in conversations. In this release we therefore did a fairly significant refactor and clean-up of the engine and polished some of the rough edges.
This work has meant that the functionality that used to live in the Conversation Engine can now be found in four distinct classes:
InputMgr— helps process inputs (data from Alexa) and call the intents defined in the Violet scripts.OutputMgr— helps build an output (back to Alexa) as provided by calls from Violet scripts to theResponseclass.ScriptParser— provides a set of methods to help the Conversation Engine parse the Violet script.ConversationEngine— the main class that users interact with.
Beyond the refactor
Alongside this refactoring of the Violet core, we also made a number of improvements:
- Violet now saves each user's conversation state in a session variable. This allows much easier out-of-the-box support for multiple users when working with conversational goals.
- Violet is now less insistent when it comes to filling goals. When a goal is added by a script, Violet no longer forces the conversation toward it as aggressively — giving you finer control over conversational flow.
- General clean-up and polish across the engine to make common conversation patterns simpler to express.
As always, you can install the latest release from npm with npm install violet-conversations --save. We'd love to hear about the scripts you've built — and about the samples you'd like to see next.