feat: derive tuhui title from image analysis

This commit is contained in:
2026-03-09 16:07:06 +08:00
parent ba5644371f
commit e0c9f46162
2 changed files with 35 additions and 0 deletions

View File

@@ -79,6 +79,9 @@ def _build_processing_prompt(intent: str, requirement_text: str, analysis: Dict)
def _build_upload_title(intent: str, analysis: Dict, requirement_text: str, idx: int) -> str:
analysis = analysis or {}
suggested = _safe_name(str(analysis.get("title_suggest") or ""), "")
if suggested:
return f"{suggested}_{idx}"
subject = _safe_name(str(analysis.get("subject") or ""), "")
proc_type = _safe_name(str(analysis.get("proc_type") or ""), "")
requirement = _safe_name(str(requirement_text or ""), "")