llmsays
One-line LLM calls with automatic prompt-tier routing and provider failover.
llmsays keeps usage simple:
from llmsays import llmsays
response = llmsays("Explain quantum tunneling in simple words")
print(response)
Why llmsays
- Single function API:
llmsays(prompt) - Smart routing with
sentence-transformers/paraphrase-MiniLM-L3-v2 - Tier selection:
small,medium,large,extra_large - Provider failover: Groq, NIM, OpenRouter, Fireworks, Baseten
- Latency-aware provider ordering
- Optional parallel provider querying for faster first-response
Installation
pip install llmsays
Required Environment Variables
Set at least one provider key (multiple keys recommended for failover):
GROQ_API_KEYOPENROUTER_API_KEYNVIDIA_API_KEYFIREWORKSAI_API_KEYBASETEN_API_KEY
Example:
export GROQ_API_KEY="your_key"
export OPENROUTER_API_KEY="your_key"
Quick Start
from llmsays import llmsays
user_prompt = input("Here goes your prompt: ")
print(llmsays(user_prompt))
Advanced Usage
Choose provider order:
from llmsays import llmsays
print(
llmsays(
"Analyze this legal clause",
provider_preference=["Groq", "Openrouter", "fireworks-ai"],
)
)
Enable parallel provider queries (returns first successful response):
from llmsays import llmsays
print(
llmsays(
"Design a production-ready architecture with tradeoffs",
use_multiprocessing=True,
)
)
CLI Usage
llmsays "Explain transformers in simple terms"
llmsays "Analyze this legal clause" --providers Groq Openrouter
llmsays "Summarize this API contract" --use-multiprocessing
How Routing Works
- Heuristic pre-filter estimates complexity quickly.
- Semantic routing refines tier selection.
- Selected tier maps to provider-specific model choices.
- If one provider fails, the next provider is attempted automatically.
Notes
- Requires Python
>=3.9 - Internet connection is required to call provider APIs
- Responses depend on the configured provider/model availability
License
MIT
Metadata
Release files for llmsays 0.1.3
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 |
|---|---|---|---|---|
| llmsays-0.1.3.tar.gz | 11.5 kB | Without provenance | Details for llmsays-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llmsays-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for llmsays-0.1.3-py3-none-any.whl |
Total release size: 19.9 kB
Release files / llmsays-0.1.3.tar.gz
| Download URL | llmsays-0.1.3.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc751c6c68f601684f0b274b8472e8a2d4f2ff0ff784fa09aed676b3b828359b
|
|
BLAKE2b-256 checksum How to use checksums |
13cf26e423d185238ed5fea2cfba51476da76096697bcd0bd39112142402b751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / llmsays-0.1.3-py3-none-any.whl
| Download URL | llmsays-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ac25cdec163e61d2ce0a116b411261eb34a9e97bcf388b1f5706a0b09a3f3ca
|
|
BLAKE2b-256 checksum How to use checksums |
6723dfca7e4d5297c5096843b9c62b79f16020ecd5c7d825e7c0bce005a1b36e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for llmsays 0.1.3
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.