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%
Utility to manage batch document analysis runs with continuation tokens, paginated history, and configurable result storage.
overwrite_existing is false and the prefix already has output, the call raises an exception instead of replacing existing files. @testskip and top controls, returning only that slice along with a marker for fetching the next page. @test@generates
from typing import Any, Dict, Optional
class BatchRunManager:
def __init__(self, client: Any):
"""Wraps the document analysis client used for batch operations."""
def start_run(
self,
model_id: str,
source_container_url: str,
*,
source_prefix: Optional[str] = None,
result_container_url: str,
result_prefix: Optional[str] = None,
overwrite_existing: bool = False,
) -> Dict[str, str]:
"""
Starts a batch analysis against the given source container and returns identifiers for later lookup.
The result prefix and overwrite flag are applied to the storage location.
Returns a mapping with at least operation_id, continuation_token, and result_location keys.
"""
def resume_run(self, continuation_token: str) -> Dict[str, Any]:
"""
Resumes a batch run from the provided continuation token and waits for completion.
Returns a summary with terminal status and succeeded_count/failed_count keys.
"""
def list_runs(self, model_id: str, *, skip: int = 0, top: int = 10) -> Dict[str, Any]:
"""
Lists batch runs for a model honoring pagination controls.
Returns a mapping containing the requested page of items and a next_link pointer when more data is available.
"""Provides batch document analysis, continuation tokens, pagination over batch operations, and result storage prefix/overwrite controls.