Seamslesly connect your apps with Alquimia Runtime API
Project description
🧪 Alquimia Python Client
AlquimiaClient is an asynchronous HTTP client for interacting with the Alquimia Runtime API, providing convenient methods for inferences, streaming responses, and uploading/downloading binary data (blobs), and extending tool capabilities on client side.
It uses httpx for async HTTP operations and SSE (Server-Sent Events) for event streaming.
🚀 Installation
# Create virtual environment and install dependencies
make venv
# Build the package
make build
# Format code with ruff
make format
🧠 Quick Start
import asyncio
from alquimia_client import AlquimiaClient
API_URL = "https://api.alquimia.ai"
API_KEY = "your_api_key_here"
async def main():
async with AlquimiaClient(base_url=API_URL, api_key=API_KEY) as client:
# Run an inference
result = await client.infer(
assistant_id="assistant-123",
session_id="session-xyz",
query="Summarize this text",
)
print(result)
# Stream live responses
async for event in client.stream(stream_id="stream-123"):
print("Received:", event)
asyncio.run(main())
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 alquimia_client-0.1.0.tar.gz.
File metadata
- Download URL: alquimia_client-0.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1b0af67bbdcc62af2bcc0f445f0513d8ed1b3bd0d9325b79b28362ae70fdddf
|
|
| MD5 |
e0c9fb2bc898db3351f7431a129fb275
|
|
| BLAKE2b-256 |
da4b8c0c708b3bb84efead4261baaef80be62dfce178ac4fe444d06f8d34e1e3
|
File details
Details for the file alquimia_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: alquimia_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02e9a2aa7dd90b5286e4f48672a1f099a5971c610f67940e274bdd90d8aa6eeb
|
|
| MD5 |
74df5b01a68ec2370a2418fab1a91cde
|
|
| BLAKE2b-256 |
2f7fb836e2a41b9b8743596bcd0fb43a5d9e748ac7f0c224ee054a1f1e70a7df
|