nanikotobot is a minimal Telegram bot powered by OpenAI. It has the ability to remember and learn from conversations in a group chat, utilizing Pinecone for storing and querying the conversation history. This enables the bot to evolve its understanding and knowledge based on the interactions it has within the group chat.
- Utilizes gpt-4 and gpt-3.5-turbo for generating intelligent responses.
- Stores conversation history in Pinecone for long-term memory.
- Queries relevant historical context from Pinecone before responding.
- Evolves with the group chat by learning from past conversations.
To run this project, you need to have the following:
- Node.js (v14 or higher)
- A Telegram Bot API Token
- OpenAI Key
- Clone the repository:
git clone https://github.com/kalidao/nanikotobot.git
- Navigate to the project directory:
cd nanikotobot
- Install the required dependencies:
pnpm i
- Create a
.env
filekalidao in the project root directory and add the following variables:
TELEGRAM_TOKEN=your_telegram_bot_token
PINECONE_API_KEY=your_pinecone_api_key
OPENAI_API_KEY=your_openai_api_key
Replace your_telegram_bot_token
, your_pinecone_api_key
, and your_openai_api_key
with the appropriate tokens.
- Start the bot:
pnpm start
To interact with the bot, simply invite it to a group chat on Telegram and mention its name (e.g., @nanikotobot
) in your messages. The bot will intelligently respond to your messages based on the historical context it has learned from past conversations within the group.
Nani currently resides in the NANI DAO Telegram group. You can join the group and interact with the bot here: https://t.me/+NKbETPq0J9UyODk9
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.