Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions extract_thinker/markdown/markdown_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,9 @@ def to_markdown(self, source: Union[str, IO, List[Union[str, IO]]], vision: bool
# We have both LLM and DocumentLoader

# Configure document loader for vision if needed
if vision and hasattr(self.document_loader, 'set_vision_mode'):
if hasattr(self.document_loader, 'set_vision_mode'):
try:
self.document_loader.set_vision_mode(True)
self.document_loader.set_vision_mode(vision)
except Exception as e:
print(f"Warning: Failed to set vision mode on document loader: {e}")

Expand Down Expand Up @@ -697,9 +697,9 @@ def _basic_to_markdown(self, source: Union[str, IO, List[Union[str, IO]]], visio
raise ValueError("Document loader is required.")

# Configure document loader for vision if needed and supported
if vision and hasattr(self.document_loader, 'set_vision_mode'):
if hasattr(self.document_loader, 'set_vision_mode'):
try:
self.document_loader.set_vision_mode(True)
self.document_loader.set_vision_mode(vision)
except Exception as e:
print(f"Warning: Failed to set vision mode on document loader: {e}")

Expand Down
Loading