The latest AI creation system + ChatGPT website source code + supports GPT4.0 + supports ai painting + supports domestic full AI models

1. AI creation system

The SparkAi system is an AI intelligent question and answer system developed based on the popular GPT question. The overall test of the source code system in this issue is very perfect. It can be said that SparkAi is currently the only domestic ChatGPT docking OpenAI software system. So how to build and deploy the AI ​​creation ChatGPT system? Let me write a detailed graphic tutorial here! The SparkAi program uses Nestjs and Vue3 framework technology to continuously integrate AI capabilities into the AIGC system!

1.1 Core functions of the program

The program already supports ChatGPT3.5/4.0 questioning, AI painting, Midjourney painting (fully customizable parameters), Midjourney drawing from pictures, Dall-E2 painting, mind map generation, knowledge base (customizable training), AI painting Plaza, invitation + agent distribution model, user daily check-in function, session record saving, visitor experience mode, WeChat official account + email + mobile phone number registration and login, and other free version feature updates in the future.

1.2  Function update plan

  • Will support OpenAI GPT full model + domestic AI full model (under development, coming online soon!)
  • System UI update (under development)
  • Midjourney painting partial redraw function (under development)

Domestic models include but are not limited to

OpenAI GPT full model + Baidu Cloud Wenxinyiyan model, Microsoft Azure model, Alibaba Cloud Tongyi Qianwen model, Tsinghua Zhipu AI ChatGLM, iFlytek Cognitive Large Model, etc.! OpenAI GPT full model + domestic AI full model interface is under development! Updated at the end of September!

1.3 Update log

Current official site version [V2.6.2] update function

【V2.6.2】September core function update log (9.17 update)

  • Added the function of automatically translating Chinese into English when MJ submits paintings.
  • Optimize the mind map generation logic to prevent only two-level outlines from being generated
  • Fixed the bug of closing the check-in function in the background and still displaying it on the mobile phone

【V2.6.1】September Core Function Update Log

  • Add guest experience functions, configure daily non-logged-in usage quota, and register an account to synchronize guest usage data
  • Add custom configuration copyright information at the bottom of the background
  • Add Hupijiao payment custom gateway
  • Violation sensitive word detection and recording function

【V2.6.0】August Core Function Update Log

  • Optimize key pool quota exhaustion locking logic

  • Optimize MJ painting connection, optimize CSS, and modify some page styles

  • Add the function of signing in on the mobile phone to receive free times, and optimize the logic of the total number of paintings in the background!

  • Added MJ official picture regeneration command function

  • Synchronize the official Vary command to enhance the contrast of a single image Vary(Strong) | Vary(Subtle)

  • Synchronize the official Zoom command to infinitely zoom a single picture Zoom out 2x | Zoom out 1.5x

2. System module demonstration

https://ai.idcyli.com

3. System function modules

3.1 ChatGPT model questions

Support GPT online questions

3.2 Prompt application

3.2.1 Prompt application square

3.2.2 Support user-defined prompts

3.3 Midjourney Professional Painting

  • Supports synchronized official image regeneration instructions

  • Synchronize the official Vary command to enhance the contrast of a single image Vary(Strong) | Vary(Subtle)

  • Synchronize the official Zoom command to infinitely zoom a single picture Zoom out 2x | Zoom out 1.5x

3.3.1 Vincentian diagram

3.3.2  Pictures generate pictures

3.4 Dall-E2 basic painting

3.5 Mind mind map

3.6 AI Painting Square

4. Introduction to SparkAi system

This system uses Nestjs and Vue3 framework technology to continuously integrate AI capabilities into this system!

4.1 Front-end demo site

System demonstration site: https://ai.idcyli.com

4.2 Demo backend site

  1. Demonstration system backend: Spark-AI

  2. Demo background account password: admin, 123456

4.3 SparkAi source code download

5. Build and deploy tutorial

The following tutorial uses pagoda construction!

5.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 the .env file. We only need to configure the following things in the env environment configuration file.

  • Authorization code authorization ip configuration

  • Mail service configuration

  • These three items of mysql database are basic configurations. Mysql and authorization are necessary. Only when mysql and authorization are configured can the project be started successfully. The mail service can be added later.

5.2 env file code

# 服务器ip
SPARK_AI_HOST=
# 授权码
SPARK_AI_KEY=

# mysql
DB_HOST=localhost
DB_PORT=3306
DB_USER=数据库用户名
DB_PASS=数据库密码
DB_DATABASE=数据库名
DB_LOG=false
DB_SYNC=true

#  mailer 邮件服务
MAILER_HOST=smtp.163.com
MAILER_PORT=465
MAILER_USER=发信邮箱
MAILER_PASS=邮箱发信密钥
MAILER_FROM=发信邮箱

# Redis
REDIS_PORT=6379
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=

# mj并发数
CONCURRENCY=3

# jwt token
JWT_SECRET=chat-spark
# jwt token 过期时间
JWT_EXPIRESIN=7d
# 自定义端口
PORT=9520

6. Environment 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 construction tutorial:

6.1 Select Node version

Use PM2 to switch Node versions (required)

  • Switch Node version to: v16.19.1

6.2 Install pnpm module

6.3 Install Redis

7. Deploy and run

7.1 Create a new site

Pagoda - Website - Add Site

7.2 Enable HTTPS secure access

7.2.1 Use your own ssl certificate

7.2.2 Let's Encrypt certificate application

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

7.3 Upload source code

Delete original files

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

7.3.1 Configure .env file

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

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

7.3.2 At this time, open the terminal again to determine whether we need a node-related environment.

node -v
npm -v
pnpm -v

If not, you need to download it manually:

Execute the following two commands in sequence to install the node environment

curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash - sudo yum install nodejs -y

Then install the pnpm and pm2 modules

npm i pm2 pnpm -g

7.4 Start the project

7.4.1 Open port

Pagoda panel securely opens port 9520 and port 3306

7.4.2 Install dependencies

Use the terminal to switch to the website directory

cd /www/wwwroot/网站目录

Or directly use the Dalai SSH terminal in the root directory of the website

Use pnpm i command to install dependencies

pnpm i

7.4.3 Starting the project

Start the project using the pnpm start command

pnpm start

7.4.4 View startup log

Enter pm2 log to view the detailed log. If you see the picture below, it means success!

pm2 log

7.4.5 Add reverse proxy

Add 9520 port reverse proxy. Pagoda Security needs to open this port, otherwise it will not be accessible.

8. Use the system

Deployment completed! At this time, you can access the SparkAi system through the domain name!

8.1 Management background

The default front-end address is the domain name address and the default back-end address is:  domain name address/sparkai/admin

The default super administrator account is: super

Default super administrator password: spark123

At this point our installation is complete!

8.2 Modify the default password of the super administrator

After logging in, please change the default password of the super administrator first.

8.3 Construction completed

Configure the KEY pool test:

9. Backend configuration & system version update

9.1 Backend configuration & system version update

For system configuration tutorials and other tutorials, please click directly on the blog homepage to view!

Guess you like

Origin blog.csdn.net/weixin_43227851/article/details/133239591