tessl install tessl/pypi-azure-ai-documentintelligence@1.0.0Azure AI Document Intelligence client library for Python - a cloud service that uses machine learning to analyze text and structured data from documents
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.19x
Baseline
Agent success rate without this tile
64%
Build a small helper module that uses the document intelligence service's raw HTTP pipeline to issue authenticated requests that bypass the convenience methods. The helpers should start a markdown-focused analysis run and retrieve results (markdown or searchable PDF) directly from the operation endpoint.
/documentintelligence/documentModels/{modelId}:analyze?api-version=<api_version> with a JSON body containing the document URL and outputContentFormat set to markdown, using the provided client pipeline so service authentication and policies apply. Returns the absolute operation-location value. @testAccept: text/markdown, and returns the full markdown content as a string. @testAccept: application/pdf and an optional pages query (e.g., pages=1-2) to fetch only selected pages. Returns the binary PDF bytes. @test@generates
def start_markdown_analysis(
client,
model_id: str,
document_url: str,
*,
api_version: str = "2024-11-30"
) -> str:
...
def get_markdown_result(client, operation_location: str) -> str:
...
def download_pdf(
client,
operation_location: str,
*,
pages: str | None = None
) -> bytes:
...Provides authenticated document intelligence pipeline and HTTP request/response helpers.