Elivia is a vocal assistant designed to be respectful of user privacy over theirs data.
The goal of this project is to be seen incorporated in /e/ os, a product from the [e foundation](https://e.foundation/), do to so it is supervised by [Gaël Duval](https://fr.wikipedia.org/wiki/Ga%C3%ABl_Duval).
E Vocal Assistant is composed of 3 parts, a front end built in Kotlin using gradle, a back-end generously inspired from [Olivia](https://github.com/olivia-ai/olivia)'s design, packaging an AI, and a CLI tool made for testing purpose.
Each part have it's own `README.md` where all the information relative to the said part will be detailed and explained more in depth.
Elivia is an open-source project resulting from a partnership between the [PoC R&D center](https://github.com/PoCInnovation) and the [/e/ Foundation](https://e.foundation/),
along with the supervision of [Gaël Duval](https://fr.wikipedia.org/wiki/Ga%C3%ABl_Duval).
The goal of this project is to create a personal assistant that respects the privacy of its users, that can run on the /e/ operating system.
Elivia is composed of two parts :
- A frontend mobile application. It is currently written in Kotlin and can be built with Android Studio.
- A backend application. It is currently written in Go and is built on top of the [Olivia](https://github.com/olivia-ai/olivia) project. It contains an AI and a CLI tool made for testing purposes.
You can learn more about each one of these two parts in the corresponding folder located at thr root of this repository.
## Installation
#### Requirements
-**Frontend**
You need [Android Studio](https://developer.android.com/studio) to build the frontend application. When you'll open the project, it will automatically sync all required dependencies.
As long as you can build the application targetting the Android 4.0 to 9.0 platform, it will work.
Learn more about the frontend [here](https://github.com/PoCInnovation/Elivia/blob/master/front/README.md).
-**Backend**
You need to have go or Docker installed to run the Olivia based AI & server.
Learn more about the backend [here](https://github.com/PoCInnovation/Elivia/blob/master/back/README.md).
## Installation
First you have to clone the repository.
```shell
git clone git@github.com:PoCInnovation/Elivia.git
```
You need [Android Studio](https://developer.android.com/studio) to build the frontend application. When you'll open the project, it will automatically sync all dependencies.
## Quick Start
As a developer or for testing, you can simply start the back end in local and request on it.
-- for dev purpose it's the basic option since IP isn't configurable yet
first start the back-end
-**Backend**
You can run the backend on your local environment and make request to the server. Please note that the target IP is not configurable yet.
```shell
cd back
go run ./
```
More information [here](https://github.com/PoCInnovation/Elivia/blob/master/back/README.md)
-**Frontend**
In the first place, you need to open the `MainActivity` file located in `app/java/com.poc.elivia/` and set your local IP address at line 26.
In the first place, you need to open the `MainActivity` file located in `app/java/com.poc.elivia/` and set your server local IP address at line 26.
To build the frontend application, open the front/Elivia folder in Android Studio.
In the `Build` tab, select `Build Bundle(s) / APK(s)` and then `Build APK(s)`.
Once the build has finished, you can copy the apk to your smartphone and install it by opening it in your file explorer.
More information [here](https://github.com/PoCInnovation/Elivia/blob/master/front/README.md)
## Maintainers
## Authors
*[Theo Ardouin](https://github.com/Qwexta)
*[Luca Georges Francois](https://github.com/PixelFault-tech)
*[Luca Georges Francois](https://github.com/PtitLuca)
## Source
As said in the description, e is inspired from[Olivia](https://github.com/olivia-ai/olivia), yet it also uses a part of its code.
The project was built upon Olivia's IA and a fork from it's Back-end. Currently, the back has been totally updated to meet the requirement we had over flexibility and mutability, but we still use the [IA]() for the moment.
As mentionned in the project description, Elivia backend is built on top of the[Olivia](https://github.com/olivia-ai/olivia) project and more precisely the backend.
Because it is still in development, we may update the current version of the AI.
As said right before, the main part about Elia, is the IA, it was extracted from [Olivia's](https://github.com/olivia-ai/the-math-behind-a-neural-network). For all documentation about the way it works, we strongly recommend checking their repository.
As said right before, the main part about Elivia is the IA and has been extracted from [Olivia's](https://github.com/olivia-ai/the-math-behind-a-neural-network). For further documentation about the way it works we strongly recommend checking the Olivia repository.
### Packages
One thing we added upon it, is the **package** system, Elia is able to load, compile, and train package at runtime allowing you to add, remove or edit response at runtime.
To say it briefly, its the bread and butter of Elia, you can format response and trigger, call your own function, and safely extract data from the sentences that triggered your package.
One thing we added upon it is the **package** system. Elivia is able to load, compile and train package at runtime allowing you to add, remove or edit response at runtime.
Its the main operation of Elivia. You can format response and trigger, call your own function and safely extract data from the sentences that your package has triggered .
**Packages** seems complicated but they aren't that much of deal, really. Plus there is a full [documentation](https://github.com/PoCInnovation/Elivia/blob/master/back/PACKAGES.md) on how to write them, which features are implemented and the best practices around them.
**Packages** seems complicated but they aren't really that much of deal. And there is a full [documentation](https://github.com/PoCInnovation/Elivia/blob/master/back/PACKAGES.md) on how to write them, which features are implemented and the best practices around them.
### Websocket
Elia uses Websocket to communicate with the front-end, the only route used is the serve one, allowing you to handle a sentence through the IA.
Elivia uses Websocket to communicate with the frontend. The only route used is the serve one, allowing you to handle a sentence through the IA.
## What's next ?
Elia is a PoC project, so the focus may change a bitt depending of the team taking over the project in the next months. but the main features left to implement are
Elivia is a PoC project, so the focus may change a bitt depending of the team taking over the project in the next months, but the main features left to implement are :
* Enhance the IA - The current one works well, but with a **Text Data Vectorization** algorithm extracting meaning could have better result thus, leading to less misunderstanding error
* Make it a run time - I lied when I said it was a run time interpreter of packages. It does, indeed, compile and run every package at run time, but it doesn't reload itself yet. This is an easy update that would allow a permanently running soft without any restart needed.
* Package data - We would like to implement a tool making user's data manipulation easy inside of package, thus, you would be able to remember previous action from the user and act upon them.
* Packages, packages and again, packages - We want to add enough of them so user would be able to choose which one they want and load only the one needed when making request with a user thus having a "store" of packages from which user would build their own little IA.
* Enhance the IA. The current one works well, but with a **Text Data Vectorization** algorithm extracting meaning could have better result thus, leading to less misunderstanding error
* Make it a runtime. It is not really a runtime interpreter of packages. It does, indeed, compile and run every package at runtime, but it doesn't reload itself yet. This is an easy update that would allow a permanently running soft without any restart needed.
* Package data. We would like to implement a tool making user's data manipulation easy inside of package, thus, you would be able to remember previous action from the user and act upon them.
* Packages, packages and again, packages. We want to add enough of them so user would be able to choose which one they want and load only the one needed when making request with a user thus having a "store" of packages from which user would build their own little IA.
As you can see, we have plenty of ideas and this is only a small grasp of what we plan to do.
The Elivia frontend is a mobile app running on the /e/ operating system.
The /e/ os is an Android fork and the frontend application can run on version 4.0 to 9.0 of Android and all corresponding versions of /e/.
## Quick start
The only two folders you have to care about are the `core` and `src` ones.
The first contains a plugin manager, which will handle the Elivia response and dispatch to an appropriate plugin.
The second contains Kotlin class (the plugins).
You can learn more and have a look at an example by openning the default ones we provide.
They handle the open app and the send sms requests from the user.
## Plugins
It's really easy to add new plugins in the frontend.
You just need to do two things :
- Create a new kotlin class in the `app/java/com.poc.elivia/plugin/src` folder. This class will contain all necessary functions used by the plugin. You can take a look at the `OpenApp` and `SendSms` plugins already present in the app.
- Add a new statement in the `app/java/com.poc.elivia/plugin/core/PluginManager.kt` run function which will call a `[your_new_plugin_name]PluginManager` private function. It's role is to extract parameters used by the class previously created and then call the `[your_new_plugin_name].run` function.
Note that each one of the parameters extracted by the backend are located in `data["paramterName"]` where data is the json returned by the backend.