توضیحات
این افزونه یکپارچهسازی Anthropic را برای SDK کلاینت هوش مصنوعی PHP فراهم میکند. این ابزار به سایتهای وردپرسی اجازه میدهد از مدلهای Claude شرکت Anthropic برای تولید متن و سایر قابلیتهای هوش مصنوعی استفاده کنند.
ویژگیها:
- تولید متن با مدلهای Claude
- پشتیبانی از فراخوانی تابع (Function calling)
- پشتیبانی از تفکر گسترده (Extended thinking)
- ثبت خودکار ارائهدهنده
مدلهای موجود بهصورت پویا از طریق API Anthropic شناسایی میشوند؛ از جمله مدلهای Claude برای تولید متن با پشتیبانی از ورودیهای چندوجهی (multimodal).
پیشنیازها:
- نسخهٔ ۷.۴ یا بالاتر PHP
- WordPress 7.0 or higher
- کلید API Anthropic
نصب
- فایلهای افزونه را در مسیر
/wp-content/plugins/ai-provider-for-anthropic/آپلود کنید. - افزونه را از طریق منوی «افزونهها» در وردپرس فعال کنید.
- On WordPress 7.0 and above, add your Anthropic API key under Settings > Connectors. Alternatively, on any supported WordPress version, provide the key via the
ANTHROPIC_API_KEYenvironment variable or PHP constant
سوالات متداول
-
چگونه کلید API Anthropic دریافت کنم؟
-
برای ایجاد حساب کاربری و تولید کلید API، به کنسول Anthropic مراجعه کنید.
-
آیا این افزونه بدون PHP AI Client کار میکند؟
-
No. This plugin provides the Anthropic-specific implementation that the PHP AI Client uses. WordPress 7.0 and above include the PHP AI Client, so nothing else needs to be installed. On WordPress 6.9, the wordpress/php-ai-client package must be installed separately.
-
Why do I see “It was not possible to connect to the provider using this key”?
-
When you save a key under Settings > Connectors, WordPress checks it by requesting the list of available models from the Anthropic API. This message is shown whenever that request fails, whatever the reason. Common causes are:
- The key was mistyped, copied with extra characters, or has been revoked in the Anthropic Console.
- The server cannot reach
api.anthropic.com, for example because of a firewall, a proxy, or the network setup of a local development environment. - The request took longer than the default WordPress HTTP timeout of 5 seconds.
- The Anthropic API was temporarily unavailable.
To find out which one applies, run the same request from the server or container that runs WordPress, replacing
YOUR_API_KEYwith your key:curl -sS -m 5 https://api.anthropic.com/v1/models -H "x-api-key: YOUR_API_KEY" -H "anthropic-version: 2023-06-01"If this returns a list of models, the key and the connection both work. Otherwise the output shows whether the key was rejected or the API could not be reached.
نقد و بررسیها
نقد و بررسیای برای این افزونه یافت نشد.
توسعه دهندگان و همکاران
“ارائهدهندهٔ هوش مصنوعی برای Anthropic” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کردهاند.
مشارکت کنندگان“ارائهدهندهٔ هوش مصنوعی برای Anthropic” به 23 زبان ترجمه شده است. با تشکر از مترجمین برای همکاری و کمکهایشان.
ترجمه “ارائهدهندهٔ هوش مصنوعی برای Anthropic” به زبان شما.
علاقه مند به توسعه هستید؟
کد را مرور کنید، مخزن SVN را بررسی کنید، یا از طریق RSS در گزارش توسعه مشترک شوید.
گزارش تغییرات
1.0.6 – 2026-12-03
Changed
- Updated setup and FAQ documentation for Connectors API-key configuration, key precedence, and connection troubleshooting (#56).
- Bump WordPress tested-up-to version 7.2 (#58).
- Bump WordPress minimum supported version to 7.0 (#58).
Fixed
- Support Anthropic Agent Skills by ignoring code-execution results, merging custom tools, and preserving containers when resuming paused turns (#26).
- Flatten top-level
oneOf,anyOf, andallOfin tool input schemas to prevent Anthropic requests from failing (#43). - Report server tool usage, such as web search request counts, in the result’s additional data (#46).
- Restored corrupted metadata for four development dependencies in
composer.lock, resolving Composer installation conflicts (#49). - Defaulted
max_tokensto the model’s output limit (capped at 16,000) instead of a fixed 4,096 when no limit is configured, and reported the limit that was actually sent inTokenLimitReachedException(#55).
1.0.5 – 2026-10-01
Changed
- Throw
TokenLimitReachedExceptionwhen the Anthropic API stops withmax_tokensormodel_context_window_exceeded, instead of silently returning a truncated result (#4). - Added a WordPress Playground preview blueprint (#40).
Fixed
- Preserved extended thinking signatures across conversation turns, preventing “thinking.signature: Field required” errors on multi-turn conversations (#31).
- Continued turns that stop with
pause_turninstead of returning a truncated result (#32). - Made model sorting robust to empty regex matches and tested compatibility with PHP AI Client 1.3.1 (#34).
- Anthropic thinking-token usage is now reported via thoughtTokens, with totals preserved and paused-turn continuations accumulated correctly (#44).
1.0.4 – 2026-08-17
Changed
- Bumped WordPress tested-up-to version 7.1 #35.
Fixed
- Corrected model metadata for Claude Opus 4.7 and later, including Claude 5 models, so unsupported sampling parameters are no longer advertised during automatic model selection #25.
- Normalized empty tool-call arguments as JSON objects, preventing Anthropic API errors when replaying tool calls that accept no arguments #23.
1.0.3 – 2026-05-13
- افزودن لوگوی ارائهدهنده به متادیتا در صورتی که نسخهٔ کلاینت بیشتر از ۱.۳.۰ باشد (#18).
1.0.2 – 2026-03-04
- افزودن داراییهای (assets) مخزن افزونه توسط @shaunandrews در https://github.com/WordPress/ai-provider-for-anthropic/pull/10
- افزودن برچسب ‘connector’ به readme.txt توسط @jeffpaul در https://github.com/WordPress/ai-provider-for-anthropic/pull/12
- افزودن توضیحات ارائهدهنده توسط @felixarntz در https://github.com/WordPress/ai-provider-for-anthropic/pull/13
1.0.1 – 2026-02-23
- انتشار اولیهٔ افزونه
- پشتیبانی از مدلهای تولید متن Claude
- پشتیبانی از فراخوانی تابع (Function calling)
- پشتیبانی از تفکر گسترده (Extended thinking)
1.0.0 – 2026-02-11
- انتشار اولیهٔ پکیج Composer
