AGENTS.md guide, Python 3.9 type compat fixes, NOC launchd verified
This commit is contained in:
@@ -11,8 +11,7 @@ import logging
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timedelta
|
||||
from dataclasses import dataclass, field, asdict
|
||||
from typing import Optional
|
||||
|
||||
from typing import Optional, Dict, List
|
||||
import requests
|
||||
|
||||
# ─── Config ───────────────────────────────────────────────────────
|
||||
@@ -795,7 +794,7 @@ def real_fact_check(article_text: str, topic_title: str) -> dict:
|
||||
|
||||
|
||||
# ─── Image Generator Hook ──────────────────────────────────────────
|
||||
def generate_article_image(title: str, vertical: str) -> str | None:
|
||||
def generate_article_image(title: str, vertical: str) -> Optional[str]:
|
||||
"""Generate a hero image for an article via FAL.ai, verify with vision model. Returns URL or None."""
|
||||
# Build a prompt that captures the article's essence
|
||||
prompt = f"""Dark atmospheric illustration for an article titled "{title}".
|
||||
@@ -841,7 +840,7 @@ Is the image relevant, coherent, and free of inappropriate content? Respond ONLY
|
||||
|
||||
# ─── Writing Pipeline ──────────────────────────────────────────────
|
||||
def write_article(topic_id: int, topic_title: str, vertical: str,
|
||||
knowledge_package: dict) -> dict | None:
|
||||
knowledge_package: dict) -> Optional[dict]:
|
||||
"""Multi-agent writing pipeline with format diversity, quality gate, and fact-check."""
|
||||
log.info(f"Writing article for topic #{topic_id}: {topic_title}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user