"""AI 重大事项识别。 从月报/弱信号中提取重大事项。 """ from app.services.llm_client import LLMClient async def detect_major_events(report_content: str) -> list[dict]: """AI 从月报内容中识别重大事项。""" llm = LLMClient() prompt = f"""请从以下月报内容中识别重大事项(融资/人事/产品/法律/市场/组织): {report_content[:6000]} 以 JSON 数组格式返回: [{{"event_type": "funding/personnel/product/legal/market/org", "title": "事项标题", "description": "描述", "severity": "low/medium/high/critical"}}]""" result = await llm.chat(prompt, temperature=0.3) return result if isinstance(result, list) else []