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.2.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.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rightnow_ai-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 e690d21ed33fa31768b7ba424591e5c2eb37dbe39cfd30feb57b814478715dd3
MD5 7c8477fadfa91de40057594ef2528c01
BLAKE2b-256 9f546ac0271513ea789bffb0a1f5746cda157e9d2807e162f473eee1c3821312

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rightnow_ai-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b420e083459ff5927204e8902e54c87ed888b61043de6b5ac03c52c92d061a98
MD5 0f5fb82ebf7612cc61e498ad998dbe9f
BLAKE2b-256 8d96e2acf1cb560c369ac102b9f8b1dd6ede39dc74919a0131019aaa731d6a3e

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