Skip to content

A golang service for chatgpt application

License

Notifications You must be signed in to change notification settings

stallr/chatgpt-web-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icon

ChatGPT Web Go

A commercially-viable ChatGpt web application built with Go.

可部署商业化的 ChatGpt 网页应用。

💡 本项目是后端服务,前端对应的项目是:79E/ChatGPT-Web

Issues

交流群

主要功能

  • 后台管理系统,可对用户,Token,商品,卡密等进行管理
  • 精心设计的 UI,响应式设计
  • 极快的首屏加载速度(~100kb)
  • 支持Midjourney绘画和DALL·E模型绘画,GPT4等应用
  • 海量的内置 prompt 列表,来自中文英文
  • 一键导出聊天记录,完整的 Markdown 支持
  • 支持自定义API地址(如:openAI / API2D

本地启动

0.环境要求准备

  • golang1.18
  • mysql 5.7+
  • redis
  • goland

1.先 Fork 本项目,然后克隆到本地。

建议目录 ~/go/src/github.com/heimeropen/
git clone https://github.com/heimeropen/chatgpt-web-go.git

2.导入sql

# sql文件
./model/sql/chatgpt.sql

3.配置文件 在 ./config 目录下新建文件 dev.yml 内容如下: (配置内容需要更具自己环境更改)

port: 8899

db:
  type: mysql
  host: 127.0.0.1:3306
  user: root
  password: 123456
  name: chatgpt_web_go

redis:
  addr: 127.0.0.1:6379

gpt:
  apiKey: #YOUR KEY
  botDesc: You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible.
  model: gpt-3.5-turbo

emailServer:
  host: 
  port: 
  senderName: 
  user: 
  password: 

4.运行

用goland打开项目
启动main函数:
./cmd/server/main.go

前端服务

前端服务安装参考:
https://github.com/79E/ChatGpt-Web/blob/master/README.md

前端项目需要修改配置文件 .env.development, 指向本地服务端:
VITE_APP_REQUEST_HOST=http://127.0.0.1:8899

页面截图

cover cover cover cover

📋 开源协议

License MIT

About

A golang service for chatgpt application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 65.3%
  • PLpgSQL 34.7%