DexFren AI chatbot is a Telegram bot powered by GPT-4 that helps users understand and use the DexAppBuilder platform. The bot uses a knowledge base built from DexKit's documentation and YouTube tutorials.
pip install python-telegram-bot
pip install langchain-chroma
pip install python-dotenv
pip install swarm
pip install youtube-transcript-api
TELEGRAM_BOT_TOKEN
OPENAI_API_KEY
project/
├── docs/                   # PDF documentation (if any)
├── knowledge/             
│   ├── __init__.py
│   └── data_ingestion.py  # Knowledge base processing
├── knowledge_base/         # Vector store data
├── .env                   # Environment variables
├── .gitignore            
├── README.md              # Simplified documentation
├── main.py                # Bot implementation
└── build_knowledge_base.py # Knowledge base builder
- Natural language processing for DexKit-related queries
 - Context-aware responses based on documentation and tutorials
 - Support for both English and Spanish video transcripts
 - Real-time responses using GPT-4
 - Persistent knowledge base using Chroma vector store
 
- Place any PDF documentation in the 
docs/directory - Update YouTube URLs in 
build_knowledge_base.py - Run the knowledge base builder:
 
python build_knowledge_base.pypython main.py- Find the bot on Telegram using the bot username
 - Start a conversation with 
/start - Ask questions about:
- DexAppBuilder usage
 - Platform features
 - Technical guidance
 - Best practices
 
 
- Telegram Bot: Handles user interactions
 - Swarm Agent: Processes queries using GPT-4
 - Knowledge Base: Stores and retrieves relevant context
 - Vector Store: Manages embeddings for efficient searching
 
- User sends message via Telegram
 - Bot queries knowledge base for relevant context
 - Context is sent to Swarm Agent with user query
 - GPT-4 generates response using context
 - Response is sent back to user