Repository navigation
fix: honor dataset language in Go vision dispatch - #17892
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughVision dispatch now resolves dataset or fallback languages and applies them to shared figure prompts and default image prompts across DOCX, Markdown, PDF, and image processing paths. Tests verify language propagation, template rendering, fallback behavior, and cached-template isolation. ChangesVision language prompting
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant VisionDispatch
participant resolveVisionLanguage
participant figureVisionPromptBuilder
participant VisionModel
VisionDispatch->>resolveVisionLanguage: Resolve inputs lang with fallback
resolveVisionLanguage-->>VisionDispatch: Return normalized language
VisionDispatch->>figureVisionPromptBuilder: Build figure prompt with language
figureVisionPromptBuilder-->>VisionDispatch: Return rendered prompt
VisionDispatch->>VisionModel: Send image or table with prompt
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@yuzhichang Please have a second eye check on your perspective. Thank you. |
Summary
{{ language }}placeholder in Go.Why
After #17227 added language-aware figure prompts, the equivalent Go ingestion paths still did not read
inputs["lang"]or render the new{{ language }}placeholder. As a result, figure and image descriptions could still be generated in English regardless of the dataset language.The full-page PDF CustomVLM path remains unchanged because it uses
vision_llm_describe_prompt.md, whose contract is verbatim transcription in the document's original language. Dataset-language handling is applied to the separate PDF image/table figure-description path.Testing
gofmt -lon all modified Go files: no outputgit diff --checkFixes #17281