MiniLLMLib
Installation
pip install minillmlib
# For HuggingFace/local models: (Beta - not well tested)
pip install minillmlib[huggingface]
A Python library for interacting with various LLM providers (OpenAI, Anthropic, Mistral, HuggingFace, through URL).
Author: Quentin Feuillade--Montixi
Installation
From Source
git clone https://github.com/qfeuilla/MiniLLMLib.git
cd MiniLLMLib
pip install -e . # Install in editable mode
Usage
import minillmlib as mll
# Create a GeneratorInfo for your model/provider
import os
gi = mll.GeneratorInfo(
model="gpt-4",
_format="openai",
api_key=os.getenv("OPENAI_API_KEY") # Recommended: use env var for secrets
)
# Create a chat node (conversation root)
chat = mll.ChatNode(content="Hello!", role="user")
# Synchronous completion
response = chat.complete_one(gi)
print(response.content)
# Or asynchronous version
# response = await chat.complete_one_async(gi)
Features
- Unified interface for major LLM providers:
- OpenAI, Anthropic, Mistral, HuggingFace (local), custom URL (e.g. OpenRouter)
- Thread (linear) and loom (tree/branching) conversation modes
- Synchronous & asynchronous API
- Multimodal support:
- Audio input (WAV/MP3) compatible with OpenRouter
- Image input (URLs, local paths, base64)
- Audio output (OpenAI audio models, beta)
- Flexible parameter/config management via
GeneratorInfoandGeneratorCompletionParameters - Save/load conversation trees
- Extensible: add new models/providers easily
Documentation
- See the Usage Guide for advanced usage, parameter tables, and branching/loom semantics.
- See the Provider Matrix for supported models and configuration tips.
- See Troubleshooting for common issues and debugging.
Configuration
- Set API keys as environment variables for security (see the Configuration Guide).
Development & Contribution
- Run tests with:
pytest tests/ - See Contributing for contribution guidelines.
For more, see the full documentation at minillmlib.readthedocs.io or open an issue on GitHub if you need help.
Release Tagging Reminder
(for maintainers use)
To push a new release tag:
git add <files you changed>
git commit -m "<your message>"
git tag v<NEW_VERSION> -m "Release v<NEW_VERSION>: <short description>"
git push origin main --tags
Metadata
Release files for minillmlib 0.4.4
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 | |
|---|---|---|---|---|
| minillmlib-0.4.4.tar.gz | 101.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minillmlib-0.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.8 kB
Release files / minillmlib-0.4.4.tar.gz
| Download URL | minillmlib-0.4.4.tar.gz |
|---|---|
| Size | 101.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d90391398f21868bbc2992ed134d37103685d4eaa7fe71e3332bef712bfe4aca
|
|
BLAKE2b-256 checksum How to use checksums |
377a3cf8f2ba13ff4bb39a5bc89c0d4a62a3d61f37c8a2be22834fe7b36b1348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / minillmlib-0.4.4-py3-none-any.whl
| Download URL | minillmlib-0.4.4-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de0bec10d7c596b96db4e6d04ac1ad655110a1f9d68c43c49dedccf29432667a
|
|
BLAKE2b-256 checksum How to use checksums |
8ddf71cf9fe600096c9f6dbcf85e51c25dfc31a68f3947cafecd9065f72e81f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for minillmlib 0.4.4
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.