Summaries
Functions
Link copied to clipboard
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
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.