ارائه‌دهندهٔ هوش مصنوعی برای Google

توضیحات

This plugin provides Google AI (Gemini) integration for the PHP AI Client SDK. It enables WordPress sites to use Google’s Gemini models for text generation, image generation, text to speech, and other AI capabilities.

ویژگی‌ها:

  • تولید متن با مدل‌های Gemini
  • تولید تصویر با مدل‌های Imagen
  • Text to Speech conversion with Gemini models
  • پشتیبانی از فراخوانی تابع (Function calling)
  • ثبت خودکار ارائه‌دهنده

مدل‌های موجود به‌صورت پویا از طریق API هوش مصنوعی گوگل (Google AI) شناسایی می‌شوند؛ از جمله مدل‌های Gemini برای تولید متن و مدل‌های Imagen برای تولید تصویر.

پیش‌نیازها:

  • نسخهٔ ۷.۴ یا بالاتر PHP
  • برای وردپرس نسخهٔ ۶.۹، باید پکیج wordpress/php-ai-client نصب باشد.
  • برای وردپرس نسخهٔ ۷.۰ و بالاتر، به هیچ تغییر اضافی نیاز نیست.
  • کلید API گوگل جمینای (Google Gemini)

نصب

  1. فایل‌های افزونه را در مسیر /wp-content/plugins/ai-provider-for-google/ آپلود کنید.
  2. افزونه را از طریق منوی «افزونه‌ها» در وردپرس فعال کنید.
  3. کلید API Google خود را از طریق متغیر محیطی (environment variable) یا ثابت (constant) GOOGLE_API_KEY پیکربندی کنید.

سوالات متداول

چگونه کلید API گوگل دریافت کنم؟

برای ایجاد کلید API جهت استفاده از Gemini API، به استودیوی هوش مصنوعی گوگل (Google AI Studio) مراجعه کنید.

آیا این افزونه بدون PHP AI Client کار می‌کند؟

خیر، این افزونه نیازمند نصب و فعال‌سازی افزونهٔ «PHP AI Client» است. این افزونه پیاده‌سازی اختصاصی Google را ارائه می‌دهد که کلاینت هوش مصنوعی PHP از آن استفاده می‌کند.

نقد و بررسی‌ها

نقد و بررسی‌ای برای این افزونه یافت نشد.

توسعه دهندگان و همکاران

“ارائه‌دهندهٔ هوش مصنوعی برای Google” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

“ارائه‌دهندهٔ هوش مصنوعی برای Google” به 22 زبان ترجمه شده است. با تشکر از مترجمین برای همکاری و کمک‌هایشان.

ترجمه “ارائه‌دهندهٔ هوش مصنوعی برای Google” به زبان شما.

علاقه‌ مند به توسعه هستید؟

کد را مرور کنید، مخزن SVN را بررسی کنید، یا از طریق RSS در گزارش توسعه مشترک شوید.

گزارش تغییرات

1.2.1 – 2026-10-27

تغییر کرد

  • Hardened response file handling by validating and explicitly encoding all model-supplied file data (URLs, MIME types, base64 payloads, including TTS audio) before File construction, with clearer indexed ResponseException errors and expanded test coverage (#55).

رفع شد

  • Google tool-calling compatibility by switching function declarations to parametersJsonSchema, normalizing schema maps/empty schemas to JSON objects, filtering unsupported declaration fields (e.g., annotations), and preserving Gemini function call IDs across continuation requests (#51).

Developer

  • Excluded tests/ and phpunit.xml.dist from Composer package archives by adding export-ignore rules to .gitattributes, so these development/testing files are no longer shipped in consumers’ vendor/ directories (#48).
  • Added unit tests for GoogleTextToSpeechConversionModel, covering request preparation, prompt parsing, audio/WAV response handling, and authentication behavior (#49).
  • Added security issue reporting guidance to SECURITY.md, including responsible disclosure instructions and a link to the official WordPress HackerOne program for submitting security concerns (#52).
  • Added a .github/CODEOWNERS global fallback entry assigning ownership of all files to @WordPress/ai-provider-for-google-maintainers when no more specific rule matches (#53).
  • Added maintainer and contribution documentation by introducing CONTRIBUTING.md and updating README.md with current maintainer contacts (#54).

1.2.0 – 2026-09-21

Added

  • Support for text to speech conversion (#31).
  • WordPress Playground preview blueprint that installs and activates the AI plugin and Google provider, enables AI and image generation/editing settings, logs in automatically, opens the Connectors screen, and configures Playground networking for provider requests after credentials are set (#43).

تغییر کرد

  • Updated the supported development baseline to PHP AI Client 1.3.1 and added automated compatibility testing across PHP 7.4–8.4 with the lowest and latest supported dependencies (#40).

رفع شد

  • Google thought signature round-tripping and thought token usage compatibility for tool-calling requests (#26).
  • Gemini tool-calling by preserving thoughtSignature values across turns so function calls remain valid in multi-step conversations (#36).
  • Gemini usage parsing to use Google’s authoritative totalTokenCount when available, ensuring prompt tokens are included in reported totals while keeping a backward-compatible fallback for older responses (#44).

۱.۱.۱ – ۲۰۲۶-۰۸-۱۷

تغییر کرد

  • نسخه tested-up-to وردپرس به ۷.۱ افزایش یافت (#39).

رفع شد

  • از نمایش هشدار PHP و پر شدن لاگ خطا هنگام پردازش تصاویر کدگذاری‌شده با base64 که توسط Google AI برگردانده می‌شوند، جلوگیری شد (#29).

1.1.0

  • افزودن پشتیبانی از نسبت‌های ابعاد (aspect ratios) در تولید تصویر (چندوجهی) Gemini (#13).
  • افزودن لوگوی ارائه‌دهنده به متادیتا در صورتی که نسخهٔ کلاینت هوش مصنوعی بیشتر از ۱.۳.۰ باشد (#20).
  • اصلاح پشتیبانی از ورودی‌های چندوجهی (multimodal) متن و تصویر تا فارغ از قابلیت انتخاب‌شده، به‌درستی کار کند (#14).
  • حذف additionalProperties از طرحوارهٔ پاسخ (response schema) فرمت JSON (#18).

1.0.3

  • رفع باگ بحرانی که به دلیل فقدان حاشیه‌نویسیِ پشتیبانی از نوع فایل (file type support annotation)، مانع استفاده از مدل‌های تصویر Gemini می‌شد.

1.0.2

  • افزودن دارایی‌های (assets) مخزن افزونه توسط @shaunandrews در https://github.com/WordPress/ai-provider-for-google/pull/7
  • به‌روزرسانی برچسب‌ها در readme.txt توسط @jeffpaul در https://github.com/WordPress/ai-provider-for-google/pull/9
  • اصلاح ترکیب‌های ناقص مدالیتهٔ (modality) ورودی و خروجی، که منجر به رفع مشکل استفاده از Nano Banana (در کنار سایر مشکلات) شد، توسط @felixarntz در https://github.com/WordPress/ai-provider-for-google/pull/11
  • افزودن توضیحات ارائه‌دهنده توسط @felixarntz در https://github.com/WordPress/ai-provider-for-google/pull/12

1.0.1

  • انتشار اولیهٔ افزونه
  • پشتیبانی از مدل‌های تولید متن و تصویر Gemini
  • پشتیبانی از مدل‌های تولید تصویر Imagen
  • پشتیبانی از فراخوانی تابع (Function calling)

1.0.0

  • انتشار اولیهٔ پکیج Composer