semvec/pypi-packages huggingface dataset:
text2structured-summary 2025.12.21183445
text2structured-summary generates structured summaries from unstructured text using an LLM.
License: MIT
Requires Python: >=3.9

# text2structured_summary
[![PyPI version](https://badge.fury.io/py/text2structured-summary.svg)](https://badge.fury.io/py/text2structured-summary)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/badge/text2structured-summary)](https://pepy.tech/project/text2structured-summary)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-blue)](https://www.linkedin.com/in/eugene-evstafev-716669181/)


Generate structured summaries from unstructured text using an LLM.

## Installation

```bash
pip install text2structured_summary
```

## Usage

```python
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 summarized
- `api_key` (Optional[str]): LLM7 API key (defaults to environment variable `LLM7_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

1. Install the package
2. Call `text2structured_summary()` with your text
3. Get structured output matching the package's pattern

## Notes

- For LLM7, register at [https://token.llm7.io/](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](https://github.com/chigwell/text2structured-summary/issues)

## Author

Eugene Evstafev (hi@euegne.plus)
challengeturn 2025.12.21183136
A new package that analyzes user input text to determine if it expresses a challenge or a statement of inability, and returns a structured, encouraging response. It uses pattern matching to identify p
License: MIT
Requires Python: >=3.9

# Challeneturn
[![PyPI version](https://badge.fury.io/py/challengeturn.svg)](https://badge.fury.io/py/challengeturn)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/badge/challengeturn)](https://pepy.tech/project/challengeturn)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-blue)](https://www.linkedin.com/in/eugene-evstafev-716669181/)

===============

A package that generates encouraging and strategic responses to user input, identifying challenges and offering tips, reframing, or positive reinforcement.

## Installation
---------------

```bash
pip install challengeturn
```

## Usage
-----

```python
from challengeturn import challengeturn

response = challengeturn(user_input="I can't do this")
```

## Documentation
--------------

### Parameters

* `user_input`: the user's input text (str)
* `llm`: an instance of `BaseChatModel` (langchain.core.language_models.BaseChatModel), defaulting to `ChatLLM7` from langchain_llm7.
* `api_key`: the API key for LLM7, defaulting to the `LLM7_API_KEY` environment variable or "None" if not provided.

### Passing your own LLM

You can safely pass your own LLM instance if desired. For example, to use the OpenAI LLM:

```python
from langchain_openai import ChatOpenAI
from challengeturn import challengeturn

llm = ChatOpenAI()
response = challengeturn(user_input, llm=llm)
```

Or the Anthropic LLM:

```python
from langchain_anthropic import ChatAnthropic
from challengeturn import challengeturn

llm = ChatAnthropic()
response = challengeturn(user_input, llm=llm)
```

Or the Google Generative AI LLM:

```python
from langchain_google_genai import ChatGoogleGenerativeAI
from challengeturn import challengeturn

llm = ChatGoogleGenerativeAI()
response = challengeturn(user_input, llm=llm)
```

### LLM7 API Key

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you require higher rate limits, you can pass your own `api_key` via environment variable `LLM7_API_KEY` or via the `challengeturn` function:

```python
response = challengeturn(user_input, api_key="your_api_key")
```

You can get a free API key by registering at https://token.llm7.io/.

## GitHub
--------

[https://github.com/chigwell/challengeturn](https://github.com/chigwell/challengeturn)

## Author
------

Eugene Evstafev
hi@eugev.plus