Skip to main content

Module preprocess

Module preprocess 

Source
Expand description

Page preprocessing.

Five format modes are supported. For a custom mode, call evaluate_json yourself against the tab.

  • Format::Html — run an in-browser cleanup pass, then take the serialized DOM (default).
  • Format::RawHtml — unmodified tab.get_content().
  • Format::Markdowndocument.body.innerHTML converted via htmd.
  • Format::Textdocument.body.innerText (browser-native).
  • Format::Image — PNG screenshot encoded as base64 (for multimodal models).

Structs§

Preprocessed
Result of a preprocessing pass.
RunOptions
Options passed to high-level LlmWeb methods. All fields are optional; use struct-update syntax to set only what you need:

Enums§

Format
Preprocessing format mode. See module docs for semantics.

Functions§

preprocess
Run the preprocessing pass on an already-opened tab.
preprocess_html
Build a Preprocessed from a raw HTML string — no browser involved.