Skip to main content

A new package would process text inputs describing unconventional or controversial business or social initiatives, such as the 2012 program where homeless individuals were employed as mobile Wi-Fi hot

Project description

idea‑distiller

PyPI version License: MIT Downloads LinkedIn

idea‑distiller is a tiny utility package that extracts a concise, neutral summary of the core problem addressed by unconventional or controversial business and social initiatives.
It leverages a language model (LLM) to focus on the “problem statement” of the input text while stripping away technical details, implementation specifics, and sensitive content.


Installation

pip install idea_distiller

Quick start

from idea_distiller import idea_distiller

# Raw description of an initiative
user_input = """
In 2012 a program hired homeless people to become mobile Wi‑Fi hotspots,
providing free internet in public places while giving them a source of
income.
"""

# Get the distilled summary
summary = idea_distiller(user_input)

print(summary)
# → ['Problem: Lack of free public internet access and unemployment among homeless individuals.']

Function signature

def idea_distiller(
    user_input: str,
    llm: Optional[BaseChatModel] = None,
    api_key: Optional[str] = None,
) -> List[str]:
Parameter Type Description
user_input str The raw text describing the initiative you want to distill.
llm Optional[BaseChatModel] A LangChain LLM instance. If omitted, the package creates a ChatLLM7 instance automatically.
api_key Optional[str] API key for the default ChatLLM7 service. If not supplied, the environment variable LLM7_API_KEY is used.

The function returns a list of strings that match the validation pattern defined in the package (normally a single concise sentence).


Using a custom LLM

You can plug any LangChain‑compatible chat model instead of the default ChatLLM7.

OpenAI

from langchain_openai import ChatOpenAI
from idea_distiller import idea_distiller

llm = ChatOpenAI(model="gpt-4o-mini")
response = idea_distiller(user_input, llm=llm)
print(response)

Anthropic

from langchain_anthropic import ChatAnthropic
from idea_distiller import idea_distiller

llm = ChatAnthropic(model="claude-3-haiku-20240307")
response = idea_distiller(user_input, llm=llm)
print(response)

Google Gemini

from langchain_google_genai import ChatGoogleGenerativeAI
from idea_distiller import idea_distiller

llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
response = idea_distiller(user_input, llm=llm)
print(response)

API key & rate limits (default LLM7)

  • The free tier of LLM7 provides enough quota for most development and low‑volume use cases.
  • To obtain a free API key, register at: https://token.llm7.io/.
  • You can supply the key directly:
response = idea_distiller(user_input, api_key="YOUR_LLM7_API_KEY")
  • Or set the environment variable beforehand:
export LLM7_API_KEY="YOUR_LLM7_API_KEY"

If higher rate limits are required, upgrade your LLM7 plan on the provider’s website.


Contributing & Support


Author

Eugene Evstafev
📧 Email: hi@euegne.plus
🐙 GitHub: chigwell


License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idea_distiller-2025.12.21102518.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idea_distiller-2025.12.21102518-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file idea_distiller-2025.12.21102518.tar.gz.

File metadata

File hashes

Hashes for idea_distiller-2025.12.21102518.tar.gz
Algorithm Hash digest
SHA256 2a69964819487a0af6920010a6431d4c2fe0b32c1605cac7011cd26c2024e4ea
MD5 26e4b9c78deff60579277441530904c1
BLAKE2b-256 3677555d29c0e4f40f6812d4269529026056a460e2989c434aff5927148ffb31

See more details on using hashes here.

File details

Details for the file idea_distiller-2025.12.21102518-py3-none-any.whl.

File metadata

File hashes

Hashes for idea_distiller-2025.12.21102518-py3-none-any.whl
Algorithm Hash digest
SHA256 3adfb1e80af48ce168d29a6db9503841e7a7eb064230dd72c7f4fb435290a892
MD5 f0092267bbd1230b85688e8f94494597
BLAKE2b-256 a2f51ae919a9f4b7b06759e17364ad86aba1ccc58b8d83a4764a3bb0262690f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page