Files
group_xinghuo_jinrong/scripts/kb/reset.ps1
T

16 lines
524 B
PowerShell
Raw Normal View History

#Requires -Version 5.1
# 知识库入库脚本:解析桌面知识库 → 向量化 → 存入 Milvus
param([switch]$Rebuild)
$ErrorActionPreference = "Stop"
$Root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
Set-Location $Root
Write-Host "=== 知识库入库 ===" -ForegroundColor Cyan
python scripts/kb/build_collections.py $(if ($Rebuild) { "--rebuild" })
if ($LASTEXITCODE -ne 0) {
Write-Host "入库失败!" -ForegroundColor Red
exit 1
}
Write-Host "=== 入库完成 ===" -ForegroundColor Green