Documentation

AI Assistant

Description

The AI Assistant is a module that allows you to configure an AI chatbot that the user can talk to. AI API key needs to be configured in mAuthor/mCourser for this module to function correctly.

Properties

The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
Chat name The name of the chat, which will be displayed at the top of the module.
Welcome text The initial text which will be displayed by the module.
Hidden prompt This will be the first message that will be sent to the AI assistant automatically after it has been initialized. The content of the Hidden prompt will not be displayed for the user.
Suggestions These suggestions will be displayed for the user as a prompt under the 'Welcome text'.
Instructions This property allows you to define the instructions for the AI Assistant. Instructions serve to guide its responses and behaviour.
Draggable When checked, the module becomes draggable.
Hide header When checked, the module's header will not be displayed.
Mute voice If checked, the module will not read the contents of the Assistant's messages. This property does not affect the TTS functionality in the WCAG mode.
Voice language Defines the language which will be used to read the contents of the Assistant's messages. The default value is 'en'. This property does not affect the TTS functionality in the WCAG mode.
Voice type Defines the voice type which will be used to read the contents of the Assistant's messages. The default value is 'onyx'. This property does not affect the TTS functionality in the WCAG mode.
Reading speed Defines the speed at which the contents of the Assistant's messages will be read. The value must be greater than 0.25 and lesser than 4. The default value is '1'. This property does not affect the TTS functionality in the WCAG mode.
Translation languages Defines the languages which will be available for translating the Assistant's messages. Each code should be separated by a semicolon.
Class names The specified classes will be used in place of 'display: none' when using the hide and show methods. This enables the author to define the exact behaviour when hiding/showing the module, such as by adding CSS for animations. If the property is left empty, 'display: none' will be used.
Lang attribute This property allows defining the language for this module (different than the language of the lesson).
Speech texts Sets the values of speech texts - predefined phrases providing additional context while using the module in the Text To Speech mode. Speech texts are always read using the content's default language.

Supported commands

Command name Params Description
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.
showAnimated --- Displays the module by assigning it either the class specified in the class names property, or the 'open' class if the 'Class names' property is empty.
hideAnimated --- Hides the module by assigning it either the class specified in the class names property, or the 'close' class if the 'Class names' property is empty.

Demo presentation

Demo presentation contains examples of how to use the AI Assistant module.