BasePydanticAiHtmlDistiller
Hierarchy
- BasePydanticAiHtmlDistiller
Index
Methods
__init__
Initialize a new instance.
Parameters
optionalkeyword-onlyprompt_notes: str | None = None
Short description of the final representation. Appended to the LLM task instructions by extractors.
Nonemeans no notes are appended.
Returns None
distill
Convert raw HTML to a compact representation suitable for an LLM.
Parameters
html: str
Returns str
get_prompt_notes
Return the configured prompt notes, or
Nonewhen not set.Returns str | None
Base class for the built-in HTML distillers.
A distiller reduces raw HTML to a compact representation that an LLM can read cheaply. Subclasses implement
distill. The base stores the prompt notes and returns them fromget_prompt_notes. Overrideget_prompt_noteswhen the notes depend on several constructor arguments.The public interface is the
PydanticAiHtmlDistillerprotocol. The concrete distillers arePydanticAiCleanHtmlDistillerandPydanticAiSkeletonDistiller.