Skip to main content

decentralized-summarizer

PyPI version License: MIT Downloads LinkedIn

decentralized-summarizer is a Python package that turns user input about decentralized protocols (e.g., Polyproto) into clear, structured summaries. It extracts key features and benefits while avoiding technical jargon, making the output accessible to non‑expert audiences. The package leverages pattern matching to guarantee that the generated summaries follow a predefined format.

Features

  • Simple API – One function call to generate a summary.
  • LLM‑agnostic – Uses ChatLLM7 by default; you can plug any LangChain‑compatible LLM.
  • Formatted output – Enforces a regex pattern, ensuring consistent structure.
  • No jargon – Tailored prompts keep language clear and approachable.

Installation

pip install decentralized_summarizer

Quick Start

from decentralized_summarizer import decentralized_summarizer

# Simple usage with the default ChatLLM7
summary = decentralized_summarizer(
    user_input="Explain the main advantages of Polyproto in a decentralized network."
)

print(summary)  # => List of formatted summary strings

Function Signature

def decentralized_summarizer(
    user_input: str,
    api_key: Optional[str] = None,
    llm: Optional[BaseChatModel] = None,
) -> List[str]:
Parameter Type Description
user_input str The raw text you want to summarise.
api_key Optional[str] API key for ChatLLM7. If omitted, the function reads LLM7_API_KEY from the environment or uses a placeholder "None" (which works for the free tier).
llm Optional[BaseChatModel] A LangChain LLM instance. If not provided, ChatLLM7 from langchain_llm7 is used.

Using a Custom LLM

You can pass any LangChain‑compatible chat model (OpenAI, Anthropic, Google, etc.):

OpenAI

from langchain_openai import ChatOpenAI
from decentralized_summarizer import decentralized_summarizer

my_llm = ChatOpenAI(model="gpt-4o-mini")
summary = decentralized_summarizer(
    user_input="What are the security benefits of a decentralized exchange?",
    llm=my_llm,
)

Anthropic

from langchain_anthropic import ChatAnthropic
from decentralized_summarizer import decentralized_summarizer

my_llm = ChatAnthropic(model="claude-3-opus-20240229")
summary = decentralized_summarizer(
    user_input="Describe how decentralised governance works.",
    llm=my_llm,
)

Google Gemini

from langchain_google_genai import ChatGoogleGenerativeAI
from decentralized_summarizer import decentralized_summarizer

my_llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
summary = decentralized_summarizer(
    user_input="Summarise the key points of the Polkadot parachain model.",
    llm=my_llm,
)

API Key & Rate Limits

  • The package defaults to ChatLLM7 from the langchain_llm7 package.
  • The free tier of ChatLLM7 provides sufficient rate limits for typical usage.
  • For higher limits, supply your own API key:
    • Environment variable: export LLM7_API_KEY="your_key"
    • Direct argument: api_key="your_key"

Obtain a free API key by registering at: https://token.llm7.io/

Contributing & Support

Author

Eugene Evstafev
Email: hi@eugene.plus
GitHub: chigwell


The package uses ChatLLM7 from langchain_llm7 by default. Feel free to replace it with any other LangChain chat model that matches the BaseChatModel interface.

Metadata

Release files for decentralized-summarizer 2025.12.21120929

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for decentralized-summarizer 2025.12.21120929
File Size Uploaded
decentralized_summarizer-2025.12.21120929.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for decentralized-summarizer 2025.12.21120929
File Interpreter ABI Platform
decentralized_summarizer-2025.12.21120929-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / decentralized_summarizer-2025.12.21120929.tar.gz

Download URL decentralized_summarizer-2025.12.21120929.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b2fbbc62a9a95747319f83296d927aa0f373e53beb26423c298814ea0901216
BLAKE2b-256 checksum
How to use checksums
a28b2579d0f38f1ad58c0e18cd2f6a06af9debfbd2f7fa7c7d29d1f5c64a27e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release files / decentralized_summarizer-2025.12.21120929-py3-none-any.whl

Download URL decentralized_summarizer-2025.12.21120929-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88f53b1807d39e25b16d40e9a76971071ce9c563f73f82c52e0f6fec4b64055d
BLAKE2b-256 checksum
How to use checksums
3488d76893636d219c61df00f24f56a246dac36de62cda1dbfed2ee5762e3081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

2025.12.21120929 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page