Skip to main content

bxlai

حزمة Python خفيفة باسم تثبيت bxlai واسم استيراد bxAI. قائمة النماذج مضمنة في bxAI.py؛ لا يوجد اعتماد على models.json أو ملفات خارج الـwheel وقت التشغيل.

مهم حول FREE: تعني FREE أن كلفة الإدخال والإخراج للنموذج كانت صفراً في كتالوج OpenRouter عند بناء هذا الإصدار. لا تعني وجود API مجهول بلا مصادقة: OpenRouter يتطلب API key لكل طلب. قد تتغير الأسعار أو الإتاحة أو حدود الاستخدام بعد الإصدار.

التثبيت

pip install bxlai

يتطلب Python 3.9+، ويعمل على Android/Pydroid وTermux وWindows وLinux. الاعتماد التشغيلي الوحيد هو requests.

الاستخدام

from bxAI import *

print(version())
print(model_info(1))
MODLES()

# FREE: لا تمرر المفتاح في الدالة؛ ضعه في متغير البيئة أولاً.
# Linux/macOS/Termux: export BXAI_API_KEY="YOUR_OPENROUTER_KEY"
# Windows PowerShell: $env:BXAI_API_KEY = "YOUR_OPENROUTER_KEY"
print(Ai(1, "Hello"))

# TOKEN: مرر مفتاح OpenRouter الذي تملكه أنت.
print(AiT("YOUR_TOKEN", 25, "Hello"))

يمكن استخدام متغير البيئة OPENROUTER_API_KEY بديلاً عن BXAI_API_KEY في Ai(). المفتاح لا يُخزن في المكتبة أو يطبع أو يسجل. لا تضع مفتاحك داخل ملف منشور.

الدوال

  • Ai(model_number, question): للنماذج المصنفة FREE؛ يقرأ المفتاح من BXAI_API_KEY أو OPENROUTER_API_KEY. من دون متغير بيئة يعيد رسالة خطأ واضحة.
  • AiT(token, model_number, question): يرسل المفتاح المعطى ويعيد نص الإجابة؛ صُمم للنماذج المصنفة TOKEN، ويقبل كذلك نموذجاً مجانياً عند الحاجة إلى تمرير المفتاح مباشرة.
  • MODLES(): الاسم التاريخي المطلوب كما هو؛ يعرض الصفحات التفاعلية من FREE ثم TOKEN. اضغط Enter للمتابعة أو q للخروج. لا تستخدم مكتبات طرفية إضافية.
  • models(): اسم بديل لـMODLES().
  • version(): يعيد 1.0.5.
  • model_info(number): يعيد قاموساً بمعلومات عامة دون كشف المعرّف الحقيقي للنموذج. الرقم غير المعروف يعيد قاموساً يحتوي رسالة خطأ.

تستخدم الطلبات واجهة OpenRouter المتوافقة مع Chat Completions. قد تترتب رسوم على نماذج TOKEN، وتظل الأسعار وسياسات الخصوصية والحدود خاضعة لمزود الخدمة. لا ترسل بيانات حساسة إلى نماذج مجانية أو خدمات لا تثق بها.

الكتالوج

يتضمن هذا الإصدار 97 معرّفاً من عناصر الملف المرفق التي أمكن مطابقتها مع كتالوج OpenRouter وقت البناء: 9 بسعر صفري و88 ذات تسعير/توجيه يتطلب token. أسماء العرض BXCode-001 وBXL-002 وما يليها أسماء مستعارة ثابتة؛ معرفات API الحقيقية داخلية. استُبعدت عناصر لم تكن موجودة في كتالوج OpenRouter أو كانت معلّمة بالتقاعد في تاريخ بناء الإصدار.

الأرقام ثابتة داخل الإصدار؛ لا يُعاد ترتيبها تلقائياً عند التثبيت.

الأخطاء والتشخيص

تعيد Ai() وAiT() نص الإجابة، أو رسالة قصيرة تبدأ بـ[BXAI ERROR] عند الخطأ (مثل HTTP 401/403/404/429/5xx، timeout، اتصال/DNS، أو JSON غير صالح). لتفعيل تشخيص المطور على stderr، اضبط BXAI_DEBUG=1. لا تسجل المكتبة الرؤوس أو نص الطلب أو قيمة token.

بناء وفحص ونشر PyPI

من مجلد المشروع:

rm -rf build dist *.egg-info
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m zipfile -l dist/bxlai-1.0.5-py3-none-any.whl
python -m twine upload --username __token__ dist/*

الأمر الأخير يرفع الملفات إلى PyPI؛ لم يتم تنفيذ رفع من هذا المشروع.

Metadata

Release files for bxlai 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bxlai 1.0.5
File Size Uploaded Provenance Actions
bxlai-1.0.5.tar.gz 8.9 kB Without provenance Details for bxlai-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bxlai 1.0.5
File Interpreter ABI Platform Actions
bxlai-1.0.5-py3-none-any.whl Python 3 none any Details for bxlai-1.0.5-py3-none-any.whl

Total release size: 16.8 kB

Release files / bxlai-1.0.5.tar.gz

Download URL bxlai-1.0.5.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
84dae8da8b6f083378c18fa9322c090236410e1140f60b4e0b683278c2569aeb
BLAKE2b-256 checksum
How to use checksums
68a60d3cab94d92bcdae8e6eb69c4dc001ede0bf7a3a0b67b8214faec097ad7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / bxlai-1.0.5-py3-none-any.whl

Download URL bxlai-1.0.5-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72fc3eb3f784cac70059b0124620c08aaffa41b35a7699584964529140bad279
BLAKE2b-256 checksum
How to use checksums
9bf7ca5766afd76e109da58efe42d75c701c9ccf6f408b3f0bc4d11f661f7e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for bxlai 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page