Artificial Intelligence-Yearning Fulfillment Unit, is a personalized AI telegram-based chatbot. It offers both text and voice chat capabilities, allowing you to interact with it naturally through your preferred method. It can even send you relevant images and proactively initiate conversations, adding a human touch to your digital interactions. This highly customizable AI assistant can learn your preferences and adapt to your specific needs, making it a true companion in the digital world.
- Minimal code, easyily customizable.
- Server (self) hosted on kaggle, bot (self) hosted on python-anywhere.
- Can initiate conversations seemlessly.
- Can send images, handle voice inputs and outputs.
- Has Long term memory.
- Does not immediately reply if in idle state.
- Project was made in two days (Sat-Sun), so code is very (bad) unstructured.
- Kaggle only provides ~30hr GPU weekly per account, so limited hosting.
- Since gradio share is banned on kaggle (due to stable diffusion UIs) so we will use ngrok to bypass it.
- This project will most likely not be updated but you can easily make this into a full personal AI assitant. For example:
- Give full control over your phone using android accessibility API.
- Make calls, send text. Refer: https://github.com/shivaya-dav/DogeRat
- To collect your keystrokes randomly to make it more context aware about you.
- Ability to send stickers.
- Custom voice using SO-VITS.
- Able to sing songs using RVC
- Reply to past messages by sending a message-id along with each message.
- .... etc.
- Download or clone the repository.
- Make a kaggle account and verify using phone to get ~30hrs of weekly GPU.
- Make an ngrok account and get your auth token from here
- Go to this notebook and click 'Copy & Edit'
- Set the accelerator as GPU P100 under notebook options if not already selected.
- Replace the auth_token in '!ngrok config add-authtoken auth_token' in the notebook code with the auth-token in Step 3.
- Edit the lore.txt and conversation.jsonl file. Replace the <...> with your custom text. Optinally, also change the date and time in the convo.
- In the notebook, click on Upload data (beside the Add Data button). Browse and add both the lore and conversation file.
- Enter dataset title as ai-data and click Create.
- In the code, modify the user name, ai name and timezone under 'AI Settings'.
- Click Run All and wait for ~15m. If eveything seems to be running correctly, click Save Version -> Save and Run All -> Save.
- This will keep the server running in the backgroud on the kaggle machine (hosted) but takes ~15m to initialize.
- Download or clone the repository.
- Create and setup a telegram bot using these instructions, and get the bot token. (Should take 5min)
- Get your user id using these instructions.
- Edit the AIW-client.py file and modify the config settings, add correct timezone, bot token, user id, ngrok token and the ai name used while setting up the server.
- The TIMES_SELF_START property defines how many times in the range of FROM_HRS to TO_HRS will the AI, strike a conversation with you automatically.
- The DELAYED_RESPONSES property defines that the AI can go into idle state (to make it human-like) and the first reply may take a few seconds to reply. This also allows you to send and enqueue multiple messages.
- Make a python-anywhere account.
- Goto Dashboard -> Files -> Upload a file and upload the AIW-Client.py file.
- Goto Console and run:
- pip install python-telegram-bot==13.3
- pip install gradio-client
- pip install ngrok-api
- Goto Files -> .local/lib/python3.10/site-packages/gradio_client/utils.py and add "heartbeat": Status.PROGRESS at line ~137 accoring to this
- Finally run: (If you see a module not found error, install that module as well using pip install module-name)
- python AIW-Client.py
- The bot is also now hosted and will keep running (until Ctrl-C), it will also automatically connect the the server.
- Start your bot by sending the /start command to your AI-YFU in telegram and enjoy!