• XSS.stack #1 – первый литературный журнал от юзеров форума

Deploy your own ChatGPT mirror site with one click

humanPie

HDD-drive
Пользователь
Регистрация
08.10.2024
Сообщения
37
Реакции
19
This tutorial will help users with zero basic knowledge to quickly duty a ChatGPT Mirror service.

Prepare in Advance​

  • A ChatGPT account (3.5 or 4.0)
  • An offshore VPS

Start Installation​

1. Install Docker and create a Docker container​

First, make sure you have Docker installed. Once that's done, go into Docker and create a container.
Код:
# Switch to the home directory and clone the ChatGPT-Mirror repository
cd /home/&&git clone https://github.com/dairoot/ChatGPT-Mirror.git

cd ChatGPT-Mirror/

cp .env.example. env && vi. env # Modify the management backend account password.

. ./deploy.sh

1735933059402.png

2. Open the website​

http://server external network ip:50002, and log in
1735933122171.png



3. Enter ChatGPT Token

1735933190745.png


4. Add login user​

In the Mirror backend, add a login account.

1735933225382.png



5. Log in to your account​

Return to the login interface, enter the newly added account and password, and you can use ChatGPT.

1735933254789.png




Through the above steps, you have successfully employed a ChatGPT Mirror service.

usage demonstration API

Chat interface request example

Код:
export accessToken=XXX # Get address: https://chatgpt.com/api/auth/session
export yourUrl=http://127.0.0.1:50002


curl --location " ${yourUrl} /v1/chat/completions" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${accessToken}" \
--data '{
 "model": "gpt-4o-mini",
 "messages": [{"role": "user", "content": "Hello!"}],
 "stream": true,
 "conversation_id": null,
 "parent_message_id": null,
 "hatd": false
 }'


Use with ChatGPT-Next-Web:

1735933472908.png
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх