fix: seed script accepts category as fallback for missing type field
This commit is contained in:
parent
0572ab5a71
commit
12a19639fd
@ -93,12 +93,12 @@ def parse_article(filepath: Path) -> dict | None:
|
||||
return m.group(1).strip() if m else ""
|
||||
|
||||
title = fm_get("title")
|
||||
topic = fm_get("type")
|
||||
topic = fm_get("type") or fm_get("category") or "analysis"
|
||||
target_audience = fm_get("target_audience")
|
||||
score_str = fm_get("score")
|
||||
|
||||
if not title or not topic or not body:
|
||||
print(f" SKIP {filepath.name}: missing title/type/body")
|
||||
if not title or not body:
|
||||
print(f" SKIP {filepath.name}: missing title/body")
|
||||
return None
|
||||
|
||||
# Build input_text: the generation request
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user