# =============================================================================
# Env Configuration
# =============================================================================
CONFIG_FILE=config.env

USE_POLARIS=false
POLARIS_URL=
POLARIS_USERNAME=
POLARIS_PASSWORD=
POLARIS_CLUSTER=

PROJECT_NAME=
VERSION=

# Enable hot reload for development (1=enabled, 0=disabled)
HOT_RELOAD_ENABLE=0
CONFIG_WATCH_INTERVAL=60

# =============================================================================
# AITools Service Configuration
# =============================================================================

# Service Information
# Basic service identification and network configuration
SERVICE_SUB=aitools
SERVICE_NAME=AITools
SERVICE_LOCATION=hf
SERVICE_PORT=18668
SERVICE_APP=plugin.aitools.app.start_server:aitools_app

# =============================================================================
# LOG Configuration
# =============================================================================
LOG_FILE=logs/aitools.log
LOG_ROTATION=5 MB
LOG_RETENTION=30 days
LOG_ENCODING=UTF-8
LOG_LEVEL=DEBUG
LOG_STDOUT_ENABLE=0

# =============================================================================
# Middleware Configuration
# =============================================================================
SAMPLE_RATE=1.0
INCLUDE_PATHS=/aitools/v1

# =============================================================================
# AIOHTTP Configuration
# =============================================================================
AIOHTTP_CLIENT_TOTAL_TIMEOUT=300.0
AIOHTTP_CLIENT_CONNECT_TIMEOUT=10.0
AIOHTTP_CLIENT_READ_TIMEOUT=60.0
AIOHTTP_CLIENT_LIMIT_CONNECTOR=200
AIOHTTP_CLIENT_LIMIT_PER_HOST_CONNECTOR=50
AIOHTTP_CLIENT_TTL_DNS_CACHE_CONNECTOR=300
AIOHTTP_CLIENT_ENABLE_CLEANUP_CLOSED_CONNECTOR=true
AIOHTTP_CLIENT_TRUST_ENV=true

# =============================================================================
# OSS Configuration
# =============================================================================
OSS_ENDPOINT=
OSS_ACCESS_KEY_ID=
OSS_ACCESS_KEY_SECRET=
OSS_BUCKET_NAME=
OSS_TTL=
OSS_TYPE=
OSS_DOWNLOAD_HOST=

# =============================================================================
# Kafka Configuration
# =============================================================================
KAFKA_ENABLE=0
KAFKA_TIMEOUT=
KAFKA_SERVERS=
KAFKA_TOPIC=
KAFKA_QUEUE_MAX_SIZE=
KAFKA_ACKS=
KAFKA_LINGER_MS=
KAFKA_RETRY_INTERVAL=
KAFKA_RETRY_BACKOFF_MS=
KAFKA_DRAIN_TIMEOUT=

# =============================================================================
# Platform Account Cache Configuration
# =============================================================================
REDIS_CLUSTER_ADDR=
REDIS_ADDR=redis:6379
REDIS_PASSWORD=
REDIS_DATABASE=0
REDIS_DATABASE_CONSOLE=0
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=root123
CONSOLE_MYSQL_DB=astron_console
MYSQL_URL=jdbc:mysql://mysql:3306/astron_console?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8&createDatabaseIfNotExist=true

# =============================================================================
# OpenTelemetry Observability Configuration
# =============================================================================

# OTLP (OpenTelemetry Protocol) Configuration
# Distributed tracing and metrics collection settings
# OTLP endpoint for telemetry data submission
OTLP_ENDPOINT=$YOUR_OTLP_ENDPOINT
# Service name for telemetry identification
OTLP_SERVICE_NAME=AITools
# Data center location for telemetry reporting
OTLP_DC=hf
# Enable/disable telemetry reporting (1=enabled, 0=disabled)
OTLP_ENABLE=0

# Metrics Collection Configuration
# SDK metric reporting interval, recommended < 30000ms, default: 1000ms
OTLP_METRIC_EXPORT_INTERVAL_MILLIS=3000
# Metrics export timeout to server in milliseconds, default: 5000ms
OTLP_METRIC_EXPORT_TIMEOUT_MILLIS=3000
# Server connection establishment timeout in milliseconds, default: 5000ms
OTLP_METRIC_TIMEOUT=3000

# Distributed Tracing Configuration
# Server connection establishment timeout in milliseconds, default: 5000ms
OTLP_TRACE_TIMEOUT=3000
# Maximum queue size for BatchSpanProcessor data export, default: 2048
OTLP_TRACE_MAX_QUEUE_SIZE=2048
# Delay interval between consecutive exports in BatchSpanProcessor, default: 5000ms
OTLP_TRACE_SCHEDULE_DELAY_MILLIS=3000
# Maximum batch size for BatchSpanProcessor data export, default: 512
OTLP_TRACE_MAX_EXPORT_BATCH_SIZE=500
# Maximum allowed time for data export from BatchSpanProcessor, default: 30000ms
OTLP_TRACE_EXPORT_TIMEOUT_MILLIS=3000

# OCR LLM
# product details：https://www.xfyun.cn/doc/words/OCRforLLM/API.html
OCR_LLM_WS_URL=https://cbm01.cn-huabei-1.xf-yun.com/v1/private/se75ocrbm
OCR_LLM_HTTP_URL_KEY=https://cbm01.cn-huabei-1.xf-yun.com/v1/private/se75ocrbm
OCR_LLM_THREAD_WORKS=2
OCR_LLM_SLEEP_TIME=1

# image generate
# product details：https://www.xfyun.cn/doc/spark/ImageGeneration.html
IMAGE_GENERATE_URL=http://spark-api.cn-huabei-1.xf-yun.com/v2.1/tti

# image understanding
# product details：https://www.xfyun.cn/doc/spark/ImageUnderstanding.html
IMAGE_UNDERSTANDING_URL=wss://spark-api.cn-huabei-1.xf-yun.com/v2.1/image

# smart text to speech
# product details：https://www.xfyun.cn/doc/spark/super%20smart-tts.html
TTS_URL=wss://cbm01.cn-huabei-1.xf-yun.com/v1/private/mcd9m97e6

# speech evaluation
# product details：https://www.xfyun.cn/doc/Ise/IseAPI.html
ISE_URL=wss://ise-api.xfyun.cn/v2/open-ise

# translation
# product details：https://www.xfyun.cn/doc/nlp/xftrans_new/API.html
TRANSLATION_URL=https://itrans.xf-yun.com/v1/its
