markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

"Description" hardcoded in English when converting images to another language

Open sglebs opened this issue 11 months ago • 1 comments

This is hardcoded: and it should not:

        if llm_client is not None and llm_model is not None:
            md_content += (
                "\n# Description:\n"
                + self._get_llm_description(
                    local_path,
                    extension,
                    llm_client,
                    llm_model,
                    prompt=kwargs.get("llm_prompt"),
                ).strip()
                + "\n"
            )

If I am passing a prompt, let ME control if I want a "Description" heading or not, and in what language it should be.

Suggestion: only append it if the prompt is None.

sglebs avatar Feb 04 '25 23:02 sglebs

Good point. The library was originally designed to allow LLMs to read various file formats -- and they are inherently multilingual. But, I agree this is not appropriate for other use-cases.

afourney avatar Feb 09 '25 05:02 afourney