An interactive AI Assistant Platform for Real Time operations
Table of Contents
InteractiveAI platform provides support in augmented decision-making for complex steering systems. It is a prototype of a bi-directional virtual assistant, open in terms of industrial applications, in which it will be possible to evaluate the forms of exchange between the expert and an AI that learns continuously, both from the information flows received and the decisions made by the human. The platform will help and assist the operator of a complex operation to resolve incidents/faults in his industrial environment.
As it is designed, the platform is generic, it can be used for different use cases. As an example, the use case of managing power line overloads at PowerGrid (Réseau de Transport d'Electricité français) is provided. To install and run the PowerGrid simulator, please refer to the detailed guide available in the file PowerGrid simulator's README. This guide provides specific instructions for setting up and running the PowerGrid use case.
The platform uses the project OperatorFabric for notification management.
Clone the repo of the assistant
git clone https://github.com/AI4REALNET/InteractiveAI.git
InteractiveAI offers versatile deployment options, leveraging either Docker or Kubernetes. The primary method entails initiating InteractiveAI via Docker to launch all services concurrently. However, recognizing potential resource strain in this mode, we've introduced alternative configurations. These configurations enable selective startup of essential services with minimal dependencies, catering to streamlined versions of certain APIs. Below are the steps to start all services. For other methods, please consult the developer guide.
- Set-up environement variables
VITE_POWERGRID_SIMU
, VITE_RAILWAY_SIMU
, VITE_ATM_SIMU
are the simulators' endpoints.
Put for each UC the corresponding IP address.
Examples:
export VITE_POWERGRID_SIMU=http://[Service url]:[Service port]
export VITE_RAILWAY_SIMU=http://[Service url]:[Service port]
export VITE_ATM_SIMU=http://[Service url]:[Service port]
NOTE: For this step, you should already have a running simulator. If not, you can use the simulator we provided as an example. For this, please follow the tutorial provided in InteractiveAI/usecases_examples/PowerGrid/ then set the VITE_POWERGRID_SIMU variable to http://YOUR_SERVER_ADDRESS:5100/
- Run InteractiveAI assistant
cd config/dev/cab-standalone
./docker-compose.sh
NOTE: You will see the word cab (Cockpit Assistant Bidirectionnel) on most files in the project. Note that it was the initial project name of InteractiveAI. Might be updated later.
-
Setting up Keycloak
Frontend URL
- Access Keycloak Interface:
- Ensure that your Keycloak instance is running and accessible.
- Open a web browser and navigate to the Keycloak admin console, typically available at
http://localhost:89/auth/admin
.
- Login to Keycloak Admin Console:
- Log in to the Keycloak admin console using your administrator credentials (
admin:admin
by default)
- Log in to the Keycloak admin console using your administrator credentials (
- Navigate to Client Settings:
- On the Keycloak admin console, locate and click on the "Clients" section.
- Select the client representing your Assistant Platform application.
- Configure FrontendUrl:
- Within the client settings, look for the "Valid Redirect URIs" or similar configuration field.
- Add the URL of your Assistant Platform frontend as a valid redirect URI. This URL is typically where your frontend application is hosted. For example, if your frontend is hosted locally for development purposes, you might add
http://localhost:3200/*
. - Ensure that the frontend URL you specify matches the actual URL where your frontend application is accessible.
- Save Changes:
- After adding the frontend URL, save the changes to update the client settings.
- Access Keycloak Interface:
-
Load resources WARINING: You need to restart the frontend after updating the URL on keycloak do it before loading the resources.
docker restart frontend
cd resources
./loadTestConf.sh
- If you encounter CORS errors (which can happen if you start tha platform in a non-HTTPS environment), you can start your browser with security mode disabled.
your-chromium-browser --disable-web-security --user-data-dir="[some directory here]" # replace your-chromium-browser with your browser
NOTE: If you encounter any issues, please refer to our troubleshooting guide.
This project is based on a microservice architecture. Every service run on a specific port. Some of th default ports are as fellow:
- Frontend: 3200
- Context Service: 5100
- Event Service: 5000
- Historic Service: 5200
- Keycloak: 89
For a development environment, the system uses predefined initial data for Keycloak setup. You can find authentication data under config/dev/cab-keycloak
Some examples of credentials:
username | password |
---|---|
admin |
test |
powergrid_user |
test |
railway_user |
test |
atm_user |
test |
By default, the system allows the user to be connected only from a single machine. Which means if you try to connect using the same credentials from another machine, you will be disconnected on the first machine.
Contributions to the InteractiveAI Assistant Platform are welcome! To contribute, please make sure to use developer guide
A postman collection is under docs/postman_collections. You can also check the openapi through the URL http://localhost:[Service port]/docs