Skip to content

Chatbot

turms-plugin-rasa

Introduction

turms-plugin-rasa is a plugin implementation of the turms-service chatbot based on the open-source conversational AI framework Rasa.

The workflow of turms-plugin-rasa is simple: it forwards messages sent by users to the Rasa server, and then sends the response returned by the Rasa server to the user in the form of a message.

Installation

Configuration

Configuration ItemDefault ValueDescription
turms-plugin.rasa.enabledtrueWhether to activate the plugin
turms-plugin.rasa.instances[?].chatbot-user-id0When a user sends a message to this user ID, the message is forwarded to the Rasa server
turms-plugin.rasa.instances[?].urlhttp://localhost:5005/webhooks/rest/webhookThe address of the Rasa server that receives user messages
turms-plugin.rasa.instances[?].request.timeoutMillis60_000Request timeout duration (in milliseconds)
turms-plugin.rasa.instances[?].response.formatPLAINWhen set to PLAIN, the text field in the response from the Rasa server will be sent directly to the user as a message;
When set to JSON, the response from the Rasa server will be first serialized into JSON format text, and then sent to the user as a message. See below for the specific JSON format.
turms-plugin.rasa.instances[?].response.delimiter\nWhen format is set to PLAIN and the user sends one message to the Rasa server but the Rasa server returns multiple responses, the specified string will be used as the delimiter between the text fields in the responses.
turms-plugin.rasa.instances[?].response.persistDEFAULTWhether to persist messages generated based on the responses of the Rasa server.
If set to TRUE, it means persisting;
If set to FALSE, it means not persisting;
If set to DEFAULT, it means judging based on the property turms.service.message.persist-message.

The JSON format of the message sent to the user is:

json
[
    {
        "text": <string>,
        "image": <string>
    },
    ...
]