123 lines
3.5 KiB
Bash
123 lines
3.5 KiB
Bash
# ============================================
|
|
# TELEGRAM BOT CONFIGURATION
|
|
# ============================================
|
|
|
|
# Telegram Bot Token
|
|
# Get it from BotFather: https://t.me/botfather
|
|
BOT_TOKEN=your_bot_token_here
|
|
|
|
# Creator ID
|
|
# Your Telegram user ID - the bot will recognize you as creator
|
|
# To get your ID: send /id command to the bot and use the "from id" value
|
|
CREATOR_ID=your_user_id_here
|
|
|
|
# Database connection
|
|
# Leave empty for local SQLite in ~/.local/share/tg-chat-bot/database.db.
|
|
# Set DATA_PATH=data if you want to keep files inside the repo.
|
|
# Set to postgres://... for PostgreSQL.
|
|
# Set to :memory: for ephemeral in-memory SQLite.
|
|
DATABASE_URL=
|
|
DATA_PATH=
|
|
|
|
# Docker Compose image tag override
|
|
# Used by docker-compose.yml when pulling ghcr.io/melod1n/tg-chat-bot
|
|
IMAGE_TAG=1.0.0
|
|
|
|
# ============================================
|
|
# BOT SETTINGS (Optional)
|
|
# ============================================
|
|
|
|
# Bot Prefix for commands
|
|
BOT_PREFIX=
|
|
|
|
# Whitelist of chat IDs (comma-separated)
|
|
# Example: 123456789,987654321
|
|
CHAT_IDS_WHITELIST=
|
|
|
|
# Test environment mode
|
|
TEST_ENVIRONMENT=false
|
|
|
|
# Only creator can use bot
|
|
ONLY_FOR_CREATOR_MODE=false
|
|
|
|
# Use user names in AI prompts
|
|
USE_NAMES_IN_PROMPT=true
|
|
|
|
# Custom system prompt for AI (or put it into data/SYSTEM_PROMPT.md)
|
|
SYSTEM_PROMPT=
|
|
|
|
# Tool ranker fallback policy:
|
|
# MAIN_MODEL - rank tools through the provider's chat model if a dedicated ranker target is missing or fails
|
|
# ALL_TOOLS - skip ranker fallback and allow all tools
|
|
# NO_TOOLS - skip ranker fallback and allow no tools
|
|
TOOL_RANKER_FALLBACK_POLICY=ALL_TOOLS
|
|
|
|
# Maximum photo size in pixels
|
|
MAX_PHOTO_SIZE=1280
|
|
|
|
# Directory with localization JSON files
|
|
LOCALES_DIR=locales
|
|
|
|
# ============================================
|
|
# AI MODELS CONFIGURATION (Optional)
|
|
# ============================================
|
|
|
|
# Mistral AI
|
|
MISTRAL_API_KEY=
|
|
MISTRAL_MODEL=mistral-small-latest
|
|
MISTRAL_TRANSCRIPTION_MODEL=voxtral-mini-latest
|
|
MISTRAL_TTS_MODEL=
|
|
MISTRAL_TTS_VOICE_ID=
|
|
MISTRAL_MAX_CONCURRENT_REQUESTS=3
|
|
|
|
# Ollama (Local AI Model)
|
|
OLLAMA_ADDRESS=
|
|
OLLAMA_CHAT_MODEL=
|
|
OLLAMA_IMAGE_MODEL=
|
|
OLLAMA_THINK_MODEL=
|
|
OLLAMA_AUDIO_MODEL=gemma4:e2b
|
|
OLLAMA_API_KEY=
|
|
OLLAMA_EMBEDDING_MODEL=nomic-embed-text
|
|
OLLAMA_RAG_CHUNK_SIZE=1400
|
|
OLLAMA_RAG_CHUNK_OVERLAP=220
|
|
OLLAMA_RAG_TOP_K=8
|
|
OLLAMA_RAG_MAX_CONTEXT_CHARS=14000
|
|
OLLAMA_RAG_MIN_SCORE=0.12
|
|
OLLAMA_RAG_MAX_ARCHIVE_FILES=200
|
|
OLLAMA_RAG_MAX_ARCHIVE_BYTES=52428800
|
|
OLLAMA_RAG_MAX_ARCHIVE_DEPTH=2
|
|
OLLAMA_MAX_CONCURRENT_REQUESTS=1
|
|
|
|
# OpenAI
|
|
OPENAI_API_KEY=
|
|
OPENAI_BASE_URL=
|
|
OPENAI_MODEL=gpt-4.1-nano
|
|
OPENAI_IMAGE_MODEL=gpt-image-1-mini
|
|
OPENAI_TRANSCRIPTION_MODEL=gpt-4o-mini-transcribe
|
|
OPENAI_TTS_MODEL=gpt-4o-mini-tts
|
|
OPENAI_TTS_VOICE=alloy
|
|
OPENAI_TTS_INSTRUCTIONS=
|
|
OPENAI_MAX_CONCURRENT_REQUESTS=3
|
|
|
|
# Per-capability AI endpoint overrides
|
|
# Pattern:
|
|
# <PROVIDER>_<CAPABILITY>_MODEL=
|
|
# <PROVIDER>_<CAPABILITY>_BASE_URL=
|
|
# <PROVIDER>_<CAPABILITY>_API_KEY=
|
|
#
|
|
# Providers: OLLAMA, MISTRAL, OPENAI
|
|
# Capabilities: CHAT, VISION, OCR, THINKING, EXTENDED_THINKING, TOOLS, AUDIO,
|
|
# DOCUMENTS, OUTPUT_IMAGES, SPEECH_TO_TEXT, TEXT_TO_SPEECH
|
|
# Endpoint aliases are also supported: *_ENDPOINT and *_ADDRESS.
|
|
# Provider-wide fallback endpoints: OPENAI_BASE_URL, MISTRAL_BASE_URL,
|
|
# OLLAMA_ADDRESS or OLLAMA_BASE_URL.
|
|
# Capability aliases are also supported: IMAGE, THINK, RAG, EMBEDDING,
|
|
# TRANSCRIPTION, STT, TTS.
|
|
#
|
|
# Examples:
|
|
# OPENAI_SPEECH_TO_TEXT_MODEL=gpt-4o-mini-transcribe
|
|
# OPENAI_SPEECH_TO_TEXT_BASE_URL=https://api.openai.com/v1
|
|
# OPENAI_SPEECH_TO_TEXT_API_KEY=
|
|
# MISTRAL_TTS_BASE_URL=
|
|
# OLLAMA_DOCUMENTS_ADDRESS=http://localhost:11434
|