This PHP library provides a robust client for interacting with the OpenAI API, targeting PHP developers who want to integrate advanced AI capabilities into their applications. It offers comprehensive coverage of OpenAI's models and features, including chat completions, audio processing, embeddings, and the Assistants API, simplifying complex API interactions.
How It Works
The client leverages PSR-18 for HTTP client compatibility, allowing flexibility in choosing underlying HTTP libraries like Guzzle. It abstracts the complexities of API endpoints, request formatting, and response parsing into a fluent, object-oriented interface. This design promotes code readability and maintainability, enabling developers to focus on leveraging AI features rather than managing low-level API details.
Quick Start & Requirements
composer require openai-php/client
guzzlehttp/guzzle
).Highlighted Details
Maintenance & Community
The project is community-maintained, with significant contributions from Nuno Maduro. Support is encouraged via GitHub Sponsors.
Licensing & Compatibility
Limitations & Caveats
The README notes that the Edits and FineTunes APIs are deprecated by OpenAI and will cease functioning. Users should migrate to newer APIs like Chat Completions and the new FineTuning API.
4 days ago
Inactive