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.0.tar.gz
(17.5 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.0.tar.gz.
File metadata
- Download URL: hejaz_ai_sdk-1.0.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14e270e9e6321a94109cc05eab5373fd5f3820a42edc8c006224fed01fbb828
|
|
| MD5 |
b62ee08777b48e178334324569ecbe2d
|
|
| BLAKE2b-256 |
932a84fe4c6c85b55468afea66d2275a57f5176f3f61a5250831fa91eb3a0d6c
|
File details
Details for the file hejaz_ai_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hejaz_ai_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.8 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 |
3436bffeef030d8e93e9f5bbedaef2716a96131572c6a9ab9653bd27c8a45fc2
|
|
| MD5 |
a95fd827f44a228c38da80a1c6584c18
|
|
| BLAKE2b-256 |
34599e59df5369099667931691900afa52c496e6e5c71a76b8abfa91d56a5ea9
|