fix(asset-catalog): 修复推理管线并新增README

- 默认模型改为 glm-5.1,API地址改为 coding 套餐端点
- 默认批次大小 20→5,增加 max_tokens=4096
- 优化 prompt 模板,明确要求返回 {"results": [...]} 格式
- 修复全批失败时 ai_inference_metadata 的 KeyError
- 输出目录从 <project>/output/ 统一到 <tool>/outputs/
- 新增 README.md(Pipeline流程、环境变量、CLI参数说明)
This commit is contained in:
2026-06-10 18:41:06 +08:00
parent b8f27221b2
commit 042bebe9d7
5 changed files with 178 additions and 22 deletions
+3 -11
View File
@@ -5,7 +5,7 @@
环境变量:
AC_SCAN_ROOT — 要扫描的 UE5 Content 路径(默认 /Game/BlockingStarterPack)
AC_OUTPUT_DIR — JSON 输出目录(绝对路径,默认 <project>/output/asset-catalog/)
AC_OUTPUT_DIR — JSON 输出目录(绝对路径,默认 <tool_dir>/outputs/)
AC_NO_QUIT — 设为 "1" 运行后不退出编辑器
AC_STEPS — 逗号分隔的步骤列表(默认 discover,mesh,material,blueprint)
"""
@@ -42,16 +42,8 @@ def get_output_dir() -> Path:
if raw:
p = Path(raw)
else:
# 默认放在项目 output/asset-catalog/ 下
# 尝试通过 unreal API 获取项目目录
if HAS_UNREAL:
try:
project_dir = Path(unreal.Paths.project_dir()).parent
p = project_dir / "output" / "asset-catalog"
except Exception:
p = Path("output") / "asset-catalog"
else:
p = Path("output") / "asset-catalog"
# 默认放在工具所在目录的 outputs/ 下
p = _SCRIPT_DIR / "outputs"
p.mkdir(parents=True, exist_ok=True)
return p