A new 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
Project description
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
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 summarix-2025.12.21123439.tar.gz.
File metadata
- Download URL: summarix-2025.12.21123439.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1949ef6e330020382959a4dd5d84515ab9053321a9650ce4d66c8aeaa2ebb809
|
|
| MD5 |
68a13d50ab3b109210a7463deaa9d4b9
|
|
| BLAKE2b-256 |
21ce84484d5ee590d4db257d89bb1a272ecaeb7a3150f6028a242cc7a2d7bedb
|
File details
Details for the file summarix-2025.12.21123439-py3-none-any.whl.
File metadata
- Download URL: summarix-2025.12.21123439-py3-none-any.whl
- Upload date:
- Size: 4.7 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 |
3addd6094c92e5773fbb8f03be4cd108be1dcaec5a415d7eac371e449daca3a6
|
|
| MD5 |
7f750acef676a758d542a5cf35a034a7
|
|
| BLAKE2b-256 |
2f0796591a8e33d000d45be94bf500747c0230a02fecdf15266aa667ee14b5d9
|