Python SDK for the AI Gateway assistant API — chat, streaming, knowledge base, image generation, artifacts, and session management.
Project description
Hejaz AI Assistant SDK
Python SDK for the Hejaz AI Gateway — chat, streaming, knowledge base, image generation, and more.
Install
pip install hejaz-ai-sdk
Quick Start
from ai_assistant import AssistantClient
async with AssistantClient(api_key="your-key", base_url="https://api.hejaz.com") as client:
# Simple chat
response = await client.chat.send("What is Zakat?")
print(response.content)
# Streaming
async for event in client.chat.stream("Explain fasting in Islam"):
if event.event_type == "text_delta":
print(event.data, end="", flush=True)
# Knowledge base search + chat
response = await client.knowledge.ask(
"Compare the four madhabs on marriage rules",
dataset_ids=["islamic-knowledge"]
)
# Image generation
result = await client.images.generate("a beautiful mosque at sunset")
Features
- Streaming SSE —
async for event in client.chat.stream()with 73 typed event types - Knowledge Base — RAG-powered Q&A over your datasets
- Sub-Agents — Parallel explore/task/plan agents
- Image Generation — Gemini + DashScope with auto-routing
- Artifacts — File upload/download with S3 storage
- Sessions — Multi-turn conversation management
- Tools — 15+ built-in tools + MCP integration
Requirements
- Python 3.11+
httpx(auto-installed)
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
hejaz_ai_sdk-1.0.1.tar.gz
(23.3 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 hejaz_ai_sdk-1.0.1.tar.gz.
File metadata
- Download URL: hejaz_ai_sdk-1.0.1.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d75436c3e628653bebae8fe38c63881b2077ea3a0ff6a4da49a7ea1551a897ee
|
|
| MD5 |
61586e18d89b991d5b38a34ade916ff8
|
|
| BLAKE2b-256 |
6bd7f5acb190d85e9c4bef2aad31efbedb8f55c0a78fa7992ba0c62d3b32923f
|
File details
Details for the file hejaz_ai_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: hejaz_ai_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c167e120d35c58786337f5e332dc5690fcb627babd13ff9369b6c806d158ebc2
|
|
| MD5 |
d50d72d2e06f9ff9010094ed254c843f
|
|
| BLAKE2b-256 |
8a7b7829654c7e9503ca444209bc152d34601da5b21261e6a115044915e1f0e2
|