Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading