Transforme el proyecto ChatGPT-Next-Web para regenerar la imagen de Docker
0. Antecedentes
Debe usar su propio servidor compatible con la API de OpenAI a través de ChatGPT-Next-Web, y debe modificar una pequeña cantidad de código en el proyecto ChatGPT-Next-Web.
1. Modificar el código
código de clonación,
git clone https://github.com/Yidadaa/ChatGPT-Next-Web; cd ChatGPT-Next-Web
modificar el código,
sed -i 's/role: "user"/role: "system"/g' app/masks/cn.ts
sed -i 's/role: "user"/role: "system"/g' app/masks/en.ts
2. Generar imagen Docker
docker build -t <your_dockerhub_name>/chatgpt-next-web:v2.9.1 .
3. Cargue la imagen de Docker
docker push <your_dockerhub_name>/chatgpt-next-web:v2.9.1
4. Ejecute la imagen de Docker
docker run -d --restart=always -p 3000:3000 -e OPENAI_API_KEY="<your_openai_key>" -e CODE="<your_password>" -e BASE_URL="<your_base_url>" <your_dockerhub_name>/chatgpt-next-web:v2.9.1
¡fin!