PHP web app for simple OpenAI-powered chat
Top 90.4% on sourcepulse
This project provides a simple PHP-based web application that clones the ChatGPT interface, allowing users to interact with OpenAI's language models. It's designed for developers and users interested in a straightforward, self-hosted chat interface powered by the OpenAI API, with chat history saved via cookies.
How It Works
The application leverages the orhanerday/OpenAI
PHP library to communicate with OpenAI's API. It utilizes PHP's built-in web server for local hosting and streams responses in real-time. Chat history is managed client-side using cookies, offering a simple persistence mechanism without requiring a backend database for basic usage.
Quick Start & Requirements
composer require orhanerday/open-ai
php.ini
, set API key in event-stream.php
.php -S localhost:8000 -t .
docker build
or docker pull orhan55555/chatgpt
.Highlighted Details
event-stream.php
.Maintenance & Community
The project is maintained by Orhan Erday. A Discord server is available for community support.
Licensing & Compatibility
The project does not explicitly state a license in the provided README. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The project is intended as a demonstration of OpenAI API streaming features and may not have extensive features or robust error handling. Customization for alternative chat history storage (e.g., databases) requires code modification.
1 year ago
1 day