# Knowledge Service Configuration
# This file contains environment variables for the Knowledge Service application

# ============================
# Serve Configuration
# ============================
SERVICE_PORT=20010
SERVICE_NAME=Knowledge
SERVICE_SUB=spf
SERVICE_LOCATION=hf
WORKERS=1

# ============================
# Logging Configuration
# ============================
# Log level for the knowledge service (DEBUG, INFO, WARN, ERROR)
LOG_PATH=logs
LOG_LEVEL=INFO
# Whether to output logs to stdout, 1=enabled, 0=disabled, default: 0
LOG_STDOUT_ENABLE=0

# ============================
# OpenTelemetry Observability Configuration
# ============================
# OTLP endpoint for telemetry data submission
OTLP_ENDPOINT=127.0.0.1:4317
# Service name for telemetry identification
OTLP_SERVICE_NAME=Knowledge
# Data center location for telemetry reporting
OTLP_DC=hf
# Enable/disable telemetry reporting (1=enabled, 0=disabled)
OTLP_ENABLE=0

# ============================
# Metrics 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

# ============================
# AIUI Service Configuration
# ============================
# Repository ID for AIUI queries
AIUI_QUERY_REPOID_V2=xxxxxxxxxx
# AIUI service base URL
AIUI_URL_V2=http://xxxx.xxxxx.xxxx
# API key for AIUI service authentication
AIUI_API_KEY=xxxxxxxxxx
# API secret for AIUI service authentication
AIUI_API_SECRET=xxxxxxxxxx
# AIUI client timeout
AIUI_CLIENT_TIMEOUT=30

# ============================
# Xinghuo (Spark) Service Configuration
# ============================
# Xinghuo RAG service base URL
XINGHUO_RAG_URL=http://chatdoc.xfyun.cn/
# Search overlap parameter for Xinghuo
XINGHUO_SEARCH_OVERLAP=1
# Xinghuo client timeout
XINGHUO_CLIENT_TIMEOUT=60

# ============================
# SparkDesk Service Configuration
# ============================
# SparkDesk RAG service base URL
DESK_RAG_URL=http://xxxx.xxx.xxx/xxx/xxx/xxx
# Application ID for SparkDesk service
DESK_APP_ID=123456
# API secret for SparkDesk service authentication
DESK_API_SECRET=xxxxxxxxxx
# SparkDesk client timeout
DESK_CLIENT_TIMEOUT=30

