Chatbot and Artificial Intelligence

Last modification: August 2026. Version: 109 OUM

Introduction

The Pandora ITSM chatbot consists of two services: a chat server (with its WEB client) and a conversational artificial intelligence engine (optional).

The artificial intelligence engine can be used to learn from the information entered in the Pandora ITSM knowledge base to offer quick answers to user questions.

  • Automatic: Uses machine learning models to automatically provide answers to the user based on prior learning.
  • Manual: A Pandora ITSM operator responds to the user through the chat interface.
  • Mixed: Pandora ITSM assists the operator by showing possible answers to the user's questions.

The architecture consists of three fundamental elements:

  • The chat client, with which the user interacts.
  • The chat server, with which the operator interacts.
  • The prediction engine, which provides answers based on user questions.

Both the chat client and server are part of a Pandora ITSM installation.

To add predictive capabilities to Hybrid Helpdesk, you must install and activate Prediction Engine as described in the following sections.

Chat server installation

It is installed by default when using the cloud installation method. To activate this option, use the chat menu Setup → Setup → ChatBot → Chat Global Options → Enable chat:

You must configure the web service (Ws) URL with the public URL (Public access to server) of the Pandora ITSM installation, as configured in the main section of the Setup:

In case it does not work as expected, you should reproduce the Node.js installation steps.

If AI has been activated (see “AI configuration”), the AI options section will also appear with the Update knowledge base model and Update conversational model buttons:

HTTPS configuration for the ChatBot

Menu Setup → Setup → ChatBot → Chat Global Options → Enable SSL.

By default it brings the following values:

You must replace the default configured certificates with your own. Save with the Update button and check for the green color in Check chat server to see if it is working properly.

Node.js installation

curl -sL https://rpm.nodesource.com/setup_12.x | sh
yum install -y nodejs
npm i -g pm2
cd /var/www/html/pandoraitsm/extras/chat_server
npm update
pm2 start server.js

You must edit the file /etc/systemd/system/integria-chat.service so that the service starts automatically every time the operating system boots, adding the following:

[Unit]
Description=Integria-Chat-Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/node server
Restart=always
# Consider creating a dedicated user for Wiki.js here:
User=root
Environment=NODE_ENV=production
WorkingDirectory=/var/www/html/pandoraitsm/extras/chat_server
[Install]
WantedBy=multi-user.target

Save the file and run:

systemctl daemon-reload
systemctl start integria-chat.service
systemctl enable integria-chat

You must configure the database access for the chat server by editing the file /var/www/html/pandoraitsm/extras/chat_server/config/config.js, modifying the necessary database parameters. Default values are assumed, they must be changed if you have a custom installation.

Artificial intelligence engine installation

The following commands must be executed as root (superuser):

yum install python3 python36-Cython
wget http://xxxxxx/prediction_engine-latest.tgz
tar xvzf prediction_engine-latest.tgz
cd prediction_engine
./install.sh
service prediction_engine.service restart

This will start the service on port 6000/tcp.

AI configuration

Menu Support → Chat → Channel manage, click on the channel name to edit.

The AI is configured independently in each channel, by activating the Enable Chat IA button:

  • IA url: URL where the webservice listens, the artificial intelligence engine. It must be in the format:
    HTTP://DIR_IP
  • IA Port: By default 6000. It should not be changed unless you have had to do a port forwarding somewhere in between.
  • Initial response time: Seconds in which the AI will answer the first user request.
  • Response time between conversations: Response time between questions once the conversation has started.
  • Progress bar timeout: Time the system will allow the operator to choose an answer from the provided ones before automatically answering with the best option.
  • Certainly threshold: Degree of uncertainty supported by the AI when choosing one of the offered options, the value must be between 0 and 1. An initial value of 0.5 (50 %) is recommended and adjust as necessary.

From version 105 you can choose the option to use ChatGPT® (OpenAI) as an alternative AI:

  • API Key: Token to authorize the connection to https://api.openai.com/v1/chat/completions.
  • Model: Selector to choose between the gpt-4 model (default value) or gpt-3.5-turbo.
  • Max tokens: Maximum number of “tokens” (2000 by default) that can be generated in the response.
  • Context time: The time over which it maintains the context of the conversation. In each call you must send the history of the messages sent by the user and those sent by the AI assistant, plus one at the beginning for system (see in Context). By default: 01:00.
  • Context: At the beginning of each request, this message is added in system. It serves to provide guidelines that affect how the model will respond. To this context is added the phrase Always answer me in ${responseLanguage}, regardless of the language in which I write to you., where responseLanguage will be the user's language if available among the channel languages, otherwise it will use the default channel language. By default: You are a Pandora ITSM assistant.
  • Temperature: controls the randomness or creativity of the generated responses. It accepts values between 0 and 1, the closer to 0 the responses are more predictable and coherent, as it approaches 1 the responses will be more creative. Default value: 0.3.
  • Avatar: Image that will be displayed in the chat when interacting with ChatGPT®. By default: moustache1.png.
  • Title: Title that will be displayed in the chat when talking to ChatGPT®. By default: ChatBot.
  • Subtitle: Subtitle that will be displayed in the chat when conversing with ChatGPT®. By default: Default Bot.

Backup of custom learning models

  • Before making any customization, it is recommended to make a backup of the current models:
cp -r /opt/prediction_engine/models /opt/prediction_engine/models.bak
  • To restore the models from the backup you must run:
cp -f /opt/prediction_engine/models.bak/\* /opt/prediction_engine/models/

Questions and answers (Knowledge Base)

This type of modification is advanced, by default you must use the buttons for Update knowledge base model and Update conversational model from the PITSM Web Console.

The questions and answers model is trained from a CSV file with the following format:

Language code;Question;Answer

Example:

“es”;“pregunta 1”;“respuesta 1”
“es”;“pregunta 2”;“respuesta 2”
“en”;“question 1”;“answer 1”
“en”;“question 2”;“answer 2”

It can be obtained automatically from the Pandora ITSM database with the following commands and connectors (change database user and password according to the environment used):

rm -f /opt/prediction_engine/data/integria_kb.zip 2>/dev/null
echo "SELECT id_language AS lang, title as question, data as answer \
FROM integria.tkb_data INTO \
OUTFILE '/opt/prediction_engine/data/integria_kb.csv' |
FIELDS TERMINATED BY ';' ENCLOSED BY '\"' LINES TERMINATED BY '\n';" \
| mysql -u integria -p integria && \
zip -j /opt/prediction_engine/data/integria_kb.zip \
/opt/prediction_engine/data/integria_kb.csv

Then to update the models you must run:

cd /opt/prediction_engine/src
python kb_train.pyc

Dialogs (conversational)

Menu Support → Chat → Conversations → Data management.

In this section of the Pandora ITSM Web Console you can add conversational items classified by categories and languages.

To search for a specific conversational item, you must enter a keyword found in the title and/or answer and select the category and language to which it belongs.

Advanced configuration

This type of modification is advanced, by default you must use the buttons for Update knowledge base model and Update conversational model from the PITSM Web Console.

The conversational model is built from YAML files with the following structure:

categories:
- category 1
- category 2
-...
conversations:
- - text 1
- text 2
-...
- - text 1
- text 2
- text 3
-...

You must place the .yaml files (regardless of the file name) in the directory:

/opt/prediction_engine/data/chat_xx

Where xx is the ISO code of the language you want to update (es for the Spanish language, en for the English language).

To update the models you must run:

cd /opt/prediction_engine/src
python chat_train.pyc

How to use the chat

The Pandora ITSM chatbot uses channels to define different places to have conversations between operators (Pandora ITSM users with special permissions to manage conversations) and normal users (normal Pandora ITSM users or simple anonymous visitors, if the chat is used from outside Pandora ITSM).

Manage a channel

Menu Support → Chat → Channel Manage.

Add operators to the channel

The channel must have at least one operator, who will answer user chat requests. Any user with chat operator permissions can be added and assigned a description, an avatar (different from their user profile), and the languages in which they can answer chats.

Click on Edit users of the corresponding channel to add a user and then click the Add User button:

The screen is used to define an operator, for example:

Once added, other users will be able to start a chat.

Channel operators

Menu Support → Chat → Chat View.

For operators to receive sound notifications in case a user opens a chat, they must be on the chat control screen.

The operator will enter one of those chats and interact with the other party:

In case the chat is opened by an internal user, it will indicate which user it is.

Using the chat outside of Pandora ITSM

Menu Support → Chat → Channel Manage → Generate Bundle in the corresponding channel.

To use the chat outside the Pandora ITSM interface, for example on a web page or in another application, you must click the star icon to show the JavaScript code snippet that you must embed in the application.

The URL included in the code is the URL defined as the public URL in the chat server options. Said URL must be accessible from where the users access, in most cases, this means it must be a public internet URL.

←Back to Pandora ITSM documentation index