Skip to main content

Python SDK for the Arabic API by RightNow — chat, embeddings, STT, TTS for Arabic

Project description

RightNow — Arabic AI SDK

Python SDK for the Arabic API by RightNow. Chat, embeddings, speech-to-text, and text-to-speech — all optimized for Arabic.

Install

pip install rightnow-ai

Quick Start

from rightnow import RightNow

client = RightNow(api_key="rn-...")

response = client.chat.completions.create(
    model="falcon-h1-arabic-7b",
    messages=[{"role": "user", "content": "ما هي عاصمة الأردن؟"}],
)
print(response.choices[0].message.content)

Streaming

stream = client.chat.completions.create(
    model="falcon-h1-arabic-7b",
    messages=[{"role": "user", "content": "مرحبا"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
stream.close()

Embeddings

response = client.embeddings.create(
    model="bge-m3-arabic",
    input="مرحبا بالعالم",
)
print(response.data[0].embedding[:5])

Async

from rightnow import AsyncRightNow

async with AsyncRightNow(api_key="rn-...") as client:
    response = await client.chat.completions.create(
        model="falcon-h1-arabic-7b",
        messages=[{"role": "user", "content": "مرحبا"}],
    )

Available Models

Model Type Size Description
falcon-h1-arabic-7b Chat 7B Best price/quality (default)
falcon-h1-arabic-34b Chat 34B Complex reasoning
jais-2-8b Chat 8B Strong dialect understanding
allam-7b Chat 7B Saudi Arabic, MSA
bge-m3-arabic Embeddings 568M 1024-dim, 8192 context
whisper-v3-arabic STT 809M Arabic speech recognition
chatterbox-arabic TTS ~1B Arabic text-to-speech

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

rightnow_ai-0.2.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

rightnow_ai-0.2.3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file rightnow_ai-0.2.3.tar.gz.

File metadata

  • Download URL: rightnow_ai-0.2.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rightnow_ai-0.2.3.tar.gz
Algorithm Hash digest
SHA256 16fd366bbc6ee399e410ad15d0c8d6ab0aaaaeb02f3be50d07a749a1668d8c75
MD5 3b1227e70eac843ecd6eb3f18766d28a
BLAKE2b-256 ddeb78841be6772d17a6a22f1dba7cb990c6ec5b7d2aa4e65ae667d741282221

See more details on using hashes here.

File details

Details for the file rightnow_ai-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: rightnow_ai-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rightnow_ai-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f3d8ce31b672112e6ac0e38405c4301183c2ede8072163ab519f272e33ec2dc2
MD5 82cd76ccc7ddc23e90d5b59ec9a2696b
BLAKE2b-256 a2b101fdda981b1d5608441eed5e9f7e426bfd4d11ec5a5b21f700c4f83f36b8

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