Skip to content

Latest commit

 

History

History
118 lines (97 loc) · 6.7 KB

File metadata and controls

118 lines (97 loc) · 6.7 KB

نمونه‌های Python برای Rahyana AI (2025)

  • آدرس تولید:
  • تست محلی: متغیرهای محیطی و
  • مدل‌ها: ،

پوشه‌ها:

  • – چت پایه، استریم، JSON Mode، ابزارها، تصویر/صوت/PDF، جستجوی وب
  • – تکمیل متن قدیمی
  • – فهرست مدل‌ها
  • – پروژه‌های کاربردی و پرتقاضا
  • – صدا (متن‌جایگزین)، تحلیل داده، اتوماسیون، Web3
  • – تولید تست، مانیتورینگ عملکرد، تولید مستندات، بازبینی کد، دستیار CI/CD

اجرای سریع: Collecting requests>=2.31.0 (from -r github-examples/python/requirements.txt (line 1)) Using cached requests-2.32.5-py3-none-any.whl.metadata (4.9 kB) Collecting httpx>=0.27.0 (from -r github-examples/python/requirements.txt (line 2)) Using cached httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB) Collecting pydantic>=2.9.0 (from -r github-examples/python/requirements.txt (line 3)) Downloading pydantic-2.12.2-py3-none-any.whl.metadata (85 kB) Collecting backoff>=2.2.1 (from -r github-examples/python/requirements.txt (line 4)) Downloading backoff-2.2.1-py3-none-any.whl.metadata (14 kB) Collecting python-dotenv>=1.0.1 (from -r github-examples/python/requirements.txt (line 5)) Using cached python_dotenv-1.1.1-py3-none-any.whl.metadata (24 kB) Collecting charset_normalizer<4,>=2 (from requests>=2.31.0->-r github-examples/python/requirements.txt (line 1)) Downloading charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (37 kB) Collecting idna<4,>=2.5 (from requests>=2.31.0->-r github-examples/python/requirements.txt (line 1)) Downloading idna-3.11-py3-none-any.whl.metadata (8.4 kB) Collecting urllib3<3,>=1.21.1 (from requests>=2.31.0->-r github-examples/python/requirements.txt (line 1)) Using cached urllib3-2.5.0-py3-none-any.whl.metadata (6.5 kB) Collecting certifi>=2017.4.17 (from requests>=2.31.0->-r github-examples/python/requirements.txt (line 1)) Downloading certifi-2025.10.5-py3-none-any.whl.metadata (2.5 kB) Collecting anyio (from httpx>=0.27.0->-r github-examples/python/requirements.txt (line 2)) Downloading anyio-4.11.0-py3-none-any.whl.metadata (4.1 kB) Collecting httpcore==1.* (from httpx>=0.27.0->-r github-examples/python/requirements.txt (line 2)) Using cached httpcore-1.0.9-py3-none-any.whl.metadata (21 kB) Collecting h11>=0.16 (from httpcore==1.*->httpx>=0.27.0->-r github-examples/python/requirements.txt (line 2)) Using cached h11-0.16.0-py3-none-any.whl.metadata (8.3 kB) Collecting annotated-types>=0.6.0 (from pydantic>=2.9.0->-r github-examples/python/requirements.txt (line 3)) Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB) Collecting pydantic-core==2.41.4 (from pydantic>=2.9.0->-r github-examples/python/requirements.txt (line 3)) Downloading pydantic_core-2.41.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.3 kB) Collecting typing-extensions>=4.14.1 (from pydantic>=2.9.0->-r github-examples/python/requirements.txt (line 3)) Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB) Collecting typing-inspection>=0.4.2 (from pydantic>=2.9.0->-r github-examples/python/requirements.txt (line 3)) Downloading typing_inspection-0.4.2-py3-none-any.whl.metadata (2.6 kB) Collecting sniffio>=1.1 (from anyio->httpx>=0.27.0->-r github-examples/python/requirements.txt (line 2)) Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB) Using cached requests-2.32.5-py3-none-any.whl (64 kB) Using cached httpx-0.28.1-py3-none-any.whl (73 kB) Using cached httpcore-1.0.9-py3-none-any.whl (78 kB) Downloading pydantic-2.12.2-py3-none-any.whl (460 kB) Downloading pydantic_core-2.41.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 2.3 MB/s eta 0:00:00

Downloading backoff-2.2.1-py3-none-any.whl (15 kB) Using cached python_dotenv-1.1.1-py3-none-any.whl (20 kB) Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB) Downloading certifi-2025.10.5-py3-none-any.whl (163 kB) Downloading charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (153 kB) Downloading idna-3.11-py3-none-any.whl (71 kB) Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB) Downloading typing_inspection-0.4.2-py3-none-any.whl (14 kB) Using cached urllib3-2.5.0-py3-none-any.whl (129 kB) Downloading anyio-4.11.0-py3-none-any.whl (109 kB) Using cached h11-0.16.0-py3-none-any.whl (37 kB) Using cached sniffio-1.3.1-py3-none-any.whl (10 kB) Installing collected packages: urllib3, typing-extensions, sniffio, python-dotenv, idna, h11, charset_normalizer, certifi, backoff, annotated-types, typing-inspection, requests, pydantic-core, httpcore, anyio, pydantic, httpx Successfully installed annotated-types-0.7.0 anyio-4.11.0 backoff-2.2.1 certifi-2025.10.5 charset_normalizer-3.4.4 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 idna-3.11 pydantic-2.12.2 pydantic-core-2.41.4 python-dotenv-1.1.1 requests-2.32.5 sniffio-1.3.1 typing-extensions-4.15.0 typing-inspection-0.4.2 urllib3-2.5.0 🚀 Starting Rahyana API Python Examples

  1. Testing basic chat completion... Error: 400 Client Error: Bad Request for url: https://rahyana.ir/api/v1/chat/completions Response status: 400 Response text: {"error":{"message":"خطای غیرمنتظره رخ داد. لطفاً دوباره تلاش کنید.","type":"api_error","code":"UNKNOWN_ERROR","param":null}}

❌ Examples failed: 400 Client Error: Bad Request for url: https://rahyana.ir/api/v1/chat/completions [AI Test Generator]

[AI Performance Monitor]

[AI Docs Generator]

[AI Code Reviewer]

[TEST] Running: chat-completions/basic_chat.py [FAIL] Command '['/home/ali/Desktop/rahyana-front/rahyana/.venv/bin/python3', '/home/ali/Desktop/rahyana-front/rahyana/github-examples/python/chat-completions/basic_chat.py']' returned non-zero exit status 1.

[TEST] Running: chat-completions/streaming_chat.py [OK] PASS

[TEST] Running: chat-completions/json_mode.py [OK] PASS

[TEST] Running: models/get_models.py [OK] PASS

[TEST] Running: completions/legacy_completions.py [OK] PASS

[TEST] Running: ai-tools/test_generator.py [OK] PASS

[TEST] Running: ai-tools/performance_monitor.py [OK] PASS

[TEST] Running: ai-tools/docs_generator.py [OK] PASS

[TEST] Running: ai-tools/code_reviewer.py [OK] PASS

[SUMMARY] Results: 8/9 passed

کلمات کلیدی: Rahyana AI Python، مثال GPT-5، استریم GPT-4o، تولید محتوا، چت‌بات، بازبینی کد، CI/CD، Web3، JSON Mode، OpenAI-compatible.