Skip to content

Commit 7fa0002

Browse files
修复一些小问题
0 parents  commit 7fa0002

File tree

106 files changed

+43752
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+43752
-0
lines changed

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.github
2+
node_modules
3+
README.md

.env.serve

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#设置openai的key,防止页面刷新重新输入
2+
VUE_APP_OPENAI_API_KEY=""
3+
#设置 OpenAI Url
4+
VUE_APP_OPENAI_API_URL=""

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/docker.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: docker
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check Out
14+
uses: actions/checkout@v3
15+
16+
- name: Build docker image
17+
id: docker_build
18+
uses: docker/build-push-action@v2
19+
with:
20+
context: ./
21+
file: ./Dockerfile
22+
push: false
23+
tags: chat-gpt:latest
24+
25+
- name: Image digest
26+
run: echo ${{ steps.docker_build.outputs.digest }}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
.env
10+
11+
# Log files
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
pnpm-debug.log*
16+
17+
# Editor directories and files
18+
.idea
19+
.vscode
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
#Electron-builder output
27+
/dist_electron

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry="https://registry.npmmirror.com/"

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:16-alpine AS builder
2+
WORKDIR /app
3+
4+
# install and cache app dependencies
5+
COPY package.json .
6+
RUN npm install
7+
8+
ARG OPENAI_API_KEY=""
9+
ARG OPENAI_API_URL=""
10+
ENV VUE_APP_OPENAI_API_KEY="${OPENAI_API_KEY}"
11+
ENV VUE_APP_OPENAI_API_URL="${OPENAI_API_URL}"
12+
13+
COPY . .
14+
RUN npm run build
15+
16+
FROM nginx:alpine
17+
18+
COPY --from=builder /app/dist /usr/share/nginx/html

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2023, 吕世昊
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
2+
3+
<div align=center>
4+
<img src="https://www.freeimg.cn/i/2023/12/26/658a86f8cf809.png" />
5+
</div>
6+
<a href="https://github.com/202252197">
7+
<img width=800 src="https://github-profile-trophy.vercel.app/?username=202252197&column=7&theme=gruvbox&no-frame=true"/>
8+
</a>
9+
<div>
10+
声明:此项目只发布于 GitHub,基于 BSD-3-Clause license 协议,免费且作为开源学习使用。并且不会有任何形式的卖号、付费服务、卖key等行为。谨防受骗。
11+
项目使用Vue2进行开发,给大家提供一个方便使用的OpenAI web 管理界面,有好的建议和bug欢迎大家提出来,项目会一直开源和代码优化,方便对openai进行入门了解使用,后期会接入后端,实现更丰富的功能。
12+
</div>
13+
14+
> 🤭记得点个小星星Starred
15+
## 会话
16+
![webui4.5](https://www.freeimg.cn/i/2023/12/26/658a737bec9c4.jpeg)
17+
## 模型
18+
![webui4.5](https://www.freeimg.cn/i/2023/12/26/658a7358e83b7.jpeg)
19+
## 微调模型
20+
![webui4.5](https://www.freeimg.cn/i/2023/12/26/658a74002da34.jpeg)
21+
## 文件
22+
![webui4.5](https://www.freeimg.cn/i/2023/12/26/658a73b451da1.jpeg)
23+
## 中英文切换
24+
![webui4.5](https://www.freeimg.cn/i/2023/12/26/658a73e2c8945.jpeg)
25+
## 适配手机
26+
<div>
27+
<img src="https://www.freeimg.cn/i/2023/12/26/658a7444f169c.jpeg" alt="drawing" width="270px"/>
28+
<img src="https://www.freeimg.cn/i/2023/12/26/658a7456ade1e.jpeg" alt="drawing" width="280px"/>
29+
<img src="https://www.freeimg.cn/i/2023/12/26/658a74685a4e4.jpeg" alt="drawing" width="270px"/>
30+
</div>
31+
32+
## 参考视频
33+
https://www.bilibili.com/video/BV1BM4y187bp 使用API调用StableDiffusion生成图片简单案例
34+
https://www.bilibili.com/video/BV1iL411k7pC 本地+云服务器 部署此项目视频
35+
https://www.bilibili.com/video/BV1ss4y1d72g 此项目微调使用的简单案例
36+
关注我的B站,持续输出简单的入门案例
37+
38+
# 部署步骤
39+
## 本地部署
40+
41+
```sh
42+
npm install
43+
npm run serve
44+
npm run build
45+
```
46+
47+
# 在线体验地址 (需要使用OpenAI KEY)
48+
49+
> https://huggingface.co/spaces/junchenmo/OpenAI-Manager
50+
51+
## OpenAI-Key设置以及自定义设置
52+
53+
### 配置使用自定义的 OpenAI proxy
54+
55+
在 .env.serve 中添加代码
56+
57+
```env
58+
VUE_APP_OPENAI_API_URL='你的openai api proxy'
59+
```
60+
61+
### 在/src/store/mutation-types.js
62+
63+
可以在此文件中设置AI头像+用户头像+用户名称
64+
65+
# 技术栈
66+
67+
| 名称 | 版本 |
68+
| ---- | ---- |
69+
| vue | 2.6.14 |
70+
| element-ui | 2.15.12 |
71+
| NodeJS | 14+ |
72+
73+
# 项目进度(对标OpenAI官方接口文档)
74+
75+
| 接口 | 描述 |
76+
| ---- | ---- |
77+
| List Models | 获取模型列表 |
78+
| Completion | text-davinci-003, text-davinci-002, text-curie-001, text-babbage-001, text-ada-001, davinci, curie, babbage, ada模型 |
79+
| Chat Completion | gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301模型 |
80+
| Create edit | 创建编辑(待..) |
81+
| Create Image | 根据描述生成图片 |
82+
| Create image edit | 根据上传的图片结合输入的描述生成图片 |
83+
| Create Image Variation | 根据上传的图片生成变体图片 |
84+
| Create embeddings | 创建向量查询(可以实现PDF对话)(待..) |
85+
| Create transcription | 语音转换为文字 |
86+
| Create translation | 一个或多个来源语言的语音或音频文件翻译成目标语言 |
87+
| List files | 文件列表 |
88+
| Upload file | 上传文件 |
89+
| Delete file | 删除文件 |
90+
| Retrieve file | 检索文件信息 |
91+
| Retrieve file content | 检索文件内容(OpenAI为了防止滥用,只要plus用户才可以使用) |
92+
| Create fine-tune | 创建微调 |
93+
| List fine-tunes | 微调列表 |
94+
| Retrieve fine-tune | 检索微调信息 |
95+
| Cancel fine-tune | 取消微调 |
96+
| List fine-tune events | 微调事件列表(待..) |
97+
| Delete fine-tune model | 删除微调模型 |
98+
| Create moderation | 创建审核 |
99+
| List engines | 引擎列表(已弃用) |
100+
| Retrieve engine | 检索引擎信息(已弃用) |
101+
| 多会话储存和上下文逻辑 | GPT3.5模型支持上下文逻辑,多窗口上下文对话 |
102+
| 导出导入数据 | 支持导出当前会话,导出全部会话,导入当前会话,导出当前会话,清除当前会话,清除全部会话 |
103+
| 聊天截图到本地图片 | 截图功能,有缺陷只能截图当前窗口的图片,建议QQ长截图(暂时取消) |
104+
| 更换聊天窗口背景 | 支持输入背景图片URL,暂时取消并保留此功能,没太大意义(暂时取消) |
105+
| 角色扮演 | 内置多角色prompt |
106+
| 界面多语言 | 支持中英文语言 |
107+
108+
# 贡献者
109+
<div>
110+
<a href="https://github.com/202252197/ChatGPT_JCM/graphs/contributors">
111+
<img src="https://contrib.rocks/image?repo=202252197/ChatGPT_JCM" />
112+
</a>
113+
</div>
114+
115+
116+
## Star History
117+
[![Star History Chart](https://api.star-history.com/svg?repos=202252197/ChatGPT_JCM&type=Timeline)](https://star-history.com/#202252197/ChatGPT_JCM&Timeline)
118+
119+
# 免责声明
120+
这不是官方的OpenAI产品。这是一个个人项目,与OpenAI没有任何关系。不要起诉我。
121+
122+
<a href="https://github.com/202252197/ChatGPT_JCM" ><img src="https://img.shields.io/github/stars/202252197/ChatGPT_JCM" /></a>
123+
<a href="https://github.com/202252197/ChatGPT_JCM" ><img src="https://img.shields.io/github/last-commit/202252197/ChatGPT_JCM" /></a>
124+
<a href="https://github.com/202252197/ChatGPT_JCM" ><img src="https://img.shields.io/github/release/202252197/ChatGPT_JCM" /></a>
125+
<a href="https://github.com/202252197/ChatGPT_JCM" ><img src="https://img.shields.io/github/downloads/202252197/ChatGPT_JCM/total" /></a>
126+
<a href="https://github.com/202252197/ChatGPT_JCM" ><img src="https://img.shields.io/github/license/202252197/ChatGPT_JCM" /></a>
127+
</p>
128+
129+
![Visitor Count](https://profile-counter.glitch.me/202252197/count.svg)
130+

0 commit comments

Comments
 (0)