- Added new endpoints to the analyst API for managing assets, including `GET /assets` to list assets and `POST /assets/{kind}/{asset_id}/publish` to publish assets.
- Introduced `DictAmbiguityCheckRequest` schema for checking metric ambiguities, enhancing the analyst's ability to clarify definitions and aliases.
- Implemented `detect_dict_ambiguity` function to analyze potential ambiguities in metrics, providing structured feedback for users.
- Updated `AnalystAgent` to support the new asset management functionalities and ambiguity detection logic, improving overall user experience.
- Enhanced existing schemas and services to accommodate new features, ensuring robust data handling and validation.
This update significantly improves the analyst API's capabilities, allowing for better asset management and clarity in metric definitions.
31 lines
1.2 KiB
PowerShell
31 lines
1.2 KiB
PowerShell
# 口径字典 + 问数模板种子(本机 MySQL jinrong_agent)
|
||
|
||
param(
|
||
|
||
[ValidateSet("Auto", "Docker", "Local")]
|
||
|
||
[string]$RestartBackend = "Local",
|
||
|
||
[switch]$SkipRestart
|
||
|
||
)
|
||
|
||
$ErrorActionPreference = "Stop"
|
||
|
||
$Root = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
||
|
||
$AgentDir = Join-Path $Root "scripts\agent"
|
||
|
||
|
||
|
||
Write-Host "Seeding analyst metric dict..."
|
||
|
||
Get-Content (Join-Path $AgentDir "seed-analyst-metric-dict.sql") -Raw | mysql -u root jinrong_agent
|
||
|
||
|
||
|
||
Write-Host "Seeding analyst query templates..."
|
||
|
||
Get-Content (Join-Path $AgentDir "seed-analyst-query-templates.sql") -Raw | mysql -u root jinrong_agent
|
||
|
||
|
||
|
||
Write-Host "Seeding analyst few-shots (D-11 published)..."
|
||
|
||
Get-Content (Join-Path $AgentDir "seed-analyst-few-shots.sql") -Raw | mysql -u root jinrong_agent
|
||
|
||
|
||
|
||
Write-Host "Done."
|
||
|
||
|
||
|
||
if (-not $SkipRestart) {
|
||
|
||
$RestartScript = Join-Path $Root "scripts\dev\restart-dev.ps1"
|
||
|
||
if (Test-Path $RestartScript) {
|
||
|
||
Write-Host "Restarting backend after seed ($RestartBackend)..." -ForegroundColor Cyan
|
||
|
||
& $RestartScript -Backend $RestartBackend -SkipFrontend
|
||
|
||
} else {
|
||
|
||
Write-Host "WARN: restart-dev.ps1 not found; skip backend restart." -ForegroundColor Yellow
|
||
|
||
}
|
||
|
||
}
|
||
|