Ai creation system ChatGPT source code building tutorial + source code attached

The system uses Nestjs and Vue3 framework technology to continuously integrate AI capabilities into the system!

Update content:
Synchronize official image regenerate command
Synchronize official Vary command Single picture contrast enhancement Vary(Strong) | Vary(Subtle) Synchronize
official Zoom command Single picture unlimited zoom Zoom out 2x | Zoom out 1.5x
Newly added GPT networking question function , mobile phone number registration and login, sign-in function, management background function update, etc.

 

 1. Function demonstration

System Client Page

1.1 GPT model question

1.2 Application Workbench

1.3 Midjourney professional painting

1.4 mind map

2. Source code system

2.1 Front Demo Site

2.2 SparkAi source code download

3. Detailed construction tutorial

The following tutorial uses Linux Pagoda to build

3.1 Basic env environment configuration

In the code, we provide the basic environment variable file configuration file env.example. Before using it, remove the suffix and change it to .env file. We only need to configure the following things in the env environment configuration file.

  • Authorization code, ip configuration

  • Mail service configuration

  • The three items of the mysql database are the basic configuration, mysql and authorization are necessary, the project can be started successfully only when the mysql and authorization are configured, and the mail service can be added later.

4. Environmental installation

  • Nginx >= 1.19.8

  • MySQL >= 5.7 or MySQL 8.0

  • PHP-7.4

  • PM2 Manager 5.5

  • Redis 7.0.11

  • Node version: >=16.19.1

Detailed tutorial:

​​

4.1 Node version

Use PM2 to switch Node version (required)

Switch Node version to: v16.19.1

​​

4.2 Install pnpm module

​​

4.3 Install Redis

​​

5. Deploy and run

5.1 Create a new site

Pagoda - Website - Add Site

​​

​5.2 Configuring SSL

5.2.1 Use your own ssl certificate

​​

5.2.2 Let's Encrypt certificate application

If you don't have a certificate, use Pagoda's free certificate to apply for Let's Encrypt

​​

​5.3 Upload source code

delete original file

​​

​Upload and unzip the program to the root directory of the website

​​

​5.3.1 Configure the .env file

Double-click the .env.example file to edit directly in the pagoda, or edit it in the terminal vim

After the configuration is complete, delete the file suffix and the file name is .env

​​

​5.4 Start the project

5.4.1 Installation dependencies

     Use the terminal to switch to the website directory

cd /www/wwwroot/网站目录

Or directly in the root directory of the website Dalai ssh terminal

Use pnpm i to install dependencies

​​

5.4.2 Start the project

Start the project with pnpm start

​​

​5.4.3 View startup log

Enter pm2 log to view the detailed log, and see the picture below to indicate success!

​​

5.4.4 Add port

Add port 9520. Pagoda security needs to open this port, otherwise it cannot be accessed

​​

6. System test

Deployment complete! Now you can access the SparkAi system through the domain name!

6.1 Management

The default foreground address is the domain name address, and the default background address is: domain name address/sparkai/admin

The default super administrator account is super spark123

At this point we are done installing!

​​​​

​​

Guess you like

Origin blog.csdn.net/2301_77931454/article/details/132030265