chore: update startup scripts and .env.example for LLM profile feature

This commit is contained in:
2026-06-16 17:03:25 +08:00
parent 719c3b4ca4
commit d68399d39b
3 changed files with 39 additions and 6 deletions

View File

@@ -1,11 +1,22 @@
# ===== LLM 连接配置RAGAS 评测 + 生成) =====
# 所有模型共用同一个 OpenAI 兼容 endpoint
# 在 Web 控制台的「LLM 配置」页面可以保存多个命名配置,
# 并在运行评估时按角色Judge / Answer / Dataset分别选择覆盖。
OPENAI_API_KEY=your-api-key
OPENAI_BASE_URL=http://6.86.80.4:30080/v1
OPENAI_TIMEOUT_SECONDS=30
# 默认评测模型(可在场景 YAML 或 Web 控制台 LLM 配置中覆盖)
RAGAS_JUDGE_MODEL=deepseek-v4-flash
RAGAS_EMBEDDING_MODEL=text-embedding-v3
# 评估并发控制
BATCH_SIZE=8
RAGAS_METRIC_TIMEOUT_SECONDS=45
# ===== 阿里云文档解析 =====
# ===== 阿里云文档解析dataset build 功能需要) =====
ALIBABA_ACCESS_KEY_ID=
ALIBABA_ACCESS_KEY_SECRET=
ALIBABA_ENDPOINT=docmind-api.cn-hangzhou.aliyuncs.com
@@ -14,6 +25,8 @@ ALIYUN_PARSE_TIMEOUT_SECONDS=900
ALIYUN_PARSE_LAYOUT_STEP_SIZE=50
ALIYUN_LLM_ENHANCEMENT=true
ALIYUN_ENHANCEMENT_MODE=VLM
DOCUMENT_PARSE_ARTIFACT_PREFIX=artifacts
DOCUMENT_PARSE_ARTIFACT_PREFIX=outputs/dataset-builds
PARSER_FAILURE_MODE=fail
# 生成题库时使用的模型(可在 Web 控制台 LLM 配置中按场景覆盖)
DATASET_GENERATOR_MODEL=qwen3.6-plus

View File

@@ -56,7 +56,17 @@ if errorlevel 1 (
)
:: ----------------------------------------------------------------
:: 4. Seed demo data if no runs exist yet
:: 4. Ensure configs/ directory exists for LLM profile storage
:: ----------------------------------------------------------------
if not exist "configs" (
mkdir configs
echo [OK] Created configs/ directory for LLM profile storage.
) else (
echo [OK] configs/ directory ready.
)
:: ----------------------------------------------------------------
:: 5. Seed demo data if no runs exist yet
:: ----------------------------------------------------------------
if not exist "outputs\kba-knowledge-base-offline-baseline" (
echo [INFO] No run data found. Generating demo data...
@@ -71,7 +81,7 @@ if not exist "outputs\kba-knowledge-base-offline-baseline" (
)
:: ----------------------------------------------------------------
:: 5. Pick an available port
:: 6. Pick an available port
:: ----------------------------------------------------------------
set PORT=8800
netstat -ano 2>nul | findstr ":8800" | findstr "LISTENING" >nul 2>&1

View File

@@ -58,7 +58,17 @@ if ($LASTEXITCODE -ne 0) {
}
# ----------------------------------------------------------------
# 4. Seed demo data if missing
# 4. Ensure configs/ directory exists for LLM profile storage
# ----------------------------------------------------------------
if (-not (Test-Path "configs")) {
New-Item -ItemType Directory "configs" | Out-Null
Write-Host "[OK] Created configs/ directory for LLM profile storage." -ForegroundColor Green
} else {
Write-Host "[OK] configs/ directory ready." -ForegroundColor Green
}
# ----------------------------------------------------------------
# 5. Seed demo data if missing
# ----------------------------------------------------------------
if (-not (Test-Path "outputs\kba-knowledge-base-offline-baseline")) {
Write-Host "[INFO] No run data found. Generating demo data..." -ForegroundColor Yellow
@@ -73,7 +83,7 @@ if (-not (Test-Path "outputs\kba-knowledge-base-offline-baseline")) {
}
# ----------------------------------------------------------------
# 5. Pick an available port
# 6. Pick an available port
# ----------------------------------------------------------------
$PORT = 8800
$inUse = netstat -ano 2>$null | Select-String ":$PORT\s" | Select-String "LISTENING"