mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-15 00:36:56 +08:00
feat: Add Telegram AI Assistant (moltbot-nofx integration)
- Add assistant package with AI Agent runtime - agent.go: Core agent loop with tool calling - session.go: Conversation memory management - tool.go: Tool interface and base implementation - trading_tools.go: Trading-specific tools (13 tools) - prompts.go: Trading expert system prompts (EN/ZH) - Add telegram package for Telegram bot integration - bot.go: Telegram bot with rate limiting & access control - config.go: Environment-based configuration - Update main.go to initialize Telegram bot on startup - Update .env.example with new configuration options - Add gopkg.in/telebot.v3 dependency Trading tools available: - Query: get_balance, get_positions, list_traders, get_trader_status - Control: start_trader, stop_trader - Trading: get_market_price, open_long, open_short, close_position - Config: list_strategies, list_exchanges, list_ai_models
This commit is contained in:
47
.env.example
47
.env.example
@@ -49,12 +49,51 @@ RSA_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nYOUR_KEY_HERE\n-----END RSA PRI
|
||||
TRANSPORT_ENCRYPTION=false
|
||||
|
||||
# ===========================================
|
||||
# Optional: External Services
|
||||
# Telegram AI Assistant (NEW - moltbot-nofx)
|
||||
# ===========================================
|
||||
|
||||
# Telegram notifications (optional)
|
||||
# TELEGRAM_BOT_TOKEN=your-bot-token
|
||||
# TELEGRAM_CHAT_ID=your-chat-id
|
||||
# Telegram Bot Token (get from @BotFather)
|
||||
# This enables the AI trading assistant via Telegram
|
||||
TELEGRAM_BOT_TOKEN=
|
||||
|
||||
# Allowed users (comma-separated Telegram user IDs)
|
||||
# Leave empty to allow all users (not recommended for production)
|
||||
# Get your ID from @userinfobot
|
||||
TELEGRAM_ALLOWED_USERS=
|
||||
|
||||
# Admin users (comma-separated Telegram user IDs)
|
||||
# Admins can manage bot settings
|
||||
TELEGRAM_ADMIN_USERS=
|
||||
|
||||
# Rate limit (messages per minute per user)
|
||||
TELEGRAM_RATE_LIMIT=30
|
||||
|
||||
# Default language: "en" or "zh"
|
||||
TELEGRAM_LANGUAGE=zh
|
||||
|
||||
# ===========================================
|
||||
# AI Model Configuration (for Assistant)
|
||||
# ===========================================
|
||||
|
||||
# DeepSeek (recommended - cost-effective)
|
||||
DEEPSEEK_API_KEY=
|
||||
DEEPSEEK_API_URL=
|
||||
DEEPSEEK_MODEL=deepseek-chat
|
||||
|
||||
# Claude (optional alternative)
|
||||
CLAUDE_API_KEY=
|
||||
CLAUDE_API_URL=
|
||||
CLAUDE_MODEL=
|
||||
|
||||
# OpenAI (optional alternative)
|
||||
OPENAI_API_KEY=
|
||||
OPENAI_API_URL=
|
||||
OPENAI_MODEL=
|
||||
|
||||
# Qwen (optional alternative)
|
||||
QWEN_API_KEY=
|
||||
QWEN_API_URL=
|
||||
QWEN_MODEL=
|
||||
|
||||
DB_TYPE=postgres
|
||||
DB_HOST=10.
|
||||
|
||||
Reference in New Issue
Block a user