ChatGPT  by orhanerday

PHP web app for simple OpenAI-powered chat

created 2 years ago
297 stars

Top 90.4% on sourcepulse

GitHubView on GitHub
Project Summary

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

  • Install: composer require orhanerday/open-ai
  • Prerequisites: PHP 7.4+ with SQLite3 enabled, Composer, OpenAI API key.
  • Setup: Enable SQLite3 in php.ini, set API key in event-stream.php.
  • Run: php -S localhost:8000 -t .
  • Docker: Available via docker build or docker pull orhan55555/chatgpt.
  • Docs: https://github.com/orhanerday/ChatGPT

Highlighted Details

  • Real-time chat interface powered by OpenAI API.
  • Chat history saved using cookies.
  • Supports GPT-4 model by changing configuration in event-stream.php.
  • Docker support for easier deployment.

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.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.