CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-azure-ai-documentintelligence

tessl install tessl/pypi-azure-ai-documentintelligence@1.0.0

Azure 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%

task.mdevals/scenario-1/

Poller Metadata Toolkit

Helpers for launching document analysis jobs with adjustable polling cadence, exposing operation identifiers from service metadata, and resuming in-flight work from continuation tokens.

Capabilities

Start analysis with custom polling

  • Launches a document analysis run using the caller-provided polling interval (seconds) and returns the completed result plus a continuation token for future resume. @test

Surface operation metadata

  • Provides the operation identifier emitted by the long-running operation metadata alongside a summary of the completed analysis (e.g., page count). @test

Resume from saved token

  • Rehydrates an existing analysis using only a continuation token without re-supplying the input file, yielding the same operation identifier and finished content. @test

Implementation

@generates

API

from dataclasses import dataclass
from typing import Any

@dataclass
class AnalysisJob:
    operation_id: str
    continuation_token: str
    page_count: int
    content: Any

def analyze_document_with_metadata(
    client: Any,
    model_id: str,
    document_path: str,
    poll_interval: int = 1
) -> AnalysisJob:
    """
    Starts a document analysis with a configurable polling interval, then returns
    the completed content plus operation metadata and a continuation token.
    """

def resume_analysis_with_metadata(
    client: Any,
    continuation_token: str,
    poll_interval: int = 1
) -> AnalysisJob:
    """
    Resumes a prior analysis using a continuation token and returns the same
    operation metadata and final content.
    """

Dependencies { .dependencies }

azure-ai-documentintelligence { .dependency }

Provides document analysis client, enhanced poller metadata, and continuation token support.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-ai-documentintelligence@1.0.x
tile.json