chatgpt-php-web logo

chatgpt-php-web

Free

3.2k

FreeFree tier
Inputs: textOutputs: text, image
Type
Open Source

About chatgpt-php-web

This project is an open-source PHP application that serves as a frontend for interacting with AI models compatible with the OpenAI API specification, such as GPT-3.5-Turbo, GPT-4, and DeepSeek-R1. It is designed to be lightweight, requiring no database and only a few PHP files without any framework, making it easy to modify and suitable for PHP beginners. The application uses a streaming (Server-Sent Events) communication method to generate and output responses in real-time, supporting Markdown formatting, code syntax highlighting, formula display, and image generation via a Stable Diffusion model when the user's query starts with the word "画" (draw). It also features context-aware continuous conversation, preset prompts, and the ability to interrupt the AI's response mid-generation. The project is fully open-source and appears to be offered for free, with a demo site available for testing. It is intended for personal or small-group sharing and does not plan to introduce complex features like databases.

Key Features

Streaming communication for real-time output generation
Supports multiple AI models including GPT-3.5-Turbo, GPT-4, and DeepSeek-R1
Markdown rendering with code syntax highlighting, copy button, and formula display
Image generation via Stable Diffusion when prompted with '画'
Context-aware continuous conversation with interruption capability
API key rotation to handle rate limits and errors
No database required, lightweight PHP code without frameworks
Supports custom API key input for sharing with others

Pros & Cons

Pros
  • Fully open-source with no licensing restrictions
  • Lightweight and easy to deploy, no database or complex dependencies
  • Streaming responses provide fast, real-time output
  • Supports multiple AI models and image generation
  • Free to use and modify, with a demo site available
Cons
  • Requires self-hosting and configuration of API keys
  • No built-in user authentication or access control (basic auth can be added)
  • Image generation quality and availability depend on the configured Stable Diffusion API
  • Limited to models compatible with the OpenAI API specification
  • No official support or regular updates guaranteed

Best For

Building a personal or small-group AI chat interfaceLearning PHP by modifying a simple, open-source AI frontendDeploying a private AI assistant with streaming responsesExperimenting with different AI models (OpenAI, DeepSeek) via a unified interfaceGenerating images from text prompts using a Stable Diffusion modelCreating a demo or prototype for AI-powered applications

FAQ

Is this project completely free to use?
The project is open-source and appears to be free to deploy and modify. However, usage of underlying AI APIs (e.g., OpenAI, DeepSeek) may incur costs based on their pricing. The demo site mentioned in the repository may have its own limits; these should be verified.
What AI models does this project support?
Based on the repository, it supports models compatible with the OpenAI API specification, including GPT-3.5-Turbo, GPT-4, and DeepSeek-R1. The model name and API endpoint can be modified in the code.
Does this project support image generation?
Yes, it appears to support image generation using a Stable Diffusion model when the user's query starts with the word '画' (draw). The exact capabilities depend on the configured API.
Do I need a database to run this project?
No, the project is designed to be lightweight and does not require a database. It uses simple file-based storage for logs and API keys.
Can I use this project with my own API key?
Yes, the project allows users to input their own API key via the interface, and it also supports automatic rotation of multiple API keys.
Is this project suitable for production use?
The project is described as a demo and intended for personal or small-group sharing. It lacks advanced features like user management, authentication, and scalability, so it may not be suitable for large-scale production without modifications.