ارائه‌دهندهٔ هوش مصنوعی برای 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, embedding generation, and other AI capabilities.

ویژگی‌ها:

  • تولید متن با مدل‌های Gemini
  • تولید تصویر با مدل‌های Imagen
  • Embedding generation with any embedding-capable Google model, including multimodal embeddings from images, audio, video, and PDF documents
  • Text to Speech conversion with Gemini models
  • پشتیبانی از فراخوانی تابع (Function calling)
  • ثبت خودکار ارائه‌دهنده

Available models are dynamically discovered from the Google AI API, including Gemini models for text generation, Imagen models for image generation, and embedding models for embedding generation.

پیش‌نیازها:

  • نسخهٔ ۷.۴ یا بالاتر PHP
  • WordPress 7.0 or higher
  • کلید 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.3.1 – 2026-12-04

تغییر کرد

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

رفع شد

  • Handle Gemini candidates without generated content and map newer finish reasons without failing (#57).

1.3.0 – 2026-11-17

Added

  • Added support for embedding generation (#30).

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).

Older changelog entries can be found in the CHANGELOG.md file.