Initial commit

This commit is contained in:
jsahn
2026-08-31 14:33:53 +09:00
commit 8bc43b3ce4
51 changed files with 8902 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""LLM provider interface. Implementations must be side-effect free apart from the HTTP call."""
from __future__ import annotations
from typing import Protocol
from us2kr.models import MarketPayload, Report
class LLMError(RuntimeError):
"""Raised when every configured model failed to produce a valid Report."""
class LLMProvider(Protocol):
def summarize(self, payload: MarketPayload) -> tuple[Report, str]:
"""Return (validated Report, model id that produced it). Raise LLMError on total failure."""
...