A new package that processes news headlines or short text inputs to generate structured summaries of events, such as service disruptions or incidents. It uses an LLM to extract key details like the co
Project description
LLM Event Digest
LLM Event Digest is a Python package designed to process news headlines or short text inputs and generate structured summaries of events, such as service disruptions or incidents. Utilizing a language model, it extracts key details like the involved company, the nature of the disruption, and the cause, ensuring outputs conform to a predefined format for consistency and reliability. This tool is ideal for automated news monitoring, alert systems, or data aggregation where structured, error-free information extraction from text is required.
Installation
Install the package via pip:
pip install llm_event_digest
Usage
Here's an example of how to use the package in Python:
from llm_event_digest import llm_event_digest
response = llm_event_digest(
user_input="The internet service in downtown was down for 3 hours caused by a fiber cut.",
api_key="your-llm7-api-key" # Optional, if not set in environment variables
)
print(response)
Parameters
user_input(str): The text input (news headline or short description) to process.llm(Optional[BaseChatModel]): An optional LangChain language model instance. If not provided, the defaultChatLLM7is used.api_key(Optional[str]): API key for LLM7. If not provided, it looks for theLLM7_API_KEYenvironment variable.
Supported LLMs
The package uses ChatLLM7 from langchain_llm7 by default.
You can also pass your own LLM instance, such as:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI()
response = llm_event_digest(
user_input="Network outage in the city center.",
llm=llm
)
Or:
from langchain_anthropic import ChatAnthropic
llm = ChatAnthropic()
response = llm_event_digest(
user_input="Server downtime due to maintenance.",
llm=llm
)
And:
from langchain_google_genai import ChatGoogleGenerativeAI
llm = ChatGoogleGenerativeAI()
response = llm_event_digest(
user_input="Scheduled power outage.",
llm=llm
)
Rate Limits
Default rate limits for LLM7 free tier are suitable for most use cases. For higher usage, obtain an API key from https://token.llm7.io/ and pass it via environment variable LLM7_API_KEY or directly in the function call.
Support and Issues
If you encounter any issues or have questions, please open an issue on the GitHub repository: https://github.com/chigwell/llm-event-digest/issues
Author
Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_event_digest-2025.12.21181028.tar.gz.
File metadata
- Download URL: llm_event_digest-2025.12.21181028.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20af305db4186b76ddb2d4f1ab70b55a9e55a34a06793541b9ed62a7a18769fc
|
|
| MD5 |
a276cf6d8ec1687f430ae890948b6bad
|
|
| BLAKE2b-256 |
93ca2d680ce34d58e60d06c4ae58e41704eea7c3e61f895c66736e26288f13f7
|
File details
Details for the file llm_event_digest-2025.12.21181028-py3-none-any.whl.
File metadata
- Download URL: llm_event_digest-2025.12.21181028-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83d66d448be57f5a2e73cfec36eb89f956bc1043380c20fe168ef50dfcd892b0
|
|
| MD5 |
c1024034297e545090b720e07cca14ab
|
|
| BLAKE2b-256 |
7e567685b406c0475ffa526723f900bbc28c16a8d3214d433d0914b2dcd54e79
|