llmatch-validate
A Python package for processing and validating user inputs using advanced language models, ensuring structured and consistent responses. Built on top of llmatch-messages, this package extracts and validates key information from text inputs, making it ideal for applications requiring structured data extraction, format validation, or response consistency.
📦 Installation
Install the package via pip:
pip install llmatch-validate
🚀 Features
- Structured Data Extraction: Extracts key information from unstructured text inputs.
- Regex Validation: Ensures extracted data matches predefined patterns.
- Flexible LLM Integration: Works with default
ChatLLM7or any LangChain-compatible LLM. - Error Handling & Diagnostics: Provides clear error messages for failed validations.
- Retry Mechanism: Built-in retry logic for robustness.
🔧 Usage
Basic Usage (Default LLM: ChatLLM7)
from llmatch_validate import llmatch_validate
response = llmatch_validate(
user_input="Your input text here..."
)
print(response) # Returns validated/extracted data as a list
Custom LLM Integration
You can replace the default ChatLLM7 with any LangChain-compatible LLM (e.g., OpenAI, Anthropic, Google Generative AI).
Example: Using OpenAI
from langchain_openai import ChatOpenAI
from llmatch_validate import llmatch_validate
llm = ChatOpenAI()
response = llmatch_validate(
user_input="Your input text here...",
llm=llm
)
print(response)
Example: Using Anthropic
from langchain_anthropic import ChatAnthropic
from llmatch_validate import llmatch_validate
llm = ChatAnthropic()
response = llmatch_validate(
user_input="Your input text here...",
llm=llm
)
print(response)
Example: Using Google Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from llmatch_validate import llmatch_validate
llm = ChatGoogleGenerativeAI()
response = llmatch_validate(
user_input="Your input text here...",
llm=llm
)
print(response)
🔑 API Key Configuration
- Default: Uses
LLM7_API_KEYfrom environment variables. - Manual Override: Pass the API key directly:
response = llmatch_validate( user_input="Your input text here...", api_key="your_llm7_api_key" )
- Get a Free API Key: Register at LLM7 Token.
📌 Parameters
| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The input text to process and validate. |
api_key |
Optional[str] |
LLM7 API key (optional if LLM7_API_KEY is set). |
llm |
Optional[BaseChatModel] |
Custom LangChain LLM (optional; defaults to ChatLLM7). |
📝 Default LLM: ChatLLM7
By default, this package uses ChatLLM7 from langchain_llm7. The free tier rate limits are sufficient for most use cases. For higher limits, provide your own API key.
🔄 Rate Limits
- LLM7 Free Tier: Sufficient for most use cases.
- Custom API Key: Required for higher rate limits (pass via
api_keyorLLM7_API_KEY).
📂 License
This project is licensed under the MIT License.
📧 Support & Issues
For support or bug reports, open an issue on GitHub.
👤 Author
Eugene Evstafev (LinkedIn) | GitHub
Email: hi@euegne.plus
📚 Related Packages
llmatch-messages(Dependency)langchain_llm7(Default LLM)
Metadata
Release files for llmatch-validate 2025.12.20175458
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llmatch_validate-2025.12.20175458.tar.gz | 5.6 kB | Without provenance | Details for llmatch_validate-2025.12.20175458.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llmatch_validate-2025.12.20175458-py3-none-any.whl | Python 3 | none | any | Details for llmatch_validate-2025.12.20175458-py3-none-any.whl |
Total release size: 11.9 kB
Release files / llmatch_validate-2025.12.20175458.tar.gz
| Download URL | llmatch_validate-2025.12.20175458.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0db478591c8e95980dea50c919286e876d49f96e972521922f47bc11bb7eefa5
|
|
BLAKE2b-256 checksum How to use checksums |
b9055ca679270e0320f68a4712964c03f52d0e2683244d8080a552b3470f110c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / llmatch_validate-2025.12.20175458-py3-none-any.whl
| Download URL | llmatch_validate-2025.12.20175458-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65219da4d5f53048fa9750d8e758a449827d6c68ed8297eff38d9f231344770a
|
|
BLAKE2b-256 checksum How to use checksums |
f2b205039bde93baf2d629b7a8784ad42ff3d2e37a6a533742b79997043a88a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for llmatch-validate 2025.12.20175458
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.