Files
SPARC/SPARC/types.py
T
agent-company b000146585 feat: configurable LLM model, SERP cache TTL, structured logging, fix patent_id type
- Make LLM model configurable via MODEL env var, default anthropic/claude-3.5-sonnet (#12)
- Expose SERP cache TTL as SERP_CACHE_TTL_HOURS env var, default 24 hours (#13)
- Fix Patent.patent_id type annotation from int to str in types.py (#14)
- Replace all print() calls with structured logging in analyzer.py and llm.py (#11)
- Add LOG_LEVEL config with basicConfig setup in config.py
- Add model and serp_cache_ttl_hours to config.py

Closes leeworks-agents/SPARC#11
Closes leeworks-agents/SPARC#12
Closes leeworks-agents/SPARC#13
Closes leeworks-agents/SPARC#14

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 06:03:25 +00:00

39 lines
795 B
Python

from dataclasses import dataclass, field
from datetime import datetime
@dataclass
class Patent:
patent_id: str
pdf_link: str
pdf_path: str | None = None
summary: dict | None = None
@dataclass
class Patents:
patents: list[Patent]
@dataclass
class CompanyAnalysisResult:
"""Result of analyzing a single company's patent portfolio."""
company_name: str
analysis: str
patent_count: int
success: bool
error: str | None = None
timestamp: datetime = field(default_factory=datetime.now)
@dataclass
class BatchAnalysisResult:
"""Result of batch analyzing multiple companies."""
results: list[CompanyAnalysisResult]
total_companies: int
successful: int
failed: int
timestamp: datetime = field(default_factory=datetime.now)