INNER CODE UNIT · Python

index_path

Dsadd4/AgentFigureGallery · agentfiguregallery/server.py:122

def index_path(root: Path) -> Path:
    return root / "data" / "reference_candidate_index.json"


def load_index(root: Path) -> dict:
    return read_json(index_path(root), {"candidates": [], "summary": {}})


def session_roots(root: Path) -> list[Path]:
    return [root / "outputs"]


def discover_sessions(root: Path) -> list[dict]:
    sessions: list[dict] = []
    for base in session_roots(root):
        for session_json in sorted(base.glob("reference_sessions*/**/reference_session.json")):
            try:
                payload = read_json(session_json)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…