orhanerday/ChatBot
소개
ChatGPT AI를 지원하는 ChatGPT 클론으로, OpenAI 라이브러리를 사용해 PHP로 만든 간단한 웹 애플리케이션입니다. 실시간으로 응답하는 AI 언어 모델과 대화할 수 있습니다. 대화 기록은 쿠키에 저장되며, 사용하려면 API 키와 SQLite3 활성화가 필요합니다.
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalChatGPT Clone
ChatGPT clone is a simple web application powered by the OpenAI library and built with PHP. It allows users to chat with an AI language model that responds in real-time. Chat history is saved using cookies, and the project requires the use of an API key and enabled SQLite3.
Prerequisites
Before running this project, you should have the following:
- PHP 7.4 or later with SQLite3 enabled
- Composer
- An OpenAI API key (which should be set to the $open_ai_key variable in event-stream.php) Getting Started
Get Started
Enable sqlite3
Open the php.ini file. This file is usually located in the PHP installation directory.
Find the following line: ;extension=php_sqlite3.dll
Remove the semicolon at the beginning of the line to uncomment it.
Save the file.
Restart the web server.
Clone this repository to your local machine
git clone https://github.com/orhanerday/ChatGPT.git
Navigate to the project directory
cd ChatGPT
Install OrhanErday/OpenAI
composer require orhanerday/open-ai
Set your OpenAI API key as the
$open_ai_keyvariable inevent-stream.php
$open_ai_key = "";
Start the PHP built-in web server
php -S localhost:8000 -t .
Open your web browser and go to http://localhost:8000
You should now see the ChatGPT clone interface, where you can chat with the OpenAI language model.

This project is a ChatGPT clone that allows users to chat with an AI language model trained by OpenAI. It's powered by the github.com/orhanerday/OpenAI php library, which provides an easy-to-use interface for communicating with the OpenAI API.

Live Demo Video
Important Notice
This project was created to highlight the Stream Example feature of OpenAI GPT-3 Api Client in PHP by Orhan Erday, please don't have too high expectations about the project.
Donation
Join our discord server

Click here to join the Discord server
GPT-4
Change model at event-stream.php
....
$chat = $open_ai->chat([
'model' => 'gpt-4',
....
Using Docker
Method I
Clone this repository to your local machine
git clone https://github.com/orhanerday/ChatGPT.git
Navigate to the project directory
cd ChatGPT
Build the image
docker build -t chatgpt .
Run the app
docker run -p 8000:8000 -e OPENAI_API_KEY=sk-o7hL4nCDcjw chatgpt
Open your web browser and go
Method II
Or you can use docker hub without cloning or building;
Pull the image from Docker Hub
docker pull orhan55555/chatgpt
Run the app
docker run -p 8000:8000 -e OPENAI_API_KEY=sk-o7hL4nCDcjw orhan55555/chatgpt
Open your web browser and go
Chat History
This project saves chat history using cookies by default. If you want to change this to use authentication instead, you can modify the code in index.php to save chat history in a database or other storage mechanism.
Credits
This project is powered by the github.com/orhanerday/OpenAI php library, which provides an easy-to-use interface for communicating with the OpenAI API.
관련 프로젝트 살펴보기
불러오는 중…
