text2structured-summary generates structured summaries from unstructured text using an LLM.
Project description
text2structured_summary
Generate structured summaries from unstructured text using an LLM.
Installation
pip install text2structured_summary
Usage
from text2structured_summary import text2structured_summary
# Basic usage with default LLM7
response = text2structured_summary(
user_input="Your unstructured text here..."
)
# With custom LLM (e.g., OpenAI)
from langchain_openai import ChatOpenAI
from text2structured_summary import text2structured_summary
llm = ChatOpenAI()
response = text2structured_summary(
user_input="Your unstructured text...",
llm=llm
)
# With custom API key (LLM7)
response = text2structured_summary(
user_input="Your unstructured text...",
api_key="your_llm7_api_key"
)
Parameters
user_input(str): The unstructured text to be summarizedapi_key(Optional[str]): LLM7 API key (defaults to environment variableLLM7_API_KEY)llm(Optional[BaseChatModel]): Custom LangChain LLM instance (defaults to ChatLLM7)
Features
- Uses LLM7 by default (free tier sufficient for most use cases)
- Supports custom LLMs via LangChain interface
- Returns structured summaries matching predefined pattern
- Automatic API key fallback from environment variables
Getting Started
- Install the package
- Call
text2structured_summary()with your text - Get structured output matching the package's pattern
Notes
- For LLM7, register at https://token.llm7.io/ for your API key
- The default pattern ensures structured output format
- Custom LLMs must implement LangChain's BaseChatModel interface
Issues
Report issues at: https://github.com/chigwell/text2structured-summary/issues
Author
Eugene Evstafev (hi@euegne.plus)
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 text2structured_summary-2025.12.21183445.tar.gz.
File metadata
- Download URL: text2structured_summary-2025.12.21183445.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc51b233b563868ffde2580ab711ff436e45fa98b9fee9af0728792396c2669b
|
|
| MD5 |
7d9128c46f5429146a8be0279fc02024
|
|
| BLAKE2b-256 |
e6093bc4cfad9d5cd6eeb94d5ca100c937b9193fbf657382015220d9ec2c0e49
|
File details
Details for the file text2structured_summary-2025.12.21183445-py3-none-any.whl.
File metadata
- Download URL: text2structured_summary-2025.12.21183445-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.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03ed933fa49b25de54d5477335df35fea4fa4af7e04dee6ad7f585f48e7918c4
|
|
| MD5 |
4699c3ed3b42e964d84fd8fa9146d2cc
|
|
| BLAKE2b-256 |
858e7ddc98e918440b3f6c057da41fe1055984589822549a7ffd993a04056c98
|