fix(advisor): fix LLM API call, wire advice_markdown to webapp, update .env.example timeouts

- llm_analyzer.py: use llm.langchain_llm.ainvoke() (correct RAGAS 0.4.3 API)
- webapp/models.py: add advice_markdown field to ReportData
- webapp/services/run_reader.py: add read_advice_markdown() reading optimization_advice.md
- webapp/services/report_builder.py: pass advice_markdown into ReportData
- .env.example: OPENAI_TIMEOUT_SECONDS 30→180, RAGAS_METRIC_TIMEOUT_SECONDS 45→300

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-16 17:12:32 +08:00
parent f5c2dce64a
commit 91c0dab4f9
5 changed files with 21 additions and 5 deletions

View File

@@ -73,6 +73,7 @@ class ReportData(BaseModel):
groupings: dict[str, list[GroupStat]] = Field(default_factory=dict)
lowest_samples: list[SampleScore] = Field(default_factory=list)
summary_markdown: str = ""
advice_markdown: str = "" # optimization_advice.md content (empty if not generated)
class RunDetail(BaseModel):