Briyah SDK - v2.0.6
    Preparing search index...

    Interface PdfMarkdownOptions

    How AppService.convertPdfToMarkdownPages should run.

    The limits are inherited from PdfConversionOptions; everything added here is about which agent does the converting and what it is told.

    interface PdfMarkdownOptions {
        agentName?: string;
        aiModel?: string;
        aiServiceName?: string;
        attempts?: number;
        concurrency?: number;
        documentType?: string;
        fidelityHints?: string;
        finishAgents?: boolean;
        onProgress?: (message: string) => void;
        pageTimeoutMs?: number;
        promptFile?: string;
        promptFolder?: string;
        reasoningEffort?: "low" | "medium" | "high";
        retryBackoffMs?: number;
        rowNoun?: string;
        variables?: Record<string, unknown>;
    }

    Hierarchy (View Summary)

    Index
    agentName?: string

    Shown in logs and cost reports. Defaults to PDF Converter.

    aiModel?: string

    Overrides DOC_CONVERSION_AI_MODEL.

    aiServiceName?: string

    Overrides DOC_CONVERSION_AI_SERVICE.

    attempts?: number

    Attempts per page before giving up. Defaults to PDF_CONVERT_PAGE_ATTEMPTS or 3.

    concurrency?: number

    How many pages may be converted at once.

    The reason this exists: converting every page concurrently is what a 146-page document did before there was a cap, and the provider rate-limited most of them. Defaults to PDF_CONVERT_CONCURRENCY or 20.

    documentType?: string

    Noun phrase completing "Convert this page from ___", e.g. a fleet schedule.

    fidelityHints?: string

    What must survive verbatim, e.g. chapter and verse numbers.

    finishAgents?: boolean

    Finish each page's agent once it has answered. Defaults to true. Pass false when the caller wants to read costs off the agents and dispose of them itself.

    onProgress?: (message: string) => void

    Called as pages complete, for a caller with somewhere to show it.

    pageTimeoutMs?: number

    Per-attempt timeout. Defaults to PDF_CONVERT_PAGE_TIMEOUT_MS or 2 minutes.

    promptFile?: string

    The prompt file within that folder. Defaults to convert_pdf_page.

    promptFolder?: string

    The prompt folder holding the conversion prompt. Defaults to pdf_converter.

    A host with its own transcription prompt points at its own folder — including a pack-qualified one — and keeps Briyah's concurrency, retry and assembly.

    reasoningEffort?: "low" | "medium" | "high"
    retryBackoffMs?: number

    Base delay for the exponential backoff between attempts. Defaults to 1000ms.

    rowNoun?: string

    Plural noun for the document's records, e.g. vehicle rows. Adds a don't-drop warning.

    variables?: Record<string, unknown>

    Further Handlebars variables for a caller's own prompt.