Skip to main content

A new package would use llmatch-messages to process text snippets about infrastructure or technical incidents and return a structured summary. It would take a user's text input, pass it to an LLM with

Project description

Incident Summary Parser Package

PyPI version License: MIT Downloads LinkedIn

This Python package provides a simple and reliable way to analyze and extract structured incident summaries from unstructured text reports or news snippets. It leverages large language models (LLMs) to interpret incident descriptions and outputs standardized information, making it easy to integrate incident analysis into your workflow or applications.

Installation

Install the package via pip:

pip install incident_summary_parser

Usage

Import and utilize the incident_summary_parser function as follows:

from incident_summary_parser import incident_summary_parser

response = incident_summary_parser(
    user_input="Your incident report text here",
    api_key="your_llm7_api_key",  # optional if set via environment variable
    llm=None  # optional, can pass your own LLM instance
)
print(response)

Parameters

  • user_input (str): The incident report or news snippet you want to analyze.

  • llm (Optional[BaseChatModel]): An optional language model instance conforming to langchain's interface. If not provided, the function defaults to using ChatLLM7.

  • api_key (Optional[str]): Your API key for the LLM7 service. Can also be set via the environment variable LLM7_API_KEY.

Supporting Custom LLMs

You can pass your own LLM implementations, such as OpenAI, Anthropic, or Google's Generative AI, to the function for flexibility, for example:

from langchain_openai import ChatOpenAI
from incident_summary_parser import incident_summary_parser

llm = ChatOpenAI()
response = incident_summary_parser(
    user_input="Sample incident report",
    llm=llm
)

Or with other providers:

from langchain_anthropic import ChatAnthropic
from incident_summary_parser import incident_summary_parser

llm = ChatAnthropic()
response = incident_summary_parser(
    user_input="Sample incident report",
    llm=llm
)

Notes

  • The package uses ChatLLM7 from langchain_llm7 (see PyPI) by default.
  • Default rate limits are suitable for most use cases, but you can increase limits by obtaining your own API key.
  • You can register for a free API key at https://token.llm7.io/.

Contributing

Please report issues or contribute improvements via the GitHub repository: https://github.....

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

incident_summary_parser-2025.12.21135341.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file incident_summary_parser-2025.12.21135341.tar.gz.

File metadata

File hashes

Hashes for incident_summary_parser-2025.12.21135341.tar.gz
Algorithm Hash digest
SHA256 4d3f64ef57c3551c3722d6b21fc47d279ae6c881606f105fa7b46d48dbacbf61
MD5 713047aa841824bd7f3bcd049646ac98
BLAKE2b-256 2c210d6eb94f078f32f217a2e851ddc666fd3581cdf294e9fffede1a6390cb56

See more details on using hashes here.

File details

Details for the file incident_summary_parser-2025.12.21135341-py3-none-any.whl.

File metadata

File hashes

Hashes for incident_summary_parser-2025.12.21135341-py3-none-any.whl
Algorithm Hash digest
SHA256 3078781bc135e2c8be712a1cd0030f5e1cfc6a316d6d5b3f8addd60f566a26b6
MD5 9a68dfb5262c2bb91c0f5ead01de6477
BLAKE2b-256 840b9bbcff0ba1041078b50c534bf129de9b63dbf22f190702e7a3806bb7d041

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page