Summaries

inner class Summaries

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
suspend fun availability(language: String? = null): PdfAiAvailability

language is a BCP 47 tag. When the on-device summariser does not support it the feature is unavailable rather than producing a poor summary (SUM-3).

Link copied to clipboard
suspend fun prepare(onProgress: (Float) -> Unit? = null): PdfAiAvailability

Downloads the on-device model. AVL-4 forbids the SDK starting a download on its own, so this exists to be called by the host and nowhere else.

Link copied to clipboard
suspend fun summarize(pages: IntRange? = null, style: PdfSummaryStyle = PdfSummaryStyle.PARAGRAPH, language: String? = null): PdfAiOutcome<PdfSummary>

Call while the app is in the foreground. AICore blocks on-device inference from the background, and the result is then PdfAiUnavailableReason.BACKGROUND_USE_BLOCKED unless a custom provider answers instead.