import { DocumentExtraction } from './documentText'; import { DocumentFormat } from './attachments'; export interface ExtractedDocument { extraction: DocumentExtraction; /** * Already trimmed to the per-file limit passed in (`MAX_INLINE_CHARS_PER_FILE` * by default). Absent unless status is 'ok'. */ textContent?: string; /** True when `textContent` is a prefix of what the document actually holds. */ textTruncated?: boolean; /** Page-per-entry text, for the shared budget's page-aligned re-trim. PDFs only. */ documentPages?: string[]; } /** * Pull text out of a document, never throwing. * * A failure here must not fail the ATTACHMENT: the file still uploads, the * model still gets its URL, and the reason we could not read it becomes a * sentence in the prompt. Throwing would instead surface as the composer's * generic 'unreadable' rejection, and the user would lose the file over * something that is only a partial loss. */ export declare function extractDocumentText(file: File, format: DocumentFormat, /** * How much of the text to keep (BOFF-7334). Defaults to the shared per-file * limit; the composer passes the largest limit among the modes on offer — * see `largestInlineCharsPerFile`. */ perFileChars?: number): Promise; //# sourceMappingURL=documentExtract.d.ts.map