markitdown-pro 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/PKG-INFO +1 -1
- markitdown_pro-1.0.2/markitdown_pro/common/logger.py +20 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/services/openai_services.py +26 -25
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro.egg-info/PKG-INFO +1 -1
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/setup.py +1 -1
- markitdown_pro-1.0.0/markitdown_pro/common/logger.py +0 -6
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/README.md +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/__init__.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/common/__init__.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/common/utils.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/conversion_pipeline.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/__init__.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/azure_doc_intel_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/azure_speech_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/base.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/gpt_vision_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/markitdown_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/pymupdf_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/unstructured_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/youtube_wrapper.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/__init__.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/audio_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/base_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/email_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/epub_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/image_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/ipynb_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/markitdown_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/markup_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/office_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/pdf_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/pst_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/tabular_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/handlers/text_handler.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/services/__init__.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/services/azure_doc_intelligence.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/services/azure_speech.py +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro.egg-info/SOURCES.txt +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro.egg-info/dependency_links.txt +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro.egg-info/requires.txt +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro.egg-info/top_level.txt +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/pyproject.toml +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/setup.cfg +0 -0
- {markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/tests/test.py +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
log_level = int(os.getenv("LOG_LEVEL", "20"))
|
|
5
|
+
logger = logging.getLogger(__name__)
|
|
6
|
+
logging.basicConfig(level=log_level, format="[%(asctime)s] [%(levelname)s] %(message)s")
|
|
7
|
+
|
|
8
|
+
# Quiet the Azure SDK HTTP logging
|
|
9
|
+
logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.WARNING)
|
|
10
|
+
logging.getLogger("azure.core.pipeline.policies._universal").setLevel(logging.WARNING)
|
|
11
|
+
|
|
12
|
+
# 2) Azure Monitor exporter "Transmission succeeded..." spam
|
|
13
|
+
logging.getLogger("azure.monitor.opentelemetry.exporter").setLevel(logging.WARNING)
|
|
14
|
+
logging.getLogger("azure.monitor.opentelemetry.exporter._transmission").setLevel(logging.WARNING)
|
|
15
|
+
|
|
16
|
+
# 3) Quiet the rest of the Azure SDK + OTel + urllib3 connection noise
|
|
17
|
+
logging.getLogger("azure").setLevel(logging.WARNING)
|
|
18
|
+
logging.getLogger("opentelemetry").setLevel(logging.WARNING)
|
|
19
|
+
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
|
20
|
+
logging.getLogger("urllib3.connectionpool").setLevel(logging.WARNING)
|
|
@@ -35,11 +35,12 @@ from pathlib import Path
|
|
|
35
35
|
from typing import Callable, Iterable, Optional, Tuple, TypeVar
|
|
36
36
|
|
|
37
37
|
import fitz
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
# from docling.datamodel.pipeline_options import PictureDescriptionApiOptions
|
|
39
40
|
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
|
|
40
41
|
from langchain_openai import AzureChatOpenAI
|
|
41
42
|
from PIL import Image as PILImage
|
|
42
|
-
from pydantic import
|
|
43
|
+
from pydantic import SecretStr
|
|
43
44
|
|
|
44
45
|
from ..common.logger import logger
|
|
45
46
|
from ..common.utils import clean_markdown, ensure_minimum_content
|
|
@@ -477,26 +478,26 @@ class GPTVision:
|
|
|
477
478
|
return None
|
|
478
479
|
|
|
479
480
|
|
|
480
|
-
def azure_openai_vlm_options(
|
|
481
|
-
|
|
482
|
-
) -> PictureDescriptionApiOptions:
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
481
|
+
# def azure_openai_vlm_options(
|
|
482
|
+
# endpoint: str, api_key: str, deployment: str, api_version: str, max_tokens: int = 4000
|
|
483
|
+
# ) -> PictureDescriptionApiOptions:
|
|
484
|
+
# """
|
|
485
|
+
# Build Docling PictureDescriptionApiOptions for calling Azure OpenAI directly.
|
|
486
|
+
|
|
487
|
+
# This is optional if you exclusively use the `GPTVision` class above.
|
|
488
|
+
# """
|
|
489
|
+
# if not endpoint:
|
|
490
|
+
# raise ValueError("AZURE_OPENAI_ENDPOINT environment variable is not set.")
|
|
491
|
+
# if not api_key:
|
|
492
|
+
# raise ValueError("AZURE_OPENAI_API_KEY environment variable is not set.")
|
|
493
|
+
# if not api_version:
|
|
494
|
+
# raise ValueError("AZURE_OPENAI_API_VERSION environment variable is not set.")
|
|
495
|
+
|
|
496
|
+
# url = f"{endpoint}/openai/deployments/{deployment}/chat/completions?api-version={api_version}"
|
|
497
|
+
# params = {"max_tokens": max_tokens}
|
|
498
|
+
# headers = {"api-key": api_key, "Content-Type": "application/json"}
|
|
499
|
+
# prompt = "Describe the image in three sentences. Be concise and accurate."
|
|
500
|
+
|
|
501
|
+
# return PictureDescriptionApiOptions(
|
|
502
|
+
# url=AnyUrl(url), params=params, headers=headers, prompt=prompt, timeout=60
|
|
503
|
+
# )
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/azure_doc_intel_wrapper.py
RENAMED
|
File without changes
|
{markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/azure_speech_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/gpt_vision_wrapper.py
RENAMED
|
File without changes
|
{markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/markitdown_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/converters/unstructured_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markitdown_pro-1.0.0 → markitdown_pro-1.0.2}/markitdown_pro/services/azure_doc_intelligence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|