# AI-Shifu Environment Configuration - COMPLETE SET
# Copy this file to docker/.env (or .env) to boot the Docker stack with sane defaults
# Set at least one LLM API key (e.g., OPENAI_API_KEY) before using in production.


#============================================================
# Alibaba Cloud
#============================================================

# Alibaba Cloud OSS Access Key ID
# (Optional - default: )
# Secret value
ALIBABA_CLOUD_OSS_ACCESS_KEY_ID=""

# Alibaba Cloud OSS Access Key Secret
# (Optional - default: )
# Secret value
ALIBABA_CLOUD_OSS_ACCESS_KEY_SECRET=""

# Alibaba Cloud OSS base URL
# (Optional - default: )
ALIBABA_CLOUD_OSS_BASE_URL=""

# Alibaba Cloud OSS bucket name
# (Optional - default: )
ALIBABA_CLOUD_OSS_BUCKET=""

# Alibaba Cloud OSS Courses Access Key ID
# (Optional - default: )
# Secret value
ALIBABA_CLOUD_OSS_COURSES_ACCESS_KEY_ID=""

# Alibaba Cloud OSS Courses Access Key Secret
# (Optional - default: )
# Secret value
ALIBABA_CLOUD_OSS_COURSES_ACCESS_KEY_SECRET=""

# Alibaba Cloud OSS Courses bucket name
# (Optional - default: )
ALIBABA_CLOUD_OSS_COURSES_BUCKET=""

# Alibaba Cloud OSS Courses endpoint
# (Optional - default: oss-cn-beijing.aliyuncs.com)
ALIBABA_CLOUD_OSS_COURSES_ENDPOINT="oss-cn-beijing.aliyuncs.com"

# Alibaba Cloud OSS Courses URL
# (Optional - default: )
ALIBABA_CLOUD_OSS_COURSES_URL=""

# Alibaba Cloud OSS endpoint
# (Optional - default: oss-cn-beijing.aliyuncs.com)
ALIBABA_CLOUD_OSS_ENDPOINT="oss-cn-beijing.aliyuncs.com"

# Alibaba Cloud settings for sending SMS and uploading files
# (Optional - default: )
# Secret value
ALIBABA_CLOUD_SMS_ACCESS_KEY_ID=""

# Alibaba Cloud SMS Access Key Secret
# (Optional - default: )
# Secret value
ALIBABA_CLOUD_SMS_ACCESS_KEY_SECRET=""

# Alibaba Cloud SMS sign name
# (Optional - default: )
ALIBABA_CLOUD_SMS_SIGN_NAME=""

# Alibaba Cloud SMS template code for billing subscription success notifications
# (Optional - default: )
ALIBABA_CLOUD_SMS_SUBSCRIPTION_SUCCESS_TEMPLATE_CODE=""

# Alibaba Cloud SMS template code
# (Optional - default: )
ALIBABA_CLOUD_SMS_TEMPLATE_CODE=""


#============================================================
# Analytics
#============================================================

# Connection pool size for the creator-analytics read-only engine
# (Optional - default: 5)
# Type: int
ANALYTICS_DATABASE_POOL_SIZE="5"

# Read-only replica DSN for creator-analytics DSL queries. Leave empty to fall back to the primary database (logs a warning).
# (Optional - default: )
# Secret value
ANALYTICS_DATABASE_URI=""

# Upper bound for the DSL `limit` field accepted by creator-analytics
# (Optional - default: 1000)
# Type: int
ANALYTICS_QUERY_LIMIT_MAX="1000"

# Per-query timeout in seconds for creator-analytics DSL execution
# (Optional - default: 15)
# Type: int
ANALYTICS_QUERY_TIMEOUT_SECONDS="15"

# Umami API key for backend analytics reads
# (Optional - default: )
# Secret value
ANALYTICS_UMAMI_API_KEY=""

# Umami password fallback for backend analytics reads
# (Optional - default: )
# Secret value
ANALYTICS_UMAMI_API_PASSWORD=""

# Umami management API base URL used by backend analytics reads
# (Optional - default: )
ANALYTICS_UMAMI_API_URL=""

# Umami username fallback for backend analytics reads
# (Optional - default: )
ANALYTICS_UMAMI_API_USERNAME=""

# Course visit analytics cache expiration time in seconds
# (Optional - default: 900)
# Type: int
ANALYTICS_UMAMI_CACHE_EXPIRE_SECONDS="900"

# Timeout in seconds for backend Umami API requests
# (Optional - default: 10)
# Type: int
ANALYTICS_UMAMI_TIMEOUT_SECONDS="10"


#============================================================
# App
#============================================================

# The count of history messages to append to LLM's context in ask
# (Optional - default: 10)
# Type: int
ASK_MAX_HISTORY_LEN="10"

# Path of log file
# (Optional - default: logs/ai-shifu.log)
LOGGING_PATH="logs/ai-shifu.log"

# Maximum concurrent follow-up (ask) requests per (user, outline) that can run alongside the main lesson stream.
# (Optional - default: 3)
# Type: int
MAX_PARALLEL_ASK_COUNT="3"

# Shifu permission cache expiration time in seconds
# (Optional - default: 300)
# Type: int
SHIFU_PERMISSION_CACHE_EXPIRE="300"

# Timezone setting for the application
# (Optional - default: UTC)
TZ="UTC"


#============================================================
# Auth
#============================================================

# When enabled, users logging in from the admin interface are automatically marked as creators and granted demo course permissions (DEMO_SHIFU_BID / DEMO_EN_SHIFU_BID if configured). Intended for demo and staging environments only.
# (Optional - default: True)
# Type: bool
ADMIN_LOGIN_GRANT_CREATOR_WITH_DEMO="True"

# Fixed image captcha code for local development and automated tests. Ignored when ENV/MODE is production.
# (Optional - default: )
CAPTCHA_CODE_OVERRIDE=""

# Expire time for image captcha challenges in seconds
# (Optional - default: 300)
# Type: int
CAPTCHA_EXPIRE_TIME="300"

# Maximum attempts allowed for a single image captcha challenge
# (Optional - default: 5)
# Type: int
CAPTCHA_MAX_VERIFY_ATTEMPTS="5"

# Expire time for one-time captcha tickets in seconds
# (Optional - default: 300)
# Type: int
CAPTCHA_TICKET_EXPIRE_TIME="300"

# OAuth client ID issued by Google
# (Optional - default: )
GOOGLE_OAUTH_CLIENT_ID=""

# OAuth client secret issued by Google
# (Optional - default: )
# Secret value
GOOGLE_OAUTH_CLIENT_SECRET=""

# Google OAuth token endpoint URL used by the backend to exchange auth codes.
# (Optional - default: https://oauth2.googleapis.com/token)
GOOGLE_OAUTH_TOKEN_ENDPOINT="https://oauth2.googleapis.com/token"

# Google OpenID Connect userinfo endpoint URL used by the backend.
# (Optional - default: https://openidconnect.googleapis.com/v1/userinfo)
GOOGLE_OAUTH_USERINFO_ENDPOINT="https://openidconnect.googleapis.com/v1/userinfo"

# IP ban time (seconds)
# (Optional - default: 86400)
# Type: int
IP_BAN_TIME="86400"

# The maximum number of allowed sends
# (Optional - default: 10)
# Type: int
IP_MAIL_LIMIT_COUNT="10"

# The time window for statistics of the number of sends by IP (seconds)
# (Optional - default: 3600)
# Type: int
IP_MAIL_LIMIT_TIME="3600"

# The maximum number of times IP can send text messages
# (Optional - default: 10)
# Type: int
IP_SMS_LIMIT_COUNT="10"

# The time window for statistics of the number of text messages sent by IP (seconds)
# (Optional - default: 3600)
# Type: int
IP_SMS_LIMIT_TIME="3600"

# The expiration time of the email verification code (seconds)
# (Optional - default: 300)
# Type: int
MAIL_CODE_EXPIRE_TIME="300"

# The interval time for sending emails
# (Optional - default: 60)
# Type: int
MAIL_CODE_INTERVAL="60"

# Expire time for phone verification code in seconds
# (Optional - default: 300)
# Type: int
PHONE_CODE_EXPIRE_TIME="300"

# Expire time for password reset code in seconds
# (Optional - default: 300)
# Type: int
RESET_PWD_CODE_EXPIRE_TIME="300"

# Secret key for JWT token signing and verification
# CRITICAL: Used to encrypt/decrypt user authentication tokens
# - Must be a strong random string (at least 32 characters recommended)
# - DO NOT change in production (will invalidate all user sessions)
# - Keep different values for dev/test/prod environments
# - Never commit to version control
# Generate secure key: python -c "import secrets; print(secrets.token_urlsafe(32))"
# (REQUIRED - must be set)
# (Has validation)
# Secret value
SECRET_KEY="ai-shifu"

# The minimum interval time for sending text messages to the same mobile phone number
# (Optional - default: 60)
# Type: int
SMS_CODE_INTERVAL="60"

# Token expiration time in seconds
# (Optional - default: 604800)
# Type: int
TOKEN_EXPIRE_TIME="604800"

# Universal verification code for testing.
# **SECURITY WARNING:** Do NOT set this in production environments.
# If set, it will allow anyone to bypass verification.
# Only use for local development or testing.
# (Optional - handled by libraries)
UNIVERSAL_VERIFICATION_CODE="1024"

# WeChat App ID for OAuth / QR login
# (Optional - default: )
WECHAT_APP_ID=""

# WeChat App secret for server-side exchanges
# (Optional - default: )
# Secret value
WECHAT_APP_SECRET=""


#============================================================
# Celery
#============================================================

# Cron expression for scanning expired billing wallet buckets.
# (Optional - default: * * * * *)
BILLING_BUCKET_EXPIRE_CRON="* * * * *"

# Cron expression for scanning billing low-balance alerts.
# (Optional - default: 0 * * * *)
BILLING_LOW_BALANCE_CRON="0 * * * *"

# Cron expression for dispatching due billing renewal events.
# (Optional - default: * * * * *)
BILLING_RENEWAL_CRON="* * * * *"

# Celery broker URL. Billing workers default to Redis.
# (Optional - default: redis://localhost:6379/0)
CELERY_BROKER_URL="redis://localhost:6379/0"

# Celery result backend URL. Defaults to Redis.
# (Optional - default: redis://localhost:6379/1)
CELERY_RESULT_BACKEND="redis://localhost:6379/1"

# Execute Celery tasks eagerly in-process for tests and local debugging.
# (Optional - default: False)
# Type: bool
CELERY_TASK_ALWAYS_EAGER="False"


#============================================================
# Content Detection
#============================================================

# Content detection provider
# (Optional - default: ilivedata)
CHECK_PROVIDER="ilivedata"

# ILIVEDATA project ID
# (Optional - default: )
ILIVEDATA_PID=""

# ILIVEDATA secret key
# (Optional - default: )
# Secret value
ILIVEDATA_SECRET_KEY=""

# Netease Yidun business ID
# (Optional - default: )
NETEASE_YIDUN_BUSINESS_ID=""

# Netease Yidun secret ID
# (Optional - default: )
# Secret value
NETEASE_YIDUN_SECRET_ID=""

# Netease Yidun secret key
# (Optional - default: )
# Secret value
NETEASE_YIDUN_SECRET_KEY=""


#============================================================
# Database
#============================================================

# MySQL database connection URI
# Example: mysql://username:password@hostname:3306/database_name?charset=utf8mb4
# (REQUIRED - must be set)
# Secret value
SQLALCHEMY_DATABASE_URI="mysql://root:ai-shifu@ai-shifu-mysql:3306/ai-shifu?charset=utf8mb4"

# SQLAlchemy max overflow connections
# (Optional - default: 20)
# Type: int
SQLALCHEMY_MAX_OVERFLOW="20"

# SQLAlchemy pool recycle time in seconds
# (Optional - default: 3600)
# Type: int
SQLALCHEMY_POOL_RECYCLE="3600"

# SQLAlchemy connection pool size
# (Optional - default: 20)
# Type: int
SQLALCHEMY_POOL_SIZE="20"

# SQLAlchemy pool timeout in seconds
# (Optional - default: 30)
# Type: int
SQLALCHEMY_POOL_TIMEOUT="30"


#============================================================
# Email
#============================================================

# SMTP password
# (Optional - default: )
# Secret value
SMTP_PASSWORD=""

# SMTP server port
# (Optional - default: 25)
# Type: int
# (Has validation)
SMTP_PORT="25"

# SMTP sender email address
# (Optional - default: )
SMTP_SENDER=""

# SMTP server address
# (Optional - default: )
SMTP_SERVER=""

# SMTP username
# (Optional - default: )
SMTP_USERNAME=""


#============================================================
# Flask
#============================================================

# Environment (development/production)
# (Optional - default: production)
ENV="production"

# Flask application entry point
# (Optional - default: app.py)
FLASK_APP="app.py"

# Application mode
# (Optional - default: api)
MODE="api"

# API path prefix
# (Optional - default: /api)
PATH_PREFIX="/api"

# Server software identification (e.g., gunicorn)
# (Optional - default: )
SERVER_SOFTWARE=""

# Enable Swagger API documentation
# (Optional - default: False)
# Type: bool
SWAGGER_ENABLED="False"


#============================================================
# Frontend
#============================================================

# Umami analytics script URL
# (Optional - default: )
ANALYTICS_UMAMI_SCRIPT=""

# Umami analytics site identifier
# (Optional - default: )
ANALYTICS_UMAMI_SITE_ID=""

# Fractional digits used for billing credit display and settlement rounding. Values: 0-10.
# (Optional - default: 2)
# Type: int
# (Has validation)
BILL_CREDIT_PRECISION="2"

# Enable the creator billing runtime surface (Cook Web /admin/billing and /api/billing/*). Leave off until billing is configured for the environment.
# (Optional - default: False)
# Type: bool
BILL_ENABLED="False"

# Cook Web floating contact CTA URL (default: empty string to hide the CTA)
# (Optional - default: )
CONTACT_US_URL=""

# Currency symbol used in Cook Web (default: ¥)
# (Optional - default: ¥)
CURRENCY_SYMBOL="¥"

# Enable Eruda debug console
# (Optional - default: False)
# Type: bool
DEBUG_ERUDA_ENABLED="False"

# Default course id for Cook Web
# (Optional - default: )
DEFAULT_COURSE_ID=""

# Default login method tab. Values: "phone" | "email" | "google"
# (Optional - default: phone)
DEFAULT_LOGIN_METHOD="phone"

# Custom favicon URL override returned by /api/config
# (Optional - default: )
FAVICON_URL=""

# Cook Web logo/home redirect URL (default: /)
# (Optional - default: /)
HOME_URL="/"

# Canonical public web origin used to derive third-party callback and payment return URLs, e.g. https://your-domain.com. Required outside local/test environments.
# (Optional - default: )
HOST_URL=""

# Login methods exposed to users.
# Values: "phone" | "email" | "google" combinations (comma-separated)
# Default: "phone".
# (Optional - default: phone)
LOGIN_METHODS_ENABLED="phone"

# Custom square logo URL override returned by /api/config
# (Optional - default: )
LOGO_SQUARE_URL=""

# Custom wide logo URL override returned by /api/config
# (Optional - default: )
LOGO_WIDE_URL=""

# Frontend server port
# (Optional - default: 5000)
# Type: int
# (Has validation)
PORT="5000"

# Enable Stripe payment entry points on Cook Web
# (Optional - default: False)
# Type: bool
STRIPE_ENABLED="False"

# Always show lesson tree in Cook Web
# (Optional - default: False)
# Type: bool
UI_ALWAYS_SHOW_LESSON_TREE="False"

# Horizontal logo URL for Cook Web
# (Optional - default: )
UI_LOGO_HORIZONTAL=""

# Vertical logo URL for Cook Web
# (Optional - default: )
UI_LOGO_VERTICAL=""


#============================================================
# Integrations
#============================================================

# API URL for generating MDF (Markdown Flow) content
# (Optional - default: )
GEN_MDF_API_URL=""

# Application ID for MDF API authentication (X-App-Id header)
# (Optional - default: )
# Secret value
GEN_MDF_APP_ID=""

# Lark (Feishu) app ID
# (Optional - default: )
LARK_APP_ID=""

# Lark (Feishu) app secret
# (Optional - default: )
# Secret value
LARK_APP_SECRET=""


#============================================================
# Legal
#============================================================

# Service agreement URL for English (en-US) users. Leave empty to disable the link.
# (Optional - default: )
LEGAL_AGREEMENT_URL_EN_US=""

# Service agreement URL for French (fr-FR) users. Leave empty to disable the link.
# (Optional - default: )
LEGAL_AGREEMENT_URL_FR_FR=""

# Service agreement URL for Chinese (zh-CN) users. Leave empty to disable the link.
# (Optional - default: )
LEGAL_AGREEMENT_URL_ZH_CN=""

# Privacy policy URL for English (en-US) users. Leave empty to disable the link.
# (Optional - default: )
LEGAL_PRIVACY_URL_EN_US=""

# Privacy policy URL for French (fr-FR) users. Leave empty to disable the link.
# (Optional - default: )
LEGAL_PRIVACY_URL_FR_FR=""

# Privacy policy URL for Chinese (zh-CN) users. Leave empty to disable the link.
# (Optional - default: )
LEGAL_PRIVACY_URL_ZH_CN=""


#============================================================
# Llm
#============================================================

# ByteDance Volcengine Ark access key ID
# (Optional - default: )
# Secret value
ARK_ACCESS_KEY_ID=""

# ByteDance Volcengine Ark API Key
# (Optional - default: )
# Secret value
ARK_API_KEY=""

# ByteDance Volcengine Ark secret access key
# (Optional - default: )
# Secret value
ARK_SECRET_ACCESS_KEY=""

# Timeout in seconds for external ask provider calls.
# (Optional - default: 20)
# Type: int
ASK_PROVIDER_TIMEOUT_SECONDS="20"

# Zhipu BigModel API Key (alternative format)
# (Optional - default: )
# Secret value
BIGMODEL_API_KEY=""

# DeepSeek API Key
# (Optional - default: )
# Secret value
DEEPSEEK_API_KEY=""

# DeepSeek API URL
# (Optional - default: https://api.deepseek.com)
DEEPSEEK_API_URL="https://api.deepseek.com"

# Default LLM model. Supported models:
# OpenAI: gpt-4o-latest, gpt-4o-mini, gpt-4, gpt-3.5-turbo, chatgpt-4o-latest
# ERNIE: ERNIE-4.0-8K, ERNIE-3.5-8K, ERNIE-3.5-128K, ERNIE-Speed-8K, ERNIE-Speed-128K
# GLM: glm-4, glm-4-air, glm-4-airx, glm-4-flash, glm-4v, glm-3-turbo
# Qwen: qwen-long, qwen-max, qwen-max-longcontext, qwen-plus, qwen-turbo, qwen2-*
# DeepSeek: deepseek-chat
# Gemini: gemini-1.5-flash, gemini-1.5-flash-8b, gemini-1.5-pro
# (Optional - default: )
DEFAULT_LLM_MODEL=""

# Default temperature for LLM generation
# (Optional - default: 0.3)
# Type: float
# (Has validation)
DEFAULT_LLM_TEMPERATURE="0.3"

# Baidu ERNIE API ID
# (Optional - default: )
# Secret value
ERNIE_API_ID=""

# Baidu ERNIE API Key
# (Optional - default: )
# Secret value
ERNIE_API_KEY=""

# Baidu ERNIE API Secret
# (Optional - default: )
# Secret value
ERNIE_API_SECRET=""

# Google Gemini API key
# (Optional - default: )
# Secret value
GEMINI_API_KEY=""

# Optional Google Gemini API base URL (leave blank to use default)
# (Optional - default: )
GEMINI_API_URL=""

# Zhipu BigModel GLM API Key
# (Optional - default: )
# Secret value
GLM_API_KEY=""

# Comma separated list of allowed LLM models to expose in UI. When empty, all detected models are shown.
# (Optional - default: )
# Type: list
LLM_ALLOWED_MODELS=""

# Optional display names for allowed LLM models. Must match the length and order of LLM_ALLOWED_MODELS. Ignored otherwise.
# (Optional - default: )
# Type: list
LLM_ALLOWED_MODEL_DISPLAY_NAMES=""

# OpenAI API key for GPT models
# (Optional - default: )
# Secret value
OPENAI_API_KEY=""

# OpenAI API base URL
# (Optional - handled by libraries)
OPENAI_BASE_URL=""

# Alibaba Cloud Qwen API Key
# (Optional - default: )
# Secret value
QWEN_API_KEY=""

# Alibaba Cloud Qwen API URL
# (Optional - default: )
QWEN_API_URL=""

# SiliconFlow API Key
# (Optional - default: )
# Secret value
SILICON_API_KEY=""


#============================================================
# Monitoring
#============================================================

# Local metrics endpoint path scraped by Prometheus in the dev harness.
# (Optional - default: /internal/metrics)
INTERNAL_METRICS_PATH="/internal/metrics"

# Local observability health endpoint path for the dev harness.
# (Optional - default: /internal/observability/health)
INTERNAL_OBSERVABILITY_HEALTH_PATH="/internal/observability/health"

# Langfuse host URL
# (Optional - default: )
LANGFUSE_HOST=""

# Langfuse settings for tracking LLM
# (Optional - default: )
# Secret value
LANGFUSE_PUBLIC_KEY=""

# Langfuse secret key for LLM tracking
# (Optional - default: )
# Secret value
LANGFUSE_SECRET_KEY=""

# Enable runtime HTTP traces exported through OTLP.
# (Optional - default: False)
# Type: bool
OBSERVABILITY_TRACES_ENABLED="False"

# OTLP HTTP endpoint for runtime traces (for example the local OTEL collector).
# (Optional - default: )
OTEL_EXPORTER_OTLP_ENDPOINT=""

# Service name reported to the local runtime observability stack.
# (Optional - default: ai-shifu-api)
OTEL_SERVICE_NAME="ai-shifu-api"

# Sampling rate for runtime HTTP traces (0.0 to 1.0).
# (Optional - default: 1.0)
# Type: float
OTEL_TRACE_SAMPLE_RATE="1.0"


#============================================================
# Payment
#============================================================

# Alipay Open Platform application identifier
# (Optional - default: )
ALIPAY_APP_ID=""

# Filesystem path to the Alipay application private key
# (Optional - default: )
# Secret value
ALIPAY_APP_PRIVATE_KEY_PATH=""

# Alipay OpenAPI gateway URL
# (Optional - default: https://openapi.alipay.com/gateway.do)
ALIPAY_GATEWAY_URL="https://openapi.alipay.com/gateway.do"

# Filesystem path to the Alipay platform public key
# (Optional - default: )
ALIPAY_PUBLIC_KEY_PATH=""

# Comma-separated list of enabled payment providers (e.g., wechatpay,alipay,pingxx,stripe)
# (Optional - default: pingxx,stripe)
PAYMENT_CHANNELS_ENABLED="pingxx,stripe"

# Order expiration time in seconds before a new order is created
# (Optional - default: 600)
# Type: int
PAY_ORDER_EXPIRE_TIME="600"

# Ping++ application identifier
# (Optional - default: )
PINGXX_APP_ID=""

# Filesystem path to the Ping++ RSA private key
# (Optional - default: )
PINGXX_PRIVATE_KEY_PATH=""

# Ping++ API secret key used for charge creation
# (Optional - default: )
# Secret value
PINGXX_SECRET_KEY=""

# Enable Alipay for Stripe
# (Optional - default: False)
# Type: bool
STRIPE_ALIPAY_ENABLED="False"

# Stripe API version to lock requests against
# (Optional - default: )
STRIPE_API_VERSION=""

# Default currency code used for Stripe payments
# (Optional - default: usd)
STRIPE_DEFAULT_CURRENCY="usd"

# Stripe publishable key shared with client applications
# (Optional - default: )
STRIPE_PUBLISHABLE_KEY=""

# Stripe secret API key for server-side requests
# (Optional - default: )
# Secret value
STRIPE_SECRET_KEY=""

# Stripe webhook signing secret
# (Optional - default: )
# Secret value
STRIPE_WEBHOOK_SECRET=""

# Enable WeChat Pay
# (Optional - default: False)
# Type: bool
STRIPE_WECHAT_PAY_ENABLED="False"

# WeChat Pay API v3 key used to decrypt notifications
# (Optional - default: )
# Secret value
WECHATPAY_API_V3_KEY=""

# WeChat Pay app identifier, defaults to WECHAT_APP_ID if empty
# (Optional - default: )
WECHATPAY_APP_ID=""

# WeChat Pay API base URL
# (Optional - default: https://api.mch.weixin.qq.com)
WECHATPAY_BASE_URL="https://api.mch.weixin.qq.com"

# WeChat Pay merchant identifier
# (Optional - default: )
WECHATPAY_MCH_ID=""

# WeChat Pay merchant certificate serial number
# (Optional - default: )
WECHATPAY_MERCHANT_SERIAL_NO=""

# Filesystem path to the WeChat Pay platform certificate for notification verification
# (Optional - default: )
WECHATPAY_PLATFORM_CERT_PATH=""

# Filesystem path to the WeChat Pay merchant private key
# (Optional - default: )
# Secret value
WECHATPAY_PRIVATE_KEY_PATH=""


#============================================================
# Redis
#============================================================

# Redis database number
# (Optional - default: 0)
# Type: int
REDIS_DB="0"

# Redis server host (optional). Leave empty to disable Redis.
# (Optional - default: )
REDIS_HOST=""

# Redis key prefix
# (Optional - default: ai-shifu:)
REDIS_KEY_PREFIX="ai-shifu:"

# Redis password
# (Optional - default: )
# Secret value
REDIS_PASSWORD=""

# Redis server port
# (Optional - default: 6379)
# Type: int
# (Has validation)
REDIS_PORT="6379"

# Redis username
# (Optional - default: )
REDIS_USER=""


#============================================================
# Shifu
#============================================================

# Minimum price of shifu
# (Optional - default: 0.5)
# Type: float
MIN_SHIFU_PRICE="0.5"


#============================================================
# Storage
#============================================================

# Filesystem directory used for local storage provider (relative to app working dir if not absolute).
# (Optional - default: storage)
LOCAL_STORAGE_ROOT="storage"

# Storage provider for uploaded/generated files. Values: "auto" | "oss" | "local".
# (Optional - default: auto)
STORAGE_PROVIDER="auto"


#============================================================
# Testing
#============================================================

# Django settings module for testing
# (Optional - default: api.settings)
DJANGO_SETTINGS_MODULE="api.settings"


#============================================================
# Tts
#============================================================

# Aliyun AccessKey ID used to create temporary NLS tokens via OpenAPI (CreateToken)
# (Optional - default: )
# Secret value
ALIYUN_AK_ID=""

# Aliyun AccessKey Secret used to create temporary NLS tokens via OpenAPI (CreateToken)
# (Optional - default: )
# Secret value
ALIYUN_AK_SECRET=""

# Aliyun TTS Appkey from Intelligent Speech Interaction console
# (Optional - default: )
# Secret value
ALIYUN_TTS_APPKEY=""

# Aliyun TTS region (shanghai, beijing, shenzhen)
# (Optional - default: shanghai)
ALIYUN_TTS_REGION="shanghai"

# Aliyun TTS sample rate (8000, 16000, 24000)
# (Optional - default: 16000)
# Type: int
ALIYUN_TTS_SAMPLE_RATE="16000"

# Aliyun NLS access token (manual override; if empty the backend auto-fetches and caches a temporary token)
# (Optional - default: )
# Secret value
ALIYUN_TTS_TOKEN=""

# Baidu TTS API Key
# (Optional - default: )
# Secret value
BAIDU_TTS_API_KEY=""

# Baidu TTS Secret Key
# (Optional - default: )
# Secret value
BAIDU_TTS_SECRET_KEY=""

# Minimax API key for TTS synthesis
# (Optional - default: )
# Secret value
MINIMAX_API_KEY=""

# Minimax group ID for API access
# (Optional - default: )
MINIMAX_GROUP_ID=""

# TTS audio bitrate (32000-256000)
# (Optional - default: 128000)
# Type: int
MINIMAX_TTS_BITRATE="128000"

# Maximum seconds a MiniMax TTS request waits in the RPM queue
# (Optional - default: 10)
# Type: int
MINIMAX_TTS_QUEUE_MAX_WAIT_SECONDS="10"

# MiniMax TTS RPM queue limit; 0 disables queue gating
# (Optional - default: 0)
# Type: int
MINIMAX_TTS_RPM_LIMIT="0"

# TTS audio sample rate (8000-44100)
# (Optional - default: 24000)
# Type: int
MINIMAX_TTS_SAMPLE_RATE="24000"

# Maximum characters per TTS segment
# (Optional - default: 300)
# Type: int
TTS_MAX_SEGMENT_CHARS="300"

# Volcengine TTS access key/token (used by both WebSocket and HTTP providers)
# (Optional - default: )
# Secret value
VOLCENGINE_TTS_ACCESS_KEY=""

# Volcengine TTS app key/appid (used by both WebSocket and HTTP providers)
# (Optional - default: )
# Secret value
VOLCENGINE_TTS_APP_KEY=""

# Volcengine TTS audio bitrate
# (Optional - default: 128000)
# Type: int
VOLCENGINE_TTS_BITRATE="128000"

# Volcengine TTS cluster for HTTP v1/tts (e.g., volcano_tts)
# (Optional - default: volcano_tts)
VOLCENGINE_TTS_CLUSTER_ID="volcano_tts"

# Volcengine TTS audio sample rate (8000-48000)
# (Optional - default: 24000)
# Type: int
VOLCENGINE_TTS_SAMPLE_RATE="24000"


# ========== END OF CONFIGURATION ==========
# Remember to keep your .env file secure and never commit it to version control
