Woody
787c6b1692
fix: vLLM highlight batch failure — replace guided_json with response_format + add debug logging
...
Root cause: guided_json removed in vLLM v0.12.0, and the two-attempt
loop (structured_outputs → guided_json) merged chat_template_kwargs
into the extra_body, potentially causing param conflicts.
Changes:
- llm_client.py: Replace _complete_structured_vllm() with two-tier
approach — response_format (Tier 1, v0.6.4+) then structured_outputs
(Tier 2, v0.8+). Remove dead guided_json path. Add _strip_markdown_fence().
- chunk_highlight_service.py: Add complete() fallback as defense-in-depth
when structured output fails. Strip markdown fences before parsing.
- chunks.py: Add request/response logging at router level.
- chunk_highlight_service.py: Add full logging chain — entry, ChromaDB
fetch, LLM call, fallback, cache results, exit.
- ResponsePanel.tsx: Add console logging for request payload, response
status/errors/timing. Handle status=failed explicitly (was silently
ignored). Track round-trip timing via performance.now().
2026-05-15 11:08:36 +08:00
Woody
41f59b396f
feat: track highlight generation prompt, response, and timing in history (Phase 5.5)
...
- Add 3 columns to query_history: highlight_prompt, highlight_response, highlight_time_ms
- HistoryService.update_highlights() updates existing row after batch LLM call
- ChunkHighlightService measures timing, captures prompt and structured JSON response
- SSE completed event includes history_id for frontend to pass back
- Frontend captures historyId, passes as ?history_id= query param in batch POST
- Highlight time tracked separately (excluded from total_time_ms)
- All 153 tests pass (108 backend + 45 frontend)
2026-04-29 11:18:21 +08:00
Woody
c6d4a38013
feat: add LLM-based batch highlight service and HTML rendering (Phase 5.4.4)
...
- ChunkHighlightService.compute_highlights_batch(): single LLM call across
all cited chunks, grouped by sub-question, with structured output
- render_highlight_html(): self-contained HTML page with yellow-highlighted
relevant sentences, LLM reason annotations, and View Original PDF footer
- Per-target error isolation, ChromaDB miss handling, graceful degradation
- 14 tests: 7 batch service + 7 HTML rendering
2026-04-29 09:26:33 +08:00