LLM Summary behavior for Plone content types
Project description
LLM summary generation for Plone content types, built on the agentic infrastructure of eea.genai.core.
Provides an activatable behavior that adds allow_llm_summary and llm_summary fields to any Dexterity content type, automatic summary generation via the summarizer agent on content save, and REST API endpoints for manual and batch generation.
Main features
ILLMSummary behavior with allow_llm_summary and llm_summary fields.
generate_summary_for(obj, request, properties=None) — single-call API that resolves the right agent for the object’s portal_type and runs it via the core executor.
Content-type-specific agents via naming convention summarizer:<PortalType> (falls back to summarizer).
generic_metadata enricher (GenericMetadataProvider) — contributes title, description, language, geographic coverage, and temporal coverage to the user prompt. Reads from in-progress properties if passed, so unsaved edits are reflected.
Event subscriber for automatic summary generation on save.
@llm-summary REST endpoint for single-object generation.
@llm-summary-batch REST endpoint for batch generation.
Default agent definitions shipped in agents.json — override via the control panel agents_json.
Install
Add eea.genai.summary to your requirements.txt.
Install the GenericSetup profile.
Activate the eea.genai.summary behavior on the desired content types (Site Setup → Dexterity Content Types → Type → Behaviors).
Customization
Override the default summarizer agent for a content type by registering a more specific agent in either ZCML or the control panel agents_json:
<genai:agent
name="summarizer:EEAFigure"
class=".agents.FigureSummarizerAgent"
/>
To inject extra prompt fragments (e.g. dataset-specific instructions), write an IEnricher in your own package and reference it from the agent’s enrichers list — no need to subclass anything in eea.genai.summary.
Copyright and license
The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.
All contributions to this package are property of their respective authors, and are covered by the same license.
The eea.genai.summary is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
Changelog
1.0 - (2026-05-21)
Initial release [avoinea refs #000000]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file eea_genai_summary-1.0.tar.gz.
File metadata
- Download URL: eea_genai_summary-1.0.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76917056fed0fa999b396676100d10d017a52e656bedfee053b7ef25640a4633
|
|
| MD5 |
e26a5008212aa05274a825d776f19270
|
|
| BLAKE2b-256 |
57531c2ffdb453b304b5a2c499394f0d07dfe7b7a3bda8b343490c8fb812baa0
|