Summarix
Summarix is a Python package designed to process user-inputted text statements or stories and extract structured summaries or insights using a reliable language model with pattern matching and retries. It simplifies transforming plain text prompts into organized, actionable data by leveraging the capabilities of a pattern-aware conversation framework. This ensures consistent interpretation and mapping of user inputs into predefined data formats, avoiding ambiguities and enhancing automation in knowledge extraction or storytelling analysis.
Features
- Uses advanced language models from langchain (by default ChatLLM7)
- Pattern matching with regex for precise output extraction
- Supports custom language model integration
- Handles retries and error management seamlessly
- Simplifies conversion of complex text inputs into structured data
Installation
Install the package via pip:
pip install summarix
Usage
Import the main function and use it with your input text:
from summarix import summarix
response = summarix(user_input="Your text here")
Parameters
- user_input (str): The text statement or story to process.
- llm (Optional[BaseChatModel]): A custom langchain language model instance. Defaults to using ChatLLM7.
- api_key (Optional[str]): API key for the LLM7 service. If not provided, it will look for the environment variable
LLM7_API_KEYor use the default free tier.
Supporting Different Language Models
You can pass your own language model instance to utilize other providers supported by langchain, e.g., OpenAI, Anthropic, Google Generative AI.
Example using OpenAI:
from langchain_openai import ChatOpenAI
from summarix import summarix
llm = ChatOpenAI()
response = summarix(user_input="Analyze this story", llm=llm)
Example using Anthropic:
from langchain_anthropic import ChatAnthropic
from summarix import summarix
llm = ChatAnthropic()
response = summarix(user_input="Describe the scenario", llm=llm)
Example using Google Generative AI:
from langchain_google_genai import ChatGoogleGenerativeAI
from summarix import summarix
llm = ChatGoogleGenerativeAI()
response = summarix(user_input="Generate insights", llm=llm)
Rate Limits & API Keys
The default rate limits for LLM7's free tier are sufficient for most use cases. For higher limits, you can obtain a free API key at https://token.llm7.io/ and provide it via environment variable LLM7_API_KEY or directly in the function call:
response = summarix(user_input="Task", api_key="your_api_key")
Support
For issues or feature requests, please visit the GitHub repository:
https://github.com/chigwell/summarix/issues
Author
Eugene Evstafev
Email: hi@eugene.plus
GitHub: chigwell
Release files for summarix 2025.12.21123439
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| summarix-2025.12.21123439.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| summarix-2025.12.21123439-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / summarix-2025.12.21123439.tar.gz
| Download URL | summarix-2025.12.21123439.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1949ef6e330020382959a4dd5d84515ab9053321a9650ce4d66c8aeaa2ebb809
|
|
BLAKE2b-256 checksum How to use checksums |
21ce84484d5ee590d4db257d89bb1a272ecaeb7a3150f6028a242cc7a2d7bedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / summarix-2025.12.21123439-py3-none-any.whl
| Download URL | summarix-2025.12.21123439-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3addd6094c92e5773fbb8f03be4cd108be1dcaec5a415d7eac371e449daca3a6
|
|
BLAKE2b-256 checksum How to use checksums |
2f0796591a8e33d000d45be94bf500747c0230a02fecdf15266aa667ee14b5d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|