Skip to main content

A new package is designed to simplify user interactions by accepting free-text prompts and providing structured, reliable responses. It leverages an underlying pattern-matching system to interpret use

Project description

Text Parser Utils

PyPI version License: MIT Downloads LinkedIn

A Python package designed to simplify user interactions by accepting free-text prompts and providing structured, reliable responses. It leverages an underlying pattern-matching system to interpret user inputs and generate consistent outputs, enabling seamless information extraction or task execution without complex processing of media types.

Installation

pip install text_parser_utils

Usage

Basic Usage

from text_parser_utils import text_parser_utils

response = text_parser_utils(user_input="Your input text here")
print(response)

Advanced Usage with Custom LLM

You can use any LLM compatible with LangChain by passing your own LLM instance.

Using OpenAI

from langchain_openai import ChatOpenAI
from text_parser_utils import text_parser_utils

llm = ChatOpenAI()
response = text_parser_utils(user_input="Your input text here", llm=llm)
print(response)

Using Anthropic

from langchain_anthropic import ChatAnthropic
from text_parser_utils import text_parser_utils

llm = ChatAnthropic()
response = text_parser_utils(user_input="Your input text here", llm=llm)
print(response)

Using Google

from langchain_google_genai import ChatGoogleGenerativeAI
from text_parser_utils import text_parser_utils

llm = ChatGoogleGenerativeAI()
response = text_parser_utils(user_input="Your input text here", llm=llm)
print(response)

Using LLM7 API Key

By default, the package uses the ChatLLM7 from langchain_llm7. If you want to use your own API key, you can pass it directly or via an environment variable.

Passing API Key Directly

from text_parser_utils import text_parser_utils

response = text_parser_utils(user_input="Your input text here", api_key="your_api_key")
print(response)

Using Environment Variable

export LLM7_API_KEY="your_api_key"
from text_parser_utils import text_parser_utils

response = text_parser_utils(user_input="Your input text here")
print(response)

Parameters

  • user_input (str): The user input text to process.
  • llm (Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the default ChatLLM7 will be used.
  • api_key (Optional[str]): The API key for LLM7. If not provided, the environment variable LLM7_API_KEY will be used.

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits, you can obtain a free API key by registering at LLM7.

Issues

If you encounter any issues, please report them on the GitHub issues page.

Author

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

text_parser_utils-2025.12.21085136.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

text_parser_utils-2025.12.21085136-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file text_parser_utils-2025.12.21085136.tar.gz.

File metadata

File hashes

Hashes for text_parser_utils-2025.12.21085136.tar.gz
Algorithm Hash digest
SHA256 df584f51f8d7206997a65fabf3e40d0f0baecf29806295b5734f89a2047faf83
MD5 79b8acdc913f966a84e151964252fb68
BLAKE2b-256 289a69d6338294e3821983a20c3dce852d972c6453498039c3ac59f97ff4b7fb

See more details on using hashes here.

File details

Details for the file text_parser_utils-2025.12.21085136-py3-none-any.whl.

File metadata

File hashes

Hashes for text_parser_utils-2025.12.21085136-py3-none-any.whl
Algorithm Hash digest
SHA256 66f1c155a6921c75d10f61b931fdfe8af90b053956febbc6c2c7e55671430422
MD5 4c712b5281bc2dcd723acdb3cd6dc25c
BLAKE2b-256 d71e0fa3a9417e915f1290cfe46ac71acaec4e12cc3102cebf0fdaa4ef28ec14

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