Adds a disk-backed scrape cache under workspace/web_cache keyed by the SHA-256 of the URL, honoring WEB_SEARCH_SCRAPE_CACHE_TTL so repeated lookups within the window skip the network entirely. Fetches now retry twice with exponential backoff before giving up, and URLs are screened against SCRAPING_BLOCKED_EXTENSIONS and SCRAPING_BLOCKED_DOMAINS to avoid downloading binaries or denylisted hosts. New scraping knobs (enable flag, max chars, cache TTL, blocklists) are exposed via .env, alongside a provider switch to stepfun with the step-3.7-flash default model.
73 lines
1.8 KiB
Bash
Executable File
73 lines
1.8 KiB
Bash
Executable File
# Telegram Configuration
|
|
TELEGRAM_BOT_TOKEN=8827588404:AAHmSKHWtkHKNWbhxwoyA6c3968tjWXR8H8
|
|
TELEGRAM_CHAT_ID=7889499475
|
|
|
|
|
|
|
|
# AI Provider (openrouter | stepfun | qwencloud | llamacpp)
|
|
AI_PROVIDER=stepfun
|
|
|
|
# Default AI Model
|
|
DEFAULT_MODEL=step-3.7-flash
|
|
|
|
|
|
|
|
|
|
# OpenRouter Configuration
|
|
OPENROUTER_API_KEY=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
|
|
OPENROUTER_API_URL=https://openrouter.ai/api/v1
|
|
|
|
# StepFun Configuration
|
|
STEPFUN_API_KEY=zKmZD8fSFhEQue1VGBxkcAlW2gDw8564F6Q1P7azcSpWeeS7lkqq4khM9od9vcw6
|
|
STEPFUN_API_URL=https://api.stepfun.ai/step_plan/v1/
|
|
|
|
# QwenCloud Configuration
|
|
QWENCLOUD_API_KEY=
|
|
QWENCLOUD_API_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
|
|
|
|
# llama.cpp Configuration
|
|
LLAMA_CPP_API_URL=http://localhost:8080/v1
|
|
|
|
# Proactive Message Intervals (in minutes)
|
|
MIN_INTERVAL_MINUTES=60
|
|
MAX_INTERVAL_MINUTES=90
|
|
|
|
# Maximum conversation history length per context (messages)
|
|
MAX_HISTORY_LENGTH=50
|
|
|
|
# Enable automatic web search when needed
|
|
WEB_SEARCH_ENABLED=true
|
|
WEB_SEARCH_MAX_RESULTS=5
|
|
|
|
# Scraping configuration
|
|
WEB_SEARCH_SCRAPE_ENABLED=true
|
|
WEB_SEARCH_SCRAPE_MAX_CHARS=2500
|
|
WEB_SEARCH_SCRAPE_CACHE_TTL=3600
|
|
SCRAPING_BLOCKED_DOMAINS=
|
|
SCRAPING_BLOCKED_EXTENSIONS=.pdf,.jpg,.jpeg,.png,.gif,.svg,.zip,.rar,.exe,.dmg,.bin
|
|
|
|
# Vision / image analysis model
|
|
VISION_MODEL=meta-llama/llama-4-maverick-17b-128e-instruct
|
|
VISION_PROVIDER=openrouter
|
|
|
|
# Upload file context max characters sent to AI (0 = no truncation)
|
|
UPLOAD_CONTEXT_MAX_CHARS=0
|
|
|
|
# User profile file path
|
|
USER_PROFILE_FILE=user_profile.json
|
|
|
|
# Contexts directory path
|
|
CONTEXTS_DIR=contexts
|
|
|
|
# Minimum lines per agent message
|
|
MIN_MESSAGE_LINES=5
|
|
|
|
# Automatic profile enrichment: enrich every N messages (0 = disabled)
|
|
AUTO_ENRICH_EVERY=2
|
|
|
|
# Automatic system improvement: improve every N messages (0 = disabled)
|
|
AUTO_IMPROVE_ENABLED=true
|
|
AUTO_IMPROVE_EVERY=20
|
|
|
|
|