AI creation system ChatGPT website source code + detailed construction and deployment tutorial + support DALL-E3 Vincentian graph / support the latest GPT-4-Turbo-With-Vision-128K multi-modal model

1. AI creation system

The SparkAi creation system is an Ai intelligent question and answer system and Midjourney painting system developed based on OpenAI's popular ChatGPT. It supports the full OpenAI-GPT model + the full domestic AI model. 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 AI creation ChatGPT? Let me write a detailed graphic tutorial here! This system uses Nestjs+Vue+Typescript framework technology to continuously integrate AI capabilities into this system. Already supports OpenAI GPT full model + domestic AI full model + Midjourney painting pool system!

"SparkAi system details and construction and deployment documents":

https://www.yuque.com/yuqueyonghutq9yt2/egy0d0

 Added Dall-E3 painting (can directly communicate with Wen Shengtu)

AI model questions

AI painting

Added Midjourney partial redraw (Vary Region) online editing function

Mobile terminal

1.1 Core functions of the program

Already supports OpenAI GPT full model + domestic AI full model + Midjourney painting pool system!

  1. AI questioning: The program already supports GPT3.5, GPT4.0 questioning, OpenAIGPT full model + domestic AI full model, and supports GPT online questioning
  2. It has supported the OpenAIGPT full model + the domestic AI full model, and has supported the domestic AI models Baidu Wenxinyiyan, Microsoft Azure, Alibaba Cloud Tongyi Qianwen model, Tsinghua Zhipu AIChatGLM, iFlytek Spark model, and Tencent Hunyuan model wait!
  3. AI painting: Midjourney painting (fully customized parameter adjustment), Midjourney drawing from pictures, Dall-E3 painting
  4. Supports the latest GPT-4 multi-modal model and OpenAI GPT-4-Turbo-With-Vision-128K model (the dialogue image recognition function will be supported in the future)
  5. Added new support for dialogue plug-in system, and will gradually add plug-in functions to expand AI capabilities.
  6. The new KEY supports independent configuration of consumption rates. For example, GPT4-32K is more expensive than GPT4 and should consume more quotas.
  7. WeChat official account + email + mobile number registration and login
  8. One-click intelligent mind map generation
  9. Application Square supports users to customize the front-end to add private or shared
  10. AI Painting Square (Gallery)
  11. Invitation + agent distribution model, user daily check-in function
  12. Session records are saved synchronously
  13. Supports docking with WeChat official payment, Yipay, code payment, Hupijiao payment, etc.
  14. Customized aggregated membership packages and card secret systems
  15. Other core features
  16. Other free version feature updates will follow.

1.2 Update log

SparkAi latest major version update log:

SparkAi [V3.0] version is now online!

  1. Added support for the latest GPT-4 multi-modal model and OpenAI GPT-4-Turbo-With-Vision-128K model (the dialogue image recognition function will be supported in the future)
  2. Added support for the latest OpenAI GPT-3.5-Turbo-1106 and GPT-4-1106-Preview models
  3. Added new support for dialogue plug-in system, and will gradually add plug-in functions to expand AI capabilities.
  4. Added support for OpenAI DALL-E3 Vincentian graph plug-in, which can directly communicate with Vincentian graphs and be used with GPT4-Turbo (official website released at 20231107)
  5. The new KEY supports independent configuration of consumption rates. For example, GPT4-32K is more expensive than GPT4 and should consume more quotas.
  6. Added new background configuration to specify that the client uses the large model by default

2. System module demonstration

SparkAi official demo site:

https://ai.sparkaigf.com

Management backend:

https://ai.sparkaigf.com/sparkai/admin

Test account: admin, 123456

 If you cannot access, please check "SparkAi System Details and Construction and Deployment Documents" to get the latest address.

3. System function modules

3.1 ChatGPT model questions

Support GPT online questions

3.2 Prompt application

3.2.1 Prompt application

3.2.2 Custom Prompt application

Support user-defined Prompt applications

3.3 Support Midjourney 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 with the official Zoom command to infinitely zoom a single picture Zoom out 2x | Zoom out 1.5x

  • Added Midjourney partial redraw (Vary Region) online editing function

3.3.1 Bunsei Picture

3.3.2 Using pictures to create pictures  

3.4 Dall-E3 painting (can directly communicate with Wenshengtu)

3.5 Mind map generation

3.6 AI Gallery

There are too many functions in other and backend pages, so they will not be displayed. Directly visit the demo site and demo backend.​ 

4. Build and deploy tutorial

The following tutorial is built using the pagoda panel

4.1 Basic env environment configuration

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

  • Authorization code authorization ip configuration

  • Mail service configuration

  • mysql database These three items 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.

4.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=
REDIS_DB=0

# jwt token
JWT_SECRET=chat-spark
# jwt token 过期时间
JWT_EXPIRESIN=7d
# 接口文档前缀
SWAGGERPREFIX=/docs
# 自定义端口
PORT=9520

5. Environment installation

Preconditions:

  1. Domestic or overseas servers are available, the minimum configuration is2H2G, it is recommended2H4G Even higher

  2. Pagoda installed successfully

Required environment:  

  • Nginx >= 1.19.8
  • MySQL >= 5.7 or MySQL 8.0

  • PHP-7.4 (optional)

  • PM2 Manager >=5.5

  • Redis 7.0.11

  • Node version:>=16.19.1

5.1 Node version 

Use PM2 to switch Node versions (required)

Exchange Node version: v16.19.1

5.2 Install pnpm module

5.3 Install Redis

6. Deploy and run

6.1 Create a new site

Enter Pagoda - > Website -> Add site

6.2 Turn on HTTPS

6.2.1 Use your own ssl certificate

6.2.2 Let's Encrypt certificate application

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

6.3 Upload system source code

Delete the original files generated by the pagoda creation site

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

6.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

6.3.2 Check and verify Node related environment

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

node -v
npm -v
pnpm -v

6.4 Start the project

6.4.1 Open port

Pagoda panel security open9520 port and3306 port

6.4.2 Install dependencies

Use the terminal to switch to the website directory

cd /www/wwwroot/网站目录

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

Use pnpm i command to install dependencies

pnpm i

6.4.3 Start the project

Start the project using the pnpm start command

pnpm start

6.4.4 View startup log

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

pm2 log

6.4.5 Add reverse proxy

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

7. Use the system

Deployment completed! Now you can access the system through the domain name

7.1 Management background

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

The default super administrator account is super, spark123

7.2 Modify the default password of the super administrator

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

7.3 Construction completed

8. Backend configuration & system version update

8.1 Backend configuration

For system configuration tutorials and other tutorials, please go to the system details deployment document or the original blog tutorial.

https://www.idcyli.com

8.2 System version update

For system version update tutorials, please go to the system details deployment document or the original tutorial on the blog.

Guess you like

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