Skip to content

可配置的中文GPT客户端,支持网络搜索、维基百科、中国上市公司数据。

License

Notifications You must be signed in to change notification settings

JLQmiller/UltraGPT

 
 

Repository files navigation

AgentGPT Logo

🤖 🤖 一款支持中文的AutoGPT客户端 🤖

Node version python ubuntu

UltraGPT可以帮助您配置和部署自主AI代理,可配置的中文GPT客户端,支持网络搜索、维基百科、中国上市公司数据。集成的第三方API除OpenAI外,还支持:

  1. Serp API - Google搜索实时信息,请用户使用前注册完毕 ✅
  2. REPLICATE API - 基于Stable Diffusion的图片生成功能 ✅
  3. Tushare API - 基于Tushare的中国金融数据处理功能 ✅

目前处于开发阶段,详细内容请查看技术文档

⚙ 启动

配置环境变量

Ultra-GPT给用户构建了自动化环境变量生成脚本,位于项目cli文件夹中,用户只需执行./setup.sh文件即可在前端next项目文件夹和后端platform文件夹下各自创建.env文件。

# 下载当前项目
git clone https://github.com/ZhangWei-KUMO/UltraGPT.git && cd UltraGPT
# 运行脚手架,自动化配置前后端环境变量
./setup.sh
# 进入platform文件夹,安装依赖
poetry install
# 运行后端程序(development Model)
poetry run python -m agent_backend
# 进入next中
npm install
# 运行前端程序(development Model)
npm run dev

🚧 项目架构和技术栈

本项目由四个子项目所组成,分别为环境变量脚手架cli,文档网站docs,客户端next,后端platform。其中前端的技术选型在语言中是TypeScript,框架为React应用最多的Next.js框架。 在API通信上使用的是tRPC库。后端选择Python语言是鉴于Python在机器学习强大的社区环境,采用Peotry进行依赖包管理,整体框架采用FastAPI。在机器学习的库中与大多数GPT应用一样, 选择了LangChain库。

⏰ 即将上线的新功能

  1. MySQL - 传统标量数据库
  2. WEAVIATE - 向量化数据库
  3. Pinecone - 向量化数据库

后端生产环境部署

后端生产环境,在/etc/systemd/system/文件夹中创建agent_backend.service

[Unit]
Description=My Agent Backend Service
After=network.target

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/UltraGPT/platform
ExecStart=/home/ubuntu/etc/bin/poetry run python -m agent_backend
Restart=always

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start agent_backend
sudo systemctl enable agent_backend

前端部署Vercel

进入next

设置环境变量:

NEXT_PUBLIC_BACKEND_URL="你的服务器域名"
NODE_ENV="production"
BACK_END_ENVIRONMENT="production"
# 安装pm2
npm install pm2@latest -g
# 启动
pm2 start npm --name "next" -- start
# 关闭
pm2 stop next

About

可配置的中文GPT客户端,支持网络搜索、维基百科、中国上市公司数据。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 59.5%
  • Python 33.6%
  • JavaScript 5.4%
  • Other 1.5%