This PHP SDK provides a comprehensive client for interacting with OpenAI's GPT-3, DALL-E, and ChatGPT APIs, targeting PHP developers seeking to integrate AI capabilities into their applications. It offers features like chat streaming and supports various OpenAI endpoints, including Assistants and Threads.
How It Works
The SDK acts as a wrapper around the OpenAI REST API, abstracting the complexities of HTTP requests and JSON parsing. It utilizes standard PHP libraries and follows a fluent interface pattern for building API calls. The library supports streaming responses via Server-Sent Events, enabling real-time interactions similar to ChatGPT.
Quick Start & Requirements
composer require orhanerday/open-ai
OPENAI_API_KEY
environment variable.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
getCURLInfo()
method for debugging exposes API keys and should not be used in production.4 months ago
Inactive