📐Documentation Site
User guide, API reference, and documentation are available at Documentation Page.
📣Features and Changes
Fixed Warning.warn bug in LLMUnitChunker
LLMUnitChunker.chunk()previously called the non-existentWarning.warn(...)when a header was missing or had an invalidanchor_text, which raisedAttributeErrorinstead of emitting a warning. Now correctly callswarnings.warn(...).
Fixed import bug in PromptEditor IPython chat
PromptEditor._IPython_chat()referencedimportlib.util.find_spec(...)without importingimportlib.util, causingAttributeErroron first call in a Jupyter environment. The missing import has been added.
Fixed assistant message rendering in PromptEditor IPython chat
- The assistant response in
_IPython_chatwas rendered by interpolating the full response dictionary into the HTML output. It now correctly renders the response text (response["response"]).
Fixed ReviewFrameExtractor default prompt MRO fallback
- When a default review prompt for a subclass of
ReviewFrameExtractorwas not found, the MRO walk was supposed to fall back to an ancestor's prompt but always probed the same filename. The lookup now uses the current class in the MRO and emits aUserWarningwhen an ancestor's prompt is used.
Widened PromptEditor extractor type
PromptEditornow accepts anyExtractor(includingStructExtractor) instead of onlyFrameExtractor. The internal usage only depends onget_prompt_guide()which is defined on the baseExtractor.
MultiClassRelationExtractor now requires possible_relation_types_func
MultiClassRelationExtractorpreviously assignedself.possible_relation_types_funconly when the argument was truthy, which let users construct an extractor that would later fail withAttributeErroron use. The argument is now validated unconditionally and a missing/invalid value raises immediately at construction time. This matches the behavior ofBinaryRelationExtractor.
Fixed AttributeError when AttributeExtractor receives empty JSON
AttributeExtractor._extract_from_framereturnedNonewhen the LLM produced no JSON object, which causedframe.attr.update(None)to raiseTypeErrordownstream. It now returns{}so attribute extraction is a safe no-op for empty responses.
Removed obsolete entity_key parameter from FrameExtractor abstract API
- The abstract
FrameExtractor.extract_framesandextract_frames_asyncpreviously declared anentity_key:strparameter that the concrete implementations did not accept. The parameter has been removed from the abstract signatures and docstring; the entity key is fixed to"entity_text"internally.
⚡ Performance
Cached PunktSentenceTokenizer in SentenceUnitChunker
SentenceUnitChunkerpreviously instantiatedPunktSentenceTokenizeron everychunk()call. The tokenizer is now imported at module level and instantiated once in__init__.
Fixed short-text fuzzy matching in FrameExtractor
_get_closest_substring(used for fuzzy entity span matching) computed an empty iteration range when the unit text was shorter than the fuzzy window, silently skipping fuzzy matches. The scan now covers every valid start position regardless of text length, and short-circuits before the inner window loop when the first token does not match.