A unified interface for multiple LLM providers
Project description
multillm-core
A unified interface for multiple LLM providers (OpenAI, Anthropic, Gemini, Mistral).
Installation
pip install multillm-core
Install with specific providers:
pip install "multillm-core[openai]"
pip install "multillm-core[anthropic]"
pip install "multillm-core[gemini]"
pip install "multillm-core[mistral]"
pip install "multillm-core[all]"
Example Usage
Synchronous:
from multillm import create_client
client = create_client("openai", api_key="your-key")
response = client.generate(
model="gpt-4o",
prompt="Explain quantum entanglement in one sentence."
)
print(f"[{response.provider}] {response.text}")
Asynchronous:
import asyncio
from multillm import create_client
async def main():
client = create_client("openai", api_key="your-key")
response = await client.async_generate(
model="gpt-4o",
prompt="Explain quantum entanglement in one sentence."
)
print(f"[{response.provider}] {response.text}")
if __name__ == "__main__":
asyncio.run(main())
Supported Providers
- OpenAI
- Anthropic
- Google Gemini
- Mistral (Pixtral for images)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multillm_core-0.2.0.tar.gz
(103.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multillm_core-0.2.0.tar.gz.
File metadata
- Download URL: multillm_core-0.2.0.tar.gz
- Upload date:
- Size: 103.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
408148dcfb9b6fd21c1b5994b46ea704b057818e562600cdcdf972c2d7908b18
|
|
| MD5 |
2b4a0806a68da0682e37604871403dcc
|
|
| BLAKE2b-256 |
593a8fd1d37e4d4d7e609a9823173913caadcaeb358b1d536d4427c493c0291f
|
File details
Details for the file multillm_core-0.2.0-py3-none-any.whl.
File metadata
- Download URL: multillm_core-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fb9a73d5b819fe955d545254c5f41cc34e1ded4d3394a9b300651beab2b7c95
|
|
| MD5 |
4124f2a789ef07b6f4c027af14036250
|
|
| BLAKE2b-256 |
f6a80996f86001ee1b35f89ceface144e740780831d5aa9f2d3f9493083bda4f
|