infospace: process book-1-chapter-03 with LLM integration

Auto-generated mappings and analysis via Claude Code CLI adapter.
Entities were already present from a previous session.

Stats: 5m04s wall time, ~51K estimated tokens, ~$0.35 estimated cost.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 01:32:24 +01:00
parent fecc2fd4fa
commit e806a701ca
7 changed files with 4034 additions and 1 deletions

View File

@@ -254,15 +254,26 @@ class ChapterProcessor:
Returns the generated content, or ``None`` on failure.
"""
import time as _time
from markitect.prompts.execution.models import RunConfig
print(f" Calling LLM ({stage_label})...")
t0 = _time.time()
try:
response = self.llm_adapter.execute_prompt(prompt, RunConfig())
except Exception as exc:
print(f" LLM error: {exc}")
print(f" LLM error ({_time.time() - t0:.1f}s): {exc}")
return None
elapsed = _time.time() - t0
usage = response.usage
print(
f" LLM done in {elapsed:.1f}s — "
f"prompt {usage.get('prompt_tokens', '?')} tok, "
f"completion {usage.get('completion_tokens', '?')} tok, "
f"total {usage.get('total_tokens', '?')} tok"
)
content = response.content
if not content or not content.strip():
print(f" LLM returned empty content")