1cec68ea61667abe6108095013a4b78c24773451
AI Pipelines with Telegram Bot
This project provides a framework for creating and executing AI-powered pipelines, with a Telegram bot interface for easy interaction.
Features
- Execute AI-powered pipelines using OpenAI's models
- Integration with Model Context Protocol (MCP) tools
- Telegram bot interface for easy interaction
- Support for dynamic prompts and variables
Prerequisites
- Node.js and Bun installed
- OpenAI API key
- Telegram Bot Token (get it from @BotFather)
Setup
- Clone the repository
- Install dependencies:
bun install
- Copy
.env.exampleto.envand fill in your credentials:
cp .env.example .env
- Edit the
.envfile and add your:OPENAI_API_KEY- Your OpenAI API keyTELEGRAM_BOT_TOKEN- Your Telegram bot token from @BotFatherMCP_SERVER_URL- (Optional) MCP server URL (defaults to Santiment's MCP server)
Running the Bot
Start the bot with:
bun start
Or in development mode with auto-reload:
bun --watch src/main.ts
Using the Bot
- Find your bot on Telegram using the username you set with @BotFather
- Start a chat with the bot
- Send any message to the bot, and it will process it through the AI pipeline
- The bot will respond with the AI's analysis or action
Project Structure
src/bot/- Telegram bot implementationsrc/models/- Data models and interfacessrc/pipelines/- Pipeline execution logicsrc/services/- External service integrationssrc/main.ts- Application entry point
Development
- Run linter:
bun run lint - Run type checking:
bun run ts:check - Run both:
bun run check
License
MIT
Languages
TypeScript
99.2%
Dockerfile
0.8%