Skip to content

cannot import name 'InsertIntoLLM' from 'llm_strategy' #4

Open

Description

@keunwoochoi

hi, i just tried to use

Traceback (most recent call last):
  File "/Users/choik11/.venv/bin/markitdown", line 4, in <module>
    from openize.markitdown.main import main
  File "/Users/choik11/.venv/lib/python3.11/site-packages/openize/markitdown/__init__.py", line 8, in <module>
    from .processor import DocumentProcessor
  File "/Users/choik11/.venv/lib/python3.11/site-packages/openize/markitdown/processor.py", line 4, in <module>
    from llm_strategy import SaveLocally, InsertIntoLLM
ImportError: cannot import name 'InsertIntoLLM' from 'llm_strategy' (/Users/choik11/.venv/lib/python3.11/site-packages/openize/markitdown/llm_strategy.py)

just confirmed in the source that InsertIntoLLM doesn't exist in the file.

i guess in general, the test coverage can be improved to include cases like this.

Activity

  1. muhammadumargroupdocs commented on Jul 6, 2025

    @muhammadumargroupdocs
    Member

    Hi @keunwoochoi,

    Thank you for bringing this to our attention. We'll investigate the issue and get back to you shortly.

  2. muhammadumargroupdocs commented on Jul 9, 2025

    @muhammadumargroupdocs
    Member

    Hi @keunwoochoi,

    The issue you reported has been fixed, and the related test cases have also been updated.

    You can now pull the latest code. If you're using MarkItDown via pip, just reinstall it to get the latest changes.

    Since Markdown content can be inserted into LLMs like OpenAI, Claude, Gemini, and Mistral using MarkItDown. Just make sure you’ve set the right environment variables for your credentials. If you’re using the CLI, it will help you configure them interactively when needed.

    CLI Examples

    Convert a Single File:

    markitdown --input-file d:\test.docx -o d:\output_folder

    Convert a Folder:

    markitdown --input-dir d:\docs -o d:\output_folder

    Use LLMs for Post-processing:

    You’ll be prompted for API keys if not already set:

    markitdown --input-file d:\test.docx -o d:\output_folder --llm openai
    markitdown --input-file d:\test.docx -o d:\output_folder --llm claude
    markitdown --input-file d:\test.docx -o d:\output_folder --llm gemini
    markitdown --input-file d:\test.docx -o d:\output_folder --llm mistral

    If you're using the Aspose APIs, you'll also be prompted to provide your license file path.

    Please give it a try and let us know if everything works as expected or if you run into anything!

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions