Skip to main content

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 SSEasync 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hejaz_ai_sdk-1.0.1-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

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

Hashes for hejaz_ai_sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d75436c3e628653bebae8fe38c63881b2077ea3a0ff6a4da49a7ea1551a897ee
MD5 61586e18d89b991d5b38a34ade916ff8
BLAKE2b-256 6bd7f5acb190d85e9c4bef2aad31efbedb8f55c0a78fa7992ba0c62d3b32923f

See more details on using hashes here.

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

Hashes for hejaz_ai_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c167e120d35c58786337f5e332dc5690fcb627babd13ff9369b6c806d158ebc2
MD5 d50d72d2e06f9ff9010094ed254c843f
BLAKE2b-256 8a7b7829654c7e9503ca444209bc152d34601da5b21261e6a115044915e1f0e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page