"""AI 行业研究 Agent。""" from app.services.llm_client import LLMClient async def research_industry(industry: str, companies: str) -> dict: """AI 追踪行业动态 → 生成风险提示 → 企业对标分析。""" llm = LLMClient() prompt = f"""请对以下行业进行研究分析: 行业:{industry} Portfolio 内相关企业:{companies[:3000]} 以 JSON 格式返回: {{"industry_trends": ["趋势1", "趋势2"], "policy_changes": ["政策变化"], "competitor_funding": [{{"company": "竞品", "amount": "融资额"}}], "risk_alerts": [{{"risk": "风险", "affected_companies": ["受影响企业"]}}], "benchmark_analysis": "对标分析"}}""" result = await llm.chat(prompt, temperature=0.4) return result if isinstance(result, dict) else {}