This project brings AI (private and local or using OpenAI's GPT3/4/4-omni) to be your personal assistant through a Telegram bot. It's capable of running automations in the user's machine using existing or custom-made Tools, it can read and write files, interpret images, run programs and chat like ChatGPT. And since it uses Telegram as the main interface, it can be used from anywhere, in PCs, phones, etc, as long as there is an internet connection.
Yes, the name is based on the Neon Genesis Evangelion character.
It's meant to be used as an intuitive assistant to automate simple or repetitive processes even if you are not at home, and since this is a versatile project, it can be configured to meet the user's necessities without compromising privacy, Ayanami can be set to run entirely locally, so, if the AI can access some of your raw data, it never leaves your computer, but be aware that information can be shown in the Telegram's chat history.
[!CAUTION] Even if this project never touches your data, it uses LangChain, the Telegram API, and optionally the OpenAI API, so you need to be aware on how they handle your data. Just be careful with sensitive data you share with it, especially when you send it to someone that is not you.
Ayanami can use any LangChain Tool (see a list of built-in tools Here), each tool is designed to be plugged into the the AI so that it can be used to do something like read a text document or execute a program.
With that, it can:
It can do some other cool things too...
And if you have the python skills, you can even write your own tools to do whatever you want. LangChain is well documented and widely used, and the process of creating a tool from scratch is actually pretty simple! (More info in the LangChain Tools Documentation)
[!WARNING] Also, be aware that, very unfortunately, these tools may not work properly with some local (Ollama) LLMs, since small models tend to not perform as good as big ones.
This project is divided into 3 development stages, 1st, 2nd and 3rd impacts.
The 1st impact is the minimum viable product, things that I will implement. 2nd impact is the increment stage, things that I will very likely implement at some point. On the 3rd impact the project will be considered finalized, so probably I will NOT work too much on it.
On this list, I will implement things in order, but this order can change.
1st Impact:
2nd Impact:
3rd Impact:
[!IMPORTANT] This project is in its early development stages, so things can and will change, but I'll do my best to never keep this part of the guide outdated. Of course that any help or suggestion is welcome, just use the Issues tab.
Ayanami is built to be used with a Telegram bot.
You'll need to contact BotFather to get your bot Token. BotFather is a Telegram bot that creates Telegram bots, it was created by Telegram people.
Save your bot token for later, you'll need it later.
TO run Ayanami you need python installed on your computer and accessible on your terminal (on your PATH).
After that, you can follow this steps in yout terminal window:
pip install -U virtualenv
python -m venv .venv
source .venv/bin/activate
, Windows: venv\Scripts\activate.bat
)pip install -r requirements.txt
Here we will be saving the credentials so that Ayanami can access resources like your Telegram Bot, OpenAI models (if you are using it) or any resource that a tool may use (the docs for the tool are going to tell which keys you'll need).
[!CAUTION] API Keys are private! You should not share them with anyone and they should never leave your machine. Unless you know what you are doing.
In this project we will be saving API Keys in a .env file, located in the root of the project:
Example .venv:
TELEGRAM_BOT_TOKEN="aejrgioaergioaergioIASUFDIAHSDFHjasfkaj"
OPENAI_API_KEY="fheifhOHFjahdsfjkHKJFHKJHfjshf"
OPENWEATHERMAP_API_KEY="..."
SERPAPI_API_KEY="..."
Ayanami will automatically load every API key when it starts up.
In the root folder, there is a file named config.py, with this file you can parameters to create your own assistant.
This file comes pre-fabricated, you can change everything in there but you cannot remove most stuff, doing so will probably crash Ayanami (for now). Most of the things you can change there are commented to be self-explanatory, but I'll go through some of the most important here:
Try experimenting with the various parameters in the config file and see what happens!
If all the steps above went well, you are ready to run Ayanami! Just run the main.py file with the command python main.py
and you are good to start chatting with your AI!