Improve output info to help user with Azure Document Intelligence#1442
Open
accelazh wants to merge 3 commits into
Open
Improve output info to help user with Azure Document Intelligence#1442accelazh wants to merge 3 commits into
accelazh wants to merge 3 commits into
Conversation
added 2 commits
October 10, 2025 13:27
1. Added debugging info if user forgot to set AZURE_API_KEY. 2. Added exception print if doc_intel_client throws exception, e.g., document length limit. The original code would silently fallback to vanilla convert without noticing the user.
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After I tried it out myself, this PR adds output info to help user when using Azure Document Intelligence.
Previously, even if Azure Document Intelligence client throws an exception, the converter would silently fall back to a more basic converter. No messages are printed to let user know. The output markdown file is still generated with the basic converter. It is very confusing to the user that, the output markdown file seems to be generated by Azure Document Intelligence, but actually NOT.
The typical confusing case is when user forgot to set AZURE_API_KEY. Below is a screenshot. You can see no messages are output.
This PR adds helpful output messages to clarify this situaiton for user. Warning messages are printed if Azure Document Intelligence client throws an exception. And if AZURE_API_KEY is forgotten, a hint message is also printed.
Below is the screenshot after this PR: