Unlimited Telegram AI Chat Bot based on gpt4free using Aiogram
Allows you to maintain long-term communication with AI by saving/requesting unique history from your database for each user
- Create DB
- Import sql template ./database/bot_database.sql
- Create
.env
(based on.env.example
) and fill it pip install -r requirements.txt
- Run
main.py
- You can change this line for gpt4free AI provider model as it mentioned on gpt4free
bot_users
table for bot usersuser_questions
table for storing user questions history
Each user question is stored in Database. As soon as a new question is asked, the bot retrieves the previous questions history from the Database, beautifies the user question history into an array and sends beatified array as an "messages" parament to the GPT4Free Provider