- Removed the `analyze_data_file` function from tool definitions to streamline functionality. - Enhanced the `execute_python_code` function description to clarify auto-installation of packages and file handling. - Deleted the `python_executor.py` module to simplify the codebase and improve maintainability. - Introduced a new `token_counter.py` module for efficient token counting for OpenAI API requests, including support for Discord image links and cost estimation.
91 lines
3.0 KiB
Plaintext
91 lines
3.0 KiB
Plaintext
# ============================================
|
|
# Discord Bot Configuration
|
|
# ============================================
|
|
|
|
# Your Discord bot token from https://discord.com/developers/applications
|
|
DISCORD_TOKEN=your_discord_bot_token_here
|
|
|
|
# ============================================
|
|
# AI Provider Configuration
|
|
# ============================================
|
|
|
|
# OpenAI API Key (or GitHub Models API Key if using GitHub Models)
|
|
# Get from: https://platform.openai.com/api-keys or https://github.com/settings/tokens
|
|
OPENAI_API_KEY=your_openai_api_key_here
|
|
|
|
# OpenAI API Base URL
|
|
# Use GitHub Models: https://models.github.ai/inference
|
|
# Use OpenAI directly: https://api.openai.com/v1
|
|
OPENAI_BASE_URL=https://models.github.ai/inference
|
|
|
|
# ============================================
|
|
# Image Generation (Optional)
|
|
# ============================================
|
|
|
|
# Runware API Key for image generation
|
|
# Get from: https://runware.ai
|
|
# Leave empty to disable image generation
|
|
RUNWARE_API_KEY=your_runware_api_key_here
|
|
|
|
# ============================================
|
|
# Google Search Configuration (Optional)
|
|
# ============================================
|
|
|
|
# Google Custom Search API Key
|
|
# Get from: https://console.cloud.google.com/apis/credentials
|
|
GOOGLE_API_KEY=your_google_api_key_here
|
|
|
|
# Google Custom Search Engine ID (CX)
|
|
# Get from: https://programmablesearchengine.google.com/
|
|
GOOGLE_CX=your_google_cx_id_here
|
|
|
|
# ============================================
|
|
# Database Configuration
|
|
# ============================================
|
|
|
|
# MongoDB Connection URI
|
|
# Format: mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority
|
|
# Get from: https://cloud.mongodb.com/
|
|
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority
|
|
|
|
# ============================================
|
|
# Admin Configuration
|
|
# ============================================
|
|
|
|
# Discord User ID of the bot administrator
|
|
# Right-click your username in Discord (with Developer Mode enabled) and select "Copy ID"
|
|
ADMIN_ID=your_discord_user_id_here
|
|
|
|
# ============================================
|
|
# Logging Configuration (Optional)
|
|
# ============================================
|
|
|
|
# Discord webhook URL for logging bot errors and info
|
|
# Create a webhook in your Discord channel settings
|
|
LOGGING_WEBHOOK_URL=your_discord_webhook_url_here
|
|
|
|
# Enable/disable webhook logging (true/false)
|
|
ENABLE_WEBHOOK_LOGGING=true
|
|
|
|
# ============================================
|
|
# Timezone Configuration
|
|
# ============================================
|
|
|
|
# Timezone for timestamps and reminders
|
|
# Examples: America/New_York, Europe/London, Asia/Tokyo, Asia/Ho_Chi_Minh
|
|
# Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
TIMEZONE=UTC
|
|
|
|
# ============================================
|
|
# File Management Configuration
|
|
# ============================================
|
|
|
|
# How long uploaded files are stored (in hours)
|
|
# Examples:
|
|
# 24 = 1 day
|
|
# 48 = 2 days (default)
|
|
# 72 = 3 days
|
|
# 168 = 1 week
|
|
# -1 = Never expire (permanent storage)
|
|
FILE_EXPIRATION_HOURS=48
|