A library for building LLM pipelines with built-in support for batch processing and multi-provider compatibility. Beta prerelease - use at your own risk.
Project description
ParaLLeM
Agents + Batch API.
- Batch API support (50% discount!)
- Expressive. Agents are simple Python functions.
- Concise, lightweight.
- Durable by default.
- Built for >1 million parallel requests.
Quickstart
pip install parallem
import parallem as pllm
# Place OPENAI_API_KEY in .env file
with pllm.resume_directory(
".pllm/simplest",
provider="openai",
strategy="sync",
dashboard=True,
load_dotenv=True,
) as orch:
with orch.agent() as agt:
resp = agt.ask_llm("Please name a power of 3.")
print(resp.final_answer)
To switch to the Batch API, simply change strategy="sync" to strategy="batch".
Responses are saved and cached. On the subsequent runs, answers are instant.
Compatibility
| Sync/Batch | OpenAI | Anthropic | |
|---|---|---|---|
| Simple | ✅ | ✅ | ✅ |
| Structured Output | ✅ | ✅ | ✅ |
| Function Calls | ✅ | ✅ | ✅ |
| Web Search | ✅ | ✅ | ✅ |
| Image Input | ✅ | ✅ | ✅ |
| MCP | ✅ | ✅ | - |
Examples
- Agents are python functions
- Structured output
- Tool calls
- Web search
- Image input
- Local MCP
- Server MCP
- 1 million requests
- Ollama
Documentation
Please refer to the documentation.
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
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 parallem-0.0.3.tar.gz.
File metadata
- Download URL: parallem-0.0.3.tar.gz
- Upload date:
- Size: 124.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59bee0feb5a2f71a8e4273efa647f5f4ee4874d2680633e6dddcc7add26922d0
|
|
| MD5 |
540766b398bc5c2980087d0d2b4186cb
|
|
| BLAKE2b-256 |
ea2e500014a3c4743dc920c6c02cccc975fdb0cda51806b4987611c26790769c
|
File details
Details for the file parallem-0.0.3-py3-none-any.whl.
File metadata
- Download URL: parallem-0.0.3-py3-none-any.whl
- Upload date:
- Size: 157.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a441d4d16cc0d2c5f29ca02acd2364183a798d5e2ff67e07f251f3c2e463e0
|
|
| MD5 |
da220407772c2e10c7dea58793e123cc
|
|
| BLAKE2b-256 |
aac084d16ff3d03757f34d43e5b29da75db9985ff689c4a053a1dd010ed44a52
|