fin-summary analyzes financial transaction problems, extracting issue details and creating structured summaries with recommended actions.
Project description
fin-summary
fin-summary is a lightweight Python package that extracts structured, actionable information from user‑provided text describing financial transaction issues (e.g., processing fees, settlement delays). It uses pattern matching combined with a language model to identify key details such as issue type, amount, timeline, and recommended steps, returning a concise summary that can be directly acted upon.
Features
- Simple one‑function API (
fin_summary) - Works out‑of‑the‑box with the default ChatLLM7 model from
langchain_llm7 - Plug‑in friendly – you can provide any LangChain‑compatible LLM (OpenAI, Anthropic, Google, etc.)
- Returns a list of extracted strings that match the supplied regex pattern
Installation
pip install fin_summary
Quick Start
from fin_summary import fin_summary
# Example user description of a problem
user_input = """
I was charged an extra $15 processing fee on my $200
transfer that should have settled yesterday, but it still shows
as pending. What should I do?
"""
# Use the default ChatLLM7 model (requires an API key)
summary = fin_summary(user_input)
print(summary)
# -> ['Issue type: processing fee', 'Amount: $15', 'Original amount: $200', ...]
Parameters
| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The free‑form text describing the financial issue. |
llm |
Optional[BaseChatModel] |
A LangChain LLM instance. If omitted, the package creates a ChatLLM7 instance using the provided api_key or the LLM7_API_KEY environment variable. |
api_key |
Optional[str] |
API key for LLM7. If not supplied, the package reads LLM7_API_KEY from the environment. |
Using a Custom LLM
You can pass any LangChain LLM that implements BaseChatModel. Below are examples with popular providers.
OpenAI
from langchain_openai import ChatOpenAI
from fin_summary import fin_summary
llm = ChatOpenAI()
response = fin_summary(user_input, llm=llm)
Anthropic
from langchain_anthropic import ChatAnthropic
from fin_summary import fin_summary
llm = ChatAnthropic()
response = fin_summary(user_input, llm=llm)
Google Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from fin_summary import fin_summary
llm = ChatGoogleGenerativeAI()
response = fin_summary(user_input, llm=llm)
API Key & Rate Limits
- Default LLM:
ChatLLM7(fromlangchain_llm7)
Documentation: https://pypi.org/project/langchain-llm7/ - Free‑tier rate limits are sufficient for typical usage of this package.
- To increase limits, provide your own API key:
export LLM7_API_KEY="your_api_key"
or directly in code:
response = fin_summary(user_input, api_key="your_api_key")
You can obtain a free API key by registering at https://token.llm7.io/.
Contributing & Issues
If you encounter any problems or have feature requests, please open an issue on GitHub:
https://github.com/chigwell/fin-summary/issues
Author
Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell
Happy summarizing! 🚀
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 fin_summary-2025.12.21235235.tar.gz.
File metadata
- Download URL: fin_summary-2025.12.21235235.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b4929ea3b55c2465ae4ddd952d03441b63a3d381be575b299cd35445852365d
|
|
| MD5 |
87ae7c9c9c00b97cb4b522e7ec2e20c5
|
|
| BLAKE2b-256 |
ff7c9d3a8e79e9f17929c4df6f0fa26fe86c9b79181d7105349345f406877e1e
|
File details
Details for the file fin_summary-2025.12.21235235-py3-none-any.whl.
File metadata
- Download URL: fin_summary-2025.12.21235235-py3-none-any.whl
- Upload date:
- Size: 6.3 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 |
66d7e8d3e97ac1852c130782ddf090209fd37bc16837352a371b5689bc3f52f6
|
|
| MD5 |
d36606f745ee5b951aa396c6683328d7
|
|
| BLAKE2b-256 |
7ce8985a4e4c026da0265b7f359adeb704573ce7180281e01fe3f5d4ac4b81a5
|