Features: - VideoLearningAgent for automated video watching on Douyin/Kuaishou/TikTok - Web dashboard UI for video learning sessions - Real-time progress tracking with screenshot capture - App detection using get_current_app() for accurate recording - Session management with pause/resume/stop controls Technical improvements: - Simplified video detection logic using direct app detection - Full base64 hash for sensitive screenshot change detection - Immediate stop when target video count is reached - Fixed circular import issues with ModelConfig Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
124 lines
4.3 KiB
Plaintext
124 lines
4.3 KiB
Plaintext
# Phone Agent Environment Configuration
|
||
# Copy this file to .env and fill in your values
|
||
|
||
# ============================================================================
|
||
# Model Configuration / 模型配置
|
||
# ============================================================================
|
||
|
||
# Model API base URL / 模型 API 地址
|
||
# Default: http://localhost:8000/v1
|
||
# For BigModel (智谱AI): https://open.bigmodel.cn/api/paas/v4
|
||
# For ModelScope: https://api-inference.modelscope.cn/v1
|
||
PHONE_AGENT_BASE_URL=http://localhost:8000/v1
|
||
|
||
# Model name / 模型名称
|
||
# Default: autoglm-phone-9b
|
||
PHONE_AGENT_MODEL=autoglm-phone-9b
|
||
|
||
# API key for authentication / API 密钥
|
||
# Default: EMPTY (no authentication)
|
||
# For BigModel: your actual API key
|
||
PHONE_AGENT_API_KEY=EMPTY
|
||
|
||
# ============================================================================
|
||
# Agent Configuration / Agent 配置
|
||
# ============================================================================
|
||
|
||
# Maximum steps per task / 每个任务的最大步数
|
||
PHONE_AGENT_MAX_STEPS=100
|
||
|
||
# Language for system prompt / 系统提示词语言
|
||
# Options: cn (Chinese), en (English)
|
||
PHONE_AGENT_LANG=cn
|
||
|
||
# Verbose output / 详细输出
|
||
# Options: true, false
|
||
PHONE_AGENT_VERBOSE=true
|
||
|
||
# ============================================================================
|
||
# Device Configuration / 设备配置
|
||
# ============================================================================
|
||
|
||
# Device ID (for multi-device setups) / 设备 ID(多设备时使用)
|
||
# Leave empty to auto-detect / 留空则自动检测
|
||
PHONE_AGENT_DEVICE_ID=
|
||
|
||
# Device type / 设备类型
|
||
# Options: adb (Android), hdc (HarmonyOS), ios (iPhone)
|
||
PHONE_AGENT_DEVICE_TYPE=adb
|
||
|
||
# ============================================================================
|
||
# iOS Specific Configuration / iOS 专用配置
|
||
# ============================================================================
|
||
|
||
# WebDriverAgent URL for iOS / iOS WebDriverAgent 地址
|
||
PHONE_AGENT_WDA_URL=http://localhost:8100
|
||
|
||
# ============================================================================
|
||
# Timing Configuration (Optional) / 时序配置(可选)
|
||
# ============================================================================
|
||
|
||
# Action delays in seconds / 动作延迟(秒)
|
||
PHONE_AGENT_KEYBOARD_SWITCH_DELAY=1.0
|
||
PHONE_AGENT_TEXT_INPUT_DELAY=1.0
|
||
|
||
# Device delays in seconds / 设备延迟(秒)
|
||
PHONE_AGENT_TAP_DELAY=1.0
|
||
PHONE_AGENT_SWIPE_DELAY=1.0
|
||
PHONE_AGENT_LAUNCH_DELAY=1.0
|
||
|
||
# Connection delays in seconds / 连接延迟(秒)
|
||
PHONE_AGENT_ADB_RESTART_DELAY=2.0
|
||
|
||
# ============================================================================
|
||
# Web Dashboard Configuration / Web 仪表板配置
|
||
# ============================================================================
|
||
|
||
# Dashboard server host / 仪表板服务器主机
|
||
# Use 0.0.0.0 for LAN access / 使用 0.0.0.0 以支持局域网访问
|
||
DASHBOARD_HOST=0.0.0.0
|
||
|
||
# Dashboard server port / 仪表板服务器端口
|
||
DASHBOARD_PORT=8080
|
||
|
||
# Dashboard debug mode / 仪表板调试模式
|
||
# Options: true, false
|
||
DASHBOARD_DEBUG=false
|
||
|
||
# CORS allowed origins / CORS 允许的来源
|
||
# Comma-separated list, use * for all / 逗号分隔列表,使用 * 表示全部
|
||
# Examples: http://localhost:3000,http://192.168.1.*
|
||
DASHBOARD_CORS_ORIGINS=*
|
||
|
||
# Default device type for dashboard / 仪表板默认设备类型
|
||
# Options: adb, hdc, ios
|
||
DEFAULT_DEVICE_TYPE=adb
|
||
|
||
# Maximum concurrent tasks / 最大并发任务数
|
||
MAX_CONCURRENT_TASKS=10
|
||
|
||
# Task timeout in seconds / 任务超时时间(秒)
|
||
TASK_TIMEOUT_SECONDS=300
|
||
|
||
# Screenshot quality (1-100) / 截图质量 (1-100)
|
||
SCREENSHOT_QUALITY=80
|
||
|
||
# Screenshot throttle delay in milliseconds / 截图节流延迟(毫秒)
|
||
SCREENSHOT_THROTTLE_MS=500
|
||
|
||
# Maximum task history to keep / 保留的最大任务历史数
|
||
MAX_TASK_HISTORY=100
|
||
|
||
# ============================================================================
|
||
# Video Learning Configuration / 视频学习配置
|
||
# ============================================================================
|
||
|
||
# Output directory for video learning data / 视频学习数据输出目录
|
||
VIDEO_LEARNING_OUTPUT_DIR=./video_learning_data
|
||
|
||
# Model parameters for video learning / 视频学习模型参数
|
||
PHONE_AGENT_MAX_TOKENS=3000
|
||
PHONE_AGENT_TEMPERATURE=0.0
|
||
PHONE_AGENT_TOP_P=0.85
|
||
PHONE_AGENT_FREQUENCY_PENALTY=0.2
|