diff --git a/README.md b/README.md index 60e4574b..7684ed66 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,20 @@ While this project is stewarded by [WordPress AI Team](https://make.wordpress.or composer require wordpress/php-ai-client ``` +### HTTP client adapter + +The client uses [HTTPlug](https://httplug.io/) and PSR-18 for HTTP transport. Composer installs the abstraction, but your application must also provide a compatible HTTP client adapter before sending requests. Choose an adapter that fits your application: + +```bash +# cURL adapter +composer require php-http/curl-client + +# or Guzzle 7 adapter +composer require php-http/guzzle7-adapter +``` + +If no adapter is available, HTTP client discovery will fail when a provider request is created. Install and configure the adapter in the same application where the PHP AI Client runs; a provider package alone does not supply a transport implementation. + ## Code examples ### Text generation using a specific model diff --git a/composer.json b/composer.json index abf013aa..7d8ce435 100644 --- a/composer.json +++ b/composer.json @@ -47,6 +47,8 @@ "wordpress/ai-provider-for-openai": "^1.0" }, "suggest": { + "php-http/curl-client": "HTTPlug adapter for cURL HTTP requests", + "php-http/guzzle7-adapter": "HTTPlug adapter for Guzzle 7 HTTP requests", "wordpress/ai-provider-for-anthropic": "For Anthropic Claude model support", "wordpress/ai-provider-for-google": "For Google Gemini model support", "wordpress/ai-provider-for-openai": "For OpenAI GPT model support"