Files
jianli-boss/client/config.py
T
2026-08-25 19:46:38 +08:00

50 lines
1.7 KiB
Python

"""
客户端配置
"""
from pydantic_settings import BaseSettings
class ClientSettings(BaseSettings):
# -------------------------------------------------------
# 云端服务端地址
# -------------------------------------------------------
SERVER_URL: str = "http://127.0.0.1:8000"
# -------------------------------------------------------
# 本地 Web 控制面板
# -------------------------------------------------------
WEB_HOST: str = "127.0.0.1"
WEB_PORT: int = 8088
# -------------------------------------------------------
# AdsPower 本地 API
# -------------------------------------------------------
ADSPOWER_API_URL: str = "http://local.adspower.net:50325"
# 要使用的 AdsPower Profile ID(在 config.env 或面板中配置)
ADSPOWER_USER_ID: str = ""
# -------------------------------------------------------
# AI 大模型(OpenAI 兼容接口)
# -------------------------------------------------------
AI_BASE_URL: str = "https://api.deepseek.com"
AI_MODEL: str = "deepseek-chat"
AI_API_KEY: str = "" # 建议通过环境变量 AI_API_KEY 注入
AI_MIN_SCORE: int = 65
# -------------------------------------------------------
# Token 持久化路径
# -------------------------------------------------------
TOKEN_FILE: str = "client/.token"
# -------------------------------------------------------
# 心跳(秒):需小于服务端在线窗口(90s)
# -------------------------------------------------------
HEARTBEAT_INTERVAL: int = 30
class Config:
env_file = "client/.env"
env_file_encoding = "utf-8"
client_settings = ClientSettings()