Compare commits
86 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02caa57304 | ||
|
|
6014a56e54 | ||
|
|
b8f08eb33e | ||
|
|
944e876aaa | ||
|
|
ee2c259c3d | ||
|
|
1c8db69a5a | ||
|
|
5128bbcce4 | ||
|
|
51a5d450b7 | ||
|
|
98444fd04b | ||
|
|
e45c1eb1e0 | ||
|
|
bd9d83e630 | ||
|
|
b66952ad98 | ||
|
|
242b21263a | ||
|
|
2843178ede | ||
|
|
bb312441c6 | ||
|
|
d07e5b8501 | ||
|
|
246ee973ec | ||
|
|
a62a9c4067 | ||
|
|
7408db9cf6 | ||
|
|
5d4dd4a18c | ||
|
|
5bf95bd846 | ||
|
|
a79429fdcd | ||
|
|
021add2af4 | ||
|
|
371e0e36c6 | ||
|
|
e7d3a8e2e1 | ||
|
|
32a8d68c6c | ||
|
|
06ab718e6e | ||
|
|
1d74095739 | ||
|
|
ca99837dab | ||
|
|
d31bdf0ee0 | ||
|
|
d3e7923040 | ||
|
|
5f66f4523c | ||
|
|
4ec02c654b | ||
|
|
9a0c92629b | ||
|
|
651eb1bf6b | ||
|
|
4e0c876154 | ||
|
|
3e5118c4f7 | ||
|
|
bdd518fd3e | ||
|
|
340de071a9 | ||
|
|
1226c3efb7 | ||
|
|
39f9080eb2 | ||
|
|
3e4b165ed9 | ||
|
|
451f234f68 | ||
|
|
1ab45651e0 | ||
|
|
16f2ad7615 | ||
|
|
4ba4a99935 | ||
|
|
6f4471d2a0 | ||
|
|
250399a1aa | ||
|
|
1c8ce369b6 | ||
|
|
875f78b42c | ||
|
|
1e262a2198 | ||
|
|
25067a14a6 | ||
|
|
591cc21ff4 | ||
|
|
5a21eb9bc1 | ||
|
|
cdf4b9f324 | ||
|
|
e3c9b8179e | ||
|
|
9b683884cc | ||
|
|
4dc541e0a6 | ||
|
|
ef2de489be | ||
|
|
cb3b9efc6e | ||
|
|
a745993829 | ||
|
|
a837552b56 | ||
|
|
f52f514f5f | ||
|
|
fac53923dd | ||
|
|
b200731d17 | ||
|
|
de6ac0f589 | ||
|
|
18e0212d27 | ||
|
|
f20a5fe9a6 | ||
|
|
d351084688 | ||
|
|
d807f9d097 | ||
|
|
3ef6d3fe63 | ||
|
|
e2fccd391e | ||
|
|
aeef1fca0c | ||
|
|
b0402434e2 | ||
|
|
014fb504a4 | ||
|
|
4d043e0e46 | ||
|
|
d1ee3913eb | ||
|
|
a34a2b622c | ||
|
|
2d74fa8e10 | ||
|
|
c879905307 | ||
|
|
487ef670cd | ||
|
|
0d6897e180 | ||
|
|
3c8f38799c | ||
|
|
91b02bbfd9 | ||
|
|
17a42ac0cc | ||
|
|
e384893ae0 |
@@ -1,8 +1,6 @@
|
|||||||
# proxy
|
# proxy
|
||||||
# AXIOS_PROXY_HOST=127.0.0.1
|
# AXIOS_PROXY_HOST=127.0.0.1
|
||||||
# AXIOS_PROXY_PORT=7890
|
# AXIOS_PROXY_PORT=7890
|
||||||
# OPENAI_BASE_URL=https://api.openai.com/v1
|
|
||||||
# OPENAI_BASE_URL_AUTH=可选的安全凭证
|
|
||||||
# 是否开启队列任务。 1-开启,0-关闭(请求parentUrl去执行任务,单机时直接填1)
|
# 是否开启队列任务。 1-开启,0-关闭(请求parentUrl去执行任务,单机时直接填1)
|
||||||
queueTask=1
|
queueTask=1
|
||||||
parentUrl=https://hostname/api/openapi/startEvents
|
parentUrl=https://hostname/api/openapi/startEvents
|
||||||
@@ -16,8 +14,18 @@ aliSignName=xxx
|
|||||||
aliTemplateCode=SMS_xxx
|
aliTemplateCode=SMS_xxx
|
||||||
# token
|
# token
|
||||||
TOKEN_KEY=xxx
|
TOKEN_KEY=xxx
|
||||||
|
# root key, 最高权限
|
||||||
|
ROOT_KEY=xxx
|
||||||
|
# 是否进行安全校验(1: 开启,0: 关闭)
|
||||||
|
SENSITIVE_CHECK=1
|
||||||
# openai
|
# openai
|
||||||
|
# OPENAI_BASE_URL=https://api.openai.com/v1
|
||||||
|
# OPENAI_BASE_URL_AUTH=可选的安全凭证(不需要的时候,记得去掉)
|
||||||
OPENAIKEY=sk-xxx
|
OPENAIKEY=sk-xxx
|
||||||
|
GPT4KEY=sk-xxx
|
||||||
|
# claude
|
||||||
|
CLAUDE_BASE_URL=calude模型请求地址
|
||||||
|
CLAUDE_KEY=CLAUDE_KEY
|
||||||
# db
|
# db
|
||||||
MONGODB_URI=mongodb://username:password@0.0.0.0:27017/test?authSource=admin
|
MONGODB_URI=mongodb://username:password@0.0.0.0:27017/test?authSource=admin
|
||||||
PG_HOST=0.0.0.0
|
PG_HOST=0.0.0.0
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
@@ -37,12 +37,12 @@ jobs:
|
|||||||
- name: build and publish image
|
- name: build and publish image
|
||||||
env:
|
env:
|
||||||
# fork friendly ^^
|
# fork friendly ^^
|
||||||
DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/fast-gpt
|
DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/fastgpt
|
||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
|
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
|
||||||
--label "org.opencontainers.image.description=fast-gpt image" \
|
--label "org.opencontainers.image.description=fastgpt image" \
|
||||||
--label "org.opencontainers.image.licenses=MIT" \
|
--label "org.opencontainers.image.licenses=MIT" \
|
||||||
--push \
|
--push \
|
||||||
-t ${DOCKER_REPO}:latest \
|
-t ${DOCKER_REPO}:latest \
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
|
ENV PORT=3000
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
201
LICENSE
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
6
Makefile
@@ -1,4 +1,4 @@
|
|||||||
SERVICE_NAME=fast-gpt
|
SERVICE_NAME=fastgpt
|
||||||
# Image URL to use all building/pushing image targets
|
# Image URL to use all building/pushing image targets
|
||||||
IMG ?= $(SERVICE_NAME):latest
|
IMG ?= $(SERVICE_NAME):latest
|
||||||
|
|
||||||
@@ -34,13 +34,13 @@ run: ## Run a dev service from host.
|
|||||||
|
|
||||||
.PHONY: docker-build
|
.PHONY: docker-build
|
||||||
docker-build: ## Build docker image with the desktop-frontend.
|
docker-build: ## Build docker image with the desktop-frontend.
|
||||||
docker build -t c121914yu/fast-gpt:latest . --network host --build-arg HTTP_PROXY=http://127.0.0.1:7890 --build-arg HTTPS_PROXY=http://127.0.0.1:7890
|
docker build -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest . --network host --build-arg HTTP_PROXY=http://127.0.0.1:7890 --build-arg HTTPS_PROXY=http://127.0.0.1:7890
|
||||||
|
|
||||||
##@ Deployment
|
##@ Deployment
|
||||||
|
|
||||||
.PHONY: docker-run
|
.PHONY: docker-run
|
||||||
docker-run: ## Push docker image.
|
docker-run: ## Push docker image.
|
||||||
docker run -d -p 8008:3000 --name fast-gpt -v /web_project/yjl/fast-gpt/logs:/app/.next/logs c121914yu/fast-gpt:latest
|
docker run -d -p 8008:3000 --name fastgpt -v /web_project/yjl/fastgpt/logs:/app/.next/logs registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest
|
||||||
|
|
||||||
#TODO: add support of docker push
|
#TODO: add support of docker push
|
||||||
|
|
||||||
|
|||||||
264
README.md
@@ -1,256 +1,46 @@
|
|||||||
# Fast GPT
|
# Fast GPT
|
||||||
|
|
||||||
Fast GPT 允许你使用自己的 openai API KEY 来快速的调用 openai 接口,目前集成了 gpt35 和 embedding. 可构建自己的知识库。
|
Fast GPT 允许你使用自己的 openai API KEY 来快速的调用 openai 接口,目前集成了 gpt35 和 embedding. 可构建自己的知识库。
|
||||||
|
|
||||||
## 知识库原理
|
## 🛸 在线体验
|
||||||

|
|
||||||
|
|
||||||
## 开发
|
🎉 [fastgpt.run](https://fastgpt.run/) (国内版)
|
||||||
**配置环境变量**
|
🎉 [ai.fastgpt.run](https://ai.fastgpt.run/) (海外版)
|
||||||
```bash
|
|
||||||
# proxy(可选)
|
|
||||||
AXIOS_PROXY_HOST=127.0.0.1
|
|
||||||
AXIOS_PROXY_PORT=7890
|
|
||||||
# openai 中转连接(可选)
|
|
||||||
OPENAI_BASE_URL=https://api.openai.com/v1
|
|
||||||
OPENAI_BASE_URL_AUTH=可选的安全凭证
|
|
||||||
# 是否开启队列任务。 1-开启,0-关闭(请求 parentUrl 去执行任务,单机时直接填1)
|
|
||||||
queueTask=1
|
|
||||||
parentUrl=https://hostname/api/openapi/startEvents
|
|
||||||
# 发送邮箱验证码配置。参考 nodeMail 获取参数,自行百度。
|
|
||||||
MY_MAIL=xxx@qq.com
|
|
||||||
MAILE_CODE=xxx
|
|
||||||
# 阿里短信服务(邮箱和短信至少二选一)
|
|
||||||
aliAccessKeyId=xxx
|
|
||||||
aliAccessKeySecret=xxx
|
|
||||||
aliSignName=xxx
|
|
||||||
aliTemplateCode=SMS_xxx
|
|
||||||
# token(随便填,作为登录凭证)
|
|
||||||
TOKEN_KEY=xxx
|
|
||||||
# openai key
|
|
||||||
OPENAIKEY=sk-xxx
|
|
||||||
# mongo连接地址
|
|
||||||
MONGODB_URI=mongodb://username:password@0.0.0.0:27017/test?authSource=admin
|
|
||||||
# mongo数据库名称
|
|
||||||
MONGODB_NAME=xxx
|
|
||||||
# pg 数据库相关内容,和 docker-compose 对上
|
|
||||||
PG_HOST=0.0.0.0
|
|
||||||
PG_PORT=8102
|
|
||||||
PG_USER=xxx
|
|
||||||
PG_PASSWORD=xxx
|
|
||||||
PG_DB_NAME=xxx
|
|
||||||
```
|
|
||||||
**运行**
|
|
||||||
```
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
## 部署
|

|
||||||
|
|
||||||
### 代理环境(国外服务器可忽略)
|
#### 知识库原理图
|
||||||
1. [clash 方案](./docs/proxy/clash.md) - 仅需一台服务器(需要有 clash)
|
|
||||||
2. [nginx 方案](./docs/proxy/nginx.md) - 需要一台国外服务器
|
|
||||||
3. [cloudflare 方案](./docs/proxy/cloudflare.md) - 需要有域名(每日免费 10w 次代理请求)
|
|
||||||
|
|
||||||
### docker 部署
|

|
||||||
#### 1. 安装 docker 和 docker-compose
|
|
||||||
这个不同系统略有区别,百度安装下。验证安装成功后进行下一步。下面给出一个例子:
|
|
||||||
```bash
|
|
||||||
# 安装docker
|
|
||||||
curl -L https://get.daocloud.io/docker | sh
|
|
||||||
sudo systemctl start docker
|
|
||||||
# 安装 docker-compose
|
|
||||||
curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
|
|
||||||
sudo chmod +x /usr/local/bin/docker-compose
|
|
||||||
# 验证安装
|
|
||||||
docker -v
|
|
||||||
docker-compose -v
|
|
||||||
```
|
|
||||||
|
|
||||||
|
## 👨💻 开发
|
||||||
|
|
||||||
#### 2. 创建3个初始化文件
|
项目技术栈: NextJs + TS + ChakraUI + Mongo + Postgres(Vector 插件)
|
||||||
手动创建或者直接把 deploy 里内容复制过去
|
这是一个平台项目,非单机项目,除了模型调用外还涉及非常多用户的内容。
|
||||||
|
[本地开发 Quick Start](docs/dev/README.md)
|
||||||
|
|
||||||
**/root/fast-gpt/pg/init.sql**
|
## 🚀 私有化部署
|
||||||
```sql
|
|
||||||
set -e
|
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
|
||||||
|
|
||||||
CREATE EXTENSION vector;
|
- [docker-compose 部署教程](docs/deploy/docker.md)
|
||||||
-- init table
|
- [由社区贡献的宝塔部署和本地运行教程](https://space.bilibili.com/431177525/channel/collectiondetail?sid=1370663)
|
||||||
CREATE TABLE modelData (
|
|
||||||
id BIGSERIAL PRIMARY KEY,
|
|
||||||
vector VECTOR(1536),
|
|
||||||
status VARCHAR(50) NOT NULL,
|
|
||||||
user_id VARCHAR(50) NOT NULL,
|
|
||||||
model_id VARCHAR(50) NOT NULL,
|
|
||||||
q TEXT NOT NULL,
|
|
||||||
a TEXT NOT NULL
|
|
||||||
);
|
|
||||||
-- create index
|
|
||||||
CREATE INDEX modelData_status_index ON modelData USING HASH (status);
|
|
||||||
CREATE INDEX modelData_userId_index ON modelData USING HASH (user_id);
|
|
||||||
CREATE INDEX modelData_modelId_index ON modelData USING HASH (model_id);
|
|
||||||
EOSQL
|
|
||||||
```
|
|
||||||
|
|
||||||
**/root/fast-gpt/nginx/nginx.conf**
|
## :point_right: RoadMap
|
||||||
```conf
|
|
||||||
user nginx;
|
|
||||||
worker_processes auto;
|
|
||||||
worker_rlimit_nofile 51200;
|
|
||||||
|
|
||||||
events {
|
- [FastGpt RoadMap](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte)
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
## 🏘️ 交流群
|
||||||
access_log off;
|
|
||||||
server_names_hash_bucket_size 512;
|
|
||||||
client_header_buffer_size 32k;
|
|
||||||
large_client_header_buffers 4 32k;
|
|
||||||
client_max_body_size 50M;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_min_length 1k;
|
|
||||||
gzip_buffers 4 8k;
|
|
||||||
gzip_http_version 1.1;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_types text/plain application/x-javascript text/css application/javascript application/json application/xml;
|
|
||||||
gzip_disable "MSIE [1-6]\.";
|
|
||||||
|
|
||||||
open_file_cache max=1000 inactive=1d;
|
添加 wx 进入:
|
||||||
open_file_cache_valid 30s;
|

|
||||||
open_file_cache_min_uses 8;
|
|
||||||
open_file_cache_errors off;
|
|
||||||
|
|
||||||
server {
|
## 👀 其他
|
||||||
listen 443 ssl;
|
|
||||||
server_name docgpt.ahapocket.cn;
|
|
||||||
ssl_certificate /ssl/docgpt.pem;
|
|
||||||
ssl_certificate_key /ssl/docgpt.key;
|
|
||||||
ssl_session_timeout 5m;
|
|
||||||
|
|
||||||
location / {
|
- [FastGpt 常见问题](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
|
||||||
proxy_pass http://localhost:3000;
|
- [公众号接入](https://www.bilibili.com/video/BV1xh4y1t7fy/)
|
||||||
proxy_set_header Host $host;
|
- [FastGpt + Laf 最佳实践,将知识库装入公众号,点击去 Laf 公众号体验效果](https://b4jky7-fastgpt.oss.laf.run/lafercode.png)
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
- [FastGpt V3.4 更新集合](https://www.bilibili.com/video/BV1Lo4y147Qh/?vd_source=92041a1a395f852f9d89158eaa3f61b4)
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
- [FastGpt 知识库演示](https://www.bilibili.com/video/BV1Wo4y1p7i1/)
|
||||||
}
|
|
||||||
}
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name docgpt.ahapocket.cn;
|
|
||||||
rewrite ^(.*) https://$server_name$1 permanent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**/root/fast-gpt/docker-compose.yml**
|
## 🌟 Star History
|
||||||
```yml
|
|
||||||
version: "3.3"
|
|
||||||
services:
|
|
||||||
fast-gpt:
|
|
||||||
image: c121914yu/fast-gpt:latest
|
|
||||||
network_mode: host
|
|
||||||
restart: always
|
|
||||||
container_name: fast-gpt
|
|
||||||
environment:
|
|
||||||
# - AXIOS_PROXY_HOST=127.0.0.1
|
|
||||||
# - AXIOS_PROXY_PORT=7890
|
|
||||||
# - OPENAI_BASE_URL=https://api.openai.com/v1
|
|
||||||
# - OPENAI_BASE_URL_AUTH=可选的安全凭证
|
|
||||||
- MY_MAIL=xxxx@qq.com
|
|
||||||
- MAILE_CODE=xxxx
|
|
||||||
- aliAccessKeyId=xxxx
|
|
||||||
- aliAccessKeySecret=xxxx
|
|
||||||
- aliSignName=xxxxx
|
|
||||||
- aliTemplateCode=SMS_xxxx
|
|
||||||
- TOKEN_KEY=xxxx
|
|
||||||
- queueTask=1
|
|
||||||
- parentUrl=https://hostname/api/openapi/startEvents
|
|
||||||
- MONGODB_URI=mongodb://username:passsword@0.0.0.0:27017/?authSource=admin
|
|
||||||
- MONGODB_NAME=xxx
|
|
||||||
- PG_HOST=0.0.0.0
|
|
||||||
- PG_PORT=8100
|
|
||||||
- PG_USER=xxx
|
|
||||||
- PG_PASSWORD=xxx
|
|
||||||
- PG_DB_NAME=xxx
|
|
||||||
- OPENAIKEY=sk-xxxxx
|
|
||||||
nginx:
|
|
||||||
image: nginx:alpine3.17
|
|
||||||
container_name: nginx
|
|
||||||
restart: always
|
|
||||||
network_mode: host
|
|
||||||
volumes:
|
|
||||||
- /root/fast-gpt/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
||||||
- /root/fast-gpt/nginx/logs:/var/log/nginx
|
|
||||||
- /root/fast-gpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
|
|
||||||
- /root/fast-gpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
|
|
||||||
pg:
|
|
||||||
image: ankane/pgvector
|
|
||||||
container_name: pg
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 8100:5432
|
|
||||||
environment:
|
|
||||||
- POSTGRES_USER=xxx
|
|
||||||
- POSTGRES_PASSWORD=xxx
|
|
||||||
- POSTGRES_DB=xxx
|
|
||||||
volumes:
|
|
||||||
- /root/fast-gpt/pg/data:/var/lib/postgresql/data
|
|
||||||
- /root/fast-gpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
mongodb:
|
|
||||||
image: mongo:4.0.1
|
|
||||||
container_name: mongo
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 27017:27017
|
|
||||||
environment:
|
|
||||||
- MONGO_INITDB_ROOT_USERNAME=username
|
|
||||||
- MONGO_INITDB_ROOT_PASSWORD=password
|
|
||||||
volumes:
|
|
||||||
- /root/fast-gpt/mongo/data:/data/db
|
|
||||||
- /root/fast-gpt/mongo/logs:/var/log/mongodb
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 3. 运行 docker-compose
|
[](https://star-history.com/#c121914yu/FastGPT&Date)
|
||||||
下面是一个辅助脚本,也可以直接 docker-compose up -d
|
|
||||||
**run.sh 运行文件**
|
|
||||||
```bash
|
|
||||||
#!/bin/bash
|
|
||||||
docker-compose pull
|
|
||||||
docker-compose up -d
|
|
||||||
|
|
||||||
echo "Docker Compose 重新拉取镜像完成!"
|
|
||||||
|
|
||||||
# 删除本地旧镜像
|
|
||||||
images=$(docker images --format "{{.ID}} {{.Repository}}" | grep fast-gpt)
|
|
||||||
|
|
||||||
# 将镜像 ID 和名称放入数组中
|
|
||||||
IFS=$'\n' read -rd '' -a image_array <<<"$images"
|
|
||||||
|
|
||||||
# 遍历数组并删除所有旧的镜像
|
|
||||||
for ((i=1; i<${#image_array[@]}; i++))
|
|
||||||
do
|
|
||||||
image=${image_array[$i]}
|
|
||||||
image_id=${image%% *}
|
|
||||||
docker rmi $image_id
|
|
||||||
done
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## 其他优化点
|
|
||||||
### Git Action 自动打包镜像
|
|
||||||
.github里拥有一个 git 提交到 main 分支时自动打包 amd64 和 arm64 镜像的 actions。你仅需要提前在 git 配置好 session。
|
|
||||||
|
|
||||||
1. 创建账号 session: 头像 -> settings -> 最底部 Developer settings -> Personal access tokens -> tokens(classic) -> 创建新 session,把一些看起来需要的权限勾上。
|
|
||||||
2. 添加 session 到仓库: 仓库 -> settings -> Secrets and variables -> Actions -> 创建secret
|
|
||||||
3. 填写 secret: Name-GH_PAT, Secret-第一步的tokens
|
|
||||||
|
|
||||||
## 其他问题
|
|
||||||
### Mac 可能的问题
|
|
||||||
> 因为教程有部分镜像不兼容arm64,所以写个文档指导新手如何快速在mac上面搭建fast-gpt[如何在mac上面部署fastgpt](./docs/mac.md)
|
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
version: '3.3'
|
|
||||||
services:
|
|
||||||
fast-gpt:
|
|
||||||
image: c121914yu/fast-gpt:latest
|
|
||||||
network_mode: host
|
|
||||||
restart: always
|
|
||||||
container_name: fast-gpt
|
|
||||||
environment:
|
|
||||||
# - AXIOS_PROXY_HOST=127.0.0.1
|
|
||||||
# - AXIOS_PROXY_PORT=7890
|
|
||||||
# - OPENAI_BASE_URL=https://api.openai.com/v1
|
|
||||||
# - OPENAI_BASE_URL_AUTH=可选的安全凭证
|
|
||||||
- MY_MAIL=xxxx@qq.com
|
|
||||||
- MAILE_CODE=xxxx
|
|
||||||
- aliAccessKeyId=xxxx
|
|
||||||
- aliAccessKeySecret=xxxx
|
|
||||||
- aliSignName=xxxxx
|
|
||||||
- aliTemplateCode=SMS_xxxx
|
|
||||||
- TOKEN_KEY=xxxx
|
|
||||||
- queueTask=1
|
|
||||||
- parentUrl=https://hostname/api/openapi/startEvents
|
|
||||||
- MONGODB_URI=mongodb://username:passsword@0.0.0.0:27017/?authSource=admin
|
|
||||||
- MONGODB_NAME=xxx
|
|
||||||
- PG_HOST=0.0.0.0
|
|
||||||
- PG_PORT=8100
|
|
||||||
- PG_USER=xxx
|
|
||||||
- PG_PASSWORD=xxx
|
|
||||||
- PG_DB_NAME=xxx
|
|
||||||
- OPENAIKEY=sk-xxxxx
|
|
||||||
nginx:
|
|
||||||
image: nginx:alpine3.17
|
|
||||||
container_name: nginx
|
|
||||||
restart: always
|
|
||||||
network_mode: host
|
|
||||||
volumes:
|
|
||||||
- /root/fast-gpt/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
||||||
- /root/fast-gpt/nginx/logs:/var/log/nginx
|
|
||||||
- /root/fast-gpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
|
|
||||||
- /root/fast-gpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
|
|
||||||
pg:
|
|
||||||
image: ankane/pgvector
|
|
||||||
container_name: pg
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 8100:5432
|
|
||||||
environment:
|
|
||||||
- POSTGRES_USER=xxx
|
|
||||||
- POSTGRES_PASSWORD=xxx
|
|
||||||
- POSTGRES_DB=xxx
|
|
||||||
volumes:
|
|
||||||
- /root/fast-gpt/pg/data:/var/lib/postgresql/data
|
|
||||||
- /root/fast-gpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
mongodb:
|
|
||||||
image: mongo:4.0.1
|
|
||||||
container_name: mongo
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 27017:27017
|
|
||||||
environment:
|
|
||||||
- MONGO_INITDB_ROOT_USERNAME=username
|
|
||||||
- MONGO_INITDB_ROOT_PASSWORD=password
|
|
||||||
volumes:
|
|
||||||
- /root/fast-gpt/mongo/data:/data/db
|
|
||||||
- /root/fast-gpt/mongo/logs:/var/log/mongodb
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
84
docs/deploy/docker.md
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
# Docker 部署 FastGpt
|
||||||
|
|
||||||
|
## 代理环境(国外服务器可忽略)
|
||||||
|
|
||||||
|
选择一个即可。这只是代理!!!不是项目。
|
||||||
|
|
||||||
|
1. [sealos nginx 方案](./proxy/sealos.md) - 推荐。约等于不用钱,不需要额外准备任何东西。
|
||||||
|
2. [clash 方案](./proxy/clash.md) - 仅需一台服务器(需要有 clash)
|
||||||
|
3. [nginx 方案](./proxy/nginx.md) - 需要一台国外服务器
|
||||||
|
4. [cloudflare 方案](./proxy/cloudflare.md) - 需要有域名(每日免费 10w 次代理请求)
|
||||||
|
5. [腾讯云函数代理方案](https://github.com/easychen/openai-api-proxy/blob/master/FUNC.md) - 仅需一台服务器
|
||||||
|
|
||||||
|
### 1. 准备一些内容
|
||||||
|
|
||||||
|
> 1. 服务器开通 80 端口。用代理的话,对应的代理端口也需要打开。
|
||||||
|
> 2. QQ 邮箱 Code:进入 QQ 邮箱 -> 账号 -> 申请 SMTP 账号
|
||||||
|
> 3. 有域名的准备好 SSL 证书
|
||||||
|
|
||||||
|
### 2. 安装 docker 和 docker-compose
|
||||||
|
|
||||||
|
这个不同系统略有区别,百度安装下。验证安装成功后进行下一步。下面给出一个例子:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 安装docker
|
||||||
|
curl -L https://get.daocloud.io/docker | sh
|
||||||
|
sudo systemctl start docker
|
||||||
|
# 安装 docker-compose
|
||||||
|
curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
|
||||||
|
sudo chmod +x /usr/local/bin/docker-compose
|
||||||
|
# 验证安装
|
||||||
|
docker -v
|
||||||
|
docker-compose -v
|
||||||
|
# 如果docker-compose运行不了,可以把 deploy/fastgpt/docker-compose 文件复制到服务器,然后在 docker-compose 文件夹里执行 sh init.sh。会把docker-compose文件复制到对应目录。
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 创建 3 个初始化文件
|
||||||
|
|
||||||
|
fastgpt 文件夹。分别为:fastgpt/docker-compose.yaml, fastgpt/pg/init.sql, fastgpt/nginx/nginx.conf
|
||||||
|
|
||||||
|
手动创建或者直接把 fastgpt 文件夹复制过去。
|
||||||
|
|
||||||
|
### 3. 运行 docker-compose
|
||||||
|
|
||||||
|
下面是一个辅助脚本,也可以直接 docker-compose up -d
|
||||||
|
|
||||||
|
**run.sh 运行文件**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/bin/bash
|
||||||
|
docker-compose pull
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
echo "Docker Compose 重新拉取镜像完成!"
|
||||||
|
|
||||||
|
# 删除本地旧镜像
|
||||||
|
images=$(docker images --format "{{.ID}} {{.Repository}}" | grep fastgpt)
|
||||||
|
|
||||||
|
# 将镜像 ID 和名称放入数组中
|
||||||
|
IFS=$'\n' read -rd '' -a image_array <<<"$images"
|
||||||
|
|
||||||
|
# 遍历数组并删除所有旧的镜像
|
||||||
|
for ((i=1; i<${#image_array[@]}; i++))
|
||||||
|
do
|
||||||
|
image=${image_array[$i]}
|
||||||
|
image_id=${image%% *}
|
||||||
|
docker rmi $image_id
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
## 其他优化点
|
||||||
|
|
||||||
|
# Git Action 自动打包镜像
|
||||||
|
|
||||||
|
.github 里拥有一个 git 提交到 main 分支时自动打包 amd64 和 arm64 镜像的 actions。你仅需要提前在 git 配置好 session。
|
||||||
|
|
||||||
|
1. 创建账号 session: 头像 -> settings -> 最底部 Developer settings -> Personal access tokens -> tokens(classic) -> 创建新 session,把一些看起来需要的权限勾上。
|
||||||
|
2. 添加 session 到仓库: 仓库 -> settings -> Secrets and variables -> Actions -> 创建 secret
|
||||||
|
3. 填写 secret: Name-GH_PAT, Secret-第一步的 tokens
|
||||||
|
|
||||||
|
## 其他问题
|
||||||
|
|
||||||
|
### Mac 可能的问题
|
||||||
|
|
||||||
|
> 因为教程有部分镜像不兼容 arm64,所以写个文档指导新手如何快速在 mac 上面搭建 fast-gpt[在 mac 上面部署 fastgpt 可能存在的问题](./mac.md)
|
||||||
BIN
docs/deploy/fastgpt/clash/Country.mmdb
Normal file
BIN
docs/deploy/fastgpt/clash/clash-linux-amd64-v3
Normal file
22
docs/deploy/fastgpt/clash/config.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
mixed-port: 7890
|
||||||
|
allow-lan: false
|
||||||
|
bind-address: '*'
|
||||||
|
mode: rule
|
||||||
|
log-level: warning
|
||||||
|
dns:
|
||||||
|
enable: true
|
||||||
|
ipv6: false
|
||||||
|
nameserver:
|
||||||
|
- 8.8.8.8
|
||||||
|
- 8.8.4.4
|
||||||
|
cache-size: 400
|
||||||
|
proxies:
|
||||||
|
|
||||||
|
proxy-groups:
|
||||||
|
- { name: '♻️ 自动选择', type: url-test, proxies: [香港V02×1.5,ABC, 印度01, 台湾03, 新加坡02, 新加坡03, 日本01, 日本02, 新加坡01, 美国01, 美国02, 台湾01, 台湾02], url: 'https://api.openai.com', interval: 3600}
|
||||||
|
rules:
|
||||||
|
- 'DOMAIN-SUFFIX,google.com,♻️ 自动选择'
|
||||||
|
- 'DOMAIN-SUFFIX,ai.fastgpt.run,♻️ 自动选择'
|
||||||
|
- 'DOMAIN-SUFFIX,openai.com,♻️ 自动选择'
|
||||||
|
- 'DOMAIN-SUFFIX,api.openai.com,♻️ 自动选择'
|
||||||
|
- 'MATCH,DIRECT'
|
||||||
18
docs/deploy/fastgpt/clash/proxy.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
export ALL_PROXY=socks5://127.0.0.1:7891
|
||||||
|
export http_proxy=http://127.0.0.1:7890
|
||||||
|
export https_proxy=http://127.0.0.1:7890
|
||||||
|
export HTTP_PROXY=http://127.0.0.1:7890
|
||||||
|
export HTTPS_PROXY=http://127.0.0.1:7890
|
||||||
|
|
||||||
|
OLD_PROCESS=$(pgrep clash)
|
||||||
|
if [ ! -z "$OLD_PROCESS" ]; then
|
||||||
|
echo "Killing old process: $OLD_PROCESS"
|
||||||
|
kill $OLD_PROCESS
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
cd /root/fastgpt/clash/fast
|
||||||
|
rm -f ./nohup.out || true
|
||||||
|
rm -f ./cache.db || true
|
||||||
|
nohup ./clash-linux-amd64-v3 -d ./ &
|
||||||
|
echo "Restart clash fast"
|
||||||
10
docs/deploy/fastgpt/clash/stop.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export ALL_PROXY=''
|
||||||
|
export http_proxy=''
|
||||||
|
export https_proxy=''
|
||||||
|
export HTTP_PROXY=''
|
||||||
|
export HTTPS_PROXY=''
|
||||||
|
OLD_PROCESS=$(pgrep clash)
|
||||||
|
if [ ! -z "$OLD_PROCESS" ]; then
|
||||||
|
echo "Killing old process: $OLD_PROCESS"
|
||||||
|
kill $OLD_PROCESS
|
||||||
|
fi
|
||||||
87
docs/deploy/fastgpt/docker-compose.yml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
version: '3.3'
|
||||||
|
services:
|
||||||
|
pg:
|
||||||
|
image: ankane/pgvector:v0.4.2
|
||||||
|
container_name: pg
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8100:5432
|
||||||
|
environment:
|
||||||
|
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
|
||||||
|
- POSTGRES_USER=fastgpt
|
||||||
|
- POSTGRES_PASSWORD=1234
|
||||||
|
- POSTGRES_DB=fastgpt
|
||||||
|
volumes:
|
||||||
|
# 刚创建的文件
|
||||||
|
- /root/fastgpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
|
||||||
|
- /root/fastgpt/pg/data:/var/lib/postgresql/data
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
mongodb:
|
||||||
|
image: mongo:6.0.4
|
||||||
|
container_name: mongo
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 27017:27017
|
||||||
|
environment:
|
||||||
|
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
|
||||||
|
- MONGO_INITDB_ROOT_USERNAME=username
|
||||||
|
- MONGO_INITDB_ROOT_PASSWORD=password
|
||||||
|
volumes:
|
||||||
|
- /root/fastgpt/mongo/data:/data/db
|
||||||
|
- /root/fastgpt/mongo/logs:/var/log/mongodb
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
fastgpt:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest
|
||||||
|
network_mode: host
|
||||||
|
restart: always
|
||||||
|
container_name: fastgpt
|
||||||
|
environment:
|
||||||
|
# proxy(可选)
|
||||||
|
- AXIOS_PROXY_HOST=127.0.0.1
|
||||||
|
- AXIOS_PROXY_PORT=7890
|
||||||
|
# 是否开启队列任务。 1-开启,0-关闭(请求 parentUrl 去执行任务,单机时直接填1)
|
||||||
|
- queueTask=1
|
||||||
|
- parentUrl=https://hostname/api/openapi/startEvents
|
||||||
|
# 发送邮箱验证码配置。用的是QQ邮箱。参考 nodeMail 获取MAILE_CODE,自行百度。
|
||||||
|
- MY_MAIL=xxxx@qq.com
|
||||||
|
- MAILE_CODE=xxxx
|
||||||
|
# 阿里短信服务(邮箱和短信至少二选一)
|
||||||
|
- aliAccessKeyId=xxxx
|
||||||
|
- aliAccessKeySecret=xxxx
|
||||||
|
- aliSignName=xxxxx
|
||||||
|
- aliTemplateCode=SMS_xxxx
|
||||||
|
# token加密凭证(随便填,作为登录凭证)
|
||||||
|
- TOKEN_KEY=xxxx
|
||||||
|
# root key, 最高权限,可以内部接口互相调用
|
||||||
|
- ROOT_KEY=xxx
|
||||||
|
# 是否进行安全校验(1: 开启,0: 关闭)
|
||||||
|
- SENSITIVE_CHECK=1
|
||||||
|
# 和上方mongo镜像的username,password对应
|
||||||
|
- MONGODB_URI=mongodb://username:password@0.0.0.0:27017/?authSource=admin
|
||||||
|
- MONGODB_NAME=fastgpt
|
||||||
|
- PG_HOST=0.0.0.0
|
||||||
|
- PG_PORT=8100
|
||||||
|
# 和上方PG镜像对应.
|
||||||
|
- PG_USER=fastgpt # POSTGRES_USER
|
||||||
|
- PG_PASSWORD=1234 # POSTGRES_PASSWORD
|
||||||
|
- PG_DB_NAME=fastgpt # POSTGRES_DB
|
||||||
|
# openai
|
||||||
|
- OPENAIKEY=sk-xxxxx
|
||||||
|
- GPT4KEY=sk-xxx
|
||||||
|
- OPENAI_BASE_URL=https://api.openai.com/v1
|
||||||
|
- OPENAI_BASE_URL_AUTH=可选的安全凭证
|
||||||
|
# claude
|
||||||
|
- CLAUDE_BASE_URL=calude模型请求地址
|
||||||
|
- CLAUDE_KEY=CLAUDE_KEY
|
||||||
|
nginx:
|
||||||
|
image: nginx:alpine3.17
|
||||||
|
container_name: nginx
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
volumes:
|
||||||
|
# 刚创建的文件
|
||||||
|
- /root/fastgpt/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
|
- /root/fastgpt/nginx/logs:/var/log/nginx
|
||||||
|
# https证书,没有的话不填,对应的nginx.conf也要修改
|
||||||
|
- /root/fastgpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
|
||||||
|
- /root/fastgpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
|
||||||
BIN
docs/deploy/fastgpt/docker-compose/docker-compose
Normal file
2
docs/deploy/fastgpt/docker-compose/init.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
cp ./docker-compose /usr/local/bin/docker-compose
|
||||||
|
sudo chmod +x /usr/local/bin/docker-compose
|
||||||
@@ -7,11 +7,19 @@ events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
|
resolver 8.8.8.8;
|
||||||
|
proxy_ssl_server_name on;
|
||||||
|
|
||||||
access_log off;
|
access_log off;
|
||||||
server_names_hash_bucket_size 512;
|
server_names_hash_bucket_size 512;
|
||||||
client_header_buffer_size 32k;
|
client_header_buffer_size 64k;
|
||||||
large_client_header_buffers 4 32k;
|
large_client_header_buffers 4 64k;
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
|
proxy_connect_timeout 240s;
|
||||||
|
proxy_read_timeout 240s;
|
||||||
|
proxy_buffer_size 128k;
|
||||||
|
proxy_buffers 4 256k;
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_min_length 1k;
|
gzip_min_length 1k;
|
||||||
@@ -46,4 +54,16 @@ http {
|
|||||||
server_name docgpt.ahapocket.cn;
|
server_name docgpt.ahapocket.cn;
|
||||||
rewrite ^(.*) https://$server_name$1 permanent;
|
rewrite ^(.*) https://$server_name$1 permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 3000;
|
||||||
|
server_name 120.0.0.0;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:3000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,12 +8,14 @@ CREATE TABLE modelData (
|
|||||||
vector VECTOR(1536),
|
vector VECTOR(1536),
|
||||||
status VARCHAR(50) NOT NULL,
|
status VARCHAR(50) NOT NULL,
|
||||||
user_id VARCHAR(50) NOT NULL,
|
user_id VARCHAR(50) NOT NULL,
|
||||||
model_id VARCHAR(50) NOT NULL,
|
model_id VARCHAR(50),
|
||||||
|
kb_id VARCHAR(50),
|
||||||
q TEXT NOT NULL,
|
q TEXT NOT NULL,
|
||||||
a TEXT NOT NULL
|
a TEXT NOT NULL
|
||||||
);
|
);
|
||||||
-- create index
|
-- create index
|
||||||
CREATE INDEX modelData_status_index ON modelData USING HASH (status);
|
CREATE INDEX modelData_status_index ON modelData USING HASH (status);
|
||||||
CREATE INDEX modelData_userId_index ON modelData USING HASH (user_id);
|
CREATE INDEX modelData_userId_index ON modelData USING HASH (user_id);
|
||||||
CREATE INDEX modelData_modelId_index ON modelData USING HASH (model_id);
|
CREATE INDEX modelData_userId_index ON modelData USING HASH (model_id);
|
||||||
|
CREATE INDEX modelData_kbId_index ON modelData USING HASH (kb_id);
|
||||||
EOSQL
|
EOSQL
|
||||||
@@ -5,7 +5,7 @@ docker-compose up -d
|
|||||||
echo "Docker Compose 重新拉取镜像完成!"
|
echo "Docker Compose 重新拉取镜像完成!"
|
||||||
|
|
||||||
# 删除本地旧镜像
|
# 删除本地旧镜像
|
||||||
images=$(docker images --format "{{.ID}} {{.Repository}}" | grep fast-gpt)
|
images=$(docker images --format "{{.ID}} {{.Repository}}" | grep fastgpt)
|
||||||
|
|
||||||
# 将镜像 ID 和名称放入数组中
|
# 将镜像 ID 和名称放入数组中
|
||||||
IFS=$'\n' read -rd '' -a image_array <<<"$images"
|
IFS=$'\n' read -rd '' -a image_array <<<"$images"
|
||||||
@@ -1,35 +1,33 @@
|
|||||||
## 怎么在mac上面部署fastgpt
|
## Mac 上部署可能遇到的问题
|
||||||
|
|
||||||
### 前置条件
|
### 前置条件
|
||||||
|
|
||||||
1、可以 curl api.openai.com
|
1、可以 curl api.openai.com
|
||||||
|
|
||||||
2、有openai key
|
2、有 openai key
|
||||||
|
|
||||||
3、有邮箱MAILE_CODE
|
3、有邮箱 MAILE_CODE
|
||||||
|
|
||||||
4、有docker
|
4、有 docker
|
||||||
|
|
||||||
```
|
```
|
||||||
docker -v
|
docker -v
|
||||||
```
|
```
|
||||||
|
|
||||||
5、有pnpm ,可以使用`brew install pnpm`安装
|
5、有 pnpm ,可以使用`brew install pnpm`安装
|
||||||
|
|
||||||
6、需要创建一个放置pg和mongo数据的文件夹,这里创建在`~/fastgpt`目录中,里面有`pg` 和`mongo `两个文件夹
|
6、需要创建一个放置 pg 和 mongo 数据的文件夹,这里创建在`~/fastgpt`目录中,里面有`pg` 和`mongo `两个文件夹
|
||||||
|
|
||||||
```
|
```
|
||||||
➜ fast-gpt pwd
|
➜ fastgpt pwd
|
||||||
/Users/jie/fast-gpt
|
/Users/jie/fastgpt
|
||||||
➜ fast-gpt ls
|
➜ fastgpt ls
|
||||||
mongo pg
|
mongo pg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### docker 部署方式
|
||||||
|
|
||||||
|
这种方式主要是为了方便调试,可以使用`pnpm dev ` 运行 fastgpt 项目
|
||||||
### docker部署方式
|
|
||||||
|
|
||||||
这种方式主要是为了方便调试,可以使用`pnpm dev ` 运行fast-gpt项目
|
|
||||||
|
|
||||||
**1、.env.local 文件**
|
**1、.env.local 文件**
|
||||||
|
|
||||||
@@ -60,19 +58,19 @@ PG_PASSWORD=xxx
|
|||||||
PG_DB_NAME=xxx
|
PG_DB_NAME=xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
**2、部署mongo**
|
**2、部署 mongo**
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run --name mongo -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password -v ~/fast-gpt/mongo/data:/data/db -d mongo:4.0.1
|
docker run --name mongo -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password -v ~/fastgpt/mongo/data:/data/db -d mongo:4.0.1
|
||||||
```
|
```
|
||||||
|
|
||||||
**3、部署pgsql**
|
**3、部署 pgsql**
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -it --name pg -e "POSTGRES_PASSWORD=xxx" -e POSTGRES_USER=xxx -p 8100:5432 -v ~/fast-gpt/pg/data:/var/lib/postgresql/data -d octoberlan/pgvector:v0.4.1
|
docker run -it --name pg -e "POSTGRES_DB=fastgpt" -e "POSTGRES_PASSWORD=xxx" -e POSTGRES_USER=xxx -p 8100:5432 -v ~/fastgpt/pg/data:/var/lib/postgresql/data -d octoberlan/pgvector:v0.4.1
|
||||||
```
|
```
|
||||||
|
|
||||||
进pgsql容器运行
|
进 pgsql 容器运行
|
||||||
|
|
||||||
```
|
```
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
@@ -90,11 +88,9 @@ CREATE TABLE modelData (
|
|||||||
);
|
);
|
||||||
-- create index
|
-- create index
|
||||||
CREATE INDEX modelData_status_index ON modelData (status);
|
CREATE INDEX modelData_status_index ON modelData (status);
|
||||||
CREATE INDEX modelData_modelId_index ON modelData (modelId);
|
CREATE INDEX modelData_modelId_index ON modelData (model_id);
|
||||||
CREATE INDEX modelData_userId_index ON modelData (userId);
|
CREATE INDEX modelData_userId_index ON modelData (user_id);
|
||||||
EOSQL
|
EOSQL
|
||||||
```
|
```
|
||||||
|
|
||||||
|
4、**最后在 FASTGPT 项目里面运行 pnpm dev 运行项目,然后进入 localhost:3000 看项目是否跑起来了**
|
||||||
|
|
||||||
4、**最后在FASTGPT项目里面运行pnpm dev 运行项目,然后进入localhost:3000 看项目是否跑起来了**
|
|
||||||
BIN
docs/deploy/proxy/imgs/sealos1.png
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
docs/deploy/proxy/imgs/sealos2.png
Normal file
|
After Width: | Height: | Size: 205 KiB |
BIN
docs/deploy/proxy/imgs/sealos3.png
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
docs/deploy/proxy/imgs/sealos4.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
docs/deploy/proxy/imgs/sealos5.png
Normal file
|
After Width: | Height: | Size: 224 KiB |
@@ -1,4 +1,5 @@
|
|||||||
# nginx 反向代理 openai 接口
|
# nginx 反向代理 openai 接口
|
||||||
|
|
||||||
如果你有国外的服务器,可以通过配置 nginx 反向代理,转发 openai 相关的请求,从而让国内的服务器可以通过访问该 nginx 去访问 openai 接口。
|
如果你有国外的服务器,可以通过配置 nginx 反向代理,转发 openai 相关的请求,从而让国内的服务器可以通过访问该 nginx 去访问 openai 接口。
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
@@ -19,7 +20,7 @@ http {
|
|||||||
client_header_buffer_size 32k;
|
client_header_buffer_size 32k;
|
||||||
large_client_header_buffers 4 32k;
|
large_client_header_buffers 4 32k;
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_min_length 1k;
|
gzip_min_length 1k;
|
||||||
gzip_buffers 4 8k;
|
gzip_buffers 4 8k;
|
||||||
@@ -43,10 +44,10 @@ http {
|
|||||||
|
|
||||||
location ~ /openai/(.*) {
|
location ~ /openai/(.*) {
|
||||||
# auth check
|
# auth check
|
||||||
if ($http_authkey != "xxxxxx") {
|
if ($auth != "xxxxxx") {
|
||||||
return 403;
|
return 403;
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_pass https://api.openai.com/$1$is_args$args;
|
proxy_pass https://api.openai.com/$1$is_args$args;
|
||||||
proxy_set_header Host api.openai.com;
|
proxy_set_header Host api.openai.com;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@@ -69,4 +70,4 @@ http {
|
|||||||
rewrite ^(.*) https://$server_name$1 permanent;
|
rewrite ^(.*) https://$server_name$1 permanent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
100
docs/deploy/proxy/sealos.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
# sealos 部署 openai 中转
|
||||||
|
|
||||||
|
## 登录 sealos cloud
|
||||||
|
|
||||||
|
[sealos cloud](https://cloud.sealos.io/)
|
||||||
|
|
||||||
|
## 创建应用
|
||||||
|
|
||||||
|
打开 App Launchpad -> 新建应用
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
### 开启外网访问
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 添加 configmap 文件
|
||||||
|
|
||||||
|
1. 复制下面这段代码,注意 `server_name` 后面的内容替换成上图的地址。
|
||||||
|
|
||||||
|
```
|
||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
worker_rlimit_nofile 51200;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
resolver 8.8.8.8;
|
||||||
|
proxy_ssl_server_name on;
|
||||||
|
|
||||||
|
access_log off;
|
||||||
|
server_names_hash_bucket_size 512;
|
||||||
|
client_header_buffer_size 64k;
|
||||||
|
large_client_header_buffers 4 64k;
|
||||||
|
client_max_body_size 50M;
|
||||||
|
|
||||||
|
proxy_connect_timeout 240s;
|
||||||
|
proxy_read_timeout 240s;
|
||||||
|
proxy_buffer_size 128k;
|
||||||
|
proxy_buffers 4 256k;
|
||||||
|
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name tgohwtdlrmer.cloud.sealos.io; # 这个地方替换成 sealos 提供的内容
|
||||||
|
|
||||||
|
location ~ /openai/(.*) {
|
||||||
|
# auth check
|
||||||
|
if ($http_auth != "auth") { # 安全凭证
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_pass https://api.openai.com/$1$is_args$args;
|
||||||
|
proxy_set_header Host api.openai.com;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
# 如果响应是流式的
|
||||||
|
proxy_set_header Connection '';
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_cache off;
|
||||||
|
# 如果响应是一般的
|
||||||
|
proxy_buffer_size 128k;
|
||||||
|
proxy_buffers 4 256k;
|
||||||
|
proxy_busy_buffers_size 256k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 点开高级配置
|
||||||
|
3. 点击新增 configmap
|
||||||
|
4. 文件名写: `/etc/nginx/nginx.conf`
|
||||||
|
5. 文件值为刚刚复制的那段代码
|
||||||
|
6. 点击确认
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 部署应用
|
||||||
|
|
||||||
|
填写完毕后,点击右上角的 `部署应用`,即可完成。
|
||||||
|
|
||||||
|
## 修改 FastGpt 环境变量
|
||||||
|
|
||||||
|
1. 进入刚刚部署应用的详情,复制外网地址
|
||||||
|

|
||||||
|
|
||||||
|
2. 修改环境变量(是 FastGpt 的环境变量,不是 sealos 的):
|
||||||
|
|
||||||
|
```
|
||||||
|
OPENAI_BASE_URL=https://tgohwtdlrmer.cloud.sealos.io/openai/v1
|
||||||
|
OPENAI_BASE_URL_AUTH=auth
|
||||||
|
```
|
||||||
|
|
||||||
|
**Done!**
|
||||||
51
docs/dev/README.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# FastGpt 本地开发
|
||||||
|
|
||||||
|
第一次开发,请先[部署教程](../deploy/docker.md),需要部署数据库.
|
||||||
|
|
||||||
|
## 环境变量配置
|
||||||
|
|
||||||
|
复制.env.template 文件,生成一个.env.local 环境变量文件夹,修改.env.local 里内容。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# proxy(可选)
|
||||||
|
AXIOS_PROXY_HOST=127.0.0.1
|
||||||
|
AXIOS_PROXY_PORT=7890
|
||||||
|
# 是否开启队列任务。 1-开启,0-关闭(请求parentUrl去执行任务,单机时直接填1)
|
||||||
|
queueTask=1
|
||||||
|
parentUrl=https://hostname/api/openapi/startEvents
|
||||||
|
# email
|
||||||
|
MY_MAIL=xxx@qq.com
|
||||||
|
MAILE_CODE=xxx
|
||||||
|
# ali ems
|
||||||
|
aliAccessKeyId=xxx
|
||||||
|
aliAccessKeySecret=xxx
|
||||||
|
aliSignName=xxx
|
||||||
|
aliTemplateCode=SMS_xxx
|
||||||
|
# token
|
||||||
|
TOKEN_KEY=xxx
|
||||||
|
# root key, 最高权限
|
||||||
|
ROOT_KEY=xxx
|
||||||
|
# 是否进行安全校验(1: 开启,0: 关闭)
|
||||||
|
SENSITIVE_CHECK=1
|
||||||
|
# openai
|
||||||
|
# OPENAI_BASE_URL=https://api.openai.com/v1
|
||||||
|
# OPENAI_BASE_URL_AUTH=可选的安全凭证(不需要的时候,记得去掉)
|
||||||
|
OPENAIKEY=sk-xxx
|
||||||
|
GPT4KEY=sk-xxx
|
||||||
|
# claude
|
||||||
|
CLAUDE_BASE_URL=calude模型请求地址
|
||||||
|
CLAUDE_KEY=CLAUDE_KEY
|
||||||
|
# db
|
||||||
|
MONGODB_URI=mongodb://username:password@0.0.0.0:27017/test?authSource=admin
|
||||||
|
PG_HOST=0.0.0.0
|
||||||
|
PG_PORT=8100
|
||||||
|
PG_USER=xxx
|
||||||
|
PG_PASSWORD=xxx
|
||||||
|
PG_DB_NAME=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
## 运行
|
||||||
|
|
||||||
|
```
|
||||||
|
pnpm dev
|
||||||
|
```
|
||||||
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 111 KiB |
BIN
docs/imgs/demo.png
Normal file
|
After Width: | Height: | Size: 456 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fastgpt",
|
"name": "fastgpt",
|
||||||
"version": "0.1.0",
|
"version": "3.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
"@tanstack/react-query": "^4.24.10",
|
"@tanstack/react-query": "^4.24.10",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"axios": "^1.3.3",
|
"axios": "^1.3.3",
|
||||||
|
"cookie": "^0.5.0",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"eventsource-parser": "^0.1.0",
|
"eventsource-parser": "^0.1.0",
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
"mongoose": "^6.10.0",
|
"mongoose": "^6.10.0",
|
||||||
"nanoid": "^4.0.1",
|
"nanoid": "^4.0.1",
|
||||||
"next": "13.1.6",
|
"next": "13.1.6",
|
||||||
|
"nextjs-cors": "^2.1.2",
|
||||||
"nodemailer": "^6.9.1",
|
"nodemailer": "^6.9.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"openai": "^3.2.1",
|
"openai": "^3.2.1",
|
||||||
@@ -60,6 +62,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@svgr/webpack": "^6.5.1",
|
"@svgr/webpack": "^6.5.1",
|
||||||
|
"@types/cookie": "^0.5.1",
|
||||||
"@types/formidable": "^2.0.5",
|
"@types/formidable": "^2.0.5",
|
||||||
"@types/jsonwebtoken": "^9.0.1",
|
"@types/jsonwebtoken": "^9.0.1",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
@@ -80,5 +83,8 @@
|
|||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"./src/**/*.{ts,tsx,scss}": "npm run format"
|
"./src/**/*.{ts,tsx,scss}": "npm run format"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
496
pnpm-lock.yaml
generated
@@ -13,6 +13,7 @@ specifiers:
|
|||||||
'@next/font': 13.1.6
|
'@next/font': 13.1.6
|
||||||
'@svgr/webpack': ^6.5.1
|
'@svgr/webpack': ^6.5.1
|
||||||
'@tanstack/react-query': ^4.24.10
|
'@tanstack/react-query': ^4.24.10
|
||||||
|
'@types/cookie': ^0.5.1
|
||||||
'@types/formidable': ^2.0.5
|
'@types/formidable': ^2.0.5
|
||||||
'@types/jsonwebtoken': ^9.0.1
|
'@types/jsonwebtoken': ^9.0.1
|
||||||
'@types/lodash': ^4.14.191
|
'@types/lodash': ^4.14.191
|
||||||
@@ -26,6 +27,7 @@ specifiers:
|
|||||||
'@types/react-syntax-highlighter': ^15.5.6
|
'@types/react-syntax-highlighter': ^15.5.6
|
||||||
'@types/tunnel': ^0.0.3
|
'@types/tunnel': ^0.0.3
|
||||||
axios: ^1.3.3
|
axios: ^1.3.3
|
||||||
|
cookie: ^0.5.0
|
||||||
crypto: ^1.0.1
|
crypto: ^1.0.1
|
||||||
dayjs: ^1.11.7
|
dayjs: ^1.11.7
|
||||||
eslint: 8.34.0
|
eslint: 8.34.0
|
||||||
@@ -44,6 +46,7 @@ specifiers:
|
|||||||
mongoose: ^6.10.0
|
mongoose: ^6.10.0
|
||||||
nanoid: ^4.0.1
|
nanoid: ^4.0.1
|
||||||
next: 13.1.6
|
next: 13.1.6
|
||||||
|
nextjs-cors: ^2.1.2
|
||||||
nodemailer: ^6.9.1
|
nodemailer: ^6.9.1
|
||||||
nprogress: ^0.2.0
|
nprogress: ^0.2.0
|
||||||
openai: ^3.2.1
|
openai: ^3.2.1
|
||||||
@@ -80,6 +83,7 @@ dependencies:
|
|||||||
'@tanstack/react-query': registry.npmmirror.com/@tanstack/react-query/4.24.10_biqbaboplfbrettd7655fr4n2y
|
'@tanstack/react-query': registry.npmmirror.com/@tanstack/react-query/4.24.10_biqbaboplfbrettd7655fr4n2y
|
||||||
'@types/nprogress': registry.npmmirror.com/@types/nprogress/0.2.0
|
'@types/nprogress': registry.npmmirror.com/@types/nprogress/0.2.0
|
||||||
axios: registry.npmmirror.com/axios/1.3.3
|
axios: registry.npmmirror.com/axios/1.3.3
|
||||||
|
cookie: 0.5.0
|
||||||
crypto: registry.npmmirror.com/crypto/1.0.1
|
crypto: registry.npmmirror.com/crypto/1.0.1
|
||||||
dayjs: registry.npmmirror.com/dayjs/1.11.7
|
dayjs: registry.npmmirror.com/dayjs/1.11.7
|
||||||
eventsource-parser: registry.npmmirror.com/eventsource-parser/0.1.0
|
eventsource-parser: registry.npmmirror.com/eventsource-parser/0.1.0
|
||||||
@@ -94,6 +98,7 @@ dependencies:
|
|||||||
mongoose: registry.npmmirror.com/mongoose/6.10.0
|
mongoose: registry.npmmirror.com/mongoose/6.10.0
|
||||||
nanoid: registry.npmmirror.com/nanoid/4.0.1
|
nanoid: registry.npmmirror.com/nanoid/4.0.1
|
||||||
next: registry.npmmirror.com/next/13.1.6_wiv434v7erz4aedd5whhdwmpv4
|
next: registry.npmmirror.com/next/13.1.6_wiv434v7erz4aedd5whhdwmpv4
|
||||||
|
nextjs-cors: 2.1.2_next@13.1.6
|
||||||
nodemailer: registry.npmmirror.com/nodemailer/6.9.1
|
nodemailer: registry.npmmirror.com/nodemailer/6.9.1
|
||||||
nprogress: registry.npmmirror.com/nprogress/0.2.0
|
nprogress: registry.npmmirror.com/nprogress/0.2.0
|
||||||
openai: registry.npmmirror.com/openai/3.2.1
|
openai: registry.npmmirror.com/openai/3.2.1
|
||||||
@@ -116,6 +121,7 @@ dependencies:
|
|||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@svgr/webpack': registry.npmmirror.com/@svgr/webpack/6.5.1
|
'@svgr/webpack': registry.npmmirror.com/@svgr/webpack/6.5.1
|
||||||
|
'@types/cookie': 0.5.1
|
||||||
'@types/formidable': registry.npmmirror.com/@types/formidable/2.0.5
|
'@types/formidable': registry.npmmirror.com/@types/formidable/2.0.5
|
||||||
'@types/jsonwebtoken': registry.npmmirror.com/@types/jsonwebtoken/9.0.1
|
'@types/jsonwebtoken': registry.npmmirror.com/@types/jsonwebtoken/9.0.1
|
||||||
'@types/lodash': registry.npmmirror.com/@types/lodash/4.14.191
|
'@types/lodash': registry.npmmirror.com/@types/lodash/4.14.191
|
||||||
@@ -136,6 +142,232 @@ devDependencies:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
|
/@aws-sdk/credential-providers/3.278.0:
|
||||||
|
resolution: {integrity: sha512-XeCyXru9+gxePvrnPbdITZLSCC5qg3C/hgdItstDEvrQh+vMw9DJvX5ztoKh987C0puwkbB6HENC04ZTh/0Buw==}
|
||||||
|
engines: {node: '>=14.0.0'}
|
||||||
|
requiresBuild: true
|
||||||
|
dependencies:
|
||||||
|
'@aws-sdk/client-cognito-identity': registry.npmmirror.com/@aws-sdk/client-cognito-identity/3.278.0
|
||||||
|
'@aws-sdk/client-sso': registry.npmmirror.com/@aws-sdk/client-sso/3.278.0
|
||||||
|
'@aws-sdk/client-sts': registry.npmmirror.com/@aws-sdk/client-sts/3.278.0
|
||||||
|
'@aws-sdk/credential-provider-cognito-identity': registry.npmmirror.com/@aws-sdk/credential-provider-cognito-identity/3.278.0
|
||||||
|
'@aws-sdk/credential-provider-env': registry.npmmirror.com/@aws-sdk/credential-provider-env/3.272.0
|
||||||
|
'@aws-sdk/credential-provider-imds': registry.npmmirror.com/@aws-sdk/credential-provider-imds/3.272.0
|
||||||
|
'@aws-sdk/credential-provider-ini': registry.npmmirror.com/@aws-sdk/credential-provider-ini/3.278.0
|
||||||
|
'@aws-sdk/credential-provider-node': registry.npmmirror.com/@aws-sdk/credential-provider-node/3.278.0
|
||||||
|
'@aws-sdk/credential-provider-process': registry.npmmirror.com/@aws-sdk/credential-provider-process/3.272.0
|
||||||
|
'@aws-sdk/credential-provider-sso': registry.npmmirror.com/@aws-sdk/credential-provider-sso/3.278.0
|
||||||
|
'@aws-sdk/credential-provider-web-identity': registry.npmmirror.com/@aws-sdk/credential-provider-web-identity/3.272.0
|
||||||
|
'@aws-sdk/property-provider': registry.npmmirror.com/@aws-sdk/property-provider/3.272.0
|
||||||
|
'@aws-sdk/shared-ini-file-loader': registry.npmmirror.com/@aws-sdk/shared-ini-file-loader/3.272.0
|
||||||
|
'@aws-sdk/types': registry.npmmirror.com/@aws-sdk/types/3.272.0
|
||||||
|
tslib: registry.npmmirror.com/tslib/2.5.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- aws-crt
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@emotion/is-prop-valid/0.8.8:
|
||||||
|
resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==}
|
||||||
|
requiresBuild: true
|
||||||
|
dependencies:
|
||||||
|
'@emotion/memoize': registry.npmmirror.com/@emotion/memoize/0.7.4
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-android-arm-eabi/13.1.6:
|
||||||
|
resolution: {integrity: sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm]
|
||||||
|
os: [android]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-android-arm64/13.1.6:
|
||||||
|
resolution: {integrity: sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [android]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-darwin-arm64/13.1.6:
|
||||||
|
resolution: {integrity: sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-darwin-x64/13.1.6:
|
||||||
|
resolution: {integrity: sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-freebsd-x64/13.1.6:
|
||||||
|
resolution: {integrity: sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [freebsd]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm-gnueabihf/13.1.6:
|
||||||
|
resolution: {integrity: sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm64-gnu/13.1.6:
|
||||||
|
resolution: {integrity: sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm64-musl/13.1.6:
|
||||||
|
resolution: {integrity: sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-x64-gnu/13.1.6:
|
||||||
|
resolution: {integrity: sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-x64-musl/13.1.6:
|
||||||
|
resolution: {integrity: sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-arm64-msvc/13.1.6:
|
||||||
|
resolution: {integrity: sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-ia32-msvc/13.1.6:
|
||||||
|
resolution: {integrity: sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [ia32]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-x64-msvc/13.1.6:
|
||||||
|
resolution: {integrity: sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@types/cookie/0.5.1:
|
||||||
|
resolution: {integrity: sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@types/hast/2.3.4:
|
||||||
|
resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==}
|
||||||
|
dependencies:
|
||||||
|
'@types/unist': 2.0.6
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@types/unist/2.0.6:
|
||||||
|
resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/cookie/0.5.0:
|
||||||
|
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
|
||||||
|
engines: {node: '>= 0.6'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/cors/2.8.5:
|
||||||
|
resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
|
||||||
|
engines: {node: '>= 0.10'}
|
||||||
|
dependencies:
|
||||||
|
object-assign: 4.1.1
|
||||||
|
vary: 1.1.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/fsevents/2.3.2:
|
||||||
|
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
|
||||||
|
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/graceful-fs/4.2.10:
|
||||||
|
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/nextjs-cors/2.1.2_next@13.1.6:
|
||||||
|
resolution: {integrity: sha512-2yOVivaaf2ILe4f/qY32hnj3oC77VCOsUQJQfhVMGsXE/YMEWUY2zy78sH9FKUCM7eG42/l3pDofIzMD781XGA==}
|
||||||
|
peerDependencies:
|
||||||
|
next: ^8.1.1-canary.54 || ^9.0.0 || ^10.0.0-0 || ^11.0.0 || ^12.0.0 || ^13.0.0
|
||||||
|
dependencies:
|
||||||
|
cors: 2.8.5
|
||||||
|
next: registry.npmmirror.com/next/13.1.6_wiv434v7erz4aedd5whhdwmpv4
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/object-assign/4.1.1:
|
||||||
|
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/saslprep/1.0.3:
|
||||||
|
resolution: {integrity: sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==}
|
||||||
|
engines: {node: '>=6'}
|
||||||
|
requiresBuild: true
|
||||||
|
dependencies:
|
||||||
|
sparse-bitfield: registry.npmmirror.com/sparse-bitfield/3.0.3
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/source-map/0.6.1:
|
||||||
|
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/vary/1.1.2:
|
||||||
|
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||||
|
engines: {node: '>= 0.8'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/@alicloud/credentials/2.2.6:
|
registry.npmmirror.com/@alicloud/credentials/2.2.6:
|
||||||
resolution: {integrity: sha512-jG+msY77dHmAF3x+8VTy7fEgORyXLHmDci8t92HeipBdCHsPptDegA++GEwKgR7f6G4wvafYt+aqMZ1iligdrQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@alicloud/credentials/-/credentials-2.2.6.tgz}
|
resolution: {integrity: sha512-jG+msY77dHmAF3x+8VTy7fEgORyXLHmDci8t92HeipBdCHsPptDegA++GEwKgR7f6G4wvafYt+aqMZ1iligdrQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@alicloud/credentials/-/credentials-2.2.6.tgz}
|
||||||
name: '@alicloud/credentials'
|
name: '@alicloud/credentials'
|
||||||
@@ -641,33 +873,6 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
registry.npmmirror.com/@aws-sdk/credential-providers/3.278.0:
|
|
||||||
resolution: {integrity: sha512-XeCyXru9+gxePvrnPbdITZLSCC5qg3C/hgdItstDEvrQh+vMw9DJvX5ztoKh987C0puwkbB6HENC04ZTh/0Buw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@aws-sdk/credential-providers/-/credential-providers-3.278.0.tgz}
|
|
||||||
name: '@aws-sdk/credential-providers'
|
|
||||||
version: 3.278.0
|
|
||||||
engines: {node: '>=14.0.0'}
|
|
||||||
requiresBuild: true
|
|
||||||
dependencies:
|
|
||||||
'@aws-sdk/client-cognito-identity': registry.npmmirror.com/@aws-sdk/client-cognito-identity/3.278.0
|
|
||||||
'@aws-sdk/client-sso': registry.npmmirror.com/@aws-sdk/client-sso/3.278.0
|
|
||||||
'@aws-sdk/client-sts': registry.npmmirror.com/@aws-sdk/client-sts/3.278.0
|
|
||||||
'@aws-sdk/credential-provider-cognito-identity': registry.npmmirror.com/@aws-sdk/credential-provider-cognito-identity/3.278.0
|
|
||||||
'@aws-sdk/credential-provider-env': registry.npmmirror.com/@aws-sdk/credential-provider-env/3.272.0
|
|
||||||
'@aws-sdk/credential-provider-imds': registry.npmmirror.com/@aws-sdk/credential-provider-imds/3.272.0
|
|
||||||
'@aws-sdk/credential-provider-ini': registry.npmmirror.com/@aws-sdk/credential-provider-ini/3.278.0
|
|
||||||
'@aws-sdk/credential-provider-node': registry.npmmirror.com/@aws-sdk/credential-provider-node/3.278.0
|
|
||||||
'@aws-sdk/credential-provider-process': registry.npmmirror.com/@aws-sdk/credential-provider-process/3.272.0
|
|
||||||
'@aws-sdk/credential-provider-sso': registry.npmmirror.com/@aws-sdk/credential-provider-sso/3.278.0
|
|
||||||
'@aws-sdk/credential-provider-web-identity': registry.npmmirror.com/@aws-sdk/credential-provider-web-identity/3.272.0
|
|
||||||
'@aws-sdk/property-provider': registry.npmmirror.com/@aws-sdk/property-provider/3.272.0
|
|
||||||
'@aws-sdk/shared-ini-file-loader': registry.npmmirror.com/@aws-sdk/shared-ini-file-loader/3.272.0
|
|
||||||
'@aws-sdk/types': registry.npmmirror.com/@aws-sdk/types/3.272.0
|
|
||||||
tslib: registry.npmmirror.com/tslib/2.5.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- aws-crt
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@aws-sdk/fetch-http-handler/3.272.0:
|
registry.npmmirror.com/@aws-sdk/fetch-http-handler/3.272.0:
|
||||||
resolution: {integrity: sha512-1Qhm9e0RbS1Xf4CZqUbQyUMkDLd7GrsRXWIvm9b86/vgeV8/WnjO3CMue9D51nYgcyQORhYXv6uVjAYCWbUExA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.272.0.tgz}
|
resolution: {integrity: sha512-1Qhm9e0RbS1Xf4CZqUbQyUMkDLd7GrsRXWIvm9b86/vgeV8/WnjO3CMue9D51nYgcyQORhYXv6uVjAYCWbUExA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.272.0.tgz}
|
||||||
name: '@aws-sdk/fetch-http-handler'
|
name: '@aws-sdk/fetch-http-handler'
|
||||||
@@ -4220,16 +4425,6 @@ packages:
|
|||||||
version: 0.9.0
|
version: 0.9.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/@emotion/is-prop-valid/0.8.8:
|
|
||||||
resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz}
|
|
||||||
name: '@emotion/is-prop-valid'
|
|
||||||
version: 0.8.8
|
|
||||||
requiresBuild: true
|
|
||||||
dependencies:
|
|
||||||
'@emotion/memoize': registry.npmmirror.com/@emotion/memoize/0.7.4
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@emotion/is-prop-valid/1.2.0:
|
registry.npmmirror.com/@emotion/is-prop-valid/1.2.0:
|
||||||
resolution: {integrity: sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz}
|
resolution: {integrity: sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz}
|
||||||
name: '@emotion/is-prop-valid'
|
name: '@emotion/is-prop-valid'
|
||||||
@@ -4520,153 +4715,6 @@ packages:
|
|||||||
version: 13.1.6
|
version: 13.1.6
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-android-arm-eabi/13.1.6:
|
|
||||||
resolution: {integrity: sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz}
|
|
||||||
name: '@next/swc-android-arm-eabi'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [android]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-android-arm64/13.1.6:
|
|
||||||
resolution: {integrity: sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz}
|
|
||||||
name: '@next/swc-android-arm64'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [android]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-darwin-arm64/13.1.6:
|
|
||||||
resolution: {integrity: sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz}
|
|
||||||
name: '@next/swc-darwin-arm64'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [darwin]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-darwin-x64/13.1.6:
|
|
||||||
resolution: {integrity: sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz}
|
|
||||||
name: '@next/swc-darwin-x64'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [darwin]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-freebsd-x64/13.1.6:
|
|
||||||
resolution: {integrity: sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz}
|
|
||||||
name: '@next/swc-freebsd-x64'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [freebsd]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-linux-arm-gnueabihf/13.1.6:
|
|
||||||
resolution: {integrity: sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz}
|
|
||||||
name: '@next/swc-linux-arm-gnueabihf'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-linux-arm64-gnu/13.1.6:
|
|
||||||
resolution: {integrity: sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz}
|
|
||||||
name: '@next/swc-linux-arm64-gnu'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
libc: [glibc]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-linux-arm64-musl/13.1.6:
|
|
||||||
resolution: {integrity: sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz}
|
|
||||||
name: '@next/swc-linux-arm64-musl'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
libc: [musl]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-linux-x64-gnu/13.1.6:
|
|
||||||
resolution: {integrity: sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz}
|
|
||||||
name: '@next/swc-linux-x64-gnu'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
libc: [glibc]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-linux-x64-musl/13.1.6:
|
|
||||||
resolution: {integrity: sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz}
|
|
||||||
name: '@next/swc-linux-x64-musl'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
libc: [musl]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-win32-arm64-msvc/13.1.6:
|
|
||||||
resolution: {integrity: sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz}
|
|
||||||
name: '@next/swc-win32-arm64-msvc'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [win32]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-win32-ia32-msvc/13.1.6:
|
|
||||||
resolution: {integrity: sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz}
|
|
||||||
name: '@next/swc-win32-ia32-msvc'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [ia32]
|
|
||||||
os: [win32]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@next/swc-win32-x64-msvc/13.1.6:
|
|
||||||
resolution: {integrity: sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz}
|
|
||||||
name: '@next/swc-win32-x64-msvc'
|
|
||||||
version: 13.1.6
|
|
||||||
engines: {node: '>= 10'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [win32]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/@nodelib/fs.scandir/2.1.5:
|
registry.npmmirror.com/@nodelib/fs.scandir/2.1.5:
|
||||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz}
|
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz}
|
||||||
name: '@nodelib/fs.scandir'
|
name: '@nodelib/fs.scandir'
|
||||||
@@ -6018,7 +6066,7 @@ packages:
|
|||||||
normalize-path: registry.npmmirror.com/normalize-path/3.0.0
|
normalize-path: registry.npmmirror.com/normalize-path/3.0.0
|
||||||
readdirp: registry.npmmirror.com/readdirp/3.6.0
|
readdirp: registry.npmmirror.com/readdirp/3.6.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents: registry.npmmirror.com/fsevents/2.3.2
|
fsevents: 2.3.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/chownr/1.1.4:
|
registry.npmmirror.com/chownr/1.1.4:
|
||||||
@@ -6812,7 +6860,7 @@ packages:
|
|||||||
esutils: registry.npmmirror.com/esutils/2.0.3
|
esutils: registry.npmmirror.com/esutils/2.0.3
|
||||||
optionator: registry.npmmirror.com/optionator/0.8.3
|
optionator: registry.npmmirror.com/optionator/0.8.3
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
source-map: registry.npmmirror.com/source-map/0.6.1
|
source-map: 0.6.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/eslint-config-next/13.1.6_7kw3g6rralp5ps6mg3uyzz6azm:
|
registry.npmmirror.com/eslint-config-next/13.1.6_7kw3g6rralp5ps6mg3uyzz6azm:
|
||||||
@@ -7399,7 +7447,7 @@ packages:
|
|||||||
react-dom: registry.npmmirror.com/react-dom/18.2.0_react@18.2.0
|
react-dom: registry.npmmirror.com/react-dom/18.2.0_react@18.2.0
|
||||||
tslib: registry.npmmirror.com/tslib/2.5.0
|
tslib: registry.npmmirror.com/tslib/2.5.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@emotion/is-prop-valid': registry.npmmirror.com/@emotion/is-prop-valid/0.8.8
|
'@emotion/is-prop-valid': 0.8.8
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/framesync/6.1.2:
|
registry.npmmirror.com/framesync/6.1.2:
|
||||||
@@ -7433,16 +7481,6 @@ packages:
|
|||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
registry.npmmirror.com/fsevents/2.3.2:
|
|
||||||
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz}
|
|
||||||
name: fsevents
|
|
||||||
version: 2.3.2
|
|
||||||
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
|
||||||
os: [darwin]
|
|
||||||
requiresBuild: true
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/ftp/0.3.10:
|
registry.npmmirror.com/ftp/0.3.10:
|
||||||
resolution: {integrity: sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ftp/-/ftp-0.3.10.tgz}
|
resolution: {integrity: sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ftp/-/ftp-0.3.10.tgz}
|
||||||
name: ftp
|
name: ftp
|
||||||
@@ -7745,7 +7783,7 @@ packages:
|
|||||||
name: hast-util-from-parse5
|
name: hast-util-from-parse5
|
||||||
version: 7.1.2
|
version: 7.1.2
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': registry.npmmirror.com/@types/hast/2.3.4
|
'@types/hast': 2.3.4
|
||||||
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
||||||
hastscript: registry.npmmirror.com/hastscript/7.2.0
|
hastscript: registry.npmmirror.com/hastscript/7.2.0
|
||||||
property-information: registry.npmmirror.com/property-information/6.2.0
|
property-information: registry.npmmirror.com/property-information/6.2.0
|
||||||
@@ -7759,7 +7797,7 @@ packages:
|
|||||||
name: hast-util-is-element
|
name: hast-util-is-element
|
||||||
version: 2.1.3
|
version: 2.1.3
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': registry.npmmirror.com/@types/hast/2.3.4
|
'@types/hast': 2.3.4
|
||||||
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -7774,7 +7812,7 @@ packages:
|
|||||||
name: hast-util-parse-selector
|
name: hast-util-parse-selector
|
||||||
version: 3.1.1
|
version: 3.1.1
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': registry.npmmirror.com/@types/hast/2.3.4
|
'@types/hast': 2.3.4
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/hast-util-to-text/3.1.2:
|
registry.npmmirror.com/hast-util-to-text/3.1.2:
|
||||||
@@ -7799,7 +7837,7 @@ packages:
|
|||||||
name: hastscript
|
name: hastscript
|
||||||
version: 6.0.0
|
version: 6.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': registry.npmmirror.com/@types/hast/2.3.4
|
'@types/hast': 2.3.4
|
||||||
comma-separated-tokens: registry.npmmirror.com/comma-separated-tokens/1.0.8
|
comma-separated-tokens: registry.npmmirror.com/comma-separated-tokens/1.0.8
|
||||||
hast-util-parse-selector: registry.npmmirror.com/hast-util-parse-selector/2.2.5
|
hast-util-parse-selector: registry.npmmirror.com/hast-util-parse-selector/2.2.5
|
||||||
property-information: registry.npmmirror.com/property-information/5.6.0
|
property-information: registry.npmmirror.com/property-information/5.6.0
|
||||||
@@ -7811,7 +7849,7 @@ packages:
|
|||||||
name: hastscript
|
name: hastscript
|
||||||
version: 7.2.0
|
version: 7.2.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': registry.npmmirror.com/@types/hast/2.3.4
|
'@types/hast': 2.3.4
|
||||||
comma-separated-tokens: registry.npmmirror.com/comma-separated-tokens/2.0.3
|
comma-separated-tokens: registry.npmmirror.com/comma-separated-tokens/2.0.3
|
||||||
hast-util-parse-selector: registry.npmmirror.com/hast-util-parse-selector/3.1.1
|
hast-util-parse-selector: registry.npmmirror.com/hast-util-parse-selector/3.1.1
|
||||||
property-information: registry.npmmirror.com/property-information/6.2.0
|
property-information: registry.npmmirror.com/property-information/6.2.0
|
||||||
@@ -8442,7 +8480,7 @@ packages:
|
|||||||
name: jsonfile
|
name: jsonfile
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.10
|
graceful-fs: 4.2.10
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/jsonwebtoken/9.0.0:
|
registry.npmmirror.com/jsonwebtoken/9.0.0:
|
||||||
@@ -8765,7 +8803,7 @@ packages:
|
|||||||
version: 5.1.2
|
version: 5.1.2
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/mdast': registry.npmmirror.com/@types/mdast/3.0.10
|
'@types/mdast': registry.npmmirror.com/@types/mdast/3.0.10
|
||||||
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
'@types/unist': 2.0.6
|
||||||
unist-util-visit: registry.npmmirror.com/unist-util-visit/4.1.2
|
unist-util-visit: registry.npmmirror.com/unist-util-visit/4.1.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -8893,7 +8931,7 @@ packages:
|
|||||||
name: mdast-util-to-hast
|
name: mdast-util-to-hast
|
||||||
version: 12.3.0
|
version: 12.3.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': registry.npmmirror.com/@types/hast/2.3.4
|
'@types/hast': 2.3.4
|
||||||
'@types/mdast': registry.npmmirror.com/@types/mdast/3.0.10
|
'@types/mdast': registry.npmmirror.com/@types/mdast/3.0.10
|
||||||
mdast-util-definitions: registry.npmmirror.com/mdast-util-definitions/5.1.2
|
mdast-util-definitions: registry.npmmirror.com/mdast-util-definitions/5.1.2
|
||||||
micromark-util-sanitize-uri: registry.npmmirror.com/micromark-util-sanitize-uri/1.1.0
|
micromark-util-sanitize-uri: registry.npmmirror.com/micromark-util-sanitize-uri/1.1.0
|
||||||
@@ -9373,8 +9411,8 @@ packages:
|
|||||||
mongodb-connection-string-url: registry.npmmirror.com/mongodb-connection-string-url/2.6.0
|
mongodb-connection-string-url: registry.npmmirror.com/mongodb-connection-string-url/2.6.0
|
||||||
socks: registry.npmmirror.com/socks/2.7.1
|
socks: registry.npmmirror.com/socks/2.7.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@aws-sdk/credential-providers': registry.npmmirror.com/@aws-sdk/credential-providers/3.278.0
|
'@aws-sdk/credential-providers': 3.278.0
|
||||||
saslprep: registry.npmmirror.com/saslprep/1.0.3
|
saslprep: 1.0.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- aws-crt
|
- aws-crt
|
||||||
dev: false
|
dev: false
|
||||||
@@ -9444,7 +9482,7 @@ packages:
|
|||||||
version: 2.7.0
|
version: 2.7.0
|
||||||
dependencies:
|
dependencies:
|
||||||
any-promise: registry.npmmirror.com/any-promise/1.3.0
|
any-promise: registry.npmmirror.com/any-promise/1.3.0
|
||||||
object-assign: registry.npmmirror.com/object-assign/4.1.1
|
object-assign: 4.1.1
|
||||||
thenify-all: registry.npmmirror.com/thenify-all/1.6.0
|
thenify-all: registry.npmmirror.com/thenify-all/1.6.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -9513,19 +9551,19 @@ packages:
|
|||||||
sass: registry.npmmirror.com/sass/1.58.3
|
sass: registry.npmmirror.com/sass/1.58.3
|
||||||
styled-jsx: registry.npmmirror.com/styled-jsx/5.1.1_react@18.2.0
|
styled-jsx: registry.npmmirror.com/styled-jsx/5.1.1_react@18.2.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@next/swc-android-arm-eabi': registry.npmmirror.com/@next/swc-android-arm-eabi/13.1.6
|
'@next/swc-android-arm-eabi': 13.1.6
|
||||||
'@next/swc-android-arm64': registry.npmmirror.com/@next/swc-android-arm64/13.1.6
|
'@next/swc-android-arm64': 13.1.6
|
||||||
'@next/swc-darwin-arm64': registry.npmmirror.com/@next/swc-darwin-arm64/13.1.6
|
'@next/swc-darwin-arm64': 13.1.6
|
||||||
'@next/swc-darwin-x64': registry.npmmirror.com/@next/swc-darwin-x64/13.1.6
|
'@next/swc-darwin-x64': 13.1.6
|
||||||
'@next/swc-freebsd-x64': registry.npmmirror.com/@next/swc-freebsd-x64/13.1.6
|
'@next/swc-freebsd-x64': 13.1.6
|
||||||
'@next/swc-linux-arm-gnueabihf': registry.npmmirror.com/@next/swc-linux-arm-gnueabihf/13.1.6
|
'@next/swc-linux-arm-gnueabihf': 13.1.6
|
||||||
'@next/swc-linux-arm64-gnu': registry.npmmirror.com/@next/swc-linux-arm64-gnu/13.1.6
|
'@next/swc-linux-arm64-gnu': 13.1.6
|
||||||
'@next/swc-linux-arm64-musl': registry.npmmirror.com/@next/swc-linux-arm64-musl/13.1.6
|
'@next/swc-linux-arm64-musl': 13.1.6
|
||||||
'@next/swc-linux-x64-gnu': registry.npmmirror.com/@next/swc-linux-x64-gnu/13.1.6
|
'@next/swc-linux-x64-gnu': 13.1.6
|
||||||
'@next/swc-linux-x64-musl': registry.npmmirror.com/@next/swc-linux-x64-musl/13.1.6
|
'@next/swc-linux-x64-musl': 13.1.6
|
||||||
'@next/swc-win32-arm64-msvc': registry.npmmirror.com/@next/swc-win32-arm64-msvc/13.1.6
|
'@next/swc-win32-arm64-msvc': 13.1.6
|
||||||
'@next/swc-win32-ia32-msvc': registry.npmmirror.com/@next/swc-win32-ia32-msvc/13.1.6
|
'@next/swc-win32-ia32-msvc': 13.1.6
|
||||||
'@next/swc-win32-x64-msvc': registry.npmmirror.com/@next/swc-win32-x64-msvc/13.1.6
|
'@next/swc-win32-x64-msvc': 13.1.6
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@babel/core'
|
- '@babel/core'
|
||||||
- babel-plugin-macros
|
- babel-plugin-macros
|
||||||
@@ -10760,17 +10798,6 @@ packages:
|
|||||||
version: 2.1.2
|
version: 2.1.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/saslprep/1.0.3:
|
|
||||||
resolution: {integrity: sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/saslprep/-/saslprep-1.0.3.tgz}
|
|
||||||
name: saslprep
|
|
||||||
version: 1.0.3
|
|
||||||
engines: {node: '>=6'}
|
|
||||||
requiresBuild: true
|
|
||||||
dependencies:
|
|
||||||
sparse-bitfield: registry.npmmirror.com/sparse-bitfield/3.0.3
|
|
||||||
dev: false
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/sass/1.58.3:
|
registry.npmmirror.com/sass/1.58.3:
|
||||||
resolution: {integrity: sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/-/sass-1.58.3.tgz}
|
resolution: {integrity: sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/-/sass-1.58.3.tgz}
|
||||||
name: sass
|
name: sass
|
||||||
@@ -11011,6 +11038,7 @@ packages:
|
|||||||
name: source-map
|
name: source-map
|
||||||
version: 0.6.1
|
version: 0.6.1
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
registry.npmmirror.com/space-separated-tokens/1.1.5:
|
registry.npmmirror.com/space-separated-tokens/1.1.5:
|
||||||
resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz}
|
resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz}
|
||||||
@@ -11637,7 +11665,7 @@ packages:
|
|||||||
name: unist-util-position
|
name: unist-util-position
|
||||||
version: 4.0.4
|
version: 4.0.4
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
'@types/unist': 2.0.6
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
registry.npmmirror.com/unist-util-remove-position/4.0.2:
|
registry.npmmirror.com/unist-util-remove-position/4.0.2:
|
||||||
@@ -11830,7 +11858,7 @@ packages:
|
|||||||
name: vfile-location
|
name: vfile-location
|
||||||
version: 4.1.0
|
version: 4.1.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/unist': registry.npmmirror.com/@types/unist/2.0.6
|
'@types/unist': 2.0.6
|
||||||
vfile: registry.npmmirror.com/vfile/5.3.7
|
vfile: registry.npmmirror.com/vfile/5.3.7
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,27 @@
|
|||||||
### 常见问题
|
### 常见问题
|
||||||
**请求次数太多了**
|
|
||||||
一般是因为自己的 openai 账号异常。请先检查自己的账号是否正常使用。
|
**Git 地址**
|
||||||
**内容长度**
|
[项目地址,完全开源,随便用。](https://github.com/c121914yu/FastGPT)
|
||||||
chatgpt 上下文最长 4096 tokens, 上下文超长时会报错。
|
|
||||||
|
**问题文档**
|
||||||
|
[先看文档,再提问](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
|
||||||
|
|
||||||
**删除和复制**
|
**删除和复制**
|
||||||
电脑端:聊天内容右侧有复制和删除的图标。
|
电脑端:聊天内容右侧有复制和删除的图标。
|
||||||
移动端:点击对话头像,可以选择复制或删除该条内容。
|
移动端:点击对话头像,可以选择复制或删除该条内容。
|
||||||
**代理出错**
|
|
||||||
服务器代理不稳定,可以过一会儿再尝试。 或者可以访问国外服务器: [FastGpt](https://fastgpt.run/)
|
**价格表**
|
||||||
|
如果使用了自己的 Api Key,不会计费。可以在账号页,看到详细账单。
|
||||||
|
| 计费项 | 价格: 元/ 1K tokens(包含上下文)|
|
||||||
|
| --- | --- |
|
||||||
|
| claude - 对话 | 免费 |
|
||||||
|
| 知识库 - 索引 | 免费 |
|
||||||
|
| chatgpt - 对话 | 0.025 |
|
||||||
|
| gpt4 - 对话 | 0.5 |
|
||||||
|
| 文件拆分 | 0.025 |
|
||||||
|
|
||||||
|
**其他问题**
|
||||||
|
请 WX 联系: fastgpt123
|
||||||
|
| 交流群 | 小助手 |
|
||||||
|
| ----------------------- | -------------------- |
|
||||||
|
|  |  |
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
接受一个csv文件,表格头包含 question 和 answer。question 代表问题,answer 代表答案。
|
接受一个 csv 文件,表格头包含 question 和 answer。question 代表问题,answer 代表答案。
|
||||||
导入前会进行去重,如果问题和答案完全相同,则不会被导入,所以最终导入的内容可能会比文件的内容少。但是,对于带有换行的内容,目前无法去重。
|
导入前会进行去重,如果问题和答案完全相同,则不会被导入,所以最终导入的内容可能会比文件的内容少。但是,对于带有换行的内容,目前无法去重。
|
||||||
| question | answer |
|
|
||||||
| --- | --- |
|
### 请保证 csv 文件为 utf-8 编码
|
||||||
| 什么是 laf | laf 是一个云函数开发平台…… |
|
|
||||||
|
| question | answer |
|
||||||
|
| ------------- | ------------------------------------------------------ |
|
||||||
|
| 什么是 laf | laf 是一个云函数开发平台…… |
|
||||||
| 什么是 sealos | Sealos 是以 kubernetes 为内核的云操作系统发行版,可以…… |
|
| 什么是 sealos | Sealos 是以 kubernetes 为内核的云操作系统发行版,可以…… |
|
||||||
|
|||||||
@@ -1,41 +1,34 @@
|
|||||||
## 欢迎使用 Fast GPT
|
## 欢迎使用 Fast GPT
|
||||||
|
|
||||||
[Git 仓库](https://github.com/c121914yu/FastGPT)
|
### 项目开源
|
||||||
|
|
||||||
### 交流群/问题反馈
|
FastGpt 项目完全开源,可随意私有化部署,去除平台风险忧虑。项目地址:[Git 仓库](https://github.com/c121914yu/FastGPT)
|
||||||
扫码满了,加个小号,定时拉
|
|
||||||
wx号: fastgpt123
|
|
||||||

|
|
||||||
|
|
||||||
|
### 开始使用知识库
|
||||||
|
|
||||||
### 快速开始
|
1. AI 助手详情里,有一个模型效果。打开知识库搜索开关即可使用知识库搜索功能。
|
||||||
1. 使用手机号注册账号。
|
2. 导入知识库数据。可以手动输入或文件导入。
|
||||||
2. 进入账号页面,添加关联账号,目前只有 openai 的账号可以添加,直接去 openai 官网,把 API Key 粘贴过来。
|
3. 开始对话。
|
||||||
3. 如果填写了自己的 openai 账号,使用时会直接用你的账号。如果没有填写,需要付费使用平台的账号。
|
4. 对话结束后,会看到聊天下方有一个“查看提示词”,可以看到搜索到了哪些内容。
|
||||||
4. 进入模型页,创建一个模型,建议直接用 ChatGPT。
|
|
||||||
5. 在模型列表点击【对话】,即可使用 API 进行聊天。
|
注意:使用知识库模型对话时,tokens 消耗会加快。
|
||||||
|
|
||||||
### 价格表
|
### 价格表
|
||||||
如果使用了自己的 Api Key,不会计费。可以在账号页,看到详细账单。单纯使用 chatGPT 模型进行对话,只有一个计费项目。使用知识库时,包含**对话**和**索引**生成两个计费项。
|
|
||||||
|
如果使用了自己的 Api Key,不会计费。可以在账号页,看到详细账单。
|
||||||
| 计费项 | 价格: 元/ 1K tokens(包含上下文)|
|
| 计费项 | 价格: 元/ 1K tokens(包含上下文)|
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| chatgpt - 对话 | 0.03 |
|
| claude - 对话 | 免费 |
|
||||||
| 知识库 - 对话 | 0.03 |
|
| 知识库 - 索引 | 免费 |
|
||||||
| 知识库 - 索引 | 0.004 |
|
| chatgpt - 对话 | 0.025 |
|
||||||
| 文件拆分 | 0.03 |
|
| gpt4 - 对话 | 0.5 |
|
||||||
|
| 文件拆分 | 0.025 |
|
||||||
|
|
||||||
|
### 交流群/问题反馈
|
||||||
|
|
||||||
### 定制 prompt
|
如果群满了,可加个小助手,定时拉
|
||||||
|
wx 号: fastgpt123
|
||||||
|
|
||||||
1. 进入模型编辑页
|
| 交流群 | 小助手 |
|
||||||
2. 调整温度和提示词
|
| ------------------------------------------------- | ---------------------------------------------- |
|
||||||
3. 使用该模型对话。每次对话时,提示词和温度都会自动注入,方便管理个人的模型。建议把自己日常经常需要使用的 5~10 个方向预设好。
|
|  |  |
|
||||||
|
|
||||||
### 知识库
|
|
||||||
|
|
||||||
1. 创建模型时选择【知识库】
|
|
||||||
2. 进入模型编辑页
|
|
||||||
3. 导入数据,可以选择手动导入,或者选择文件导入。文件导入会自动调用 chatGPT 理解文件内容,并生成知识库。
|
|
||||||
4. 使用该模型对话。
|
|
||||||
|
|
||||||
注意:使用知识库模型对话时,tokens 消耗会加快。
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
### Fast GPT V3.1
|
### Fast GPT V3.8
|
||||||
|
|
||||||
- 优化 - 模型结构设计,不再区分知识库和对话模型,而是通过开关的形式,手动选择手否需要进行知识库搜索。
|
- 新增 - 知识库引用反馈。
|
||||||
- 新增 - 模型共享市场,可以使用其他用户分享的模型。
|
- 新增 - 知识库与 AI 助手对多对关系,一个知识库可以被多个 AI 助手关联,一个 AI 助手可以关联多个知识库。
|
||||||
- 新增 - 邀请好友注册功能。
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 50 KiB |
BIN
public/imgs/wxqun300.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
9
public/js/particles.js
Normal file
@@ -1,18 +1,23 @@
|
|||||||
import { GET, POST, DELETE } from './request';
|
import { GET, POST, DELETE } from './request';
|
||||||
import type { ChatItemType } from '@/types/chat';
|
import type { HistoryItemType } from '@/types/chat';
|
||||||
import type { InitChatResponse } from './response/chat';
|
import type { InitChatResponse, InitShareChatResponse } from './response/chat';
|
||||||
|
import { RequestPaging } from '../types/index';
|
||||||
|
import type { ShareChatSchema } from '@/types/mongoSchema';
|
||||||
|
import type { ShareChatEditType } from '@/types/model';
|
||||||
|
import { Obj2Query } from '@/utils/tools';
|
||||||
|
import { QuoteItemType } from '@/pages/api/openapi/kb/appKbSearch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取初始化聊天内容
|
* 获取初始化聊天内容
|
||||||
*/
|
*/
|
||||||
export const getInitChatSiteInfo = (modelId: string, chatId: '' | string) =>
|
export const getInitChatSiteInfo = (modelId: '' | string, chatId: '' | string) =>
|
||||||
GET<InitChatResponse>(`/chat/init?modelId=${modelId}&chatId=${chatId}`);
|
GET<InitChatResponse>(`/chat/init?modelId=${modelId}&chatId=${chatId}`);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取历史记录
|
* 获取历史记录
|
||||||
*/
|
*/
|
||||||
export const getChatHistory = () =>
|
export const getChatHistory = (data: RequestPaging) =>
|
||||||
GET<{ _id: string; title: string; modelId: string }[]>('/chat/getHistory');
|
POST<HistoryItemType[]>('/chat/getHistory', data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除一条历史记录
|
* 删除一条历史记录
|
||||||
@@ -20,16 +25,48 @@ export const getChatHistory = () =>
|
|||||||
export const delChatHistoryById = (id: string) => GET(`/chat/removeHistory?id=${id}`);
|
export const delChatHistoryById = (id: string) => GET(`/chat/removeHistory?id=${id}`);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储一轮对话
|
* get history quotes
|
||||||
*/
|
*/
|
||||||
export const postSaveChat = (data: {
|
export const getHistoryQuote = (params: { chatId: string; historyId: string }) =>
|
||||||
modelId: string;
|
GET<(QuoteItemType & { _id: string })[]>(`/chat/getHistoryQuote`, params);
|
||||||
chatId: '' | string;
|
|
||||||
prompts: ChatItemType[];
|
/**
|
||||||
}) => POST<string>('/chat/saveChat', data);
|
* update history quote status
|
||||||
|
*/
|
||||||
|
export const updateHistoryQuote = (params: {
|
||||||
|
chatId: string;
|
||||||
|
historyId: string;
|
||||||
|
quoteId: string;
|
||||||
|
}) => GET(`/chat/updateHistoryQuote`, params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除一句对话
|
* 删除一句对话
|
||||||
*/
|
*/
|
||||||
export const delChatRecordByIndex = (chatId: string, contentId: string) =>
|
export const delChatRecordByIndex = (chatId: string, contentId: string) =>
|
||||||
DELETE(`/chat/delChatRecordByContentId?chatId=${chatId}&contentId=${contentId}`);
|
DELETE(`/chat/delChatRecordByContentId?chatId=${chatId}&contentId=${contentId}`);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create a shareChat
|
||||||
|
*/
|
||||||
|
export const createShareChat = (
|
||||||
|
data: ShareChatEditType & {
|
||||||
|
modelId: string;
|
||||||
|
}
|
||||||
|
) => POST<string>(`/chat/shareChat/create`, data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get shareChat
|
||||||
|
*/
|
||||||
|
export const getShareChatList = (modelId: string) =>
|
||||||
|
GET<ShareChatSchema[]>(`/chat/shareChat/list?modelId=${modelId}`);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* delete a shareChat
|
||||||
|
*/
|
||||||
|
export const delShareChatById = (id: string) => DELETE(`/chat/shareChat/delete?id=${id}`);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化分享聊天
|
||||||
|
*/
|
||||||
|
export const initShareChatInfo = (data: { shareId: string; password: string }) =>
|
||||||
|
GET<InitShareChatResponse>(`/chat/shareChat/init?${Obj2Query(data)}`);
|
||||||
|
|||||||
105
src/api/fetch.ts
@@ -1,5 +1,4 @@
|
|||||||
import { getToken } from '../utils/user';
|
import { GUIDE_PROMPT_HEADER, NEW_CHATID_HEADER, QUOTE_LEN_HEADER } from '@/constants/chat';
|
||||||
import { SYSTEM_PROMPT_PREFIX } from '@/constants/chat';
|
|
||||||
|
|
||||||
interface StreamFetchProps {
|
interface StreamFetchProps {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -8,60 +7,58 @@ interface StreamFetchProps {
|
|||||||
abortSignal: AbortController;
|
abortSignal: AbortController;
|
||||||
}
|
}
|
||||||
export const streamFetch = ({ url, data, onMessage, abortSignal }: StreamFetchProps) =>
|
export const streamFetch = ({ url, data, onMessage, abortSignal }: StreamFetchProps) =>
|
||||||
new Promise<{ responseText: string; systemPrompt: string }>(async (resolve, reject) => {
|
new Promise<{ responseText: string; newChatId: string; systemPrompt: string; quoteLen: number }>(
|
||||||
try {
|
async (resolve, reject) => {
|
||||||
const res = await fetch(url, {
|
try {
|
||||||
method: 'POST',
|
const res = await fetch(url, {
|
||||||
headers: {
|
method: 'POST',
|
||||||
'Content-Type': 'application/json',
|
headers: {
|
||||||
Authorization: getToken() || ''
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
signal: abortSignal.signal
|
signal: abortSignal.signal
|
||||||
});
|
});
|
||||||
const reader = res.body?.getReader();
|
const reader = res.body?.getReader();
|
||||||
if (!reader) return;
|
if (!reader) return;
|
||||||
|
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
let responseText = '';
|
|
||||||
let systemPrompt = '';
|
|
||||||
|
|
||||||
const read = async () => {
|
const newChatId = decodeURIComponent(res.headers.get(NEW_CHATID_HEADER) || '');
|
||||||
try {
|
const systemPrompt = decodeURIComponent(res.headers.get(GUIDE_PROMPT_HEADER) || '').trim();
|
||||||
const { done, value } = await reader?.read();
|
const quoteLen = res.headers.get(QUOTE_LEN_HEADER)
|
||||||
if (done) {
|
? Number(res.headers.get(QUOTE_LEN_HEADER))
|
||||||
if (res.status === 200) {
|
: 0;
|
||||||
resolve({ responseText, systemPrompt });
|
|
||||||
} else {
|
let responseText = '';
|
||||||
const parseError = JSON.parse(responseText);
|
|
||||||
reject(parseError?.message || '请求异常');
|
const read = async () => {
|
||||||
|
try {
|
||||||
|
const { done, value } = await reader?.read();
|
||||||
|
if (done) {
|
||||||
|
if (res.status === 200) {
|
||||||
|
resolve({ responseText, newChatId, quoteLen, systemPrompt });
|
||||||
|
} else {
|
||||||
|
const parseError = JSON.parse(responseText);
|
||||||
|
reject(parseError?.message || '请求异常');
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
const text = decoder.decode(value);
|
||||||
return;
|
responseText += text;
|
||||||
|
onMessage(text);
|
||||||
|
read();
|
||||||
|
} catch (err: any) {
|
||||||
|
if (err?.message === 'The user aborted a request.') {
|
||||||
|
return resolve({ responseText, newChatId, quoteLen: 0, systemPrompt: '' });
|
||||||
|
}
|
||||||
|
reject(typeof err === 'string' ? err : err?.message || '请求异常');
|
||||||
}
|
}
|
||||||
let text = decoder.decode(value).replace(/<br\/>/g, '\n');
|
};
|
||||||
// check system prompt
|
read();
|
||||||
if (text.includes(SYSTEM_PROMPT_PREFIX)) {
|
} catch (err: any) {
|
||||||
const arr = text.split(SYSTEM_PROMPT_PREFIX);
|
console.log(err, '====');
|
||||||
systemPrompt = arr.pop() || '';
|
reject(typeof err === 'string' ? err : err?.message || '请求异常');
|
||||||
|
}
|
||||||
text = arr.join('');
|
|
||||||
}
|
|
||||||
responseText += text;
|
|
||||||
onMessage(text);
|
|
||||||
|
|
||||||
read();
|
|
||||||
} catch (err: any) {
|
|
||||||
if (err?.message === 'The user aborted a request.') {
|
|
||||||
return resolve({ responseText, systemPrompt });
|
|
||||||
}
|
|
||||||
reject(typeof err === 'string' ? err : err?.message || '请求异常');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
read();
|
|
||||||
} catch (err: any) {
|
|
||||||
console.log(err, '====');
|
|
||||||
reject(typeof err === 'string' ? err : err?.message || '请求异常');
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { GET, POST, DELETE, PUT } from './request';
|
import { GET, POST, DELETE, PUT } from './request';
|
||||||
import type { ModelSchema, ModelDataSchema } from '@/types/mongoSchema';
|
import type { ModelSchema } from '@/types/mongoSchema';
|
||||||
import { ModelUpdateParams, ShareModelItem } from '@/types/model';
|
import type { ModelUpdateParams } from '@/types/model';
|
||||||
import { RequestPaging } from '../types/index';
|
import { RequestPaging } from '../types/index';
|
||||||
import { Obj2Query } from '@/utils/tools';
|
import type { ModelListResponse } from './response/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取模型列表
|
* 获取模型列表
|
||||||
*/
|
*/
|
||||||
export const getMyModels = () => GET<ModelSchema[]>('/model/list');
|
export const getMyModels = () => GET<ModelListResponse>('/model/list');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建一个模型
|
* 创建一个模型
|
||||||
@@ -30,79 +30,13 @@ export const getModelById = (id: string) => GET<ModelSchema>(`/model/detail?mode
|
|||||||
export const putModelById = (id: string, data: ModelUpdateParams) =>
|
export const putModelById = (id: string, data: ModelUpdateParams) =>
|
||||||
PUT(`/model/update?modelId=${id}`, data);
|
PUT(`/model/update?modelId=${id}`, data);
|
||||||
|
|
||||||
/* 模型 data */
|
|
||||||
type GetModelDataListProps = RequestPaging & {
|
|
||||||
modelId: string;
|
|
||||||
searchText: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 获取模型的知识库数据
|
|
||||||
*/
|
|
||||||
export const getModelDataList = (props: GetModelDataListProps) =>
|
|
||||||
GET(`/model/data/getModelData?${Obj2Query(props)}`);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取导出数据(不分页)
|
|
||||||
*/
|
|
||||||
export const getExportDataList = (modelId: string) =>
|
|
||||||
GET<[string, string][]>(`/model/data/exportModelData?modelId=${modelId}`);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取模型正在拆分数据的数量
|
|
||||||
*/
|
|
||||||
export const getModelSplitDataListLen = (modelId: string) =>
|
|
||||||
GET<number>(`/model/data/getSplitData?modelId=${modelId}`);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 web 页面内容
|
|
||||||
*/
|
|
||||||
export const getWebContent = (url: string) => POST<string>(`/model/data/fetchingUrlData`, { url });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手动输入数据
|
|
||||||
*/
|
|
||||||
export const postModelDataInput = (data: {
|
|
||||||
modelId: string;
|
|
||||||
data: { a: ModelDataSchema['a']; q: ModelDataSchema['q'] }[];
|
|
||||||
}) => POST<number>(`/model/data/pushModelDataInput`, data);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拆分数据
|
|
||||||
*/
|
|
||||||
export const postModelDataSplitData = (data: {
|
|
||||||
modelId: string;
|
|
||||||
chunks: string[];
|
|
||||||
prompt: string;
|
|
||||||
mode: 'qa' | 'subsection';
|
|
||||||
}) => POST(`/model/data/splitData`, data);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* json导入数据
|
|
||||||
*/
|
|
||||||
export const postModelDataCsvData = (modelId: string, data: string[][]) =>
|
|
||||||
POST<number>(`/model/data/pushModelDataCsv`, { modelId, data: data });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新模型数据
|
|
||||||
*/
|
|
||||||
export const putModelDataById = (data: { dataId: string; a: string; q?: string }) =>
|
|
||||||
PUT('/model/data/putModelData', data);
|
|
||||||
/**
|
|
||||||
* 删除一条模型数据
|
|
||||||
*/
|
|
||||||
export const delOneModelData = (dataId: string) =>
|
|
||||||
DELETE(`/model/data/delModelDataById?dataId=${dataId}`);
|
|
||||||
|
|
||||||
/* 共享市场 */
|
/* 共享市场 */
|
||||||
/**
|
/**
|
||||||
* 获取共享市场模型
|
* 获取共享市场模型
|
||||||
*/
|
*/
|
||||||
export const getShareModelList = (data: { searchText?: string } & RequestPaging) =>
|
export const getShareModelList = (data: { searchText?: string } & RequestPaging) =>
|
||||||
POST(`/model/share/getModels`, data);
|
POST(`/model/share/getModels`, data);
|
||||||
/**
|
|
||||||
* 获取收藏的模型
|
|
||||||
*/
|
|
||||||
export const getCollectionModels = () => GET<ShareModelItem[]>(`/model/share/getCollection`);
|
|
||||||
/**
|
/**
|
||||||
* 收藏/取消收藏模型
|
* 收藏/取消收藏模型
|
||||||
*/
|
*/
|
||||||
|
|||||||
73
src/api/plugins/kb.ts
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import { GET, POST, PUT, DELETE } from '../request';
|
||||||
|
import type { KbItemType } from '@/types/plugin';
|
||||||
|
import { RequestPaging } from '@/types/index';
|
||||||
|
import { SplitTextTypEnum } from '@/constants/plugin';
|
||||||
|
import { KbDataItemType } from '@/types/plugin';
|
||||||
|
|
||||||
|
export type KbUpdateParams = { id: string; name: string; tags: string; avatar: string };
|
||||||
|
|
||||||
|
/* knowledge base */
|
||||||
|
export const getKbList = () => GET<KbItemType[]>(`/plugins/kb/list`);
|
||||||
|
|
||||||
|
export const getKbById = (id: string) => GET<KbItemType>(`/plugins/kb/detail?id=${id}`);
|
||||||
|
|
||||||
|
export const postCreateKb = (data: { name: string }) => POST<string>(`/plugins/kb/create`, data);
|
||||||
|
|
||||||
|
export const putKbById = (data: KbUpdateParams) => PUT(`/plugins/kb/update`, data);
|
||||||
|
|
||||||
|
export const delKbById = (id: string) => DELETE(`/plugins/kb/delete?id=${id}`);
|
||||||
|
|
||||||
|
/* kb data */
|
||||||
|
type GetKbDataListProps = RequestPaging & {
|
||||||
|
kbId: string;
|
||||||
|
searchText: string;
|
||||||
|
};
|
||||||
|
export const getKbDataList = (data: GetKbDataListProps) =>
|
||||||
|
POST(`/plugins/kb/data/getDataList`, data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导出数据(不分页)
|
||||||
|
*/
|
||||||
|
export const getExportDataList = (kbId: string) =>
|
||||||
|
GET<[string, string][]>(`/plugins/kb/data/exportModelData?kbId=${kbId}`);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模型正在拆分数据的数量
|
||||||
|
*/
|
||||||
|
export const getTrainingData = (kbId: string) =>
|
||||||
|
GET<{
|
||||||
|
splitDataQueue: number;
|
||||||
|
embeddingQueue: number;
|
||||||
|
}>(`/plugins/kb/data/getTrainingData?kbId=${kbId}`);
|
||||||
|
|
||||||
|
export const getKbDataItemById = (dataId: string) =>
|
||||||
|
GET(`/plugins/kb/data/getDataById`, { dataId });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直接push数据
|
||||||
|
*/
|
||||||
|
export const postKbDataFromList = (data: {
|
||||||
|
kbId: string;
|
||||||
|
data: { a: KbDataItemType['a']; q: KbDataItemType['q'] }[];
|
||||||
|
}) => POST(`/openapi/kb/pushData`, data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新一条数据
|
||||||
|
*/
|
||||||
|
export const putKbDataById = (data: { dataId: string; a: string; q?: string }) =>
|
||||||
|
PUT('/openapi/kb/updateData', data);
|
||||||
|
/**
|
||||||
|
* 删除一条知识库数据
|
||||||
|
*/
|
||||||
|
export const delOneKbDataByDataId = (dataId: string) =>
|
||||||
|
DELETE(`/openapi/kb/delDataById?dataId=${dataId}`);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拆分数据
|
||||||
|
*/
|
||||||
|
export const postSplitData = (data: {
|
||||||
|
kbId: string;
|
||||||
|
chunks: string[];
|
||||||
|
prompt: string;
|
||||||
|
mode: `${SplitTextTypEnum}`;
|
||||||
|
}) => POST(`/openapi/text/splitText`, data);
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import axios, { Method, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
|
import axios, { Method, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
|
||||||
import { getToken, clearToken } from '@/utils/user';
|
import { clearCookie } from '@/utils/user';
|
||||||
import { TOKEN_ERROR_CODE } from '@/service/errorCode';
|
import { TOKEN_ERROR_CODE } from '@/service/errorCode';
|
||||||
|
|
||||||
interface ConfigType {
|
interface ConfigType {
|
||||||
@@ -17,7 +17,7 @@ interface ResponseDataType {
|
|||||||
*/
|
*/
|
||||||
function requestStart(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig {
|
function requestStart(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig {
|
||||||
if (config.headers) {
|
if (config.headers) {
|
||||||
config.headers.Authorization = getToken();
|
// config.headers.Authorization = getToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
@@ -54,13 +54,13 @@ function responseError(err: any) {
|
|||||||
if (typeof err === 'string') {
|
if (typeof err === 'string') {
|
||||||
return Promise.reject({ message: err });
|
return Promise.reject({ message: err });
|
||||||
}
|
}
|
||||||
if (err.response) {
|
// 有报错响应
|
||||||
// 有报错响应
|
if (err?.code in TOKEN_ERROR_CODE) {
|
||||||
const res = err.response;
|
clearCookie();
|
||||||
if (res.data.code in TOKEN_ERROR_CODE) {
|
window.location.replace(
|
||||||
clearToken();
|
`/login?lastRoute=${encodeURIComponent(location.pathname + location.search)}`
|
||||||
return Promise.reject({ message: 'token过期,重新登录' });
|
);
|
||||||
}
|
return Promise.reject({ message: 'token过期,重新登录' });
|
||||||
}
|
}
|
||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
}
|
}
|
||||||
|
|||||||
23
src/api/response/chat.d.ts
vendored
@@ -1,12 +1,25 @@
|
|||||||
import type { ChatPopulate, ModelSchema } from '@/types/mongoSchema';
|
import type { ChatPopulate, ModelSchema } from '@/types/mongoSchema';
|
||||||
import type { ChatItemType } from '@/types/chat';
|
import type { ChatItemType } from '@/types/chat';
|
||||||
|
|
||||||
export type InitChatResponse = {
|
export interface InitChatResponse {
|
||||||
chatId: string;
|
chatId: string;
|
||||||
modelId: string;
|
modelId: string;
|
||||||
name: string;
|
model: {
|
||||||
avatar: string;
|
name: string;
|
||||||
intro: string;
|
avatar: string;
|
||||||
|
intro: string;
|
||||||
|
canUse: boolean;
|
||||||
|
};
|
||||||
chatModel: ModelSchema['chat']['chatModel']; // 对话模型名
|
chatModel: ModelSchema['chat']['chatModel']; // 对话模型名
|
||||||
history: ChatItemType[];
|
history: ChatItemType[];
|
||||||
};
|
}
|
||||||
|
|
||||||
|
export interface InitShareChatResponse {
|
||||||
|
maxContext: number;
|
||||||
|
model: {
|
||||||
|
name: string;
|
||||||
|
avatar: string;
|
||||||
|
intro: string;
|
||||||
|
};
|
||||||
|
chatModel: ModelSchema['chat']['chatModel']; // 对话模型名
|
||||||
|
}
|
||||||
|
|||||||
6
src/api/response/model.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ModelListItemType } from '@/types/model';
|
||||||
|
|
||||||
|
export type ModelListResponse = {
|
||||||
|
myModels: ModelListItemType[];
|
||||||
|
myCollectionModels: ModelListItemType[];
|
||||||
|
};
|
||||||
1
src/api/response/user.d.ts
vendored
@@ -1,7 +1,6 @@
|
|||||||
import type { UserType } from '@/types/user';
|
import type { UserType } from '@/types/user';
|
||||||
import type { PromotionRecordSchema } from '@/types/mongoSchema';
|
import type { PromotionRecordSchema } from '@/types/mongoSchema';
|
||||||
export interface ResLogin {
|
export interface ResLogin {
|
||||||
token: string;
|
|
||||||
user: UserType;
|
user: UserType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
src/api/system.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { GET, POST, PUT } from './request';
|
||||||
|
import type { ChatModelItemType } from '@/constants/model';
|
||||||
|
|
||||||
|
export const getFilling = () => GET<{ beianText: string }>('/system/getFiling');
|
||||||
|
|
||||||
|
export const getSystemModelList = () => GET<ChatModelItemType[]>('/system/getModels');
|
||||||
@@ -2,10 +2,9 @@ import { GET, POST, PUT } from './request';
|
|||||||
import { createHashPassword, Obj2Query } from '@/utils/tools';
|
import { createHashPassword, Obj2Query } from '@/utils/tools';
|
||||||
import { ResLogin, PromotionRecordType } from './response/user';
|
import { ResLogin, PromotionRecordType } from './response/user';
|
||||||
import { UserAuthTypeEnum } from '@/constants/common';
|
import { UserAuthTypeEnum } from '@/constants/common';
|
||||||
import { UserType, UserUpdateParams } from '@/types/user';
|
import { UserBillType, UserType, UserUpdateParams } from '@/types/user';
|
||||||
import type { PagingData, RequestPaging } from '@/types';
|
import type { PagingData, RequestPaging } from '@/types';
|
||||||
import { BillSchema, PaySchema } from '@/types/mongoSchema';
|
import { PaySchema } from '@/types/mongoSchema';
|
||||||
import { adaptBill } from '@/utils/adapt';
|
|
||||||
|
|
||||||
export const sendAuthCode = ({
|
export const sendAuthCode = ({
|
||||||
username,
|
username,
|
||||||
@@ -64,13 +63,12 @@ export const postLogin = ({ username, password }: { username: string; password:
|
|||||||
password: createHashPassword(password)
|
password: createHashPassword(password)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const loginOut = () => GET('/user/loginout');
|
||||||
|
|
||||||
export const putUserInfo = (data: UserUpdateParams) => PUT('/user/update', data);
|
export const putUserInfo = (data: UserUpdateParams) => PUT('/user/update', data);
|
||||||
|
|
||||||
export const getUserBills = (data: RequestPaging) =>
|
export const getUserBills = (data: RequestPaging) =>
|
||||||
GET<PagingData<BillSchema>>(`/user/getBill?${Obj2Query(data)}`).then((res) => ({
|
GET<PagingData<UserBillType>>(`/user/getBill?${Obj2Query(data)}`);
|
||||||
...res,
|
|
||||||
data: res.data.map((bill) => adaptBill(bill))
|
|
||||||
}));
|
|
||||||
|
|
||||||
export const getPayOrders = () => GET<PaySchema[]>(`/user/getPayOrders`);
|
export const getPayOrders = () => GET<PaySchema[]>(`/user/getPayOrders`);
|
||||||
|
|
||||||
|
|||||||
19
src/components/Avatar/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Image } from '@chakra-ui/react';
|
||||||
|
import type { ImageProps } from '@chakra-ui/react';
|
||||||
|
|
||||||
|
const Avatar = ({ w = '30px', ...props }: ImageProps) => {
|
||||||
|
return (
|
||||||
|
<Image
|
||||||
|
fallbackSrc="/icon/logo.png"
|
||||||
|
borderRadius={'50%'}
|
||||||
|
objectFit={'contain'}
|
||||||
|
alt=""
|
||||||
|
w={w}
|
||||||
|
h={w}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Avatar;
|
||||||
1
src/components/Icon/icons/appStore.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684739031957" class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4988" xmlns:xlink="http://www.w3.org/1999/xlink" width="64.125" height="64"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" p-id="4989"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
1
src/components/Icon/icons/back.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683436459815" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1278" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M377.04830749 512.02677874l395.88826112-382.68981248c23.33363769-22.59430969 23.33363769-59.16132466 0-81.68344804-23.33247261-22.5582171-61.18836224-22.5582171-84.52083485 0L250.30081877 471.19378659c-23.29754397 22.5582171-23.29754397 59.14385977 0 81.63105451l438.11491385 423.52280349c11.70233003 11.27968995 26.99767353 16.91837099 42.29534607 16.91837098 15.29883648 0 30.59418112-5.63984498 42.22548878-16.95446471 23.33363769-22.5582171 23.33363769-59.07283854 0-81.63105451L377.04830749 512.02677874" p-id="1279"></path></svg>
|
||||||
|
After Width: | Height: | Size: 866 B |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1680878351566" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1173" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M896 771.413333h-768c-51.2 0-93.866667-42.666667-93.866667-93.866666V209.92c0-51.2 42.666667-93.866667 93.866667-93.866667h768c51.2 0 93.866667 42.666667 93.866667 93.866667v465.92c0 52.906667-42.666667 95.573333-93.866667 95.573333zM128 167.253333C104.106667 167.253333 85.333333 186.026667 85.333333 209.92v465.92c0 23.893333 18.773333 42.666667 42.666667 42.666667h768c23.893333 0 42.666667-18.773333 42.666667-42.666667V209.92c0-23.893333-18.773333-42.666667-42.666667-42.666667h-768z" p-id="1174"></path><path d="M512 907.946667c-13.653333 0-25.6-11.946667-25.6-25.6v-136.533334c0-13.653333 11.946667-25.6 25.6-25.6s25.6 11.946667 25.6 25.6v136.533334c0 13.653333-11.946667 25.6-25.6 25.6z" p-id="1175"></path><path d="M680.96 907.946667H343.04c-13.653333 0-25.6-11.946667-25.6-25.6s11.946667-25.6 25.6-25.6h337.92c13.653333 0 25.6 11.946667 25.6 25.6s-11.946667 25.6-25.6 25.6zM776.533333 648.533333h-529.066666c-13.653333 0-25.6-11.946667-25.6-25.6s11.946667-25.6 25.6-25.6h530.773333c13.653333 0 25.6 11.946667 25.6 25.6s-11.946667 25.6-27.306667 25.6z" p-id="1176"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
1
src/components/Icon/icons/chat.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683254586102" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="940" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M512 34.13333333c263.91893333 0 477.86666667 213.94773333 477.86666667 477.86666667S775.91893333 989.86666667 512 989.86666667H79.6448A45.51146667 45.51146667 0 0 1 34.13333333 944.3552V512C34.13333333 248.08106667 248.08106667 34.13333333 512 34.13333333zM307.2 580.26666667a22.7552 22.7552 0 0 0-22.7552 22.7552V648.53333333A22.7552 22.7552 0 0 0 307.2 671.28853333h227.5552A22.7552 22.7552 0 0 0 557.51146667 648.53333333v-45.51146666A22.7552 22.7552 0 0 0 534.7552 580.26666667H307.2z m0-182.0448a22.7552 22.7552 0 0 0-22.7552 22.75626666v45.5104A22.7552 22.7552 0 0 0 307.2 489.2448h409.6a22.7552 22.7552 0 0 0 22.7552-22.75626667v-45.5104A22.7552 22.7552 0 0 0 716.8 398.22186667H307.2z" p-id="941"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
1
src/components/Icon/icons/closeSolid.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683455612885" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1736" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M848.41813333 174.4896q69.90506667 69.90506667 104.31146667 157.2864t34.4064 179.13173333-34.4064 179.13173334-104.31146667 157.2864-157.2864 104.8576-179.13173333 34.95253333-179.67786667-34.95253333-157.83253333-104.8576-104.8576-157.2864-34.95253333-179.13173334 34.95253333-179.13173333 104.8576-157.2864 157.83253333-104.31146667 179.67786667-34.4064 179.13173333 34.4064 157.2864 104.31146667zM734.8224 729.36106667q22.9376-22.9376 20.20693333-52.4288t-25.66826666-52.4288l-114.688-114.688 114.688-114.688q22.9376-22.9376 25.66826666-52.4288t-20.20693333-52.4288-55.15946667-22.9376-55.15946666 22.9376l-114.688 113.59573333-111.4112-111.4112q-22.9376-21.84533333-52.4288-24.576t-52.4288 19.11466667q-22.9376 22.9376-22.9376 55.7056t22.9376 55.7056l111.4112 111.4112-111.4112 111.4112q-22.9376 22.9376-22.9376 55.15946666t22.9376 55.15946667 52.4288 20.20693333 52.4288-25.66826666l111.4112-111.4112 114.688 114.688q22.9376 22.9376 55.15946666 22.9376t55.15946667-22.9376z" p-id="1737"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682232349111" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7070" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28"><path d="M512 102.6c110.7 0 215 12.3 293.9 34.7 35.8 10.2 65 22.1 84.5 34.7 18.6 12 21.3 19.7 21.6 20.6-0.2 0.9-3 8.6-21.6 20.6-19.5 12.5-48.7 24.5-84.5 34.7-78.9 22.3-183.2 34.7-293.9 34.7s-215-12.3-293.9-34.7c-35.8-10.2-65-22.1-84.5-34.7-18.6-12-21.3-19.7-21.6-20.6 0.2-0.9 3-8.6 21.6-20.6 19.5-12.5 48.7-24.5 84.5-34.7 78.9-22.4 183.2-34.7 293.9-34.7m0-40c-243 0-440 58.2-440 130s197 130 440 130 440-58.2 440-130-197-130-440-130zM112 190.4H72v641h40v-641z m840-0.3h-40v641h40v-641zM912 831v0.5c-0.2 0.9-3 8.6-21.6 20.6-19.5 12.5-48.7 24.5-84.5 34.7-78.9 22.3-183.2 34.6-293.9 34.6s-215-12.3-293.9-34.7c-35.8-10.2-65-22.1-84.5-34.7-18.6-12-21.3-19.7-21.6-20.6v-0.3l-40 0.3v0.1c0 71.8 197 130 440 130s440-58.2 440-130v-0.4l-40-0.1z m0-210.5v0.5c-0.2 0.9-3 8.6-21.6 20.6-19.5 12.5-48.7 24.5-84.5 34.7C727 698.6 622.7 711 512 711s-215-12.3-293.9-34.7c-35.8-10.2-65-22.1-84.5-34.7-18.6-12-21.3-19.7-21.6-20.6v-0.3l-40 0.3v0.1c0 71.8 197 130 440 130s440-58.2 440-130v-0.4l-40-0.2z m0-221.5v0.5c-0.2 0.9-3 8.6-21.6 20.6-19.5 12.5-48.7 24.5-84.5 34.7-78.9 22.3-183.2 34.7-293.9 34.7s-215-12.3-293.9-34.7c-35.8-10.2-65-22.1-84.5-34.7-18.6-12-21.3-19.7-21.6-20.6v-0.3l-40 0.3v0.1c0 71.8 197 130 440 130s440-58.2 440-130v-0.4l-40-0.2z" fill="" p-id="7071"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1680878410563" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2745" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M256 512l81.6 108.8a32 32 0 0 1-51.2 38.4l-96-128a31.968 31.968 0 0 1 0-38.4l96-128a32 32 0 0 1 51.2 38.4L256 512zM670.4 620.8a32 32 0 0 0 51.2 38.4l96-128a31.968 31.968 0 0 0 0-38.4l-96-128a32 32 0 0 0-51.2 38.4L752 512l-81.6 108.8zM503.232 646.944a32 32 0 1 1-62.464-13.888l64-288a32 32 0 1 1 62.464 13.888l-64 288z" p-id="2746"></path><path d="M160 144a32 32 0 0 0-32 32V864a32 32 0 0 0 32 32h688a32 32 0 0 0 32-32V176a32 32 0 0 0-32-32H160z m0-64h688a96 96 0 0 1 96 96V864a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V176a96 96 0 0 1 96-96z" p-id="2747"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683254594671" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1491" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M46.95735957 106.20989621h930.08528086v158.0067668H46.95735957zM46.95735957 353.99323467v608.68515424h930.08528086V353.99323467H46.95735957z m346.5375657 418.35882335L328.85579413 835.19565715l-165.18889183-172.37101684 165.18889183-172.37101686 64.63913114 62.84359914-105.93635373 109.52741772 105.93635373 109.52741771z m127.48273175 62.84359913l-86.18550917-23.34190854 87.98104116-330.37778366 86.1855077 23.34191003L520.97765702 835.19565715z m193.91739489 0l-64.63913114-62.84359913 105.93635372-109.52741771-105.93635372-109.52741772 64.63913114-62.84359914 165.18889182 172.37101686-165.18889182 172.37101684z" p-id="1492"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 976 B |
1
src/components/Icon/icons/edit.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684826302600" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2244" xmlns:xlink="http://www.w3.org/1999/xlink" ><path d="M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" p-id="2245"></path><path d="M355.9 534.9L354 653.8c-0.1 8.9 7.1 16.2 16 16.2h0.4l118-2.9c2-0.1 4-0.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1 0.8-5.7 2.3l-415.8 415c-1.4 1.5-2.3 3.5-2.3 5.6z m63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1 0.7-46.4z" p-id="2246"></path></svg>
|
||||||
|
After Width: | Height: | Size: 810 B |
5
src/components/Icon/icons/empty.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="40" cy="40" r="39.5" stroke="#9CA2A8" stroke-dasharray="4 4"/>
|
||||||
|
<path d="M23.6876 55.8387L23.6407 55.8376C23.3701 55.8288 21.9635 55.7385 21.0265 54.8601C20.0656 53.959 19.9509 52.6633 19.9377 52.4125C19.9364 52.389 19.9358 52.3653 19.9359 52.3417V45.2852C19.9219 44.9945 19.9031 44.0125 20.2321 42.922C20.5474 41.8763 20.9369 41.1898 21.0484 41.0045L24.591 34.7371C24.6087 34.7056 24.6275 34.6752 24.6476 34.6457C24.758 34.4818 25.3518 33.6383 26.166 33.1317C27.0227 32.5982 28.0597 32.557 28.3572 32.557H50.7351C50.7639 32.557 50.7924 32.5578 50.8219 32.5596C51.0443 32.5739 52.1994 32.6714 53.0933 33.1828C53.9469 33.6716 54.634 34.5259 54.763 34.6919C54.7891 34.7259 54.8137 34.7611 54.8367 34.7974L59.0442 41.4646C59.0622 41.4939 59.0804 41.5246 59.0968 41.556C59.1774 41.7109 59.5933 42.529 59.8039 43.3247C60.0119 44.1119 60.0621 44.9819 60.0698 45.1481L60.0708 45.2048V52.2624C60.0756 52.6356 60.0069 53.9162 58.9446 54.8678C57.9386 55.7684 56.5842 55.8381 56.1931 55.8381H23.6876V55.8387ZM23.3271 42.4347C23.2497 42.5723 23.0089 43.0277 22.8065 43.6986C22.5927 44.4079 22.6181 45.0709 22.6215 45.1444C22.6234 45.1761 22.6245 45.208 22.625 45.2398V52.2952L22.6276 52.3147C22.6443 52.4416 22.7217 52.749 22.8551 52.8876L22.8731 52.9067L22.8943 52.9223C23.0811 53.06 23.5441 53.139 23.7058 53.1487L56.1952 53.1493C56.4648 53.1461 56.936 53.0563 57.1495 52.8649C57.3405 52.6937 57.3833 52.3998 57.3833 52.3528L57.3807 52.2712V45.2461C57.3662 44.9721 57.3131 44.4259 57.2031 44.0121C57.0786 43.5393 56.8001 42.973 56.7454 42.8646L56.7303 42.8382L52.6013 36.2947L52.5884 36.2791C52.4319 36.0906 52.0567 35.6879 51.757 35.5161C51.4975 35.3676 50.969 35.2725 50.6968 35.2471L50.6686 35.2458H28.362C28.1532 35.2476 27.7653 35.3029 27.5861 35.4149C27.3338 35.5722 27.0349 35.9316 26.912 36.0994L26.9014 36.1139L23.381 42.3419L23.3429 42.4059L23.3435 42.4043C23.3424 42.4074 23.3271 42.4347 23.3271 42.4347ZM39.8749 30.5851C39.5184 30.5847 39.1766 30.443 38.9245 30.1909C38.6724 29.9388 38.5306 29.5971 38.5301 29.2406V21.5056C38.5306 21.1492 38.6723 20.8075 38.9243 20.5555C39.1763 20.3034 39.518 20.1616 39.8744 20.1611C40.2309 20.1615 40.5728 20.3032 40.8249 20.5553C41.0771 20.8073 41.2189 21.1491 41.2194 21.5056V29.2405C41.2191 29.5969 41.0773 29.9387 40.8252 30.1908C40.5732 30.4429 40.2314 30.5846 39.8749 30.585V30.5851ZM48.8898 30.5341C48.5333 30.5336 48.1916 30.3917 47.9395 30.1396C47.6875 29.8875 47.5457 29.5458 47.5453 29.1893C47.5456 28.8809 47.6516 28.5819 47.8457 28.3423L50.9194 24.5515C51.0453 24.3956 51.2047 24.27 51.3856 24.1838C51.5666 24.0977 51.7646 24.0532 51.965 24.0537C52.2757 24.0537 52.5683 24.1575 52.8103 24.3539C52.948 24.4646 53.0623 24.6017 53.1465 24.757C53.2308 24.9123 53.2833 25.0829 53.3011 25.2587C53.32 25.4343 53.304 25.6119 53.2537 25.7813C53.2035 25.9506 53.1202 26.1083 53.0085 26.2452L49.935 30.036C49.8095 30.1918 49.6507 30.3175 49.4701 30.4036C49.2896 30.4898 49.092 30.5343 48.8919 30.5338H48.8898V30.5341ZM31.0112 30.4313C30.8092 30.4318 30.6097 30.3865 30.4278 30.2988C30.2458 30.2111 30.0861 30.0833 29.9607 29.925L26.9392 26.1344C26.7173 25.8554 26.6151 25.4998 26.6551 25.1455C26.695 24.7912 26.8739 24.4673 27.1525 24.2447C27.3898 24.0541 27.6853 23.9505 27.9897 23.9514C28.4019 23.9514 28.7853 24.1361 29.0419 24.458L32.0637 28.2485C32.2857 28.5274 32.388 28.883 32.3481 29.2372C32.3083 29.5914 32.1295 29.9154 31.851 30.138C31.6128 30.3274 31.3177 30.4307 31.0133 30.4313H31.0112Z" fill="#7B838B"/>
|
||||||
|
<path d="M39.9264 50.3068C36.9308 50.3068 34.3281 48.2985 33.5976 45.4236L33.5388 45.1918L21.5977 45.1847C21.2412 45.1839 20.8995 45.0419 20.6475 44.7897C20.3954 44.5375 20.2537 44.1957 20.2532 43.8391C20.2537 43.4827 20.3956 43.1411 20.6476 42.8892C20.8997 42.6373 21.2413 42.4955 21.5977 42.4951L34.7466 42.5035C35.103 42.5044 35.4444 42.6465 35.6963 42.8986C35.9481 43.1506 36.0899 43.4922 36.0904 43.8486C36.0904 45.9621 37.7753 47.6174 39.9264 47.6174C42.0698 47.6174 43.7489 45.9622 43.7489 43.8486C43.7496 43.4922 43.8915 43.1506 44.1435 42.8985C44.3954 42.6465 44.737 42.5044 45.0934 42.5035L58.1206 42.4953C58.8623 42.4953 59.4651 43.0976 59.4656 43.8388C59.4661 44.58 58.8634 45.1839 58.1221 45.185L46.3019 45.1921L46.243 45.4238C45.5134 48.2987 42.9162 50.3068 39.9264 50.3068Z" fill="#7B838B"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682957006954" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2644" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M942.1 593.9c-22.6 0-41 18.3-41 41v204.8c0 22.6-18.4 41-41 41H163.8c-22.6 0-41-18.4-41-41V634.9c0-22.6-18.3-41-41-41s-41 18.3-41 41v204.8c0 67.8 55.1 122.9 122.9 122.9H860c67.8 0 122.9-55.1 122.9-122.9V634.9c0.1-22.6-18.2-41-40.8-41z" p-id="2645"></path><path d="M309.3 363L471 201.3v515.5c0 22.5 18.4 41 41 41 22.5 0 41-18.4 41-41V201.3L714.7 363c15.9 15.9 42 15.9 57.9 0 15.9-15.9 15.9-42 0-57.9L541.5 73.9c-0.2-0.2-0.3-0.4-0.4-0.5-5.7-5.7-12.7-9.3-20.1-10.9-0.2-0.1-0.5-0.2-0.7-0.2-2.7-0.5-5.4-0.8-8.1-0.8-2.7 0-5.5 0.3-8.1 0.8-0.3 0.1-0.5 0.2-0.7 0.2-7.4 1.6-14.4 5.2-20.1 10.9-0.2 0.2-0.3 0.4-0.4 0.5L251.4 305.1c-15.9 15.9-15.9 42 0 57.9 15.9 15.9 42 15.9 57.9 0z" p-id="2646"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.0 KiB |
1
src/components/Icon/icons/git.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684122143852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2364" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9 23.5 23.2 38.1 55.4 38.1 91v112.5c0.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" p-id="2365"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1013 B |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682232686576" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8959" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28"><path d="M762.805186 140.938939c-14.335497-9.66922-33.725102-5.887081-43.373857 8.398274-9.648754 14.295588-5.897314 33.714869 8.398274 43.373857 106.369609 71.852468 169.864736 191.267185 169.864736 319.445496 0 212.414831-172.802648 385.217479-385.217479 385.217479S127.259382 724.571397 127.259382 512.156566c0-128.178311 63.494103-247.593028 169.864736-319.445496 14.295588-9.658987 18.047028-29.078269 8.398274-43.373857-9.658987-14.285355-29.088502-18.067494-43.373857-8.398274C138.575102 224.432539 64.791655 363.206162 64.791655 512.156566c0 246.851131 200.834074 447.685205 447.685205 447.685205S960.162066 759.007697 960.162066 512.156566C960.162066 363.206162 886.377596 224.432539 762.805186 140.938939z" p-id="8960"></path><path d="M401.003 64.47136c-17.253966 0-31.234375 13.980409-31.234375 31.233352l0 30.470989c0 17.253966 13.980409 31.234375 31.234375 31.234375s31.234375-13.980409 31.234375-31.234375L432.237375 95.704712C432.236352 78.450746 418.256966 64.47136 401.003 64.47136z" p-id="8961"></path><path d="M623.950721 64.47136c-17.253966 0-31.233352 13.980409-31.233352 31.233352l0 30.470989c0 17.253966 13.980409 31.234375 31.233352 31.234375s31.234375-13.980409 31.234375-31.234375L655.185097 95.704712C655.184073 78.450746 641.204687 64.47136 623.950721 64.47136z" p-id="8962"></path><path d="M426.012603 227.493248c11.214413 18.047028 41.970904 48.589648 86.157265 48.589648 43.963281 0 75.105558-30.318516 86.574774-48.223305 9.222035-14.396895 5.03262-33.358759-9.242502-42.763966-14.304797-9.405207-33.593096-5.398964-43.159986 8.764618-0.132006 0.193405-13.614066 19.754926-34.172287 19.754926-19.989263 0-32.423457-18.098193-33.267685-19.36914-9.160637-14.427594-28.264741-18.799158-42.834574-9.770528C421.416935 193.584973 416.912341 212.841549 426.012603 227.493248z" p-id="8963"></path><path d="M510.781242 335.164502c-17.253966 0-31.233352 13.980409-31.233352 31.233352l0 208.225415c0 0.63445 0.149403 1.227967 0.187265 1.853208 0.067538 1.115404 0.148379 2.217505 0.333598 3.314489 0.168846 1.00898 0.416486 1.978051 0.679475 2.951215 0.258896 0.954745 0.529049 1.895163 0.87595 2.821255 0.36839 0.981351 0.801249 1.916653 1.26276 2.847861 0.431835 0.876973 0.880043 1.734504 1.393743 2.569522 0.532119 0.860601 1.115404 1.670036 1.727341 2.472308 0.610914 0.805342 1.235131 1.588171 1.926886 2.336208 0.688685 0.74292 1.424442 1.420349 2.181689 2.093684 0.741897 0.659009 1.484817 1.303692 2.298346 1.89721 0.899486 0.657986 1.850138 1.222851 2.819209 1.783623 0.544399 0.314155 1.00898 0.714268 1.577938 0.998747l208.225415 104.113219c4.484128 2.236947 9.252735 3.304256 13.94971 3.304256 11.44875 0 22.479991-6.334265 27.959795-17.274432 7.706519-15.433504 1.454118-34.192753-13.970176-41.909505l-190.961216-95.480608L542.015617 366.397854C542.015617 349.143888 528.035208 335.164502 510.781242 335.164502z" p-id="8964"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1679114254212" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2776" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M923.733333 394.666667c-85.333333-70.4-206.933333-174.933333-362.666666-309.333334C533.333333 61.866667 490.666667 61.866667 462.933333 85.333333c-155.733333 134.4-277.333333 238.933333-362.666666 309.333334-14.933333 14.933333-25.6 34.133333-25.6 53.333333 0 38.4 32 70.4 70.4 70.4H192v358.4c0 29.866667 23.466667 53.333333 53.333333 53.333333H405.333333c29.866667 0 53.333333-23.466667 53.333334-53.333333v-206.933333h106.666666v206.933333c0 29.866667 23.466667 53.333333 53.333334 53.333333h160c29.866667 0 53.333333-23.466667 53.333333-53.333333V518.4h46.933333c38.4 0 70.4-32 70.4-70.4 0-21.333333-10.666667-40.533333-25.6-53.333333z m-44.8 59.733333h-57.6c-29.866667 0-53.333333 23.466667-53.333333 53.333333v358.4h-138.666667V661.333333c0-29.866667-23.466667-53.333333-53.333333-53.333333h-128c-29.866667 0-53.333333 23.466667-53.333333 53.333333v206.933334H256V507.733333c0-29.866667-23.466667-53.333333-53.333333-53.333333H145.066667c-4.266667 0-6.4-2.133333-6.4-6.4 0-2.133333 2.133333-4.266667 2.133333-6.4 85.333333-70.4 206.933333-174.933333 362.666667-309.333333 4.266667-4.266667 10.666667-4.266667 14.933333 0 155.733333 134.4 277.333333 238.933333 362.666667 309.333333 2.133333 2.133333 2.133333 2.133333 2.133333 4.266667 2.133333 6.4-2.133333 8.533333-4.266667 8.533333z" p-id="2777"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
1
src/components/Icon/icons/kb.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684163814302" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3451" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M512 384c-229.8 0-416-57.3-416-128v256c0 70.7 186.2 128 416 128s416-57.3 416-128V256c0 70.7-186.2 128-416 128z" p-id="3452"></path><path d="M512 704c-229.8 0-416-57.3-416-128v256c0 70.7 186.2 128 416 128s416-57.3 416-128V576c0 70.7-186.2 128-416 128zM512 320c229.8 0 416-57.3 416-128S741.8 64 512 64 96 121.3 96 192s186.2 128 416 128z" p-id="3453"></path></svg>
|
||||||
|
After Width: | Height: | Size: 694 B |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1679316084227" class="icon" viewBox="0 0 1305 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1173" xmlns:xlink="http://www.w3.org/1999/xlink" width="61.171875" height="48"><path d="M0.837818 75.218317c0 19.642164 8.098902 39.191237 21.969435 53.06177 13.963624 13.963624 33.512697 22.062525 53.247951 22.062525a76.055204 76.055204 0 0 0 53.06177-21.969434c13.963624-13.963624 22.062525-33.512697 22.062526-53.154861A76.055204 76.055204 0 0 0 129.303156 21.970365 76.055204 76.055204 0 0 0 76.055204 0.000931a76.055204 76.055204 0 0 0-53.247951 21.969434A76.706839 76.706839 0 0 0 0.837818 75.218317M0.837818 476.160498c0 19.642164 8.005811 39.377419 21.969435 53.247952 13.963624 13.963624 33.419606 21.969435 53.247951 21.969434a76.241385 76.241385 0 0 0 53.154861-21.969434 75.962113 75.962113 0 0 0 21.969435-53.247952 76.241385 76.241385 0 0 0-21.969435-53.154861 75.962113 75.962113 0 0 0-53.154861-21.969434 76.241385 76.241385 0 0 0-53.247951 21.969434 75.962113 75.962113 0 0 0-21.969435 53.154861M0.837818 877.19577c0 19.642164 8.005811 39.284328 21.969435 53.247951 13.963624 13.963624 33.419606 21.969435 53.247951 21.969435a76.241385 76.241385 0 0 0 53.154861-21.969435 75.962113 75.962113 0 0 0 21.969435-53.247951 76.241385 76.241385 0 0 0-21.969435-53.247952 75.962113 75.962113 0 0 0-53.154861-21.969434 76.241385 76.241385 0 0 0-53.247951 21.969434 76.520658 76.520658 0 0 0-21.969435 53.247952M1304.109361 75.218317c0 41.518508-32.395607 75.124295-72.331571 75.124295H373.945843c-40.029055 0-72.331571-33.512697-72.331571-75.124295C301.521181 33.513628 333.916788 0.000931 373.945843 0.000931h857.831947c40.029055 0 72.331571 33.605788 72.331571 75.217386M1231.77779 551.377884H373.945843c-40.029055 0-72.331571-33.605788-72.331571-75.217386 0-41.518508 32.302516-75.124295 72.331571-75.124295h857.831947c40.029055-0.186182 72.331571 33.512697 72.331571 75.124295 0 41.425417-32.395607 75.217386-72.331571 75.217386zM1304.109361 877.102679c0 41.611599-32.395607 75.310477-72.331571 75.310477H373.945843c-40.029055 0-72.331571-33.698878-72.331571-75.310477 0-41.425417 32.302516-75.124295 72.331571-75.124295h857.831947c40.029055-0.093091 72.331571 33.698878 72.331571 75.124295" p-id="1174"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684745011703" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1481" xmlns:xlink="http://www.w3.org/1999/xlink" ><path d="M110.025 252.249c0 13.741 5.456 27.374 14.899 37.112s22.663 15.364 35.987 15.364 26.544-5.626 35.987-15.364c9.441-9.738 14.899-23.371 14.899-37.112s-5.456-27.375-14.899-37.111c-9.442-9.738-22.663-15.364-35.987-15.364s-26.544 5.626-35.987 15.364c-9.338 9.736-14.899 23.37-14.899 37.111m0 0zM103.625 512.575c0 13.741 5.455 27.482 14.899 37.22 9.442 9.738 22.663 15.364 36.091 15.364 13.324 0 26.649-5.626 36.091-15.364s14.899-23.371 14.899-37.22c0-13.741-5.455-27.482-14.899-37.22-9.442-9.738-22.662-15.364-36.091-15.364-13.324 0-26.649 5.626-36.091 15.364-9.444 9.737-14.899 23.37-14.899 37.22m0 0zM103.625 774.089c0 13.741 5.455 27.482 14.899 37.22 9.442 9.738 22.663 15.364 36.091 15.364 13.324 0 26.649-5.626 36.091-15.364s14.899-23.37 14.899-37.22c0-13.741-5.455-27.482-14.899-37.22-9.442-9.737-22.662-15.364-36.091-15.364-13.324 0-26.649 5.627-36.091 15.364-9.444 9.847-14.899 23.479-14.899 37.22m0 0zM919.041 249.869c0 27.699-19.935 50.095-44.59 50.095H345.88c-24.655 0-44.59-22.397-44.59-50.095 0-27.699 19.935-50.095 44.59-50.095h528.571c24.656-0.001 44.59 22.396 44.59 50.095m0 0zM919.041 510.195c0 27.59-19.935 50.095-44.59 50.095H345.88c-24.655 0-44.59-22.398-44.59-50.096 0-27.699 19.935-50.096 44.59-50.096h528.571c24.656-0.109 44.59 22.397 44.59 50.097m0 0zM919.041 771.601c0 27.699-19.935 50.096-44.59 50.096H345.88c-24.655 0-44.59-22.397-44.59-50.096 0-27.591 19.935-49.988 44.59-49.988h528.571c24.656-0.108 44.59 22.397 44.59 49.988m0 0z" p-id="1482"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1679070302676" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1173" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M910.13 243.22L545.97 32.97c-19.82-11.46-44.41-11.4-64.16 0.13L115.54 246.51c-19.5 11.36-31.68 32.43-31.76 54.99L82.1 725.44c-0.08 22.87 12.16 44.16 31.97 55.6l364.16 210.25c9.86 5.7 20.92 8.55 31.97 8.55 11.13 0 22.27-2.89 32.19-8.67l366.27-213.41c19.5-11.36 31.66-32.43 31.75-54.99l1.69-423.93c0.08-22.88-12.16-44.18-31.97-55.62zM513.68 88.9l335.28 193.58-332.93 192.2c-1.38 0.8-2.63 1.76-3.94 2.64-1.32-0.88-2.56-1.85-3.94-2.64L178.66 284.46 513.68 88.9zM146.69 725.68l1.24-384.39 327.91 189.32c1.59 0.92 2.74 2.31 3.54 3.89-0.09 1.49-0.29 2.95-0.28 4.45l0.7 175.55-0.8 202.69-332.31-191.51z m398.5 189.44l-0.8-200.61 0.7-175.54c0.01-1.5-0.2-2.97-0.28-4.46 0.8-1.59 1.95-2.98 3.53-3.9l329.03-189.96-1.23 381.29-330.95 193.18z" p-id="1174"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683254592786" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1352" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M450.09164971 42.7357605a123.86965959 123.86965959 0 0 1 123.76374272 0L889.06369251 222.84722403a123.92261859 123.92261859 0 0 1 62.06722618 107.2407279v360.38180181c0 44.22025102-23.6194395 85.05116445-61.9613093 107.13480989l-0.10591688 0.10591687-315.20830008 180.11146353a123.86965959 123.86965959 0 0 1-123.76374272 0L134.93630749 797.7104805a123.92261859 123.92261859 0 0 1-62.06722618-107.24072676V330.08795193c0-44.22025102 23.67239737-85.05116445 61.9613093-107.13481102l0.10591688-0.10591688z m462.16781482 223.59029646a33.78744889 33.78744889 0 0 0-46.17971029-12.28634453l-353.81496263 204.57823687L158.44982898 254.09267029a33.78744889 33.78744889 0 0 0-33.89336463 58.46605597l353.6031289 204.47232v430.02207687c0 18.00585102 15.14609778 32.62236445 33.84040675 32.62236444a33.20490667 33.20490667 0 0 0 33.73449102-32.62236444V517.29583787l354.18567111-204.79006948a33.78744889 33.78744889 0 0 0 14.66947129-41.20162304z" p-id="1353"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
1
src/components/Icon/icons/more.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683436563791" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1062" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M162.42900021 628.38449281c-64.29851769 0-116.48887344-52.19035577-116.48887345-116.48887345s52.19035577-116.48887344 116.48887345-116.48887345 116.48887344 52.19035577 116.48887344 116.48887345S226.72751789 628.38449281 162.42900021 628.38449281z" fill="#575B66" p-id="1063"></path><path d="M511.89561936 628.38449281c-64.29851769 0-116.48887344-52.19035577-116.48887345-116.48887345s52.19035577-116.48887344 116.48887345-116.48887345 116.48887344 52.19035577 116.48887345 116.48887345S576.19413706 628.38449281 511.89561936 628.38449281z" fill="#575B66" p-id="1064"></path><path d="M861.57099979 628.38449281c-64.29851769 0-116.48887344-52.19035577-116.48887344-116.48887345s52.19035577-116.48887344 116.48887344-116.48887345 116.48887344 52.19035577 116.48887345 116.48887345S925.66075619 628.38449281 861.57099979 628.38449281z" fill="#575B66" p-id="1065"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
1
src/components/Icon/icons/out.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683506235966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1906" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M833.633836 551.096437 481.955218 551.096437c-16.207124 0-29.359678-13.019525-29.359678-29.322839 0-16.188704 13.057387-29.321816 29.359678-29.321816l359.371834 0-74.718749-74.719772c-11.435447-11.414981-11.473309-29.894867 0.057305-41.424458 11.453866-11.453866 30.124088-11.340279 41.407062-0.038886l109.329011 109.310591c5.555529 1.069355 10.881838 3.703345 15.196097 8.018627 6.681166 6.681166 9.468652 15.691377 8.399297 24.319895 1.069355 8.630564-1.718131 17.640776-8.399297 24.321942-4.314259 4.315282-9.640568 6.987135-15.196097 8.018627l-109.329011 109.309568c-11.281951 11.30037-29.953196 11.413957-41.407062-0.039909-11.530614-11.530614-11.491729-30.009478-0.057305-41.423435L833.633836 551.096437zM745.933425 238.32392l0-97.704253c0-43.2572-35.029818-78.230736-78.230736-78.230736l-508.36931 0c-43.181475 0-78.230736 35.011398-78.230736 78.230736l0 742.759641c0 43.256176 35.011398 78.230736 78.230736 78.230736l508.36931 0c43.181475 0 78.230736-35.050284 78.230736-78.230736l0-97.704253c0-16.188704-13.134135-29.321816-29.341259-29.321816-16.208147 0-29.341259 13.133112-29.341259 29.321816l0 78.230736c0 21.571295-17.600867 39.059598-38.925544 39.059598l-469.635123 0c-21.49557 0-38.943964-17.450441-38.943964-39.059598l0-703.852516c0-21.533432 17.600867-39.019689 38.943964-39.019689l469.635123 0c21.515013 0 38.925544 17.410532 38.925544 39.019689l0 78.269621c0 16.187681 13.133112 29.321816 29.341259 29.321816C732.79929 267.645736 745.933425 254.511601 745.933425 238.32392z" p-id="1907"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1679410564438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2824" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M693.095316 281.760857l-131.632817 223.935003 103.718481 0 0 49.478312-120.846571 0 0 68.193688 120.846571 0 0 50.115659-120.846571 0 0 99.276514-62.164435 0L482.169975 673.483519 356.88022 673.483519l0-50.115659 125.289755 0 0-68.193688L356.88022 555.174172l0-49.478312 106.893053 0-130.364204-223.935003 70.099647 0c60.895822 111.230417 97.898433 181.748475 111.012698 211.562689l1.268612 0c4.441967-12.262847 16.596562-37.002611 36.474732-74.219292l74.536749-137.343396L693.095316 281.760857 693.095316 281.760857zM693.095316 281.760857" p-id="2825"></path><path d="M784.470674 621.448522c-15.061578 0-27.247797 12.187435-27.247797 27.247797s12.187435 27.247797 27.247797 27.247797l71.98128 0c-61.204765 128.843816-192.338895 217.986027-344.464118 217.986027-210.6687 0-381.478892-170.782216-381.478892-381.475243 0-210.696675 170.810191-381.465512 381.478892-381.465512 192.121175 0 350.635679 142.189179 377.137878 326.968701l55.08064 0C917.333181 242.953241 734.255278 76.493794 511.987837 76.493794 271.197197 76.493794 76.012135 271.688586 76.012135 512.456117c0 240.762665 195.185062 435.972053 435.975702 435.972053 164.236031 0 307.128238-90.894915 381.475243-225.064956l0 61.57574c0 15.061578 12.187435 27.247797 27.276989 27.247797 15.004412 0 27.247797-12.187435 27.247797-27.247797L947.987865 648.697535c0-3.297419 0-27.247797-27.247797-27.247797L784.470674 621.449738 784.470674 621.448522zM784.470674 621.448522" p-id="2826"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
1
src/components/Icon/icons/phoneTabbar/chat.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683450440385" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1585" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M469.21500445 150.07971555h87.84554666V84.19555555h-87.84554666v65.88416zM106.84416 732.06897778v-219.61614223H40.96v219.61614223h65.88416z m450.21866667 142.75242667H249.59431111v65.88416h307.46396444v-65.88416zM40.96 732.06670222c0 115.21137778 93.42520889 208.63658667 208.63658667 208.63658667v-65.88416c-78.84344889 0-142.75242667-63.90897778-142.75242667-142.75242667H40.96z m878.47139555-219.61614222c0 200.11463111-162.25393778 362.36856889-362.37084444 362.36856889v65.88416C793.58862222 940.70328889 985.31555555 748.97863111 985.31555555 512.45056h-65.88416zM557.06055111 150.07971555c200.11690667 0 362.37084445 162.25393778 362.37084444 362.37084445H985.31555555C985.31555555 275.92248889 793.58862222 84.19555555 557.06055111 84.19555555v65.88416zM469.21500445 84.19555555C232.68693333 84.19555555 40.96 275.92248889 40.96 512.45056h65.88416c0-200.11690667 162.25393778-362.37084445 362.37084445-362.37084445V84.19555555z" p-id="1586"></path><path d="M513.13777778 512.45056m-43.92277333 0a43.92277333 43.92277333 0 1 0 87.84554666 0 43.92277333 43.92277333 0 1 0-87.84554666 0Z" p-id="1587"></path><path d="M688.83114667 512.45056m-43.92277334 0a43.92277333 43.92277333 0 1 0 87.84554667 0 43.92277333 43.92277333 0 1 0-87.84554667 0Z" p-id="1588"></path><path d="M337.44440889 512.45056m-43.92277334 0a43.92277333 43.92277333 0 1 0 87.84554667 0 43.92277333 43.92277333 0 1 0-87.84554667 0Z" p-id="1589"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
1
src/components/Icon/icons/phoneTabbar/me.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683450445756" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1866" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M671.3984 266.93973333c0 87.97866667-71.31306667 159.2896-159.2896 159.2896v73.5168c128.55893333 0 232.8064-104.24746667 232.8064-232.8064h-73.5168z m-159.2896 159.2896c-87.97653333 0-159.28746667-71.31306667-159.28746667-159.2896h-73.51893333c0 128.55893333 104.2496 232.8064 232.8064 232.8064v-73.5168z m-159.28746667-159.2896c0-87.97653333 71.31093333-159.28746667 159.28746667-159.28746666V34.13333333c-128.5568 0-232.8064 104.24746667-232.8064 232.8064h73.51893333z m159.28746667-159.28746666c87.97866667 0 159.2896 71.31093333 159.2896 159.28746666h73.5168C744.91733333 138.3808 640.66773333 34.13333333 512.1088 34.13333333v73.51893334z m306.32533333 673.9136c0 25.9264-22.00533333 59.3536-80.18346666 88.41813333-55.97226667 27.98506667-135.86133333 46.36373333-226.14186667 46.36373333V989.86666667c99.2 0 190.85226667-20.04693333 259.02933333-54.10986667 66.01813333-33.03253333 120.81493333-85.37813333 120.81493334-154.19093333H818.432z m-306.32533333 134.784c-90.2784 0-170.1696-18.3808-226.13973333-46.36586667-58.17813333-29.06453333-80.18346667-62.49173333-80.18346667-88.41813333H132.26666667c0 68.8128 54.79466667 121.1584 120.81493333 154.19093333C321.25653333 969.81973333 412.91093333 989.86666667 512.11093333 989.86666667v-73.51893334z m-306.32533333-134.784c0-25.9264 22.00746667-59.3536 80.1856-88.41813334 55.97013333-27.98506667 135.86133333-46.36586667 226.13973333-46.36586666v-73.5168c-99.2 0-190.85226667 20.0448-259.02933333 54.10986666C187.06346667 660.40746667 132.26666667 712.75306667 132.26666667 781.56586667h73.51893333z m306.32533333-134.784c90.28266667 0 170.1696 18.3808 226.14186667 46.36586666 58.176 29.06453333 80.18346667 62.49173333 80.18346666 88.41813334h73.51893334c0-68.8128-54.7968-121.1584-120.81493334-154.19093334-68.17706667-34.06506667-159.82933333-54.10986667-259.02933333-54.10986666v73.5168z" p-id="1867"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.2 KiB |
1
src/components/Icon/icons/phoneTabbar/model.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683450443331" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1727" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M58.15222827 227.09272427L492.1075808-23.4520384a39.00952427 39.00952427 0 0 1 39.00952427 0l433.95657066 250.54476267a39.00952427 39.00952427 0 0 1 19.50476267 33.78346666v501.0895232a39.00952427 39.00952427 0 0 1-19.50476267 33.78224747l-433.95657066 250.54476267a39.00952427 39.00952427 0 0 1-39.00952427 0L58.15100907 795.7479616a39.00952427 39.00952427 0 0 1-19.5047616-33.78224747V260.87619093a39.00952427 39.00952427 0 0 1 19.5047616-33.78346666z m63.494096 53.5503232a9.7523808 9.7523808 0 0 0-4.87619094 8.4467808v444.66224746a9.7523808 9.7523808 0 0 0 4.87619094 8.44556267l385.08982826 222.3311232a9.7523808 9.7523808 0 0 0 9.7523808 0l385.08860907-222.329904a9.7523808 9.7523808 0 0 0 4.87619093-8.44678187V289.08982827a9.7523808 9.7523808 0 0 0-4.87619093-8.4467808L516.48853333 58.3131424a9.7523808 9.7523808 0 0 0-9.7523808 0l-385.08982826 222.32990507z m389.56129493 190.72l300.3611424-173.4131808c18.65752427-10.77150507 42.51550507-4.3788192 53.28822933 14.27870506 10.77150507 18.65752427 4.3788192 42.51550507-14.27870506 53.28822827L551.00952427 538.4728384V881.37142827c0 21.54422827-17.46529493 39.00952427-39.00952427 39.00952426-21.54422827 0-39.00952427-17.46529493-39.00952427-39.00952426V539.38712427L172.89386667 366.12632427c-18.65752427-10.77272427-25.05142827-34.63070507-14.27870507-53.28822934 10.77272427-18.65752427 34.63070507-25.05142827 53.28822933-14.278704L511.2076192 471.36304747z" p-id="1728"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
1
src/components/Icon/icons/phoneTabbar/more.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684739068105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7879" xmlns:xlink="http://www.w3.org/1999/xlink" ><path d="M817.87 556.31h-63.58v-66.24A42.27 42.27 0 0 0 712 447.8h-84.81a42.27 42.27 0 0 0-42.27 42.27v66.24H436.57v-66.24a42.27 42.27 0 0 0-42.27-42.27h-84.83a42.27 42.27 0 0 0-42.27 42.27v66.24h-61.83A22.39 22.39 0 0 0 183 578.7a22.39 22.39 0 0 0 22.39 22.39h61.81v65.55a42.27 42.27 0 0 0 42.27 42.27h84.83a42.27 42.27 0 0 0 42.27-42.27v-65.55h148.36v65.55a42.27 42.27 0 0 0 42.27 42.27H712a42.27 42.27 0 0 0 42.27-42.27v-65.55h63.58a22.39 22.39 0 0 0 22.39-22.39 22.39 22.39 0 0 0-22.37-22.39z m-438.64 95.26h-54.69V505.14h54.69z m317.72 0h-54.69V505.14H697z" p-id="7880"></path><path d="M823 202.58h-90.81v-63.09a71.88 71.88 0 0 0-71.88-71.88H363.19a71.88 71.88 0 0 0-71.88 71.88v63.08h-90.12A137.17 137.17 0 0 0 64 339.75v479a137.17 137.17 0 0 0 137.19 137.14H823a137.17 137.17 0 0 0 137.19-137.17v-479A137.17 137.17 0 0 0 823 202.58z m-474.36-54.1A23.52 23.52 0 0 1 372.17 125h279.16a23.52 23.52 0 0 1 23.52 23.52v54.1h-326.2z m554.23 673.31a76.76 76.76 0 0 1-76.76 76.76h-628a76.76 76.76 0 0 1-76.76-76.76V336.67a76.76 76.76 0 0 1 76.76-76.76h628a76.76 76.76 0 0 1 76.76 76.76z" p-id="7881"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682078370900" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3577" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M941.312 888.704H628.032a32 32 0 0 1 0-64h313.28a32 32 0 0 1 0 64zM519.808 576.768c-158.976 0-288.384-129.344-288.384-288.384S360.832 0 519.808 0s288.384 129.344 288.384 288.384-129.408 288.384-288.384 288.384z m0-512.768C396.096 64 295.424 164.672 295.424 288.384s100.672 224.384 224.384 224.384c123.776 0 224.384-100.672 224.384-224.384S643.584 64 519.808 64z" p-id="3578"></path><path d="M763.264 606.528a31.552 31.552 0 0 1-16.96-4.864 427.2 427.2 0 0 0-100.544-45.952 32 32 0 0 1-21.184-40 31.744 31.744 0 0 1 39.936-21.184 492.16 492.16 0 0 1 115.712 52.864 32 32 0 0 1-16.96 59.136zM59.776 996.928a32 32 0 0 1-32-32 489.6 489.6 0 0 1 347.328-470.464 32 32 0 1 1 18.816 61.184 425.856 425.856 0 0 0-302.144 409.28 32 32 0 0 1-32 32zM964.224 879.68a32.128 32.128 0 0 1-24.32-11.2l-108.224-126.336a32 32 0 1 1 48.64-41.6l108.224 126.336a32 32 0 0 1-24.32 52.8z" p-id="3579"></path><path d="M856 1024a32 32 0 0 1-25.664-51.2l108.224-144.32a32.064 32.064 0 0 1 51.264 38.336L881.6 1011.2a32 32 0 0 1-25.6 12.8z" p-id="3580"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683254589346" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1074" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M446.5084032 361.0189472m-220.5069312 0a215.4848 215.4848 0 1 0 441.01386347 0 215.4848 215.4848 0 1 0-441.01386347 0ZM620.04694507 784.5116256c0-68.92772267 33.63539307-129.9888128 85.37702826-167.69996587 0.03602027-0.02619627 0.03820373-0.08077333 0.00218347-0.1080608-26.91486293-21.45832213-56.54544427-39.6551616-88.3045024-53.96834986-0.02401387-0.0109152-0.0523936-0.00654933-0.07204053 0.009824-46.01985387 38.94457813-105.5320672 62.44187093-170.5412096 62.44187093s-124.52026453-23.4962016-170.5412096-62.44187093c-0.019648-0.01746453-0.04802667-0.0207392-0.07204054-0.009824C143.28449387 622.50178773 47.66130453 749.79343893 32.841648 900.79959573c-0.00436587 0.04038613 0.02837973 0.0753152 0.06876587 0.0753152l622.71265706 0c0.054576 0 0.0873216-0.06003413 0.05566827-0.1058784C633.19001707 867.60954667 620.04694507 827.59745493 620.04694507 784.5116256zM827.43700053 620.7826336c-90.42533867 0-163.728992 73.30365227-163.728992 163.728992s73.30365227 163.728992 163.728992 163.728992 163.728992-73.30365227 163.728992-163.728992S917.86234027 620.7826336 827.43700053 620.7826336zM911.96263893 808.52521067L851.51935253 808.52521067c-0.03820373 0-0.06876587 0.0305632-0.06876586 0.06876586l0 60.4432864c0 12.48597333-9.2812512 23.34448-21.71155627 24.51896214-14.23023253 1.34476053-26.31561493-9.93725867-26.31561493-23.90443307l0-61.05672427c0-0.03820373-0.0305632-0.06876587-0.06876587-0.06876586L742.9124544 808.52630187c-12.48597333 0-23.34448-9.2812512-24.51896213-21.71155627-1.34476053-14.23023253 9.93725867-26.31561493 23.90443306-26.31561493l61.05672427 0c0.03820373 0 0.06876587-0.0305632 0.06876587-0.06876587l0-60.4432864c0-12.48597333 9.2812512-23.34448 21.71155626-24.51896213 14.23023253-1.34476053 26.31561493 9.93725867 26.31561494 23.90443306l0 61.05672427c0 0.03820373 0.0305632 0.06876587 0.06876586 0.06876587l61.05672427 0c13.9671744 0 25.2491936 12.0853824 23.90443307 26.31561493C935.30602667 799.24396053 924.44752 808.52521067 911.96263893 808.52521067z" p-id="1075"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1679070718083" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5975" id="mx_n_1679070718084" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M1023.82 694.91v146.26c0 102.38-80.44 182.82-182.82 182.82H182.83C80.45 1024 0 943.56 0 841.18V183.01C0 80.63 80.45 0.19 182.83 0.19h146.26c21.94 0 36.57 14.62 36.57 36.57 0 21.94-14.62 36.56-36.57 36.56H182.83c-58.5 0-109.7 51.19-109.7 109.7v658.17c0 58.5 51.19 109.7 109.7 109.7h658.17c58.5 0 109.7-51.19 109.7-109.7V694.91c0-21.94 14.62-36.56 36.56-36.56 21.93 0 36.56 14.63 36.56 36.56z" p-id="5976"></path><path d="M1012.6 292.61L684.73 5.86c-6.56-5.7-15.02-6.32-21.96-1.49-6.94 4.83-11.31 14.24-11.31 24.65v132.66h-80.9c-84.89 0-164.74 41.49-224.82 116.92-29.27 36.79-52.28 79.65-68.44 127.34C260.57 455.5 252.11 508.02 252.11 562.27c0 40.13 4.65 85.72 12.17 118.79 2.47 11.02 9.89 18.95 18.72 19.94h1.81c8.08 0 15.59-6.07 19.21-15.61 50.29-134.27 154.86-220.98 266.46-220.98h80.9v138.12c0 10.28 4.37 19.69 11.31 24.65 6.94 4.83 15.4 4.33 21.96-1.49l327.96-286.75c5.89-5.21 9.51-13.87 9.51-23.16-0.01-9.3-3.53-17.97-9.52-23.17z m-88.21 16.04L717.4 477.58v-81.92c0-11.07-7.41-20.08-16.52-20.08h-78.98c-49.84 0-95.79 2.5-146.79 32.25-30.31 17.68-130.92 89.06-150 121.09-0.51-7.94 20.14-85.47 23-92.41C390.11 334.54 504.6 237.8 621.9 237.8h78.98c9.1 0 16.52-9.02 16.52-20.08v-78l206.99 168.93z" p-id="5977"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682599933100" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5707" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M750.592 668.7232a159.6416 159.6416 0 0 0-128.4608 64.9216l-269.568-138.24a159.3344 159.3344 0 0 0 17.0496-128.6656l261.12-136.704a159.4368 159.4368 0 1 0-31.1296-53.0432L341.1456 412.3648a159.7952 159.7952 0 1 0-32.256 229.7856l286.72 146.9952a159.7952 159.7952 0 1 0 154.88-120.4224z m0-542.72a98.3552 98.3552 0 1 1-98.3552 98.3552 98.4576 98.4576 0 0 1 98.3552-98.304z m-534.2208 484.352A98.3552 98.3552 0 1 1 314.7264 512a98.4576 98.4576 0 0 1-98.3552 98.3552zM750.592 926.72a98.3552 98.3552 0 1 1 98.3552-98.3552A98.4576 98.4576 0 0 1 750.592 926.72z" p-id="5708"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 915 B |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1680878383832" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1637" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M511.333 63.333c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z m0 832c-51.868 0-102.15-10.144-149.451-30.15-36.011-15.231-69.123-35.67-98.812-60.897 12.177-31.985 42.226-63.875 84.223-88.903C396.189 686.243 456.222 669.53 512 669.53c55.631 0 115.416 16.658 164.026 45.703 41.762 24.953 71.689 56.812 83.863 88.804-29.764 25.342-62.976 45.865-99.106 61.146-47.299 20.006-97.582 30.15-149.45 30.15z m296.268-139.658c-20.493-35.937-54.353-68.855-98.747-95.381C649.75 624.979 579.839 605.53 512 605.53c-67.964 0-138.094 19.488-197.471 54.875-44.644 26.606-78.656 59.594-99.195 95.586-23.835-28.755-43.234-60.652-57.85-95.208-20.006-47.3-30.15-97.583-30.15-149.451s10.144-102.15 30.15-149.451c19.337-45.719 47.034-86.792 82.321-122.078 35.286-35.287 76.359-62.983 122.078-82.321 47.3-20.006 97.583-30.15 149.451-30.15 51.868 0 102.15 10.144 149.451 30.15 45.719 19.337 86.792 47.034 122.078 82.321 35.287 35.286 62.983 76.359 82.321 122.078 20.006 47.3 30.15 97.583 30.15 149.451s-10.144 102.15-30.15 149.451c-14.563 34.429-33.869 66.22-57.583 94.892z" p-id="1638"></path><path d="M512 220.223c-88.224 0-160 71.776-160 160s71.776 160 160 160c88.225 0 160-71.775 160-160s-71.775-160-160-160z m0 256c-52.935 0-96-43.065-96-96s43.065-96 96-96 96 43.065 96 96-43.065 96-96 96z" p-id="1639"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683294437103" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1297" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M512 1025.74643102C229.20379943 1025.74643102-1.74643102 794.79620057-1.74643102 512S229.20379943-1.74643102 512-1.74643102 1025.74643102 229.20379943 1025.74643102 512 794.79620057 1025.74643102 512 1025.74643102z m254.5165805-400.62795081c-14.13981003-9.42654002-28.27962006-14.13981003-47.13270009-18.85308002-42.41943008-9.42654002-94.26540019-14.13981003-127.25829026-56.55924012 0 0-18.85308003-18.85308003 23.56635004-65.98578013 42.41943008-47.1327001 42.41943008-122.54502023 32.99289008-179.10426035-9.42654002-56.55924012-65.98578013-94.26540019-127.25829025-94.2654002-61.27251012 0-117.83175024 37.70616007-127.25829026 94.2654002-9.42654002 56.55924012-4.71327001 131.97156027 32.99289007 179.10426035 42.41943008 47.1327001 23.56635005 65.98578013 23.56635005 65.98578013-32.99289006 42.41943008-84.83886017 47.1327001-127.25829024 56.55924012-18.85308003 4.71327001-32.99289006 9.42654002-47.13270012 18.85308002-28.27962006 14.13981003-14.13981003 141.39810029-14.13981001 141.39810029h513.74643101c-9.42654002 0 0-122.54502023-9.42654002-141.39810029z" p-id="1298"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
1
src/components/Icon/icons/wx.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683506233267" class="icon" viewBox="0 0 1228 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1762" xmlns:xlink="http://www.w3.org/1999/xlink" width="76.75" height="64"><path d="M86.176896 791.989949a21.240784 21.240784 0 0 1-19.541522-29.567172l61.246284-143.648389c-37.626532-31.205746-67.788446-67.31508-89.636109-107.526919C12.914397 464.529882 0 414.668658 0 363.059621c0-49.594197 11.906977-97.646919 35.405353-142.847308 22.503094-43.294787 54.619159-82.098665 95.47429-115.307114C214.010004 37.250267 324.26788 0 441.371358 0s227.324941 37.250267 310.443164 104.868786c40.842994 33.232724 72.971197 72.036602 95.474291 115.307114 23.498376 45.200389 35.405353 93.253111 35.405353 142.847308h-42.481569C840.212597 186.299884 661.280231 42.481568 441.371358 42.481568S42.481568 186.299884 42.481568 363.059621c0 44.447858 11.130171 87.487756 33.099211 127.905934 21.422848 39.447171 52.070265 74.573359 91.031932 104.383282a21.240784 21.240784 0 0 1 6.639263 25.209777l-45.940782 107.745395 146.670649-67.836996a21.252922 21.252922 0 0 1 15.66963-0.91032 481.291895 481.291895 0 0 0 151.719887 24.056706 500.372188 500.372188 0 0 0 53.793803-2.900884l4.58801 42.226679a543.011545 543.011545 0 0 1-58.381813 3.143636 524.902259 524.902259 0 0 1-157.011877-23.607615L95.085888 790.035796a21.216509 21.216509 0 0 1-8.908992 1.954153z" p-id="1763"></path><path d="M1151.578219 1024a21.204371 21.204371 0 0 1-8.908992-1.96629L980.984378 947.2176a454.504232 454.504232 0 0 1-134.800086 20.09985c-101.37316 0.036413-196.835313-32.237442-268.871915-90.813455-35.441766-28.838916-63.321812-62.508594-82.851196-100.098713a265.958893 265.958893 0 0 1 0-248.407937c19.541521-37.626532 47.421568-71.271934 82.851196-100.098713 72.00019-58.588152 167.498755-90.849868 268.835502-90.849868s196.859588 32.261717 268.859778 90.849868c35.441766 28.838916 63.321812 62.508594 82.851196 100.098713a266.929901 266.929901 0 0 1 30.780931 124.203968c0 44.909087-11.190859 88.228149-33.244862 128.840529-18.631202 34.300832-44.192969 65.166726-76.07842 91.905838l51.803238 121.485148a21.240784 21.240784 0 0 1-19.541521 29.567172z m-169.198018-120.732617a21.228647 21.228647 0 0 1 8.921129 1.966289l119.094043 55.080388-36.412773-85.521466a21.240784 21.240784 0 0 1 6.639262-25.209776c33.208449-25.379703 59.292132-55.262452 77.510656-88.810753 18.64334-34.325107 28.098523-70.847119 28.098523-108.558614 0-150.348339-152.520968-272.670981-339.998198-272.670981S506.186094 501.840836 506.186094 652.201313 658.707062 924.872295 846.172155 924.872295a410.857454 410.857454 0 0 0 129.520233-20.524667 21.228647 21.228647 0 0 1 6.687813-1.080245z" p-id="1764"></path><path d="M276.542873 215.830643m-45.916507 0a45.916507 45.916507 0 1 0 91.833013 0 45.916507 45.916507 0 1 0-91.833013 0Z" p-id="1765"></path><path d="M537.319015 215.830643m-45.916507 0a45.916507 45.916507 0 1 0 91.833013 0 45.916507 45.916507 0 1 0-91.833013 0Z" p-id="1766"></path><path d="M715.790152 509.997297m-45.916506 0a45.916507 45.916507 0 1 0 91.833013 0 45.916507 45.916507 0 1 0-91.833013 0Z" p-id="1767"></path><path d="M976.566294 509.997297m-45.916506 0a45.916507 45.916507 0 1 0 91.833013 0 45.916507 45.916507 0 1 0-91.833013 0Z" p-id="1768"></path></svg>
|
||||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -4,25 +4,32 @@ import { Icon } from '@chakra-ui/react';
|
|||||||
|
|
||||||
const map = {
|
const map = {
|
||||||
model: require('./icons/model.svg').default,
|
model: require('./icons/model.svg').default,
|
||||||
share: require('./icons/share.svg').default,
|
|
||||||
home: require('./icons/home.svg').default,
|
|
||||||
menu: require('./icons/menu.svg').default,
|
|
||||||
pay: require('./icons/pay.svg').default,
|
|
||||||
copy: require('./icons/copy.svg').default,
|
copy: require('./icons/copy.svg').default,
|
||||||
chatSend: require('./icons/chatSend.svg').default,
|
chatSend: require('./icons/chatSend.svg').default,
|
||||||
board: require('./icons/board.svg').default,
|
|
||||||
develop: require('./icons/develop.svg').default,
|
develop: require('./icons/develop.svg').default,
|
||||||
user: require('./icons/user.svg').default,
|
user: require('./icons/user.svg').default,
|
||||||
promotion: require('./icons/promotion.svg').default,
|
promotion: require('./icons/promotion.svg').default,
|
||||||
delete: require('./icons/delete.svg').default,
|
delete: require('./icons/delete.svg').default,
|
||||||
withdraw: require('./icons/withdraw.svg').default,
|
withdraw: require('./icons/withdraw.svg').default,
|
||||||
dbModel: require('./icons/dbModel.svg').default,
|
|
||||||
history: require('./icons/history.svg').default,
|
|
||||||
stop: require('./icons/stop.svg').default,
|
stop: require('./icons/stop.svg').default,
|
||||||
shareMarket: require('./icons/shareMarket.svg').default,
|
|
||||||
collectionLight: require('./icons/collectionLight.svg').default,
|
collectionLight: require('./icons/collectionLight.svg').default,
|
||||||
collectionSolid: require('./icons/collectionSolid.svg').default,
|
collectionSolid: require('./icons/collectionSolid.svg').default,
|
||||||
export: require('./icons/export.svg').default
|
chat: require('./icons/chat.svg').default,
|
||||||
|
empty: require('./icons/empty.svg').default,
|
||||||
|
back: require('./icons/back.svg').default,
|
||||||
|
more: require('./icons/more.svg').default,
|
||||||
|
tabbarChat: require('./icons/phoneTabbar/chat.svg').default,
|
||||||
|
tabbarModel: require('./icons/phoneTabbar/model.svg').default,
|
||||||
|
tabbarMore: require('./icons/phoneTabbar/more.svg').default,
|
||||||
|
tabbarMe: require('./icons/phoneTabbar/me.svg').default,
|
||||||
|
closeSolid: require('./icons/closeSolid.svg').default,
|
||||||
|
wx: require('./icons/wx.svg').default,
|
||||||
|
out: require('./icons/out.svg').default,
|
||||||
|
git: require('./icons/git.svg').default,
|
||||||
|
kb: require('./icons/kb.svg').default,
|
||||||
|
appStore: require('./icons/appStore.svg').default,
|
||||||
|
menu: require('./icons/menu.svg').default,
|
||||||
|
edit: require('./icons/edit.svg').default
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IconName = keyof typeof map;
|
export type IconName = keyof typeof map;
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import React from 'react';
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useToast } from '@chakra-ui/react';
|
import { useToast } from '@chakra-ui/react';
|
||||||
import { useUserStore } from '@/store/user';
|
import { useUserStore } from '@/store/user';
|
||||||
import { useGlobalStore } from '@/store/global';
|
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
|
|
||||||
const unAuthPage: { [key: string]: boolean } = {
|
const unAuthPage: { [key: string]: boolean } = {
|
||||||
'/': true,
|
'/': true,
|
||||||
'/login': true,
|
'/login': true,
|
||||||
'/model/share': true
|
'/model/share': true,
|
||||||
|
'/chat/share': true
|
||||||
};
|
};
|
||||||
|
|
||||||
const Auth = ({ children }: { children: JSX.Element }) => {
|
const Auth = ({ children }: { children: JSX.Element }) => {
|
||||||
@@ -19,15 +19,13 @@ const Auth = ({ children }: { children: JSX.Element }) => {
|
|||||||
status: 'warning'
|
status: 'warning'
|
||||||
});
|
});
|
||||||
const { userInfo, initUserInfo } = useUserStore();
|
const { userInfo, initUserInfo } = useUserStore();
|
||||||
const { setLoading } = useGlobalStore();
|
|
||||||
|
|
||||||
useQuery(
|
useQuery(
|
||||||
[router.pathname, userInfo],
|
[router.pathname],
|
||||||
() => {
|
() => {
|
||||||
if (unAuthPage[router.pathname] === true || userInfo) {
|
if (unAuthPage[router.pathname] === true || userInfo) {
|
||||||
return setLoading(false);
|
return null;
|
||||||
} else {
|
} else {
|
||||||
setLoading(true);
|
|
||||||
return initUserInfo();
|
return initUserInfo();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -38,9 +36,6 @@ const Auth = ({ children }: { children: JSX.Element }) => {
|
|||||||
`/login?lastRoute=${encodeURIComponent(location.pathname + location.search)}`
|
`/login?lastRoute=${encodeURIComponent(location.pathname + location.search)}`
|
||||||
);
|
);
|
||||||
toast();
|
toast();
|
||||||
},
|
|
||||||
onSettled() {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,64 +1,34 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect, useMemo } from 'react';
|
||||||
import { Box, useColorMode, Flex } from '@chakra-ui/react';
|
import { Box, useColorMode, Flex } from '@chakra-ui/react';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
|
import { useLoading } from '@/hooks/useLoading';
|
||||||
|
import { useGlobalStore } from '@/store/global';
|
||||||
|
import { throttle } from 'lodash';
|
||||||
|
import Auth from './auth';
|
||||||
import Navbar from './navbar';
|
import Navbar from './navbar';
|
||||||
import NavbarPhone from './navbarPhone';
|
import NavbarPhone from './navbarPhone';
|
||||||
import { useRouter } from 'next/router';
|
|
||||||
import { useScreen } from '@/hooks/useScreen';
|
|
||||||
import { useLoading } from '@/hooks/useLoading';
|
|
||||||
import Auth from './auth';
|
|
||||||
import { useGlobalStore } from '@/store/global';
|
|
||||||
|
|
||||||
const unShowLayoutRoute: { [key: string]: boolean } = {
|
const pcUnShowLayoutRoute: Record<string, boolean> = {
|
||||||
|
'/': true,
|
||||||
'/login': true,
|
'/login': true,
|
||||||
'/chat': true
|
'/chat/share': true
|
||||||
|
};
|
||||||
|
const phoneUnShowLayoutRoute: Record<string, boolean> = {
|
||||||
|
'/': true,
|
||||||
|
'/login': true,
|
||||||
|
'/chat/share': true
|
||||||
};
|
};
|
||||||
|
|
||||||
const navbarList = [
|
|
||||||
{
|
|
||||||
label: '介绍',
|
|
||||||
icon: 'board',
|
|
||||||
link: '/',
|
|
||||||
activeLink: ['/']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '共享',
|
|
||||||
icon: 'shareMarket',
|
|
||||||
link: '/model/share',
|
|
||||||
activeLink: ['/model/share']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '模型',
|
|
||||||
icon: 'model',
|
|
||||||
link: '/model/list',
|
|
||||||
activeLink: ['/model/list', '/model/detail']
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
label: '账号',
|
|
||||||
icon: 'user',
|
|
||||||
link: '/number/setting',
|
|
||||||
activeLink: ['/number/setting']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '邀请',
|
|
||||||
icon: 'promotion',
|
|
||||||
link: '/promotion',
|
|
||||||
activeLink: ['/promotion']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '开发',
|
|
||||||
icon: 'develop',
|
|
||||||
link: '/openapi',
|
|
||||||
activeLink: ['/openapi']
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const Layout = ({ children }: { children: JSX.Element }) => {
|
const Layout = ({ children }: { children: JSX.Element }) => {
|
||||||
const { isPc } = useScreen();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { colorMode, setColorMode } = useColorMode();
|
const { colorMode, setColorMode } = useColorMode();
|
||||||
const { Loading } = useLoading({ defaultLoading: true });
|
const { Loading } = useLoading();
|
||||||
const { loading } = useGlobalStore();
|
const { loading, setScreenWidth, isPc } = useGlobalStore();
|
||||||
|
|
||||||
|
const isChatPage = useMemo(
|
||||||
|
() => router.pathname === '/chat' && Object.values(router.query).join('').length !== 0,
|
||||||
|
[router.pathname, router.query]
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (colorMode === 'dark' && router.pathname !== '/chat') {
|
if (colorMode === 'dark' && router.pathname !== '/chat') {
|
||||||
@@ -66,38 +36,52 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
|||||||
}
|
}
|
||||||
}, [colorMode, router.pathname, setColorMode]);
|
}, [colorMode, router.pathname, setColorMode]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const resize = throttle(() => {
|
||||||
|
setScreenWidth(document.documentElement.clientWidth);
|
||||||
|
}, 300);
|
||||||
|
resize();
|
||||||
|
|
||||||
|
window.addEventListener('resize', resize);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('resize', resize);
|
||||||
|
};
|
||||||
|
}, [setScreenWidth]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!unShowLayoutRoute[router.pathname] ? (
|
<Box
|
||||||
<Box h={'100%'} backgroundColor={'gray.100'} overflow={'auto'}>
|
h={'100%'}
|
||||||
{isPc ? (
|
bgGradient={'linear(to-t,rgba(173, 206, 255, 0.05) 0%, rgba(173, 206, 255, 0.12) 100%)'}
|
||||||
<>
|
>
|
||||||
<Box h={'100%'} position={'fixed'} left={0} top={0} w={'80px'}>
|
{isPc ? (
|
||||||
<Navbar navbarList={navbarList} />
|
pcUnShowLayoutRoute[router.pathname] ? (
|
||||||
</Box>
|
<Auth>{children}</Auth>
|
||||||
<Box h={'100%'} ml={'80px'}>
|
|
||||||
<Box h={'100%'} py={7} px={'5vw'} m={'auto'} overflowY={'auto'}>
|
|
||||||
<Auth>{children}</Auth>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<Flex h={'100%'} flexDirection={'column'}>
|
<>
|
||||||
<Box h={'60px'} borderBottom={'1px solid rgba(0,0,0,0.1)'}>
|
<Box h={'100%'} position={'fixed'} left={0} top={0} w={'60px'}>
|
||||||
<NavbarPhone navbarList={navbarList} />
|
<Navbar />
|
||||||
</Box>
|
</Box>
|
||||||
<Box flex={'1 0 0'} h={0} py={3} px={4} overflowY={'auto'}>
|
<Box h={'100%'} ml={'60px'} overflow={'overlay'}>
|
||||||
<Auth>{children}</Auth>
|
<Auth>{children}</Auth>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</>
|
||||||
)}
|
)
|
||||||
</Box>
|
) : phoneUnShowLayoutRoute[router.pathname] || isChatPage ? (
|
||||||
) : (
|
<Auth>{children}</Auth>
|
||||||
<Auth>
|
) : (
|
||||||
<>{children}</>
|
<Flex h={'100%'} flexDirection={'column'}>
|
||||||
</Auth>
|
<Box flex={'1 0 0'} h={0} overflow={'overlay'}>
|
||||||
)}
|
<Auth>{children}</Auth>
|
||||||
{loading && <Loading />}
|
</Box>
|
||||||
|
<Box h={'50px'} borderTop={'1px solid rgba(0,0,0,0.1)'}>
|
||||||
|
<NavbarPhone />
|
||||||
|
</Box>
|
||||||
|
</Flex>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
<Loading loading={loading} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,80 +1,148 @@
|
|||||||
import React from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { Box, Flex } from '@chakra-ui/react';
|
import { Box, Flex, Tooltip } from '@chakra-ui/react';
|
||||||
import Image from 'next/image';
|
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import MyIcon from '../Icon';
|
import MyIcon from '../Icon';
|
||||||
|
import { useUserStore } from '@/store/user';
|
||||||
|
import { useChatStore } from '@/store/chat';
|
||||||
|
import Avatar from '../Avatar';
|
||||||
|
|
||||||
export enum NavbarTypeEnum {
|
export enum NavbarTypeEnum {
|
||||||
normal = 'normal',
|
normal = 'normal',
|
||||||
small = 'small'
|
small = 'small'
|
||||||
}
|
}
|
||||||
|
|
||||||
const Navbar = ({
|
const Navbar = () => {
|
||||||
navbarList
|
|
||||||
}: {
|
|
||||||
navbarList: {
|
|
||||||
label: string;
|
|
||||||
icon: string;
|
|
||||||
link: string;
|
|
||||||
activeLink: string[];
|
|
||||||
}[];
|
|
||||||
}) => {
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { userInfo, lastModelId } = useUserStore();
|
||||||
|
const { lastChatModelId, lastChatId } = useChatStore();
|
||||||
|
const navbarList = useMemo(
|
||||||
|
() => [
|
||||||
|
{
|
||||||
|
label: '聊天',
|
||||||
|
icon: 'chat',
|
||||||
|
link: `/chat?modelId=${lastChatModelId}&chatId=${lastChatId}`,
|
||||||
|
activeLink: ['/chat']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '我的应用',
|
||||||
|
icon: 'model',
|
||||||
|
link: `/model?modelId=${lastModelId}`,
|
||||||
|
activeLink: ['/model']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '知识库',
|
||||||
|
icon: 'kb',
|
||||||
|
link: `/kb`,
|
||||||
|
activeLink: ['/kb']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用市场',
|
||||||
|
icon: 'appStore',
|
||||||
|
link: '/model/share',
|
||||||
|
activeLink: ['/model/share']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '邀请',
|
||||||
|
icon: 'promotion',
|
||||||
|
link: '/promotion',
|
||||||
|
activeLink: ['/promotion']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '开发',
|
||||||
|
icon: 'develop',
|
||||||
|
link: '/openapi',
|
||||||
|
activeLink: ['/openapi']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '账号',
|
||||||
|
icon: 'user',
|
||||||
|
link: '/number',
|
||||||
|
activeLink: ['/number']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[lastChatId, lastChatModelId, lastModelId]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
flexDirection={'column'}
|
flexDirection={'column'}
|
||||||
alignItems={'center'}
|
alignItems={'center'}
|
||||||
py={3}
|
pt={6}
|
||||||
backgroundColor={'white'}
|
backgroundColor={'#465069'}
|
||||||
h={'100%'}
|
h={'100%'}
|
||||||
w={'100%'}
|
w={'100%'}
|
||||||
boxShadow={'4px 0px 4px 0px rgba(43, 45, 55, 0.01)'}
|
boxShadow={'4px 0px 4px 0px rgba(43, 45, 55, 0.01)'}
|
||||||
userSelect={'none'}
|
userSelect={'none'}
|
||||||
>
|
>
|
||||||
{/* logo */}
|
{/* logo */}
|
||||||
<Box pb={4}>
|
<Box
|
||||||
<Image src={'/icon/logo.png'} width={'35'} height={'35'} alt=""></Image>
|
mb={5}
|
||||||
|
border={'2px solid #fff'}
|
||||||
|
borderRadius={'36px'}
|
||||||
|
overflow={'hidden'}
|
||||||
|
cursor={'pointer'}
|
||||||
|
onClick={() => router.push('/number')}
|
||||||
|
>
|
||||||
|
<Avatar w={'36px'} h={'36px'} src={userInfo?.avatar} fallbackSrc={'/icon/human.png'} />
|
||||||
</Box>
|
</Box>
|
||||||
{/* 导航列表 */}
|
{/* 导航列表 */}
|
||||||
<Box flex={1}>
|
<Box flex={1}>
|
||||||
{navbarList.map((item) => (
|
{navbarList.map((item) => (
|
||||||
<Flex
|
<Tooltip
|
||||||
|
label={item.label}
|
||||||
key={item.label}
|
key={item.label}
|
||||||
mb={4}
|
placement={'right'}
|
||||||
flexDirection={'column'}
|
openDelay={100}
|
||||||
alignItems={'center'}
|
gutter={-10}
|
||||||
justifyContent={'center'}
|
|
||||||
onClick={() => {
|
|
||||||
if (item.link === router.pathname) return;
|
|
||||||
router.push(item.link, undefined, {
|
|
||||||
shallow: true
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
cursor={'pointer'}
|
|
||||||
fontSize={'sm'}
|
|
||||||
w={'60px'}
|
|
||||||
h={'70px'}
|
|
||||||
borderRadius={'sm'}
|
|
||||||
{...(item.activeLink.includes(router.pathname)
|
|
||||||
? {
|
|
||||||
color: '#2B6CB0',
|
|
||||||
backgroundColor: '#BEE3F8'
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
color: '#4A5568',
|
|
||||||
backgroundColor: 'transparent'
|
|
||||||
})}
|
|
||||||
>
|
>
|
||||||
<MyIcon
|
<Flex
|
||||||
name={item.icon as any}
|
mb={3}
|
||||||
width={'24px'}
|
flexDirection={'column'}
|
||||||
height={'24px'}
|
alignItems={'center'}
|
||||||
fill={item.activeLink.includes(router.pathname) ? '#2B6CB0' : '#4A5568'}
|
justifyContent={'center'}
|
||||||
/>
|
onClick={() => {
|
||||||
<Box mt={1}>{item.label}</Box>
|
if (item.link === router.asPath) return;
|
||||||
</Flex>
|
router.push(item.link);
|
||||||
|
}}
|
||||||
|
cursor={'pointer'}
|
||||||
|
w={'60px'}
|
||||||
|
h={'45px'}
|
||||||
|
_hover={{
|
||||||
|
color: '#ffffff'
|
||||||
|
}}
|
||||||
|
{...(item.activeLink.includes(router.pathname)
|
||||||
|
? {
|
||||||
|
color: '#ffffff ',
|
||||||
|
backgroundImage: 'linear-gradient(270deg,#4e83fd,#3370ff)'
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
color: '#9096a5',
|
||||||
|
backgroundColor: 'transparent'
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<MyIcon name={item.icon as any} width={'22px'} height={'22px'} />
|
||||||
|
</Flex>
|
||||||
|
</Tooltip>
|
||||||
))}
|
))}
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Flex
|
||||||
|
mb={3}
|
||||||
|
flexDirection={'column'}
|
||||||
|
alignItems={'center'}
|
||||||
|
justifyContent={'center'}
|
||||||
|
cursor={'pointer'}
|
||||||
|
w={'60px'}
|
||||||
|
h={'45px'}
|
||||||
|
color={'#9096a5'}
|
||||||
|
_hover={{
|
||||||
|
color: '#ffffff'
|
||||||
|
}}
|
||||||
|
onClick={() => window.open('https://github.com/c121914yu/FastGPT')}
|
||||||
|
>
|
||||||
|
<MyIcon name={'git'} width={'22px'} height={'22px'} />
|
||||||
|
</Flex>
|
||||||
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,32 +1,37 @@
|
|||||||
import React from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import MyIcon from '../Icon';
|
import MyIcon from '../Icon';
|
||||||
import {
|
import { Flex } from '@chakra-ui/react';
|
||||||
Flex,
|
import { useChatStore } from '@/store/chat';
|
||||||
Drawer,
|
|
||||||
DrawerBody,
|
|
||||||
DrawerFooter,
|
|
||||||
DrawerOverlay,
|
|
||||||
DrawerContent,
|
|
||||||
Box,
|
|
||||||
useDisclosure,
|
|
||||||
Button,
|
|
||||||
Image
|
|
||||||
} from '@chakra-ui/react';
|
|
||||||
|
|
||||||
const NavbarPhone = ({
|
const NavbarPhone = () => {
|
||||||
navbarList
|
|
||||||
}: {
|
|
||||||
navbarList: {
|
|
||||||
label: string;
|
|
||||||
icon: string;
|
|
||||||
link: string;
|
|
||||||
activeLink: string[];
|
|
||||||
}[];
|
|
||||||
}) => {
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { lastChatModelId, lastChatId } = useChatStore();
|
||||||
const { isOpen, onClose, onOpen } = useDisclosure();
|
const navbarList = useMemo(
|
||||||
|
() => [
|
||||||
|
{
|
||||||
|
icon: 'tabbarChat',
|
||||||
|
link: `/chat?modelId=${lastChatModelId}&chatId=${lastChatId}`,
|
||||||
|
activeLink: ['/chat']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'tabbarModel',
|
||||||
|
link: `/model`,
|
||||||
|
activeLink: ['/model']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'tabbarMore',
|
||||||
|
link: '/tools',
|
||||||
|
activeLink: ['/tools']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'tabbarMe',
|
||||||
|
link: '/number',
|
||||||
|
activeLink: ['/number']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[lastChatId, lastChatModelId]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -36,61 +41,51 @@ const NavbarPhone = ({
|
|||||||
justifyContent={'space-between'}
|
justifyContent={'space-between'}
|
||||||
backgroundColor={'white'}
|
backgroundColor={'white'}
|
||||||
position={'relative'}
|
position={'relative'}
|
||||||
px={7}
|
px={10}
|
||||||
>
|
>
|
||||||
<Box onClick={onOpen}>
|
{navbarList.map((item) => (
|
||||||
<MyIcon name="menu" width={'20px'} height={'20px'} color={'blackAlpha.600'}></MyIcon>
|
<Flex
|
||||||
</Box>
|
position={'relative'}
|
||||||
|
key={item.link}
|
||||||
|
cursor={'pointer'}
|
||||||
|
borderRadius={'md'}
|
||||||
|
textAlign={'center'}
|
||||||
|
alignItems={'center'}
|
||||||
|
h={'100%'}
|
||||||
|
px={3}
|
||||||
|
{...(item.activeLink.includes(router.asPath)
|
||||||
|
? {
|
||||||
|
color: '#7089f1'
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
color: 'myGray.500'
|
||||||
|
})}
|
||||||
|
_after={
|
||||||
|
item.activeLink.includes(router.asPath)
|
||||||
|
? {
|
||||||
|
content: '""',
|
||||||
|
position: 'absolute',
|
||||||
|
top: '50%',
|
||||||
|
left: '50%',
|
||||||
|
transform: 'translate(-50%,-50%)',
|
||||||
|
borderRadius: '50%',
|
||||||
|
w: '18px',
|
||||||
|
h: '18px',
|
||||||
|
bg: ' #6782f1',
|
||||||
|
filter: 'blur(10px)',
|
||||||
|
boxShadow: '0px 2px 4px 0px rgba(0, 0, 0, 0.25)'
|
||||||
|
}
|
||||||
|
: {}
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
if (item.link === router.asPath) return;
|
||||||
|
router.push(item.link);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MyIcon name={item.icon as any} width={'20px'} height={'20px'} />
|
||||||
|
</Flex>
|
||||||
|
))}
|
||||||
</Flex>
|
</Flex>
|
||||||
<Drawer isOpen={isOpen} placement="left" size={'xs'} onClose={onClose}>
|
|
||||||
<DrawerOverlay />
|
|
||||||
<DrawerContent maxWidth={'50vw'}>
|
|
||||||
<DrawerBody p={4}>
|
|
||||||
<Box py={4}>
|
|
||||||
<Image src={'/icon/logo.png'} margin={'auto'} w={'35'} h={'35'} alt=""></Image>
|
|
||||||
</Box>
|
|
||||||
{navbarList.map((item) => (
|
|
||||||
<Flex
|
|
||||||
key={item.label}
|
|
||||||
mb={5}
|
|
||||||
alignItems={'center'}
|
|
||||||
justifyContent={'center'}
|
|
||||||
onClick={() => {
|
|
||||||
if (item.link === router.pathname) return;
|
|
||||||
router.push(item.link);
|
|
||||||
onClose();
|
|
||||||
}}
|
|
||||||
cursor={'pointer'}
|
|
||||||
h={'60px'}
|
|
||||||
borderRadius={'md'}
|
|
||||||
{...(item.activeLink.includes(router.pathname)
|
|
||||||
? {
|
|
||||||
color: '#2B6CB0',
|
|
||||||
backgroundColor: '#BEE3F8'
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
color: '#4A5568',
|
|
||||||
backgroundColor: 'transparent'
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<MyIcon
|
|
||||||
name={item.icon as any}
|
|
||||||
width={'24px'}
|
|
||||||
height={'24px'}
|
|
||||||
fill={item.activeLink.includes(router.pathname) ? '#2B6CB0' : '#4A5568'}
|
|
||||||
/>
|
|
||||||
<Box ml={5}>{item.label}</Box>
|
|
||||||
</Flex>
|
|
||||||
))}
|
|
||||||
</DrawerBody>
|
|
||||||
|
|
||||||
<DrawerFooter px={2}>
|
|
||||||
<Button variant="outline" onClick={onClose}>
|
|
||||||
Cancel
|
|
||||||
</Button>
|
|
||||||
</DrawerFooter>
|
|
||||||
</DrawerContent>
|
|
||||||
</Drawer>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
22
src/components/Loading/index.tsx
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Spinner, Flex } from '@chakra-ui/react';
|
||||||
|
|
||||||
|
const Loading = ({ fixed = true }: { fixed?: boolean }) => {
|
||||||
|
return (
|
||||||
|
<Flex
|
||||||
|
position={fixed ? 'fixed' : 'absolute'}
|
||||||
|
zIndex={1000}
|
||||||
|
backgroundColor={'rgba(255,255,255,0.5)'}
|
||||||
|
top={0}
|
||||||
|
left={0}
|
||||||
|
right={0}
|
||||||
|
bottom={0}
|
||||||
|
alignItems={'center'}
|
||||||
|
justifyContent={'center'}
|
||||||
|
>
|
||||||
|
<Spinner thickness="4px" speed="0.65s" emptyColor="gray.200" color="myBlue.500" size="xl" />
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Loading;
|
||||||
@@ -337,10 +337,13 @@
|
|||||||
}
|
}
|
||||||
.markdown {
|
.markdown {
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
overflow-y: hidden;
|
|
||||||
tab-size: 4;
|
tab-size: 4;
|
||||||
word-spacing: normal;
|
word-spacing: normal;
|
||||||
word-break: break-all;
|
width: 100%;
|
||||||
|
|
||||||
|
* {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
@@ -353,13 +356,13 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background-color: #222 !important;
|
background-color: #292b33 !important;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre code {
|
pre code {
|
||||||
background-color: #222 !important;
|
background-color: #292b33 !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { memo } from 'react';
|
import React, { memo, useMemo } from 'react';
|
||||||
import ReactMarkdown from 'react-markdown';
|
import ReactMarkdown from 'react-markdown';
|
||||||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||||
import { Box, Flex, useColorModeValue } from '@chakra-ui/react';
|
import { Box, Flex, useColorModeValue } from '@chakra-ui/react';
|
||||||
import { useCopyData } from '@/utils/tools';
|
import { useCopyData, formatLinkText } from '@/utils/tools';
|
||||||
import Icon from '@/components/Icon';
|
import Icon from '@/components/Icon';
|
||||||
import remarkGfm from 'remark-gfm';
|
import remarkGfm from 'remark-gfm';
|
||||||
import remarkMath from 'remark-math';
|
import remarkMath from 'remark-math';
|
||||||
@@ -12,9 +12,21 @@ import 'katex/dist/katex.min.css';
|
|||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
import { codeLight } from './codeLight';
|
import { codeLight } from './codeLight';
|
||||||
|
|
||||||
const Markdown = ({ source, isChatting = false }: { source: string; isChatting?: boolean }) => {
|
const Markdown = ({
|
||||||
|
source,
|
||||||
|
isChatting = false,
|
||||||
|
formatLink
|
||||||
|
}: {
|
||||||
|
source: string;
|
||||||
|
formatLink?: boolean;
|
||||||
|
isChatting?: boolean;
|
||||||
|
}) => {
|
||||||
const { copyData } = useCopyData();
|
const { copyData } = useCopyData();
|
||||||
|
|
||||||
|
const formatSource = useMemo(() => {
|
||||||
|
return formatLink ? formatLinkText(source) : source;
|
||||||
|
}, [source, formatLink]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
className={`markdown ${styles.markdown} ${
|
className={`markdown ${styles.markdown} ${
|
||||||
@@ -29,7 +41,7 @@ const Markdown = ({ source, isChatting = false }: { source: string; isChatting?:
|
|||||||
const code = String(children);
|
const code = String(children);
|
||||||
|
|
||||||
return !inline || match ? (
|
return !inline || match ? (
|
||||||
<Box my={3} borderRadius={'md'} overflow={'hidden'} backgroundColor={'#222'}>
|
<Box my={3} borderRadius={'md'} overflow={'overlay'} backgroundColor={'#222'}>
|
||||||
<Flex
|
<Flex
|
||||||
className="code-header"
|
className="code-header"
|
||||||
py={2}
|
py={2}
|
||||||
@@ -63,7 +75,7 @@ const Markdown = ({ source, isChatting = false }: { source: string; isChatting?:
|
|||||||
}}
|
}}
|
||||||
linkTarget="_blank"
|
linkTarget="_blank"
|
||||||
>
|
>
|
||||||
{source}
|
{formatSource}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,16 +28,16 @@ const Radio = ({ list, value, onChange, ...props }: Props) => {
|
|||||||
...(value === item.value
|
...(value === item.value
|
||||||
? {
|
? {
|
||||||
border: '5px solid',
|
border: '5px solid',
|
||||||
borderColor: 'blue.500'
|
borderColor: 'myBlue.700'
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
border: '2px solid',
|
border: '2px solid',
|
||||||
borderColor: 'gray.200'
|
borderColor: 'myGray.200'
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
_hover={{
|
_hover={{
|
||||||
_before: {
|
_before: {
|
||||||
borderColor: 'blue.400'
|
borderColor: 'myBlue.600'
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onClick={() => onChange(item.value)}
|
onClick={() => onChange(item.value)}
|
||||||
|
|||||||
67
src/components/SideBar/index.tsx
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
|
import { Box, Flex } from '@chakra-ui/react';
|
||||||
|
import type { BoxProps } from '@chakra-ui/react';
|
||||||
|
import MyIcon from '../Icon';
|
||||||
|
|
||||||
|
interface Props extends BoxProps {}
|
||||||
|
|
||||||
|
const SideBar = (e?: Props) => {
|
||||||
|
const {
|
||||||
|
w = ['100%', '0 0 250px', '0 0 280px', '0 0 310px', '0 0 340px'],
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
} = e || {};
|
||||||
|
|
||||||
|
const [foldSideBar, setFoldSideBar] = useState(false);
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
position={'relative'}
|
||||||
|
flex={foldSideBar ? '0 0 0' : w}
|
||||||
|
w={['100%', 0]}
|
||||||
|
h={'100%'}
|
||||||
|
zIndex={1}
|
||||||
|
transition={'0.2s'}
|
||||||
|
_hover={{
|
||||||
|
'& > div': { visibility: 'visible', opacity: 1 }
|
||||||
|
}}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<Flex
|
||||||
|
position={'absolute'}
|
||||||
|
right={0}
|
||||||
|
top={'50%'}
|
||||||
|
transform={'translate(50%,-50%)'}
|
||||||
|
alignItems={'center'}
|
||||||
|
justifyContent={'flex-end'}
|
||||||
|
pr={1}
|
||||||
|
w={'36px'}
|
||||||
|
h={'50px'}
|
||||||
|
borderRadius={'10px'}
|
||||||
|
bg={'rgba(0,0,0,0.5)'}
|
||||||
|
cursor={'pointer'}
|
||||||
|
transition={'0.2s'}
|
||||||
|
{...(foldSideBar
|
||||||
|
? {
|
||||||
|
opacity: 0.6
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
visibility: 'hidden',
|
||||||
|
opacity: 0
|
||||||
|
})}
|
||||||
|
onClick={() => setFoldSideBar(!foldSideBar)}
|
||||||
|
>
|
||||||
|
<MyIcon
|
||||||
|
name={'back'}
|
||||||
|
transform={foldSideBar ? 'rotate(180deg)' : ''}
|
||||||
|
w={'14px'}
|
||||||
|
color={'white'}
|
||||||
|
/>
|
||||||
|
</Flex>
|
||||||
|
<Box position={'relative'} h={'100%'} overflow={foldSideBar ? 'hidden' : 'visible'}>
|
||||||
|
{children}
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SideBar;
|
||||||
@@ -52,7 +52,7 @@ const MySlider = ({
|
|||||||
mt={3}
|
mt={3}
|
||||||
fontSize={'sm'}
|
fontSize={'sm'}
|
||||||
transform={'translateX(-50%)'}
|
transform={'translateX(-50%)'}
|
||||||
{...(activeVal === item.value ? { color: 'blue.500', fontWeight: 'bold' } : {})}
|
{...(activeVal === item.value ? { color: 'myBlue.500', fontWeight: 'bold' } : {})}
|
||||||
>
|
>
|
||||||
<Box px={3} cursor={'pointer'}>
|
<Box px={3} cursor={'pointer'}>
|
||||||
{item.label}
|
{item.label}
|
||||||
@@ -74,7 +74,7 @@ const MySlider = ({
|
|||||||
>
|
>
|
||||||
<SliderFilledTrack />
|
<SliderFilledTrack />
|
||||||
</SliderTrack>
|
</SliderTrack>
|
||||||
<SliderThumb border={'2.5px solid'} borderColor={'blue.500'}></SliderThumb>
|
<SliderThumb border={'2.5px solid'} borderColor={'myBlue.500'}></SliderThumb>
|
||||||
</Slider>
|
</Slider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,23 +9,23 @@ import {
|
|||||||
ModalFooter,
|
ModalFooter,
|
||||||
ModalBody,
|
ModalBody,
|
||||||
ModalCloseButton,
|
ModalCloseButton,
|
||||||
useColorModeValue
|
useColorModeValue,
|
||||||
|
Image
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import Image from 'next/image';
|
|
||||||
|
|
||||||
const WxConcat = ({ onClose }: { onClose: () => void }) => {
|
const WxConcat = ({ onClose }: { onClose: () => void }) => {
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={true} onClose={onClose}>
|
<Modal isOpen={true} onClose={onClose}>
|
||||||
<ModalOverlay />
|
<ModalOverlay />
|
||||||
<ModalContent color={useColorModeValue('blackAlpha.700', 'white')}>
|
<ModalContent>
|
||||||
<ModalHeader>wx交流群</ModalHeader>
|
<ModalHeader>wx交流群</ModalHeader>
|
||||||
<ModalCloseButton />
|
<ModalCloseButton />
|
||||||
<ModalBody textAlign={'center'}>
|
<ModalBody textAlign={'center'}>
|
||||||
<Image
|
<Image
|
||||||
style={{ margin: 'auto' }}
|
style={{ margin: 'auto' }}
|
||||||
src={'/imgs/wx300.jpg'}
|
src={'https://otnvvf-imgs.oss.laf.run/wx300.jpg'}
|
||||||
width={200}
|
width={'200px'}
|
||||||
height={200}
|
height={'200px'}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<Box mt={2}>
|
<Box mt={2}>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
export const SYSTEM_PROMPT_PREFIX = 'SYSTEM_PROMPT:';
|
export const NEW_CHATID_HEADER = 'response-new-chat-id';
|
||||||
|
export const QUOTE_LEN_HEADER = 'response-quote-len';
|
||||||
|
export const GUIDE_PROMPT_HEADER = 'response-guide-prompt';
|
||||||
|
|
||||||
export enum ChatRoleEnum {
|
export enum ChatRoleEnum {
|
||||||
System = 'System',
|
System = 'System',
|
||||||
|
|||||||
11
src/constants/kb.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import type { KbItemType } from '@/types/plugin';
|
||||||
|
|
||||||
|
export const defaultKbDetail: KbItemType = {
|
||||||
|
_id: '',
|
||||||
|
userId: '',
|
||||||
|
updateTime: new Date(),
|
||||||
|
avatar: '/icon/logo.png',
|
||||||
|
name: '',
|
||||||
|
tags: '',
|
||||||
|
totalData: 0
|
||||||
|
};
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { getSystemModelList } from '@/api/system';
|
||||||
|
import type { ShareChatEditType } from '@/types/model';
|
||||||
import type { ModelSchema } from '@/types/mongoSchema';
|
import type { ModelSchema } from '@/types/mongoSchema';
|
||||||
|
|
||||||
export const embeddingModel = 'text-embedding-ada-002';
|
export const embeddingModel = 'text-embedding-ada-002';
|
||||||
@@ -8,30 +10,66 @@ export enum OpenAiChatEnum {
|
|||||||
'GPT4' = 'gpt-4',
|
'GPT4' = 'gpt-4',
|
||||||
'GPT432k' = 'gpt-4-32k'
|
'GPT432k' = 'gpt-4-32k'
|
||||||
}
|
}
|
||||||
|
export enum ClaudeEnum {
|
||||||
|
'Claude' = 'Claude'
|
||||||
|
}
|
||||||
|
|
||||||
export type ChatModelType = `${OpenAiChatEnum}`;
|
export type ChatModelType = `${OpenAiChatEnum}` | `${ClaudeEnum}`;
|
||||||
|
|
||||||
|
export type ChatModelItemType = {
|
||||||
|
chatModel: ChatModelType;
|
||||||
|
name: string;
|
||||||
|
contextMaxToken: number;
|
||||||
|
systemMaxToken: number;
|
||||||
|
maxTemperature: number;
|
||||||
|
price: number;
|
||||||
|
};
|
||||||
|
|
||||||
export const ChatModelMap = {
|
export const ChatModelMap = {
|
||||||
[OpenAiChatEnum.GPT35]: {
|
[OpenAiChatEnum.GPT35]: {
|
||||||
|
chatModel: OpenAiChatEnum.GPT35,
|
||||||
name: 'ChatGpt',
|
name: 'ChatGpt',
|
||||||
contextMaxToken: 4096,
|
contextMaxToken: 4096,
|
||||||
maxTemperature: 1.5,
|
systemMaxToken: 2400,
|
||||||
price: 3
|
maxTemperature: 1.2,
|
||||||
|
price: 2.5
|
||||||
},
|
},
|
||||||
[OpenAiChatEnum.GPT4]: {
|
[OpenAiChatEnum.GPT4]: {
|
||||||
|
chatModel: OpenAiChatEnum.GPT4,
|
||||||
name: 'Gpt4',
|
name: 'Gpt4',
|
||||||
contextMaxToken: 8000,
|
contextMaxToken: 8000,
|
||||||
maxTemperature: 1.5,
|
systemMaxToken: 3000,
|
||||||
price: 30
|
maxTemperature: 1.2,
|
||||||
|
price: 50
|
||||||
},
|
},
|
||||||
[OpenAiChatEnum.GPT432k]: {
|
[OpenAiChatEnum.GPT432k]: {
|
||||||
|
chatModel: OpenAiChatEnum.GPT432k,
|
||||||
name: 'Gpt4-32k',
|
name: 'Gpt4-32k',
|
||||||
contextMaxToken: 32000,
|
contextMaxToken: 32000,
|
||||||
maxTemperature: 1.5,
|
systemMaxToken: 3000,
|
||||||
price: 30
|
maxTemperature: 1.2,
|
||||||
|
price: 90
|
||||||
|
},
|
||||||
|
[ClaudeEnum.Claude]: {
|
||||||
|
chatModel: ClaudeEnum.Claude,
|
||||||
|
name: 'Claude(免费体验)',
|
||||||
|
contextMaxToken: 9000,
|
||||||
|
systemMaxToken: 2400,
|
||||||
|
maxTemperature: 1,
|
||||||
|
price: 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let chatModelList: ChatModelItemType[] = [];
|
||||||
|
export const getChatModelList = async () => {
|
||||||
|
if (chatModelList.length > 0) {
|
||||||
|
return chatModelList;
|
||||||
|
}
|
||||||
|
const list = await getSystemModelList();
|
||||||
|
chatModelList = list;
|
||||||
|
return list;
|
||||||
|
};
|
||||||
|
|
||||||
export enum ModelStatusEnum {
|
export enum ModelStatusEnum {
|
||||||
running = 'running',
|
running = 'running',
|
||||||
training = 'training',
|
training = 'training',
|
||||||
@@ -84,15 +122,15 @@ export const ModelVectorSearchModeMap: Record<
|
|||||||
> = {
|
> = {
|
||||||
[ModelVectorSearchModeEnum.hightSimilarity]: {
|
[ModelVectorSearchModeEnum.hightSimilarity]: {
|
||||||
text: '高相似度, 无匹配时拒绝回复',
|
text: '高相似度, 无匹配时拒绝回复',
|
||||||
similarity: 0.2
|
similarity: 0.18
|
||||||
},
|
},
|
||||||
[ModelVectorSearchModeEnum.noContext]: {
|
[ModelVectorSearchModeEnum.noContext]: {
|
||||||
text: '高相似度,无匹配时直接回复',
|
text: '高相似度,无匹配时直接回复',
|
||||||
similarity: 0.2
|
similarity: 0.18
|
||||||
},
|
},
|
||||||
[ModelVectorSearchModeEnum.lowSimilarity]: {
|
[ModelVectorSearchModeEnum.lowSimilarity]: {
|
||||||
text: '低相似度匹配',
|
text: '低相似度匹配',
|
||||||
similarity: 0.8
|
similarity: 0.7
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -104,7 +142,7 @@ export const defaultModel: ModelSchema = {
|
|||||||
status: ModelStatusEnum.pending,
|
status: ModelStatusEnum.pending,
|
||||||
updateTime: Date.now(),
|
updateTime: Date.now(),
|
||||||
chat: {
|
chat: {
|
||||||
useKb: false,
|
relatedKbs: [],
|
||||||
searchMode: ModelVectorSearchModeEnum.hightSimilarity,
|
searchMode: ModelVectorSearchModeEnum.hightSimilarity,
|
||||||
systemPrompt: '',
|
systemPrompt: '',
|
||||||
temperature: 0,
|
temperature: 0,
|
||||||
@@ -115,12 +153,11 @@ export const defaultModel: ModelSchema = {
|
|||||||
isShareDetail: false,
|
isShareDetail: false,
|
||||||
intro: '',
|
intro: '',
|
||||||
collection: 0
|
collection: 0
|
||||||
},
|
|
||||||
security: {
|
|
||||||
domain: ['*'],
|
|
||||||
contextMaxLen: 1,
|
|
||||||
contentMaxLen: 1,
|
|
||||||
expiredTime: 9999,
|
|
||||||
maxLoadAmount: 1
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const defaultShareChat: ShareChatEditType = {
|
||||||
|
name: '',
|
||||||
|
password: '',
|
||||||
|
maxContext: 5
|
||||||
|
};
|
||||||
|
|||||||
14
src/constants/plugin.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export enum SplitTextTypEnum {
|
||||||
|
'qa' = 'qa',
|
||||||
|
'subsection' = 'subsection'
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum PluginTypeEnum {
|
||||||
|
LLM = 'LLM',
|
||||||
|
Text = 'Text',
|
||||||
|
Function = 'Function'
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum PluginParamsTypeEnum {
|
||||||
|
'Text' = 'text'
|
||||||
|
}
|
||||||
@@ -1,10 +1,18 @@
|
|||||||
import { extendTheme, defineStyleConfig } from '@chakra-ui/react';
|
import { extendTheme, defineStyleConfig, ComponentStyleConfig } from '@chakra-ui/react';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { modalAnatomy as parts } from '@chakra-ui/anatomy';
|
import { modalAnatomy, switchAnatomy, selectAnatomy, checkboxAnatomy } from '@chakra-ui/anatomy';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system';
|
import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system';
|
||||||
|
|
||||||
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);
|
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
|
||||||
|
modalAnatomy.keys
|
||||||
|
);
|
||||||
|
const { definePartsStyle: switchPart, defineMultiStyleConfig: switchMultiStyle } =
|
||||||
|
createMultiStyleConfigHelpers(switchAnatomy.keys);
|
||||||
|
const { definePartsStyle: selectPart, defineMultiStyleConfig: selectMultiStyle } =
|
||||||
|
createMultiStyleConfigHelpers(selectAnatomy.keys);
|
||||||
|
const { definePartsStyle: checkboxPart, defineMultiStyleConfig: checkboxMultiStyle } =
|
||||||
|
createMultiStyleConfigHelpers(checkboxAnatomy.keys);
|
||||||
|
|
||||||
// modal 弹窗
|
// modal 弹窗
|
||||||
const ModalTheme = defineMultiStyleConfig({
|
const ModalTheme = defineMultiStyleConfig({
|
||||||
@@ -17,46 +25,141 @@ const ModalTheme = defineMultiStyleConfig({
|
|||||||
|
|
||||||
// 按键
|
// 按键
|
||||||
const Button = defineStyleConfig({
|
const Button = defineStyleConfig({
|
||||||
baseStyle: {},
|
baseStyle: {
|
||||||
|
_active: {
|
||||||
|
transform: 'scale(0.98)'
|
||||||
|
}
|
||||||
|
},
|
||||||
sizes: {
|
sizes: {
|
||||||
sm: {
|
xs: {
|
||||||
fontSize: 'xs',
|
fontSize: 'xs',
|
||||||
px: 3,
|
px: 3,
|
||||||
py: 0,
|
py: 0,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
|
height: '22px',
|
||||||
|
borderRadius: '2px'
|
||||||
|
},
|
||||||
|
sm: {
|
||||||
|
fontSize: 'sm',
|
||||||
|
px: 3,
|
||||||
|
py: 0,
|
||||||
|
fontWeight: 'normal',
|
||||||
height: '26px',
|
height: '26px',
|
||||||
lineHeight: '26px'
|
borderRadius: '2px'
|
||||||
},
|
},
|
||||||
md: {
|
md: {
|
||||||
fontSize: 'sm',
|
fontSize: 'md',
|
||||||
px: 6,
|
px: 6,
|
||||||
py: 0,
|
py: 0,
|
||||||
height: '34px',
|
height: '32px',
|
||||||
lineHeight: '34px',
|
fontWeight: 'normal',
|
||||||
fontWeight: 'normal'
|
borderRadius: '4px'
|
||||||
},
|
},
|
||||||
lg: {
|
lg: {
|
||||||
fontSize: 'md',
|
fontSize: 'lg',
|
||||||
px: 8,
|
px: 8,
|
||||||
py: 0,
|
py: 0,
|
||||||
height: '42px',
|
height: '42px',
|
||||||
lineHeight: '42px',
|
fontWeight: 'normal',
|
||||||
fontWeight: 'normal'
|
borderRadius: '8px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
white: {
|
primary: {
|
||||||
color: '#fff',
|
background: 'myBlue.700 !important',
|
||||||
backgroundColor: 'transparent',
|
color: 'white',
|
||||||
border: '1px solid #ffffff',
|
|
||||||
_hover: {
|
_hover: {
|
||||||
backgroundColor: 'rgba(255,255,255,0.1)'
|
filter: 'brightness(110%)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
base: {
|
||||||
|
color: 'myGray.900',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'myGray.200',
|
||||||
|
bg: 'transparent',
|
||||||
|
_hover: {
|
||||||
|
color: 'myBlue.600'
|
||||||
|
},
|
||||||
|
_active: {
|
||||||
|
color: 'myBlue.700'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
size: 'md',
|
size: 'md',
|
||||||
colorScheme: 'blue'
|
variant: 'primary'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const Input: ComponentStyleConfig = {
|
||||||
|
baseStyle: {},
|
||||||
|
variants: {
|
||||||
|
outline: {
|
||||||
|
field: {
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
border: '1px solid',
|
||||||
|
borderRadius: 'base',
|
||||||
|
borderColor: 'myGray.200',
|
||||||
|
_focus: {
|
||||||
|
borderColor: 'myBlue.600',
|
||||||
|
boxShadow: '0px 0px 4px #A8DBFF',
|
||||||
|
bg: 'white'
|
||||||
|
},
|
||||||
|
_disabled: {
|
||||||
|
color: 'myGray.400',
|
||||||
|
bg: 'myWhite.300'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
defaultProps: {
|
||||||
|
size: 'md',
|
||||||
|
variant: 'outline'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const Textarea: ComponentStyleConfig = {
|
||||||
|
variants: {
|
||||||
|
outline: {
|
||||||
|
border: '1px solid',
|
||||||
|
borderRadius: 'base',
|
||||||
|
borderColor: 'myGray.200',
|
||||||
|
_focus: {
|
||||||
|
borderColor: 'myBlue.600',
|
||||||
|
boxShadow: '0px 0px 4px #A8DBFF'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
defaultProps: {
|
||||||
|
size: 'md',
|
||||||
|
variant: 'outline'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const Switch = switchMultiStyle({
|
||||||
|
baseStyle: switchPart({
|
||||||
|
track: {
|
||||||
|
bg: 'myGray.100',
|
||||||
|
_checked: {
|
||||||
|
bg: 'myBlue.700'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
const Select = selectMultiStyle({
|
||||||
|
variants: {
|
||||||
|
outline: selectPart({
|
||||||
|
field: {
|
||||||
|
borderColor: 'myGray.100',
|
||||||
|
|
||||||
|
_focusWithin: {
|
||||||
|
boxShadow: '0px 0px 4px #A8DBFF',
|
||||||
|
borderColor: 'myBlue.600'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -65,40 +168,73 @@ export const theme = extendTheme({
|
|||||||
styles: {
|
styles: {
|
||||||
global: {
|
global: {
|
||||||
'html, body': {
|
'html, body': {
|
||||||
color: 'blackAlpha.800',
|
color: 'myGray.900',
|
||||||
|
fontSize: 'md',
|
||||||
|
fontWeight: 400,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
maxHeight: '100vh',
|
overflow: 'hidden'
|
||||||
overflowY: 'hidden'
|
},
|
||||||
|
a: {
|
||||||
|
color: 'myBlue.700'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fontSizes: {
|
colors: {
|
||||||
xs: '0.8rem',
|
myGray: {
|
||||||
sm: '0.9rem',
|
100: '#EFF0F1',
|
||||||
md: '1rem',
|
200: '#DEE0E2',
|
||||||
lg: '1.125rem',
|
300: '#BDC1C5',
|
||||||
xl: '1.25rem',
|
400: '#9CA2A8',
|
||||||
'2xl': '1.5rem',
|
500: '#7B838B',
|
||||||
'3xl': '1.875rem',
|
600: '#5A646E',
|
||||||
'4xl': '2.25rem',
|
700: '#485058',
|
||||||
'5xl': '3rem',
|
800: '#363C42',
|
||||||
'6xl': '3.75rem',
|
900: '#24282C',
|
||||||
'7xl': '4.5rem',
|
1000: '#121416'
|
||||||
'8xl': '6rem',
|
},
|
||||||
'9xl': '8rem'
|
myBlue: {
|
||||||
|
100: '#f0f7ff',
|
||||||
|
200: '#EBF7FD',
|
||||||
|
300: '#d6e8ff',
|
||||||
|
400: '#adceff',
|
||||||
|
500: '#85b1ff',
|
||||||
|
600: '#4e83fd',
|
||||||
|
700: '#3370ff',
|
||||||
|
800: '#2152d9',
|
||||||
|
900: '#1237b3',
|
||||||
|
1000: '#07228c'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fonts: {
|
fonts: {
|
||||||
body: '-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"'
|
body: '-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"'
|
||||||
},
|
},
|
||||||
|
fontSizes: {
|
||||||
|
xs: '10px',
|
||||||
|
sm: '12px',
|
||||||
|
md: '14px',
|
||||||
|
lg: '16px',
|
||||||
|
xl: '16px',
|
||||||
|
'2xl': '18px',
|
||||||
|
'3xl': '20px'
|
||||||
|
},
|
||||||
|
borders: {
|
||||||
|
sm: '1px solid #EFF0F1',
|
||||||
|
base: '1px solid #DEE0E2',
|
||||||
|
md: '1px solid #BDC1C5'
|
||||||
|
},
|
||||||
breakpoints: {
|
breakpoints: {
|
||||||
sm: '900px',
|
sm: '900px',
|
||||||
md: '1200px',
|
md: '1200px',
|
||||||
lg: '1500px',
|
lg: '1500px',
|
||||||
xl: '1800',
|
xl: '1800px',
|
||||||
'2xl': '2100'
|
'2xl': '2100px'
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Modal: ModalTheme,
|
Modal: ModalTheme,
|
||||||
Button
|
Button,
|
||||||
|
Input,
|
||||||
|
Textarea,
|
||||||
|
Switch,
|
||||||
|
Select
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
export enum BillTypeEnum {
|
export enum BillTypeEnum {
|
||||||
chat = 'chat',
|
chat = 'chat',
|
||||||
splitData = 'splitData',
|
openapiChat = 'openapiChat',
|
||||||
QA = 'QA',
|
QA = 'QA',
|
||||||
abstract = 'abstract',
|
|
||||||
vector = 'vector',
|
vector = 'vector',
|
||||||
return = 'return'
|
return = 'return'
|
||||||
}
|
}
|
||||||
@@ -14,9 +13,8 @@ export enum PageTypeEnum {
|
|||||||
|
|
||||||
export const BillTypeMap: Record<`${BillTypeEnum}`, string> = {
|
export const BillTypeMap: Record<`${BillTypeEnum}`, string> = {
|
||||||
[BillTypeEnum.chat]: '对话',
|
[BillTypeEnum.chat]: '对话',
|
||||||
[BillTypeEnum.splitData]: 'QA拆分',
|
[BillTypeEnum.openapiChat]: 'api 对话',
|
||||||
[BillTypeEnum.QA]: 'QA拆分',
|
[BillTypeEnum.QA]: 'QA拆分',
|
||||||
[BillTypeEnum.abstract]: '摘要总结',
|
|
||||||
[BillTypeEnum.vector]: '索引生成',
|
[BillTypeEnum.vector]: '索引生成',
|
||||||
[BillTypeEnum.return]: '退款'
|
[BillTypeEnum.return]: '退款'
|
||||||
};
|
};
|
||||||
@@ -29,6 +27,6 @@ export enum PromotionEnum {
|
|||||||
|
|
||||||
export const PromotionTypeMap = {
|
export const PromotionTypeMap = {
|
||||||
[PromotionEnum.invite]: '好友充值',
|
[PromotionEnum.invite]: '好友充值',
|
||||||
[PromotionEnum.shareModel]: '模型分享',
|
[PromotionEnum.shareModel]: '应用分享',
|
||||||
[PromotionEnum.withdraw]: '提现'
|
[PromotionEnum.withdraw]: '提现'
|
||||||
};
|
};
|
||||||
|
|||||||