Skip to content

Refactor ImageConverter to reuse llm_caption helper - #2302

Open
Syed Ahnaf Raza (syahra712) wants to merge 1 commit into
microsoft:mainfrom
syahra712:refactor/reuse-llm-caption-image-converter
Open

Refactor ImageConverter to reuse llm_caption helper#2302
Syed Ahnaf Raza (syahra712) wants to merge 1 commit into
microsoft:mainfrom
syahra712:refactor/reuse-llm-caption-image-converter

Conversation

@syahra712

Copy link
Copy Markdown

Summary

  • Reuses the existing llm_caption helper in ImageConverter
  • Removes duplicated image caption request construction from _image_converter.py
  • Keeps direct image LLM behavior aligned with the PPTX image caption path

Why

_image_converter.py and _llm_caption.py had duplicate logic for building the multimodal LLM caption request. This keeps the behavior in one place and matches the existing helper already used by the PPTX converter.

Verification

  • python3 -m pytest packages/markitdown/tests/test_module_misc.py::test_markitdown_llm_parameters

@syahra712

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant