Compare commits
450 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89a817d1c9 | ||
|
|
e788bcaabe | ||
|
|
9219903341 | ||
|
|
6939899baa | ||
|
|
732b6d7780 | ||
|
|
e361279208 | ||
|
|
946fda0843 | ||
|
|
97216eec59 | ||
|
|
9f4aa3160e | ||
|
|
8e4084f7ee | ||
|
|
ee718750e2 | ||
|
|
1e02544c3a | ||
|
|
98771284e4 | ||
|
|
efc4e860b7 | ||
|
|
e06d72e86e | ||
|
|
b712a821f8 | ||
|
|
4e3d817b63 | ||
|
|
78a85bf847 | ||
|
|
a5b913f1b1 | ||
|
|
7ee1a340e6 | ||
|
|
c722ced68d | ||
|
|
f89452acdd | ||
|
|
74d58d562b | ||
|
|
165fe077bc | ||
|
|
75494f8d01 | ||
|
|
bb727b0710 | ||
|
|
9b0706ed92 | ||
|
|
718108a552 | ||
|
|
025facbc2d | ||
|
|
87b4061302 | ||
|
|
618729a254 | ||
|
|
3f34c33d4c | ||
|
|
779ff29ed5 | ||
|
|
445a38924f | ||
|
|
7ec2253f0a | ||
|
|
6522cc7dfa | ||
|
|
40f527a021 | ||
|
|
4aaf9bfeb0 | ||
|
|
5efa70f3a1 | ||
|
|
d45d18cc3b | ||
|
|
8bdb35ff51 | ||
|
|
e56965a8ed | ||
|
|
d4e0a43771 | ||
|
|
00638d6ee7 | ||
|
|
da281ea9ec | ||
|
|
4f1ce640a7 | ||
|
|
2a2b919daf | ||
|
|
3f01cc9c63 | ||
|
|
bc70428d89 | ||
|
|
d55ccc9f64 | ||
|
|
27ef4dc8ea | ||
|
|
daa5b552b1 | ||
|
|
fe6c8897ce | ||
|
|
0dcda9822e | ||
|
|
06e1c5d68d | ||
|
|
d52da7d4e0 | ||
|
|
a42707064a | ||
|
|
02bcab8802 | ||
|
|
27291faa66 | ||
|
|
3878a50d0f | ||
|
|
15b8353c7d | ||
|
|
b950146031 | ||
|
|
887e1d53d6 | ||
|
|
1dcd39bfbe | ||
|
|
01dad96618 | ||
|
|
13401294ad | ||
|
|
8273c96bbc | ||
|
|
61c6b1e471 | ||
|
|
f06aca9874 | ||
|
|
3a4b4a866b | ||
|
|
7afa8f00b8 | ||
|
|
f6c5695df4 | ||
|
|
dd3a1b910b | ||
|
|
a66d9d2e98 | ||
|
|
fc6f28f26e | ||
|
|
d4b99ddcab | ||
|
|
df328b2a73 | ||
|
|
fadb389294 | ||
|
|
7c38d1da9a | ||
|
|
7c829febec | ||
|
|
7bdff9ce9c | ||
|
|
1599d144ce | ||
|
|
f2749cbb00 | ||
|
|
f7a8203454 | ||
|
|
d95f71e9e3 | ||
|
|
a43d845298 | ||
|
|
3e64f46d92 | ||
|
|
0335f16742 | ||
|
|
98dbec2cf7 | ||
|
|
d259eda6b4 | ||
|
|
7c8f2ab6f5 | ||
|
|
691476c821 | ||
|
|
efcb53cd6d | ||
|
|
21ab855871 | ||
|
|
aee5de29c7 | ||
|
|
78d15c2a2f | ||
|
|
54e0a0eab1 | ||
|
|
e6bad93b32 | ||
|
|
12d7ba5d73 | ||
|
|
5ad8c81ef3 | ||
|
|
cb6fe9d0da | ||
|
|
1cf76ee7df | ||
|
|
edebfdf5ef | ||
|
|
86436d55ff | ||
|
|
e31d6ec2c1 | ||
|
|
6bb10ca150 | ||
|
|
7aa75f8ee0 | ||
|
|
afd2c394d8 | ||
|
|
434c03c955 | ||
|
|
f4d4d6516c | ||
|
|
b6833ca3ea | ||
|
|
3ab934771f | ||
|
|
4245ea4998 | ||
|
|
9eb02b7e38 | ||
|
|
75af549c7f | ||
|
|
5e7c97b7b8 | ||
|
|
6c2a7574c3 | ||
|
|
ca9f36ef9f | ||
|
|
265434799f | ||
|
|
258de4471e | ||
|
|
d83bb9d2c7 | ||
|
|
093bfa2134 | ||
|
|
539bc77934 | ||
|
|
aabbe06e41 | ||
|
|
bb22fa6548 | ||
|
|
bd2509bd41 | ||
|
|
561516eeef | ||
|
|
2bdda4638d | ||
|
|
1ebc95a282 | ||
|
|
d0e8f7203c | ||
|
|
092bb9ab17 | ||
|
|
9de8849193 | ||
|
|
3d5da27079 | ||
|
|
c454fe07cb | ||
|
|
3e144c4227 | ||
|
|
d8b2887625 | ||
|
|
ba3b3280b4 | ||
|
|
390b8f5b86 | ||
|
|
d74e6a47d6 | ||
|
|
424c745cbb | ||
|
|
0abbcf1401 | ||
|
|
da1126ed3c | ||
|
|
56281d92f2 | ||
|
|
fde1618af2 | ||
|
|
22bb4c1e2e | ||
|
|
6331f4b845 | ||
|
|
5101c7a6dc | ||
|
|
02bf400bf3 | ||
|
|
11cbcca2d4 | ||
|
|
34422f9549 | ||
|
|
aeba79267a | ||
|
|
7473be5922 | ||
|
|
de59b3d2e5 | ||
|
|
08190c2f0d | ||
|
|
6a85c8c2b6 | ||
|
|
bbdab1d40e | ||
|
|
78ad2791cd | ||
|
|
5f3c8e9046 | ||
|
|
30057f01a6 | ||
|
|
3ea185315d | ||
|
|
a1ae08f62b | ||
|
|
91ec895fd2 | ||
|
|
1a33642635 | ||
|
|
e9681c8ed5 | ||
|
|
69ff65973f | ||
|
|
52ac445557 | ||
|
|
d45cb2f84a | ||
|
|
1cb71c6bfb | ||
|
|
fb59b60761 | ||
|
|
9334a0dcf6 | ||
|
|
c614f8b9ca | ||
|
|
478386c612 | ||
|
|
dfcffc7fc1 | ||
|
|
b4238257b6 | ||
|
|
38f47956cd | ||
|
|
7fed4d697f | ||
|
|
5ed89130ef | ||
|
|
3671e55001 | ||
|
|
3bcc3430fb | ||
|
|
d6233cd7b1 | ||
|
|
64708ea424 | ||
|
|
85a11d08b2 | ||
|
|
a7569037fe | ||
|
|
4726034344 | ||
|
|
9a57e94b79 | ||
|
|
761e35c226 | ||
|
|
5ebe0017a0 | ||
|
|
036097243a | ||
|
|
84de95d294 | ||
|
|
fdab383b26 | ||
|
|
060492dbf7 | ||
|
|
9d5fd24085 | ||
|
|
903f39fe17 | ||
|
|
2ef98c24be | ||
|
|
6d00f73e91 | ||
|
|
813eaacfd0 | ||
|
|
322ca757af | ||
|
|
a177a302d4 | ||
|
|
034108c218 | ||
|
|
0632dfed80 | ||
|
|
6c16fa9166 | ||
|
|
ac4854a47b | ||
|
|
b9a6b71fe9 | ||
|
|
aba50e958e | ||
|
|
52cbfeace3 | ||
|
|
bebf565c06 | ||
|
|
c9bb39d802 | ||
|
|
454a479fd8 | ||
|
|
d057ad3a45 | ||
|
|
a206d77287 | ||
|
|
14bd1b5404 | ||
|
|
450167c951 | ||
|
|
67445b40bc | ||
|
|
d3731d221a | ||
|
|
f6e2d13e21 | ||
|
|
77e6cf4157 | ||
|
|
fd3f32d083 | ||
|
|
f7544ea47b | ||
|
|
a1a9a0b463 | ||
|
|
dbfe1fca31 | ||
|
|
94f3b7f2d6 | ||
|
|
22a0f6bcfa | ||
|
|
c1d08c0ccc | ||
|
|
a4c19fbd0a | ||
|
|
ace84f015e | ||
|
|
bb7adc96ed | ||
|
|
ad63210f45 | ||
|
|
fa106eb24c | ||
|
|
3248e95d53 | ||
|
|
3e57c7f559 | ||
|
|
eaaf6f5978 | ||
|
|
6288dc9492 | ||
|
|
de573e4303 | ||
|
|
b3acd570f7 | ||
|
|
19904e648b | ||
|
|
785ba03239 | ||
|
|
366fe0eada | ||
|
|
225554f22c | ||
|
|
5627a4bfde | ||
|
|
113c57bcbe | ||
|
|
649de7f028 | ||
|
|
26d800981c | ||
|
|
40b1d22d9d | ||
|
|
2d0e6bd085 | ||
|
|
226cae5ab9 | ||
|
|
238381256d | ||
|
|
5fab3734fa | ||
|
|
884c2d9553 | ||
|
|
918d7fb257 | ||
|
|
0719f7bd4a | ||
|
|
9b74437417 | ||
|
|
bebbba399a | ||
|
|
14e22687e3 | ||
|
|
61347d9aaa | ||
|
|
5bf0dd0ef1 | ||
|
|
5545e84bb9 | ||
|
|
86c27e85ef | ||
|
|
fdeb1590d7 | ||
|
|
f8b8fcc172 | ||
|
|
5bbaa8264a | ||
|
|
0f3418daf5 | ||
|
|
7417de74da | ||
|
|
fe9cb437e5 | ||
|
|
2827c633cd | ||
|
|
dd1e2d5eb7 | ||
|
|
6293801bfa | ||
|
|
7f2aa97de7 | ||
|
|
2196930005 | ||
|
|
231afc4ac5 | ||
|
|
2dc0b0fbec | ||
|
|
72bb3f667b | ||
|
|
02d6b7c788 | ||
|
|
e098b2f1dc | ||
|
|
832a4d6638 | ||
|
|
4d570ecd4f | ||
|
|
067f3f4098 | ||
|
|
d682a8252f | ||
|
|
c6dd3076c5 | ||
|
|
b4f3a77b01 | ||
|
|
7141189102 | ||
|
|
3ba9c21828 | ||
|
|
7b388b287a | ||
|
|
e9ba00d38f | ||
|
|
a109c59cc6 | ||
|
|
91bc573571 | ||
|
|
2712ef21ff | ||
|
|
593af8f7dc | ||
|
|
96ebec9809 | ||
|
|
f35ba8e5a7 | ||
|
|
e36d9d794f | ||
|
|
10dcdb5491 | ||
|
|
025d405fe2 | ||
|
|
fe71efbbd2 | ||
|
|
56f6e69bc7 | ||
|
|
998e7833e8 | ||
|
|
110bf9391f | ||
|
|
48f2c95bb9 | ||
|
|
9f37e56173 | ||
|
|
af1cff6230 | ||
|
|
3760726354 | ||
|
|
6ddf0b23fc | ||
|
|
f680bdf54d | ||
|
|
834d36981f | ||
|
|
2fdca621e6 | ||
|
|
8c7f4a3a30 | ||
|
|
41da52d6ed | ||
|
|
446d9cb1b9 | ||
|
|
48a5853550 | ||
|
|
c129874d59 | ||
|
|
cc6fa4207a | ||
|
|
e27abe1f6b | ||
|
|
5cecef5836 | ||
|
|
ee89d0d7a4 | ||
|
|
6eeb1b4da1 | ||
|
|
b6c9bb4a65 | ||
|
|
20aad33850 | ||
|
|
02b51317b4 | ||
|
|
ba933c7450 | ||
|
|
856d7ce48f | ||
|
|
23f22cda18 | ||
|
|
0a9a7691b4 | ||
|
|
8d25a1d3ec | ||
|
|
2d1e53c3b5 | ||
|
|
71d0093768 | ||
|
|
cd554f573e | ||
|
|
2d016b7462 | ||
|
|
65515e7952 | ||
|
|
5906daff9f | ||
|
|
55cefccad1 | ||
|
|
87dac54f1e | ||
|
|
45b8d7e8de | ||
|
|
a478621730 | ||
|
|
a233ab9584 | ||
|
|
8d2a192515 | ||
|
|
dcaf972767 | ||
|
|
f9d43ac009 | ||
|
|
abcf48d5ec | ||
|
|
bf5145e632 | ||
|
|
f37cdabb15 | ||
|
|
e99c91aaa6 | ||
|
|
a4787bce5c | ||
|
|
f24e41f5ec | ||
|
|
85de3c1d64 | ||
|
|
c6f682310c | ||
|
|
991398b8d2 | ||
|
|
f452554663 | ||
|
|
57ff38e16f | ||
|
|
f7b55b501f | ||
|
|
cf7145ab54 | ||
|
|
1eedb9caba | ||
|
|
6390d64417 | ||
|
|
3d80eb288b | ||
|
|
5cb196535f | ||
|
|
982325d066 | ||
|
|
36f8755d09 | ||
|
|
fc96bb99cc | ||
|
|
1e4ffc2481 | ||
|
|
ee7496467b | ||
|
|
b5c98a4f63 | ||
|
|
090c880860 | ||
|
|
dd2a9bdee5 | ||
|
|
8d60ef505f | ||
|
|
b14514c105 | ||
|
|
11ffaaf2c5 | ||
|
|
e2ae571d15 | ||
|
|
f548e24e7d | ||
|
|
5605f1a892 | ||
|
|
88d10451c9 | ||
|
|
8a7bd689ae | ||
|
|
a9cdece341 | ||
|
|
babf03c218 | ||
|
|
9e169a48e3 | ||
|
|
e223390231 | ||
|
|
3257744c76 | ||
|
|
e1e112eaff | ||
|
|
5c37d29451 | ||
|
|
3a16f1a21c | ||
|
|
fa7b73f942 | ||
|
|
f8610d750d | ||
|
|
96a03e9927 | ||
|
|
a3b0ef066b | ||
|
|
9d084b633c | ||
|
|
4b4bea196a | ||
|
|
e247545afa | ||
|
|
93b44fc8f5 | ||
|
|
9aa6fd4904 | ||
|
|
c8bc9838e3 | ||
|
|
5c8c7fb9f2 | ||
|
|
d902d29c71 | ||
|
|
9d29b471bc | ||
|
|
4a33e04a08 | ||
|
|
a9ab9ebe8e | ||
|
|
24596a6e21 | ||
|
|
5cc01b8509 | ||
|
|
980b4d3db5 | ||
|
|
2b25e3cc2d | ||
|
|
565bfc8486 | ||
|
|
b17d14bb7d | ||
|
|
c11131d653 | ||
|
|
f7f4a8de4d | ||
|
|
6385794603 | ||
|
|
b8b26ad700 | ||
|
|
05611df056 | ||
|
|
d0085a23e6 | ||
|
|
bc6864c3dc | ||
|
|
b20d075d35 | ||
|
|
19c8a06d51 | ||
|
|
fcb915c988 | ||
|
|
9bffb9ffc0 | ||
|
|
c1d7c08c7a | ||
|
|
a5d590e0bd | ||
|
|
db544afa7c | ||
|
|
a259d034b8 | ||
|
|
9fc6a8c74a | ||
|
|
5c8f2f95f7 | ||
|
|
f1e16b209a | ||
|
|
ced23e1695 | ||
|
|
1db816150b | ||
|
|
1e48922bc9 | ||
|
|
8ba8488086 | ||
|
|
9639139b52 | ||
|
|
d9f5f4ede0 | ||
|
|
6609cb98dc | ||
|
|
74830f0ac8 | ||
|
|
9c7c74050b | ||
|
|
92a3d6d268 | ||
|
|
c4ce1236ea | ||
|
|
4eb2c9bd07 | ||
|
|
b1aafde7c9 | ||
|
|
87e4afe89b | ||
|
|
a14a8ae627 | ||
|
|
fb368a581c | ||
|
|
8e8ceb7439 | ||
|
|
e35ce2caa0 | ||
|
|
fd31a0b763 | ||
|
|
ba517b6a73 | ||
|
|
2f93dedfb6 | ||
|
|
67c52992d7 | ||
|
|
2d1ec9b3ad | ||
|
|
6067f5aff3 | ||
|
|
c6d9b15897 | ||
|
|
d5073f98ab | ||
|
|
8386f707cd | ||
|
|
cd876251b7 | ||
|
|
fb04889a31 | ||
|
|
b779e2806d | ||
|
|
240f60c0ca | ||
|
|
8d2230f24f | ||
|
|
610ebded3b | ||
|
|
80a84a5733 |
2
.github/ISSUE_TEMPLATE/bugs.md
vendored
@@ -11,7 +11,7 @@ assignees: ''
|
|||||||
[//]: # '方框内填 x 表示打钩'
|
[//]: # '方框内填 x 表示打钩'
|
||||||
|
|
||||||
- [ ] 我已确认目前没有类似 issue
|
- [ ] 我已确认目前没有类似 issue
|
||||||
- [ ] 我已完整查看过项目 README,以及[项目文档](https://doc.fastgpt.in/docs/intro/)
|
- [ ] 我已完整查看过项目 README,以及[项目文档](https://doc.tryfastgpt.ai/docs/intro/)
|
||||||
- [ ] 我使用了自己的 key,并确认我的 key 是可正常使用的
|
- [ ] 我使用了自己的 key,并确认我的 key 是可正常使用的
|
||||||
- [ ] 我理解并愿意跟进此 issue,协助测试和提供反馈
|
- [ ] 我理解并愿意跟进此 issue,协助测试和提供反馈
|
||||||
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,**不遵循规则的 issue 可能会被无视或直接关闭**
|
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,**不遵循规则的 issue 可能会被无视或直接关闭**
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: 微信交流群
|
- name: 飞书话题群
|
||||||
url: https://oss.laf.run/htr4n1-images/fastgpt-qr-code.jpg
|
url: https://oss.laf.run/otnvvf-imgs/fastgpt-feishu1.png
|
||||||
about: FastGPT 全是问题群
|
about: FastGPT 全是问题群
|
||||||
|
|||||||
BIN
.github/imgs/image.png
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
.github/imgs/intro1.png
vendored
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 173 KiB |
BIN
.github/imgs/intro2.png
vendored
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 273 KiB |
BIN
.github/imgs/intro3.png
vendored
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 168 KiB |
BIN
.github/imgs/intro4.png
vendored
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 159 KiB |
96
.github/workflows/build-sandbox-image.yml
vendored
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
name: Build fastgpt-sandbox images and copy image to docker hub
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'projects/sandbox/**'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
jobs:
|
||||||
|
build-fastgpt-sandbox-images:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
# install env
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update && sudo apt install -y nodejs npm
|
||||||
|
- name: Set up QEMU (optional)
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
driver-opts: network=host
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
|
# login docker
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GH_PAT }}
|
||||||
|
- name: Login to Ali Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: registry.cn-hangzhou.aliyuncs.com
|
||||||
|
username: ${{ secrets.ALI_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.ALI_HUB_PASSWORD }}
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_NAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
|
|
||||||
|
# Set tag
|
||||||
|
- name: Set image name and tag
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
||||||
|
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sandbox:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sandbox:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build and publish image for main branch or tag push event
|
||||||
|
env:
|
||||||
|
Git_Tag: ${{ env.Git_Tag }}
|
||||||
|
Git_Latest: ${{ env.Git_Latest }}
|
||||||
|
Ali_Tag: ${{ env.Ali_Tag }}
|
||||||
|
Ali_Latest: ${{ env.Ali_Latest }}
|
||||||
|
Docker_Hub_Tag: ${{ env.Docker_Hub_Tag }}
|
||||||
|
Docker_Hub_Latest: ${{ env.Docker_Hub_Latest }}
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
-f projects/sandbox/Dockerfile \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/fastgpt-sandbox" \
|
||||||
|
--label "org.opencontainers.image.description=fastgpt-sandbox image" \
|
||||||
|
--push \
|
||||||
|
--cache-from=type=local,src=/tmp/.buildx-cache \
|
||||||
|
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
||||||
|
-t ${Git_Tag} \
|
||||||
|
-t ${Git_Latest} \
|
||||||
|
-t ${Ali_Tag} \
|
||||||
|
-t ${Ali_Latest} \
|
||||||
|
-t ${Docker_Hub_Tag} \
|
||||||
|
-t ${Docker_Hub_Latest} \
|
||||||
|
.
|
||||||
5
.github/workflows/docs-deploy-kubeconfig.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy image by kubeconfig
|
name: Deploy doc image by kubeconfig
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
@@ -16,6 +16,9 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Change baseURL
|
||||||
|
run: sed -i 's|^baseURL =.*|baseURL = "https://doc.fastgpt.cn"|g' ./docSite/hugo.toml
|
||||||
|
|
||||||
- name: Get current date and time
|
- name: Get current date and time
|
||||||
id: datetime
|
id: datetime
|
||||||
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT"
|
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
4
.github/workflows/docs-deploy-vercel.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy image to vercel
|
name: Deploy doc image to vercel
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Add cdn for images
|
- name: Add cdn for images
|
||||||
run: |
|
run: |
|
||||||
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/docs)
|
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/zh-cn/docs)
|
||||||
|
|
||||||
# Step 3 - Install Hugo (specific version)
|
# Step 3 - Install Hugo (specific version)
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
|
|||||||
2
.github/workflows/docs-preview.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Add cdn for images
|
- name: Add cdn for images
|
||||||
run: |
|
run: |
|
||||||
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/docs)
|
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/zh-cn/docs)
|
||||||
|
|
||||||
# Step 3 - Install Hugo (specific version)
|
# Step 3 - Install Hugo (specific version)
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
|
|||||||
106
.github/workflows/fastgpt-image.yml
vendored
@@ -11,6 +11,7 @@ jobs:
|
|||||||
build-fastgpt-images:
|
build-fastgpt-images:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
# install env
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@@ -31,82 +32,61 @@ jobs:
|
|||||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
|
# login docker
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GH_PAT }}
|
password: ${{ secrets.GH_PAT }}
|
||||||
- name: Set DOCKER_REPO_TAGGED based on branch or tag
|
|
||||||
run: |
|
|
||||||
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
|
||||||
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
- name: Build and publish image for main branch or tag push event
|
|
||||||
env:
|
|
||||||
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
|
|
||||||
run: |
|
|
||||||
docker buildx build \
|
|
||||||
--build-arg name=app \
|
|
||||||
--platform linux/amd64,linux/arm64 \
|
|
||||||
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
|
|
||||||
--label "org.opencontainers.image.description=fastgpt image" \
|
|
||||||
--push \
|
|
||||||
--cache-from=type=local,src=/tmp/.buildx-cache \
|
|
||||||
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
|
||||||
-t ${DOCKER_REPO_TAGGED} \
|
|
||||||
-f Dockerfile \
|
|
||||||
.
|
|
||||||
push-to-docker-hub:
|
|
||||||
needs: build-fastgpt-images
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
if: github.repository == 'labring/FastGPT'
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_HUB_NAME }}
|
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
||||||
- name: Set DOCKER_REPO_TAGGED based on branch or tag
|
|
||||||
run: |
|
|
||||||
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
|
||||||
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
- name: Pull image from GitHub Container Registry
|
|
||||||
run: docker pull ghcr.io/${{ github.repository_owner }}/fastgpt:${{env.IMAGE_TAG}}
|
|
||||||
- name: Tag image with Docker Hub repository name and version tag
|
|
||||||
run: docker tag ghcr.io/${{ github.repository_owner }}/fastgpt:${{env.IMAGE_TAG}} ${{ secrets.DOCKER_IMAGE_NAME }}:${{env.IMAGE_TAG}}
|
|
||||||
- name: Push image to Docker Hub
|
|
||||||
run: docker push ${{ secrets.DOCKER_IMAGE_NAME }}:${{env.IMAGE_TAG}}
|
|
||||||
push-to-ali-hub:
|
|
||||||
needs: build-fastgpt-images
|
|
||||||
if: github.repository == 'labring/FastGPT'
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to Ali Hub
|
- name: Login to Ali Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: registry.cn-hangzhou.aliyuncs.com
|
registry: registry.cn-hangzhou.aliyuncs.com
|
||||||
username: ${{ secrets.ALI_HUB_USERNAME }}
|
username: ${{ secrets.ALI_HUB_USERNAME }}
|
||||||
password: ${{ secrets.ALI_HUB_PASSWORD }}
|
password: ${{ secrets.ALI_HUB_PASSWORD }}
|
||||||
- name: Set DOCKER_REPO_TAGGED based on branch or tag
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_NAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
|
|
||||||
|
# Set tag
|
||||||
|
- name: Set image name and tag
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
||||||
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
|
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
|
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Pull image from GitHub Container Registry
|
|
||||||
run: docker pull ghcr.io/${{ github.repository_owner }}/fastgpt:${{env.IMAGE_TAG}}
|
- name: Build and publish image for main branch or tag push event
|
||||||
- name: Tag image with Docker Hub repository name and version tag
|
env:
|
||||||
run: docker tag ghcr.io/${{ github.repository_owner }}/fastgpt:${{env.IMAGE_TAG}} ${{ secrets.ALI_IMAGE_NAME }}:${{env.IMAGE_TAG}}
|
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
|
||||||
- name: Push image to Docker Hub
|
run: |
|
||||||
run: docker push ${{ secrets.ALI_IMAGE_NAME }}:${{env.IMAGE_TAG}}
|
docker buildx build \
|
||||||
|
-f projects/app/Dockerfile \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
|
||||||
|
--label "org.opencontainers.image.description=fastgpt image" \
|
||||||
|
--push \
|
||||||
|
--cache-from=type=local,src=/tmp/.buildx-cache \
|
||||||
|
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
||||||
|
-t ${Git_Tag} \
|
||||||
|
-t ${Git_Latest} \
|
||||||
|
-t ${Ali_Tag} \
|
||||||
|
-t ${Ali_Latest} \
|
||||||
|
-t ${Docker_Hub_Tag} \
|
||||||
|
-t ${Docker_Hub_Latest} \
|
||||||
|
.
|
||||||
|
|||||||
5
.github/workflows/helm-release.yaml
vendored
@@ -24,11 +24,6 @@ jobs:
|
|||||||
export APP_VERSION=${{ steps.vars.outputs.tag }}
|
export APP_VERSION=${{ steps.vars.outputs.tag }}
|
||||||
export HELM_VERSION=${{ steps.vars.outputs.tag }}
|
export HELM_VERSION=${{ steps.vars.outputs.tag }}
|
||||||
export HELM_REPO=ghcr.io/${{ github.repository_owner }}
|
export HELM_REPO=ghcr.io/${{ github.repository_owner }}
|
||||||
if [[ ! "$line" =~ ^v ]]
|
|
||||||
then
|
|
||||||
unset APP_VERSION
|
|
||||||
unset HELM_VERSION
|
|
||||||
fi
|
|
||||||
helm dependency update files/helm/fastgpt
|
helm dependency update files/helm/fastgpt
|
||||||
helm package files/helm/fastgpt --version ${HELM_VERSION}-helm --app-version ${APP_VERSION} -d bin
|
helm package files/helm/fastgpt --version ${HELM_VERSION}-helm --app-version ${APP_VERSION} -d bin
|
||||||
helm push bin/fastgpt-${HELM_VERSION}-helm.tgz oci://${HELM_REPO}
|
helm push bin/fastgpt-${HELM_VERSION}-helm.tgz oci://${HELM_REPO}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'projects/app/**'
|
- 'projects/app/**'
|
||||||
- 'packages/**'
|
- 'packages/**'
|
||||||
branches:
|
|
||||||
- 'main'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-fastgpt-images:
|
preview-fastgpt-images:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -44,15 +42,14 @@ jobs:
|
|||||||
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
|
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
|
||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--build-arg name=app \
|
-f projects/app/Dockerfile \
|
||||||
--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=fastgpt-pr image" \
|
--label "org.opencontainers.image.description=fastgpt-pr imae" \
|
||||||
--label "org.opencontainers.image.licenses=Apache" \
|
--label "org.opencontainers.image.licenses=Apache" \
|
||||||
--push \
|
--push \
|
||||||
--cache-from=type=local,src=/tmp/.buildx-cache \
|
--cache-from=type=local,src=/tmp/.buildx-cache \
|
||||||
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
||||||
-t ${DOCKER_REPO_TAGGED} \
|
-t ${DOCKER_REPO_TAGGED} \
|
||||||
-f Dockerfile \
|
|
||||||
.
|
.
|
||||||
|
|
||||||
helm-check:
|
helm-check:
|
||||||
3
.npmrc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
public-hoist-pattern[]=*tiktoken*
|
||||||
|
public-hoist-pattern[]=*@zilliz/milvus2-sdk-node*
|
||||||
|
registry=https://registry.npmjs.org/
|
||||||
@@ -3,4 +3,6 @@ dist
|
|||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
docSite/
|
docSite/
|
||||||
*.md
|
*.md
|
||||||
|
|
||||||
|
cl100l_base.ts
|
||||||
5
.vscode/extensions.json
vendored
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"inlang.vs-code-extension"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
9
.vscode/i18n-ally-custom-framework.yml
vendored
@@ -23,13 +23,17 @@ usageMatchRegex:
|
|||||||
- "[^\\w\\d]datasetT\\(['\"`]({key})['\"`]"
|
- "[^\\w\\d]datasetT\\(['\"`]({key})['\"`]"
|
||||||
- "[^\\w\\d]fileT\\(['\"`]({key})['\"`]"
|
- "[^\\w\\d]fileT\\(['\"`]({key})['\"`]"
|
||||||
- "[^\\w\\d]publishT\\(['\"`]({key})['\"`]"
|
- "[^\\w\\d]publishT\\(['\"`]({key})['\"`]"
|
||||||
|
- "[^\\w\\d]workflowT\\(['\"`]({key})['\"`]"
|
||||||
|
- "[^\\w\\d]userT\\(['\"`]({key})['\"`]"
|
||||||
|
- "[^\\w\\d]chatT\\(['\"`]({key})['\"`]"
|
||||||
|
- "[^\\w\\d]i18nT\\(['\"`]({key})['\"`]"
|
||||||
|
|
||||||
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys
|
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys
|
||||||
# and works like how the i18next framework identifies the namespace scope from the
|
# and works like how the i18next framework identifies the namespace scope from the
|
||||||
# useTranslation() hook.
|
# useTranslation() hook.
|
||||||
# You should unescape RegEx strings in order to fit in the YAML file
|
# You should unescape RegEx strings in order to fit in the YAML file
|
||||||
# To help with this, you can use https://www.freeformatter.com/json-escape.html
|
# To help with this, you can use https://www.freeformatter.com/json-escape.html
|
||||||
scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
|
scopeRangeRegex: "([^:]+):"
|
||||||
|
|
||||||
# An array of strings containing refactor templates.
|
# An array of strings containing refactor templates.
|
||||||
# The "$1" will be replaced by the keypath specified.
|
# The "$1" will be replaced by the keypath specified.
|
||||||
@@ -38,6 +42,5 @@ scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
|
|||||||
# refactorTemplates:
|
# refactorTemplates:
|
||||||
# - i18n.get("$1")
|
# - i18n.get("$1")
|
||||||
|
|
||||||
|
|
||||||
# If set to true, only enables this custom framework (will disable all built-in frameworks)
|
# If set to true, only enables this custom framework (will disable all built-in frameworks)
|
||||||
monopoly: true
|
monopoly: false
|
||||||
|
|||||||
103
.vscode/nextapi.code-snippets
vendored
@@ -10,14 +10,19 @@
|
|||||||
"scope": "javascript,typescript",
|
"scope": "javascript,typescript",
|
||||||
"prefix": "nextapi",
|
"prefix": "nextapi",
|
||||||
"body": [
|
"body": [
|
||||||
"import type { NextApiRequest, NextApiResponse } from 'next';",
|
"import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';",
|
||||||
"import { NextAPI } from '@/service/middle/entry';",
|
"import { NextAPI } from '@/service/middleware/entry';",
|
||||||
"",
|
"",
|
||||||
"type Props = {};",
|
"export type ${TM_FILENAME_BASE}Query = {};",
|
||||||
"",
|
"",
|
||||||
"type Response = {};",
|
"export type ${TM_FILENAME_BASE}Body = {};",
|
||||||
"",
|
"",
|
||||||
"async function handler(req: NextApiRequest, res: NextApiResponse<any>): Promise<Response> {",
|
"export type ${TM_FILENAME_BASE}Response = {};",
|
||||||
|
"",
|
||||||
|
"async function handler(",
|
||||||
|
" req: ApiRequestProps<${TM_FILENAME_BASE}Body, ${TM_FILENAME_BASE}Query>,",
|
||||||
|
" res: ApiResponseType<any>",
|
||||||
|
"): Promise<${TM_FILENAME_BASE}Response> {",
|
||||||
" $1",
|
" $1",
|
||||||
" return {}",
|
" return {}",
|
||||||
"}",
|
"}",
|
||||||
@@ -25,5 +30,93 @@
|
|||||||
"export default NextAPI(handler);"
|
"export default NextAPI(handler);"
|
||||||
],
|
],
|
||||||
"description": "FastGPT Next API template"
|
"description": "FastGPT Next API template"
|
||||||
|
},
|
||||||
|
"use context template": {
|
||||||
|
"scope": "typescriptreact",
|
||||||
|
"prefix": "context",
|
||||||
|
"body": [
|
||||||
|
"import React, { ReactNode } from 'react';",
|
||||||
|
"import { createContext } from 'use-context-selector';",
|
||||||
|
"",
|
||||||
|
"type ContextType = {$1};",
|
||||||
|
"",
|
||||||
|
"export const Context = createContext<ContextType>({});",
|
||||||
|
"",
|
||||||
|
"const ContextProvider = ({ children }: { children: ReactNode }) => {",
|
||||||
|
" const contextValue: ContextType = {};",
|
||||||
|
" return <Context.Provider value={contextValue}>{children}</Context.Provider>;",
|
||||||
|
"};",
|
||||||
|
"",
|
||||||
|
"export default ContextProvider"
|
||||||
|
],
|
||||||
|
"description": "FastGPT usecontext template"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Jest test template": {
|
||||||
|
"scope": "typescriptreact",
|
||||||
|
"prefix": "jesttest",
|
||||||
|
"body": [
|
||||||
|
"import '@/pages/api/__mocks__/base';",
|
||||||
|
"import { root } from '@/pages/api/__mocks__/db/init';",
|
||||||
|
"import { getTestRequest } from '@/test/utils';",
|
||||||
|
"import { AppErrEnum } from '@fastgpt/global/common/error/code/app';",
|
||||||
|
"import handler from './demo';",
|
||||||
|
"",
|
||||||
|
"// Import the schema",
|
||||||
|
"import { MongoOutLink } from '@fastgpt/service/support/outLink/schema';",
|
||||||
|
"",
|
||||||
|
"beforeAll(async () => {",
|
||||||
|
" // await MongoOutLink.create({",
|
||||||
|
" // shareId: 'aaa',",
|
||||||
|
" // appId: root.appId,",
|
||||||
|
" // tmbId: root.tmbId,",
|
||||||
|
" // teamId: root.teamId,",
|
||||||
|
" // type: 'share',",
|
||||||
|
" // name: 'aaa'",
|
||||||
|
" // })",
|
||||||
|
"});",
|
||||||
|
"",
|
||||||
|
"test('Should return a list of outLink', async () => {",
|
||||||
|
" // Mock request",
|
||||||
|
" const res = (await handler(",
|
||||||
|
" ...getTestRequest({",
|
||||||
|
" query: {",
|
||||||
|
" appId: root.appId,",
|
||||||
|
" type: 'share'",
|
||||||
|
" },",
|
||||||
|
" user: root",
|
||||||
|
" })",
|
||||||
|
" )) as any;",
|
||||||
|
"",
|
||||||
|
" expect(res.code).toBe(200);",
|
||||||
|
" expect(res.data.length).toBe(2);",
|
||||||
|
"});",
|
||||||
|
"",
|
||||||
|
"test('appId is required', async () => {",
|
||||||
|
" const res = (await handler(",
|
||||||
|
" ...getTestRequest({",
|
||||||
|
" query: {",
|
||||||
|
" type: 'share'",
|
||||||
|
" },",
|
||||||
|
" user: root",
|
||||||
|
" })",
|
||||||
|
" )) as any;",
|
||||||
|
" expect(res.code).toBe(500);",
|
||||||
|
" expect(res.error).toBe(AppErrEnum.unExist);",
|
||||||
|
"});",
|
||||||
|
"",
|
||||||
|
"test('if type is not provided, return nothing', async () => {",
|
||||||
|
" const res = (await handler(",
|
||||||
|
" ...getTestRequest({",
|
||||||
|
" query: {",
|
||||||
|
" appId: root.appId",
|
||||||
|
" },",
|
||||||
|
" user: root",
|
||||||
|
" })",
|
||||||
|
" )) as any;",
|
||||||
|
" expect(res.code).toBe(200);",
|
||||||
|
" expect(res.data.length).toBe(0);",
|
||||||
|
"});"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
28
.vscode/settings.json
vendored
@@ -1,15 +1,33 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.mouseWheelZoom": true,
|
"editor.mouseWheelZoom": true,
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
|
"prettier.prettierPath": "node_modules/prettier",
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"prettier.prettierPath": "",
|
|
||||||
"i18n-ally.localesPaths": [
|
"i18n-ally.localesPaths": [
|
||||||
"projects/app/i18n",
|
"packages/web/i18n",
|
||||||
],
|
],
|
||||||
"i18n-ally.enabledParsers": ["json", "yaml", "js", "ts"],
|
"i18n-ally.enabledParsers": [
|
||||||
"i18n-ally.keystyle": "nested",
|
"json",
|
||||||
|
"yaml",
|
||||||
|
"js",
|
||||||
|
"ts"
|
||||||
|
],
|
||||||
|
"i18n-ally.keystyle": "flat",
|
||||||
"i18n-ally.sortKeys": true,
|
"i18n-ally.sortKeys": true,
|
||||||
"i18n-ally.keepFulfilled": false,
|
"i18n-ally.keepFulfilled": false,
|
||||||
"i18n-ally.sourceLanguage": "zh", // 根据此语言文件翻译其他语言文件的变量和内容
|
"i18n-ally.sourceLanguage": "zh", // 根据此语言文件翻译其他语言文件的变量和内容
|
||||||
"i18n-ally.displayLanguage": "zh" // 显示语言
|
"i18n-ally.displayLanguage": "zh", // 显示语言
|
||||||
|
"i18n-ally.namespace": true,
|
||||||
|
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
|
||||||
|
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key",
|
||||||
|
"i18n-ally.translate.engines": ["google"],
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
|
"markdown.copyFiles.destination": {
|
||||||
|
"/docSite/content/**/*": "${documentWorkspaceFolder}/docSite/assets/imgs/"
|
||||||
|
},
|
||||||
|
"markdown.copyFiles.overwriteBehavior": "nameIncrementally",
|
||||||
|
"markdown.copyFiles.transformPath": "const filename = uri.path.split('/').pop(); return `/imgs/${filename}`;"
|
||||||
}
|
}
|
||||||
82
Dockerfile
@@ -1,82 +0,0 @@
|
|||||||
# --------- install dependence -----------
|
|
||||||
FROM node:18.17-alpine AS mainDeps
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG name
|
|
||||||
ARG proxy
|
|
||||||
|
|
||||||
RUN [ -z "$proxy" ] || sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
|
||||||
RUN apk add --no-cache libc6-compat && npm install -g pnpm@8.6.0
|
|
||||||
# if proxy exists, set proxy
|
|
||||||
RUN [ -z "$proxy" ] || pnpm config set registry https://registry.npmmirror.com
|
|
||||||
|
|
||||||
# copy packages and one project
|
|
||||||
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
||||||
COPY ./packages ./packages
|
|
||||||
COPY ./projects/$name/package.json ./projects/$name/package.json
|
|
||||||
|
|
||||||
RUN [ -f pnpm-lock.yaml ] || (echo "Lockfile not found." && exit 1)
|
|
||||||
|
|
||||||
RUN pnpm i
|
|
||||||
|
|
||||||
# --------- builder -----------
|
|
||||||
FROM node:18.17-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG name
|
|
||||||
ARG proxy
|
|
||||||
|
|
||||||
# copy common node_modules and one project node_modules
|
|
||||||
COPY package.json pnpm-workspace.yaml ./
|
|
||||||
COPY --from=mainDeps /app/node_modules ./node_modules
|
|
||||||
COPY --from=mainDeps /app/packages ./packages
|
|
||||||
COPY ./projects/$name ./projects/$name
|
|
||||||
COPY --from=mainDeps /app/projects/$name/node_modules ./projects/$name/node_modules
|
|
||||||
|
|
||||||
RUN [ -z "$proxy" ] || sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
|
||||||
|
|
||||||
RUN apk add --no-cache libc6-compat && npm install -g pnpm@8.6.0
|
|
||||||
RUN pnpm --filter=$name build
|
|
||||||
|
|
||||||
# --------- runner -----------
|
|
||||||
FROM node:18.17-alpine AS runner
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG name
|
|
||||||
ARG proxy
|
|
||||||
|
|
||||||
# create user and use it
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
|
||||||
RUN adduser --system --uid 1001 nextjs
|
|
||||||
|
|
||||||
RUN [ -z "$proxy" ] || sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
|
||||||
RUN apk add --no-cache curl ca-certificates \
|
|
||||||
&& update-ca-certificates
|
|
||||||
|
|
||||||
# copy running files
|
|
||||||
COPY --from=builder /app/projects/$name/public /app/projects/$name/public
|
|
||||||
COPY --from=builder /app/projects/$name/next.config.js /app/projects/$name/next.config.js
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/projects/$name/.next/standalone /app/
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/projects/$name/.next/static /app/projects/$name/.next/static
|
|
||||||
# copy server chunks
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/projects/$name/.next/server/chunks /app/projects/$name/.next/server/chunks
|
|
||||||
# copy worker
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/projects/$name/.next/server/worker /app/projects/$name/.next/server/worker
|
|
||||||
# copy package.json to version file
|
|
||||||
COPY --from=builder /app/projects/$name/package.json ./package.json
|
|
||||||
# copy config
|
|
||||||
COPY ./projects/$name/data /app/data
|
|
||||||
|
|
||||||
RUN chown -R nextjs:nodejs /app/data
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
|
||||||
ENV PORT=3000
|
|
||||||
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
USER nextjs
|
|
||||||
|
|
||||||
ENV serverPath=./projects/$name/server.js
|
|
||||||
|
|
||||||
ENTRYPOINT ["sh","-c","node ${serverPath}"]
|
|
||||||
2
LICENSE
@@ -5,7 +5,7 @@ The FastGPT is licensed under the Apache License 2.0, with the following additio
|
|||||||
1. FastGPT is permitted to be used for commercialization. You can use FastGPT as a "backend-as-a-service" for your other applications, or delivering it to enterprises as an application development platform. However, when the following conditions are met, you must contact the producer to obtain a commercial license:
|
1. FastGPT is permitted to be used for commercialization. You can use FastGPT as a "backend-as-a-service" for your other applications, or delivering it to enterprises as an application development platform. However, when the following conditions are met, you must contact the producer to obtain a commercial license:
|
||||||
|
|
||||||
a. Multi-tenant SaaS service: Unless explicitly authorized by FastGPT in writing, you may not use the FastGPT.AI source code to operate a multi-tenant SaaS service that is similar to the FastGPT.
|
a. Multi-tenant SaaS service: Unless explicitly authorized by FastGPT in writing, you may not use the FastGPT.AI source code to operate a multi-tenant SaaS service that is similar to the FastGPT.
|
||||||
b. LOGO and copyright information: In the process of using FastGPT, you may not remove or moFastGPT the LOGO or copyright information in the FastGPT console.
|
b. LOGO and copyright information: In the process of using FastGPT, you may not remove or modify the LOGO or copyright information in the FastGPT console.
|
||||||
|
|
||||||
Please contact yujinlong@sealos.io by email to inquire about licensing matters.
|
Please contact yujinlong@sealos.io by email to inquire about licensing matters.
|
||||||
|
|
||||||
|
|||||||
25
Makefile
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# 定义默认变量
|
||||||
|
proxy=null
|
||||||
|
image=null
|
||||||
|
|
||||||
|
# 定义目标
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
# 检查 target 是否定义
|
||||||
|
ifndef name
|
||||||
|
$(error name is not defined)
|
||||||
|
endif
|
||||||
|
|
||||||
|
filePath=./projects/$(name)/Dockerfile
|
||||||
|
|
||||||
|
dev:
|
||||||
|
pnpm --prefix ./projects/$(name) dev
|
||||||
|
|
||||||
|
build:
|
||||||
|
ifeq ($(proxy), taobao)
|
||||||
|
docker build -f $(filePath) -t $(image) . --build-arg proxy=taobao
|
||||||
|
else ifeq ($(proxy), clash)
|
||||||
|
docker build -f $(filePath) -t $(image) . --network host --build-arg HTTP_PROXY=http://127.0.0.1:7890 --build-arg HTTPS_PROXY=http://127.0.0.1:7890
|
||||||
|
else
|
||||||
|
docker build -f $(filePath) -t $(image) .
|
||||||
|
endif
|
||||||
64
README.md
@@ -1,6 +1,6 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<a href="https://fastgpt.in/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
|
<a href="https://tryfastgpt.ai/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
|
||||||
|
|
||||||
# FastGPT
|
# FastGPT
|
||||||
|
|
||||||
@@ -15,13 +15,13 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://fastgpt.in/">
|
<a href="https://tryfastgpt.ai/">
|
||||||
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
|
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://doc.fastgpt.in/docs/intro">
|
<a href="https://doc.tryfastgpt.ai/docs/intro">
|
||||||
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
|
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://doc.fastgpt.in/docs/development">
|
<a href="https://doc.tryfastgpt.ai/docs/development">
|
||||||
<img height="21" src="https://img.shields.io/badge/本地开发-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
|
<img height="21" src="https://img.shields.io/badge/本地开发-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
|
||||||
</a>
|
</a>
|
||||||
<a href="/#-%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE">
|
<a href="/#-%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE">
|
||||||
@@ -36,7 +36,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
|
|
||||||
## 🛸 在线使用
|
## 🛸 在线使用
|
||||||
|
|
||||||
- 🌍 海外版:[fastgpt.in](https://fastgpt.in/)
|
- 🌍 国际版:[tryfastgpt.ai](https://tryfastgpt.ai/)
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| ---------------------------------- | ---------------------------------- |
|
| ---------------------------------- | ---------------------------------- |
|
||||||
@@ -50,36 +50,34 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
## 💡 RoadMap
|
## 💡 RoadMap
|
||||||
|
|
||||||
`1` 应用编排能力
|
`1` 应用编排能力
|
||||||
- [x] 提供简易模式,无需操作编排
|
- [x] 对话工作流、插件工作流
|
||||||
- [x] 工作流编排
|
- [x] 工具调用
|
||||||
- [x] 源文件引用追踪
|
- [x] Code sandbox
|
||||||
- [x] 模块封装,实现多级复用
|
- [x] 循环调用
|
||||||
- [x] Tool 模块
|
- [x] 用户选择
|
||||||
- [ ] 嵌入 [Laf](https://github.com/labring/laf),实现在线编写 HTTP 模块。初版已完成。
|
- [x] 表单输入
|
||||||
- [ ] 插件封装功能,支持低代码渲染
|
|
||||||
|
|
||||||
`2` 知识库能力
|
`2` 知识库能力
|
||||||
- [x] 多库复用,混用
|
- [x] 多库复用,混用
|
||||||
- [x] chunk 记录修改和删除
|
- [x] chunk 记录修改和删除
|
||||||
- [x] 源文件存储
|
|
||||||
- [x] 支持手动输入,直接分段,QA 拆分导入
|
- [x] 支持手动输入,直接分段,QA 拆分导入
|
||||||
- [x] 支持 txt,md,html,pdf,docx,pptx,csv,xlsx (有需要更多可 PR file loader)
|
- [x] 支持 txt,md,html,pdf,docx,pptx,csv,xlsx (有需要更多可 PR file loader)
|
||||||
- [x] 支持 url 读取、CSV 批量导入
|
- [x] 支持 url 读取、CSV 批量导入
|
||||||
- [x] 混合检索 & 重排
|
- [x] 混合检索 & 重排
|
||||||
- [ ] 支持文件阅读器
|
- [ ] 自定义文件读取服务
|
||||||
- [ ] 更多的数据预处理方案
|
- [ ] 自定义分块服务
|
||||||
|
|
||||||
`3` 应用调试能力
|
`3` 应用调试能力
|
||||||
- [x] 知识库单点搜索测试
|
- [x] 知识库单点搜索测试
|
||||||
- [x] 对话时反馈引用并可修改与删除
|
- [x] 对话时反馈引用并可修改与删除
|
||||||
- [x] 完整上下文呈现
|
- [x] 完整上下文呈现
|
||||||
- [x] 完整模块中间值呈现
|
- [x] 完整模块中间值呈现
|
||||||
- [ ] 高级编排 DeBug 模式
|
- [x] 高级编排 DeBug 模式
|
||||||
|
|
||||||
`4` OpenAPI 接口
|
`4` OpenAPI 接口
|
||||||
- [x] completions 接口 (chat 模式对齐 GPT 接口)
|
- [x] completions 接口 (chat 模式对齐 GPT 接口)
|
||||||
- [x] 知识库 CRUD
|
- [x] 知识库 CRUD
|
||||||
- [ ] 对话 CRUD
|
- [x] 对话 CRUD
|
||||||
|
|
||||||
`5` 运营能力
|
`5` 运营能力
|
||||||
- [x] 免登录分享窗口
|
- [x] 免登录分享窗口
|
||||||
@@ -89,6 +87,8 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
|
|
||||||
`6` 其他
|
`6` 其他
|
||||||
- [x] 支持语音输入和输出 (可配置语音输入语音回答)
|
- [x] 支持语音输入和输出 (可配置语音输入语音回答)
|
||||||
|
- [x] 模糊输入提示
|
||||||
|
- [x] 模板市场
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#readme">
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
||||||
@@ -96,23 +96,21 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
|
|
||||||
## 👨💻 开发
|
## 👨💻 开发
|
||||||
|
|
||||||
项目技术栈:NextJs + TS + ChakraUI + Mongo + Postgres (Vector 插件)
|
项目技术栈:NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector 插件)/Milvus
|
||||||
|
|
||||||
- **⚡ 快速部署**
|
- **⚡ 快速部署**
|
||||||
|
|
||||||
> [Sealos](https://sealos.io) 的服务器在国外,不需要额外处理网络问题,无需服务器、无需魔法、无需域名,支持高并发 & 动态伸缩。点击以下按钮即可一键部署 👇
|
> 使用 [Sealos](https://sealos.io) 服务,无需采购服务器、无需域名,支持高并发 & 动态伸缩,并且数据库应用采用 kubeblocks 的数据库,在 IO 性能方面,远超于简单的 Docker 容器部署。
|
||||||
|
|
||||||
[](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
|
[点击查看 Sealos 一键部署 FastGPT 教程](https://doc.tryfastgpt.ai/docs/development/sealos/)
|
||||||
|
|
||||||
由于需要部署数据库,部署完后需要等待 2~4 分钟才能正常访问。默认用了最低配置,首次访问时会有些慢。相关使用教程可查看:[Sealos 部署 FastGPT](https://doc.fastgpt.in/docs/development/sealos/)
|
* [快速开始本地开发](https://doc.tryfastgpt.ai/docs/development/intro/)
|
||||||
|
* [部署 FastGPT](https://doc.tryfastgpt.ai/docs/development/sealos)
|
||||||
* [快开始本地开发](https://doc.fastgpt.in/docs/development/intro/)
|
* [系统配置文件说明](https://doc.tryfastgpt.ai/docs/development/configuration/)
|
||||||
* [部署 FastGPT](https://doc.fastgpt.in/docs/development/sealos)
|
* [多模型配置](https://doc.tryfastgpt.ai/docs/development/one-api/)
|
||||||
* [系统配置文件说明](https://doc.fastgpt.in/docs/development/configuration/)
|
* [版本更新/升级介绍](https://doc.tryfastgpt.ai/docs/development/upgrading)
|
||||||
* [多模型配置](https://doc.fastgpt.in/docs/development/one-api/)
|
* [OpenAPI API 文档](https://doc.tryfastgpt.ai/docs/development/openapi/)
|
||||||
* [版本更新/升级介绍](https://doc.fastgpt.in/docs/development/upgrading)
|
* [知识库结构详解](https://doc.tryfastgpt.ai/docs/course/dataset_engine/)
|
||||||
* [OpenAPI API 文档](https://doc.fastgpt.in/docs/development/openapi/)
|
|
||||||
* [知识库结构详解](https://doc.fastgpt.in/docs/course/dataset_engine/)
|
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#readme">
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
||||||
@@ -120,9 +118,9 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
|
|
||||||
## 🏘️ 社区交流群
|
## 🏘️ 社区交流群
|
||||||
|
|
||||||
wx 扫一下加入:
|
扫码加入飞书话题群 (新开,逐渐弃用微信群):
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#readme">
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
||||||
@@ -151,7 +149,7 @@ wx 扫一下加入:
|
|||||||
|
|
||||||
## 🌿 第三方生态
|
## 🌿 第三方生态
|
||||||
|
|
||||||
- [OnWeChat 个人微信/企微机器人](https://doc.fastgpt.in/docs/use-cases/onwechat/)
|
- [OnWeChat 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/onwechat/)
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#readme">
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
|
||||||
@@ -214,4 +212,4 @@ wx 扫一下加入:
|
|||||||
1. 允许作为后台服务直接商用,但不允许提供 SaaS 服务。
|
1. 允许作为后台服务直接商用,但不允许提供 SaaS 服务。
|
||||||
2. 未经商业授权,任何形式的商用服务均需保留相关版权信息。
|
2. 未经商业授权,任何形式的商用服务均需保留相关版权信息。
|
||||||
3. 完整请查看 [FastGPT Open Source License](./LICENSE)
|
3. 完整请查看 [FastGPT Open Source License](./LICENSE)
|
||||||
4. 联系方式:yujinlong@sealos.io,[点击查看商业版定价策略](https://doc.fastgpt.in/docs/commercial)
|
4. 联系方式:Dennis@sealos.io,[点击查看商业版定价策略](https://doc.tryfastgpt.ai/docs/commercial)
|
||||||
|
|||||||
218
README_en.md
@@ -1,140 +1,88 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<a href="https://fastgpt.in/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
|
<a href="https://tryfastgpt.ai/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
|
||||||
|
|
||||||
# FastGPT
|
# FastGPT
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="./README_en.md">English</a> |
|
<a href="./README_en.md">English</a> |
|
||||||
<a href="./README.md">简体中文</a> |
|
<a href="./README.md">简体中文</a> |
|
||||||
<a href="./README_ja.md">日语</a>
|
<a href="./README_ja.md">日语</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
FastGPT is a knowledge-based Q&A system built on the LLM, offers out-of-the-box data processing and model invocation capabilities, allows for workflow orchestration through Flow visualization!
|
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
|
||||||
|
|
||||||
|
[](https://github.com/labring/FastGPT/stargazers)
|
||||||
|
[](https://github.com/labring/FastGPT/pulls)
|
||||||
|
[](https://github.com/labring/FastGPT/pulls)
|
||||||
|
[](https://github.com/labring/FastGPT/blob/main/LICENSE)
|
||||||
|
[](https://doc.tryfastgpt.ai/docs/intro)
|
||||||
|
[](https://doc.tryfastgpt.ai/docs/intro)
|
||||||
|
[](https://tryfastgpt.ai/)
|
||||||
|
|
||||||
|
[](https://discord.gg/mp68xkZn2Q)
|
||||||
|
[](https://oss.laf.run/otnvvf-imgs/feishu3.png)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p align="center">
|
## 🎥 Comprehensive Feature Demonstration
|
||||||
<a href="https://fastgpt.in/">
|
|
||||||
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
|
|
||||||
</a>
|
|
||||||
<a href="https://doc.fastgpt.in/docs/intro">
|
|
||||||
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
|
|
||||||
</a>
|
|
||||||
<a href="https://doc.fastgpt.in/docs/development">
|
|
||||||
<img height="21" src="https://img.shields.io/badge/本地开发-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
|
|
||||||
</a>
|
|
||||||
<a href="/#-%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE">
|
|
||||||
<img height="21" src="https://img.shields.io/badge/相关项目-7d09f1?style=flat-square" alt="project">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/labring/FastGPT/blob/main/LICENSE">
|
|
||||||
<img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?style=flat-square&labelColor=d4eaf7&color=7d09f1" alt="license">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409bd33f6d4
|
https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409bd33f6d4
|
||||||
|
|
||||||
## 🛸 Use Cloud Services
|
## 🛸 Online Use
|
||||||
|
|
||||||
Cloud: [fastgpt.in](https://fastgpt.in/)
|
Website: [tryfastgpt.ai](https://tryfastgpt.ai/)
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| ---------------------------------- | ---------------------------------- |
|
| ---------------------------------- | ---------------------------------- |
|
||||||
|
| Conversational AI Setup | Workflow Automation |
|
||||||
|  |  |
|
|  |  |
|
||||||
|
| Knowledge Base Setup | Integration Process |
|
||||||
|  |  |
|
|  |  |
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#FastGPT">
|
||||||
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## 💡 Features
|
## 💡 Features
|
||||||
|
|
||||||
`1` Application Orchestration Features
|
| **Features** | **Details** |
|
||||||
|
|--------------------------------------------|---------------------------------------------------|
|
||||||
- [x] Offers a straightforward mode, eliminating the need for complex orchestration
|
| **Application Orchestration Features** | ✅ Offers a straightforward mode, eliminating the need for complex orchestration <br> ✅ Provides clear next-step instructions in dialogues <br> ✅ Facilitates workflow orchestration <br> ✅ Tracks references in source files <br> ✅ Encapsulates modules for enhanced reuse at multiple levels <br> ✅ Combines search and reordering functions <br> 🔜 Includes a tool module <br> 🔜 Integrates [Laf](https://github.com/labring/laf) for online HTTP module creation <br> 🔜 Plugin encapsulation capabilities |
|
||||||
- [x] Provides clear next-step instructions in dialogues
|
| **Knowledge Base Features** | ✅ Allows for the mixed use of multiple databases <br> ✅ Keeps track of modifications and deletions in data chunks <br> ✅ Enables specific vector models for each knowledge base <br> ✅ Stores original source files <br> ✅ Supports direct input and segment-based QA import <br> ✅ Compatible with a variety of file formats: pdf, docx, txt, html, md, csv <br> ✅ Facilitates URL reading and bulk CSV importing <br> 🔜 Supports PPT and Excel file import <br> 🔜 Features a file reader <br> 🔜 Offers diverse data preprocessing options |
|
||||||
- [x] Facilitates workflow orchestration
|
| **Application Debugging Features** | ✅ Enables targeted search testing within the knowledge base <br> ✅ Allows feedback, editing, and deletion during conversations <br> ✅ Presents the full context of interactions <br> ✅ Displays all intermediate values within modules <br> 🔜 Advanced Debug mode for orchestration |
|
||||||
- [x] Tracks references in source files
|
| **OpenAPI Interface** | ✅ The completions interface (aligned with GPT's chat mode interface) <br> ✅ CRUD operations for the knowledge base <br> 🔜 CRUD operations for conversation |
|
||||||
- [x] Encapsulates modules for enhanced reuse at multiple levels
|
| **Operational Features** | ✅ Share without requiring login <br> ✅ Easy embedding with Iframe <br> ✅ Customizable chat window embedding with features like default open, drag-and-drop <br> ✅ Centralizes conversation records for review and annotation |
|
||||||
- [x] Combines search and reordering functions
|
|
||||||
- [ ] Includes a tool module
|
|
||||||
- [ ] Integrates [Laf](https://github.com/labring/laf) for online HTTP module creation
|
|
||||||
- [ ] Plugin encapsulation capabilities
|
|
||||||
|
|
||||||
`2` Knowledge Base Features
|
|
||||||
|
|
||||||
- [x] Allows for the mixed use of multiple databases
|
|
||||||
- [x] Keeps track of modifications and deletions in data chunks
|
|
||||||
- [x] Enables specific vector models for each knowledge base
|
|
||||||
- [x] Stores original source files
|
|
||||||
- [x] Supports direct input and segment-based QA import
|
|
||||||
- [x] Compatible with a variety of file formats: pdf, docx, txt, html, md, csv
|
|
||||||
- [x] Facilitates URL reading and bulk CSV importing
|
|
||||||
- [ ] Supports PPT and Excel file import
|
|
||||||
- [ ] Features a file reader
|
|
||||||
- [ ] Offers diverse data preprocessing options
|
|
||||||
|
|
||||||
`3` Application Debugging Features
|
|
||||||
|
|
||||||
- [x] Enables targeted search testing within the knowledge base
|
|
||||||
- [x] Allows feedback, editing, and deletion during conversations
|
|
||||||
- [x] Presents the full context of interactions
|
|
||||||
- [x] Displays all intermediate values within modules
|
|
||||||
- [ ] Advanced DeBug mode for orchestration
|
|
||||||
|
|
||||||
`4` OpenAPI Interface
|
|
||||||
|
|
||||||
- [x] The completions interface (aligned with GPT's chat mode interface)
|
|
||||||
- [x] CRUD operations for the knowledge base
|
|
||||||
- [ ] CRUD operations for conversations
|
|
||||||
|
|
||||||
`5` Operational Features
|
|
||||||
|
|
||||||
- [x] Share without requiring login
|
|
||||||
- [x] Easy embedding with Iframe
|
|
||||||
- [x] Customizable chat window embedding with features like default open, drag-and-drop
|
|
||||||
- [x] Centralizes conversation records for review and annotation
|
|
||||||
|
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#FastGPT">
|
||||||
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## 👨💻 Development
|
## 👨💻 Development
|
||||||
|
|
||||||
Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)
|
Project tech stack: NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector plug-in)/Milvus
|
||||||
|
|
||||||
- **⚡ Deployment**
|
- **⚡ Fast Deployment**
|
||||||
|
|
||||||
|
> When using [Sealos](https://sealos.io) services, there is no need to purchase servers or domain names. It supports high concurrency and dynamic scaling, and the database application uses the kubeblocks database, which far exceeds the simple Docker container deployment in terms of IO performance.
|
||||||
|
<div align="center">
|
||||||
[](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
|
[](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
|
||||||
|
</div>
|
||||||
|
|
||||||
Give it a 2-4 minute wait after deployment as it sets up the database. Initially, it might be a tad slow since we're using the basic settings.
|
Give it a 2-4 minute wait after deployment as it sets up the database. Initially, it might be a too slow since we're using the basic settings.
|
||||||
|
|
||||||
- [Getting Started with Local Development](https://doc.fastgpt.in/docs/development)
|
[sealos one click deployment tutorial](https://doc.tryfastgpt.ai/docs/development/sealos/)
|
||||||
- [Deploying FastGPT](https://doc.fastgpt.in/docs/installation)
|
|
||||||
- [Guide on System Configs](https://doc.fastgpt.in/docs/installation/reference)
|
|
||||||
- [Configuring Multiple Models](https://doc.fastgpt.in/docs/installation/reference/models)
|
|
||||||
- [Version Updates & Upgrades](https://doc.fastgpt.in/docs/installation/upgrading)
|
|
||||||
|
|
||||||
|
- [Getting Started with Local Development](https://doc.tryfastgpt.ai/docs/development)
|
||||||
|
- [Deploying FastGPT](https://doc.tryfastgpt.ai/docs/installation)
|
||||||
|
- [Guide on System Configs](https://doc.tryfastgpt.ai/docs/installation/reference)
|
||||||
|
- [Configuring Multiple Models](https://doc.tryfastgpt.ai/docs/installation/reference/models)
|
||||||
|
- [Version Updates & Upgrades](https://doc.tryfastgpt.ai/docs/installation/upgrading)
|
||||||
|
|
||||||
## 🏘️ Community
|
<a href="#FastGPT">
|
||||||
|
|
||||||
| Community Group |
|
|
||||||
| ------------------------------------------------- |
|
|
||||||
|  |
|
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
## 👀 Others
|
|
||||||
|
|
||||||
- [FastGPT FAQ](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
|
|
||||||
- [Docker Deployment Tutorial Video](https://www.bilibili.com/video/BV1jo4y147fT/)
|
|
||||||
- [Official Account Integration Video Tutorial](https://www.bilibili.com/video/BV1xh4y1t7fy/)
|
|
||||||
- [FastGPT Knowledge Base Demo](https://www.bilibili.com/video/BV1Wo4y1p7i1/)
|
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -145,7 +93,7 @@ Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)
|
|||||||
- [One API: Multi-model management, supports Azure, Wenxin Yiyuan, etc.](https://github.com/songquanpeng/one-api)
|
- [One API: Multi-model management, supports Azure, Wenxin Yiyuan, etc.](https://github.com/songquanpeng/one-api)
|
||||||
- [TuShan: Build a backend management system in 5 minutes](https://github.com/msgbyte/tushan)
|
- [TuShan: Build a backend management system in 5 minutes](https://github.com/msgbyte/tushan)
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#FastGPT">
|
||||||
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -153,10 +101,69 @@ Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)
|
|||||||
|
|
||||||
- [luolinAI: Enterprise WeChat bot, ready to use](https://github.com/luolin-ai/FastGPT-Enterprise-WeChatbot)
|
- [luolinAI: Enterprise WeChat bot, ready to use](https://github.com/luolin-ai/FastGPT-Enterprise-WeChatbot)
|
||||||
|
|
||||||
<a href="#readme">
|
<a href="#FastGPT">
|
||||||
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
## 🏘️ Community & Support
|
||||||
|
|
||||||
|
+ 🌐 Visit the [FastGPT website](https://tryfastgpt.ai/) for full documentation and useful links.
|
||||||
|
+ 💬 Join our [Discord server](https://discord.gg/mp68xkZn2Q) is to chat with FastGPT developers and other FastGPT users. This is a good place to learn about FastGPT, ask questions, and share your experiences.
|
||||||
|
+ 🐞 Create [GitHub Issues](https://github.com/labring/FastGPT/issues/new/choose) for bug reports and feature requests.
|
||||||
|
|
||||||
|
<a href="#FastGPT">
|
||||||
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
## 👀 Others
|
||||||
|
|
||||||
|
- [FastGPT FAQ](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
|
||||||
|
- [Docker Deployment Tutorial Video](https://www.bilibili.com/video/BV1jo4y147fT/)
|
||||||
|
- [Official Account Integration Video Tutorial](https://www.bilibili.com/video/BV1xh4y1t7fy/)
|
||||||
|
- [FastGPT Knowledge Base Demo](https://www.bilibili.com/video/BV1Wo4y1p7i1/)
|
||||||
|
|
||||||
|
<a href="#FastGPT">
|
||||||
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
## 🌱 Contributors
|
||||||
|
|
||||||
|
We welcome all forms of contributions. If you are interested in contributing code, you can check out our GitHub [Issues](https://github.com/labring/FastGPT/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) to show us your ideas.
|
||||||
|
|
||||||
|
<a href="https://github.com/labring/FastGPT/graphs/contributors" target="_blank">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">
|
||||||
|
<br><img src="https://contrib.rocks/image?repo=labring/FastGPT"><br><br>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=active&period=past_28_days&owner_id=102226726&repo_ids=605673387&image_size=2x3&color_scheme=dark">
|
||||||
|
<img alt="Active participants of labring - past 28 days" src="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=active&period=past_28_days&owner_id=102226726&repo_ids=605673387&image_size=2x3&color_scheme=light">
|
||||||
|
</picture>
|
||||||
|
</td>
|
||||||
|
<td rowspan="2">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-participants-growth/thumbnail.png?activity=new&period=past_28_days&owner_id=102226726&repo_ids=605673387&image_size=4x7&color_scheme=dark">
|
||||||
|
<img alt="New trends of labring" src="https://next.ossinsight.io/widgets/official/compose-org-participants-growth/thumbnail.png?activity=new&period=past_28_days&owner_id=102226726&repo_ids=605673387&image_size=4x7&color_scheme=light">
|
||||||
|
</picture>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=new&period=past_28_days&owner_id=102226726&repo_ids=605673387&image_size=2x3&color_scheme=dark">
|
||||||
|
<img alt="New participants of labring - past 28 days" src="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=new&period=past_28_days&owner_id=102226726&repo_ids=605673387&image_size=2x3&color_scheme=light">
|
||||||
|
</picture>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
## 🌟 Star History
|
## 🌟 Star History
|
||||||
|
|
||||||
<a href="https://github.com/labring/FastGPT/stargazers" target="_blank" style="display: block" align="center">
|
<a href="https://github.com/labring/FastGPT/stargazers" target="_blank" style="display: block" align="center">
|
||||||
@@ -166,3 +173,20 @@ Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)
|
|||||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=labring/FastGPT&type=Date" />
|
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=labring/FastGPT&type=Date" />
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="#FastGPT">
|
||||||
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
## 📄 Usage Agreement
|
||||||
|
|
||||||
|
This repository complies with the [FastGPT Open Source License](./LICENSE) open source agreement.
|
||||||
|
|
||||||
|
1. Direct commercial use as a backend service is allowed, but provision of SaaS services is not allowed.
|
||||||
|
2. Without commercial authorization, any form of commercial service must retain relevant copyright information.
|
||||||
|
3. For full details, please see [FastGPT Open Source License](./LICENSE)
|
||||||
|
4. Contact: Dennis@sealos.io , [click to view commercial version pricing strategy](https://doc.tryfastgpt.ai/docs/commercial)
|
||||||
|
|
||||||
|
<a href="#FastGPT">
|
||||||
|
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
|
||||||
|
</a>
|
||||||
20
README_ja.md
@@ -1,6 +1,6 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<a href="https://fastgpt.in/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
|
<a href="https://tryfastgpt.ai/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
|
||||||
|
|
||||||
# FastGPT
|
# FastGPT
|
||||||
|
|
||||||
@@ -15,13 +15,13 @@ FastGPT は、LLM 上 に 構築 された 知識 ベースの Q&A システム
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://fastgpt.in/">
|
<a href="https://tryfastgpt.ai/">
|
||||||
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
|
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://doc.fastgpt.in/docs/intro">
|
<a href="https://doc.tryfastgpt.ai/docs/intro">
|
||||||
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
|
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://doc.fastgpt.in/docs/development">
|
<a href="https://doc.tryfastgpt.ai/docs/development">
|
||||||
<img height="21" src="https://img.shields.io/badge/本地开发-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
|
<img height="21" src="https://img.shields.io/badge/本地开发-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
|
||||||
</a>
|
</a>
|
||||||
<a href="/#-%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE">
|
<a href="/#-%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE">
|
||||||
@@ -36,7 +36,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
|
|
||||||
## 🛸 クラウドサービスの 利用
|
## 🛸 クラウドサービスの 利用
|
||||||
|
|
||||||
[fastgpt.in](https://fastgpt.in/)
|
[tryfastgpt.ai](https://tryfastgpt.ai/)
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| ---------------------------------- | ---------------------------------- |
|
| ---------------------------------- | ---------------------------------- |
|
||||||
@@ -98,11 +98,11 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
|
|||||||
|
|
||||||
デプロイ 後、データベースをセットアップするので、2~4分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。
|
デプロイ 後、データベースをセットアップするので、2~4分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。
|
||||||
|
|
||||||
- [ローカル 開発入門](https://doc.fastgpt.in/docs/development)
|
- [ローカル 開発入門](https://doc.tryfastgpt.ai/docs/development)
|
||||||
- [FastGPT のデプロイ](https://doc.fastgpt.in/docs/installation)
|
- [FastGPT のデプロイ](https://doc.tryfastgpt.ai/docs/installation)
|
||||||
- [システム 設定 ガイド](https://doc.fastgpt.in/docs/installation/reference)
|
- [システム 設定 ガイド](https://doc.tryfastgpt.ai/docs/installation/reference)
|
||||||
- [複数 モデルの 設定](https://doc.fastgpt.in/docs/installation/reference/models)
|
- [複数 モデルの 設定](https://doc.tryfastgpt.ai/docs/installation/reference/models)
|
||||||
- [バージョン 更新 とアップグレード](https://doc.fastgpt.in/docs/installation/upgrading)
|
- [バージョン 更新 とアップグレード](https://doc.tryfastgpt.ai/docs/installation/upgrading)
|
||||||
|
|
||||||
<!-- ## :point_right: ロードマップ
|
<!-- ## :point_right: ロードマップ
|
||||||
- [FastGPT ロードマップ](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte) -->
|
- [FastGPT ロードマップ](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte) -->
|
||||||
|
|||||||
BIN
bin/fastgpt-v1.0.0-helm.tgz
Normal file
119
dev.md
@@ -1,17 +1,114 @@
|
|||||||
# 打包命令
|
## Premise
|
||||||
|
|
||||||
|
Since FastGPT is managed in the same way as monorepo, it is recommended to install 'make' first during development.
|
||||||
|
|
||||||
|
monorepo Project Name:
|
||||||
|
|
||||||
|
- app: main project
|
||||||
|
-......
|
||||||
|
|
||||||
|
## Dev
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Build image, not proxy
|
# Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content)
|
||||||
docker build -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.4.7 --build-arg name=app .
|
chmod -R +x ./scripts/
|
||||||
|
# Executing under the code root directory installs all dependencies within the root package, projects, and packages
|
||||||
|
pnpm i
|
||||||
|
|
||||||
# build image with proxy
|
# Not make cmd
|
||||||
docker build -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.4.7 --build-arg name=app --build-arg proxy=taobao .
|
cd projects/app
|
||||||
|
pnpm dev
|
||||||
|
|
||||||
|
# Make cmd
|
||||||
|
make dev name=app
|
||||||
```
|
```
|
||||||
|
|
||||||
# Pg 常用索引
|
Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` parameter to Node when running `pnpm i`
|
||||||
|
|
||||||
```sql
|
```sh
|
||||||
CREATE INDEX IF NOT EXISTS modelData_dataset_id_index ON modeldata (dataset_id);
|
NODE_OPTIONS=--no-node-snapshot pnpm i
|
||||||
CREATE INDEX IF NOT EXISTS modelData_collection_id_index ON modeldata (collection_id);
|
```
|
||||||
CREATE INDEX IF NOT EXISTS modelData_teamId_index ON modeldata (team_id);
|
|
||||||
```
|
### Jest
|
||||||
|
|
||||||
|
https://fael3z0zfze.feishu.cn/docx/ZOI1dABpxoGhS7xzhkXcKPxZnDL
|
||||||
|
|
||||||
|
## I18N
|
||||||
|
|
||||||
|
### Install i18n-ally Plugin
|
||||||
|
|
||||||
|
1. Open the Extensions Marketplace in VSCode, search for and install the `i18n Ally` plugin.
|
||||||
|
|
||||||
|
### Code Optimization Examples
|
||||||
|
|
||||||
|
#### Fetch Specific Namespace Translations in `getServerSideProps`
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// pages/yourPage.tsx
|
||||||
|
export async function getServerSideProps(context: any) {
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
currentTab: context?.query?.currentTab || TabEnum.info,
|
||||||
|
...(await serverSideTranslations(context.locale, ['publish', 'user']))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Use useTranslation Hook in Page
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// pages/yourPage.tsx
|
||||||
|
import { useTranslation } from 'next-i18next';
|
||||||
|
|
||||||
|
const YourComponent = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
mr={2}
|
||||||
|
onClick={() => setShowSelected(false)}
|
||||||
|
>
|
||||||
|
{t('common:close')}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default YourComponent;
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Handle Static File Translations
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// utils/i18n.ts
|
||||||
|
import { i18nT } from '@fastgpt/web/i18n/utils';
|
||||||
|
|
||||||
|
const staticContent = {
|
||||||
|
id: 'simpleChat',
|
||||||
|
avatar: 'core/workflow/template/aiChat',
|
||||||
|
name: i18nT('app:template.simple_robot'),
|
||||||
|
};
|
||||||
|
|
||||||
|
export default staticContent;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Standardize Translation Format
|
||||||
|
|
||||||
|
- Use the t(namespace:key) format to ensure consistent naming.
|
||||||
|
- Translation keys should use lowercase letters and underscores, e.g., common.close.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Docker cmd: Build image, not proxy
|
||||||
|
docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app
|
||||||
|
# Make cmd: Build image, not proxy
|
||||||
|
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1
|
||||||
|
|
||||||
|
# Docker cmd: Build image with proxy
|
||||||
|
docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app --build-arg proxy=taobao
|
||||||
|
# Make cmd: Build image with proxy
|
||||||
|
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 proxy=taobao
|
||||||
|
```
|
||||||
|
|||||||
5
docSite/assets/images/social/lark.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg t="1728884315234" class="icon" viewBox="0 0 1224 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4847" width="28" height="28" fill="currentColor">
|
||||||
|
|
||||||
|
<path d="M1224.146926 401.768509a50.444385 50.444385 0 0 0-23.813954-38.631991c-6.095363-3.741292-61.752335-36.782364-141.475481-43.949671a317.253146 317.253146 0 0 0-135.884563 16.982943L746.964061 25.579507A50.444385 50.444385 0 0 0 703.077446 0h-418.268027A50.444385 50.444385 0 0 0 248.027055 84.97777c3.236848 3.447033 296.360763 315.739814 426.969683 459.653442-59.734559 55.762064-103.558119 83.800735-127.666331 96.832201l-200.894764-140.823909a50.045034 50.045034 0 0 0-6.97814-4.098606L79.416697 314.205464A50.444385 50.444385 0 0 0 0.744475 364.124387c0.210185 1.177036 20.619142 118.607361 42.036988 237.635091C86.815207 847.297523 91.775572 859.656397 95.054457 867.874628c5.065457 12.611096 14.334613 24.549601 44.895503 44.538188a595.916337 595.916337 0 0 0 69.361029 38.337733c49.519571 23.603769 128.212812 54.437899 221.59798 67.25918a623.009175 623.009175 0 0 0 85.061845 5.948234c131.491697 0 290.055215-44.138837 418.373119-211.404011 73.564728-96.054517 118.250046-163.944252 154.086578-218.592335 44.033745-67.070014 70.622139-107.551633 118.838564-150.177139a50.444385 50.444385 0 0 0 16.877851-42.015969zM673.693591 100.88877L834.443032 384.638437a413.097477 413.097477 0 0 0-63.055481 59.356226c-8.743693 10.04684-17.256183 19.568218-25.579507 28.711263C656.248242 373.961042 497.033151 203.332909 401.188819 100.88877zM305.491617 882.125167c-59.86067-22.594881-102.065806-47.85911-118.523287-59.692523-10.299062-45.610132-39.935138-209.638457-65.829922-355.780044l391.238243 274.270325a48.132351 48.132351 0 0 0 6.725918 3.951477l189.166445 132.689752a398.300458 398.300458 0 0 1-155.410744 44.138837c-97.336645 7.713787-188.262649-17.277202-247.366653-39.577824z m698.654734-343.442189c-34.932737 53.197808-78.398982 119.385045-149.819824 212.496972a503.371908 503.371908 0 0 1-58.641598 64.33761l-158.185184-110.830518c35.31107-23.813953 81.152405-60.070855 135.905581-114.803013a48.342536 48.342536 0 0 0 14.944149-15.154334c18.790533-19.379051 38.568936-40.859952 59.272153-64.694924 57.086229-65.745849 124.009113-96.243683 198.540692-90.673782a247.639894 247.639894 0 0 1 38.589955 6.011289c-28.290893 33.62959-51.936698 69.63427-80.605924 113.3107z" p-id="4848"></path>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docSite/assets/imgs/RAG1.png
Normal file
|
After Width: | Height: | Size: 381 KiB |
BIN
docSite/assets/imgs/RAG2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docSite/assets/imgs/RAG3.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
docSite/assets/imgs/ai-translate-1.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
docSite/assets/imgs/ai-translate-2.png
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
docSite/assets/imgs/ai-translate-3.png
Normal file
|
After Width: | Height: | Size: 220 KiB |
BIN
docSite/assets/imgs/collection-tags-1.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
docSite/assets/imgs/collection-tags-2.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
docSite/assets/imgs/collection-tags-3.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
docSite/assets/imgs/combine-subtitle.png
Normal file
|
After Width: | Height: | Size: 207 KiB |
BIN
docSite/assets/imgs/cut-text.png
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
docSite/assets/imgs/external_file0.png
Normal file
|
After Width: | Height: | Size: 163 KiB |
BIN
docSite/assets/imgs/external_file1.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
docSite/assets/imgs/external_file2.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
docSite/assets/imgs/extract-subtitle.png
Normal file
|
After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 150 KiB |
BIN
docSite/assets/imgs/fastgpt-api1.jpg
Normal file
|
After Width: | Height: | Size: 143 KiB |
BIN
docSite/assets/imgs/feishu-bot-1.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
docSite/assets/imgs/feishu-bot-10.jpg
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
docSite/assets/imgs/feishu-bot-11.jpg
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
docSite/assets/imgs/feishu-bot-12.jpg
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
docSite/assets/imgs/feishu-bot-13.jpg
Normal file
|
After Width: | Height: | Size: 187 KiB |
BIN
docSite/assets/imgs/feishu-bot-2.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
docSite/assets/imgs/feishu-bot-3.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
docSite/assets/imgs/feishu-bot-4.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
docSite/assets/imgs/feishu-bot-5.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
docSite/assets/imgs/feishu-bot-6.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
docSite/assets/imgs/feishu-bot-7.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
docSite/assets/imgs/feishu-bot-8.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docSite/assets/imgs/feishu-bot-9.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
docSite/assets/imgs/fileinpu-1.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
docSite/assets/imgs/fileinpu-2.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
docSite/assets/imgs/fileinpu-3.jpg
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
docSite/assets/imgs/fileinpu-4.jpg
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
docSite/assets/imgs/fileinpu-5.jpg
Normal file
|
After Width: | Height: | Size: 246 KiB |
BIN
docSite/assets/imgs/fileinpu-6.jpg
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
docSite/assets/imgs/fileinpu-7.jpg
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
docSite/assets/imgs/format-original-text.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
docSite/assets/imgs/gpt-translate-example.png
Normal file
|
After Width: | Height: | Size: 298 KiB |
BIN
docSite/assets/imgs/image-1.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
docSite/assets/imgs/image-2.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
docSite/assets/imgs/image-3.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
docSite/assets/imgs/image-4.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
docSite/assets/imgs/image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docSite/assets/imgs/loop-execution.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
docSite/assets/imgs/offiaccount-1.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
docSite/assets/imgs/offiaccount-2.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
docSite/assets/imgs/offiaccount-3.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docSite/assets/imgs/offiaccount-4.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
docSite/assets/imgs/offiaccount-5.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
docSite/assets/imgs/offiaccount-6.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
docSite/assets/imgs/offiaccount-7.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
docSite/assets/imgs/offiaccount-8.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
docSite/assets/imgs/offiaccount-9.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docSite/assets/imgs/questionGuide.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
docSite/assets/imgs/sealos-deploy1.jpg
Normal file
|
After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 119 KiB |
BIN
docSite/assets/imgs/zilliz_key.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
@@ -1,133 +0,0 @@
|
|||||||
---
|
|
||||||
title: " 打造高质量 AI 知识库(过期)"
|
|
||||||
description: " 利用 FastGPT 打造高质量 AI 知识库"
|
|
||||||
icon: "school"
|
|
||||||
draft: false
|
|
||||||
toc: true
|
|
||||||
weight: 300
|
|
||||||
---
|
|
||||||
|
|
||||||
## 前言
|
|
||||||
|
|
||||||
自从去年 12 月 ChatGPT 发布后,带动了新的一轮应用交互革命。尤其是 GPT-3.5 接口全面放开后,LLM 应用雨后春笋般快速涌现,但因为 GPT 的可控性、随机性和合规性等问题,很多应用场景都没法落地。
|
|
||||||
|
|
||||||
3 月时候,在 Twitter 上刷到一个老哥使用 GPT 训练自己的博客记录,并且成本非常低(比起 FT)。他给出了一个完整的流程图:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
看到这个推文后,我灵机一动,应用场景就十分清晰了。直接上手开干,在经过不到 1 个月时间,FastGPT 在原来多助手管理基础上,加入了向量搜索。于是便有了最早的一期视频:
|
|
||||||
|
|
||||||
{{< bilibili BV1Wo4y1p7i1 >}}
|
|
||||||
|
|
||||||
3 个月过去了,FastGPT 延续着早期的思路去完善和扩展,目前在向量搜索 + LLM 线性问答方面的功能基本上完成了。不过我们始终没有出一期关于如何构建知识库的教程,趁着 V4 在开发中,我们计划介绍一期《如何在 FastGPT 上构建高质量知识库》,以便大家更好的使用。
|
|
||||||
|
|
||||||
## FastGPT 知识库完整逻辑
|
|
||||||
|
|
||||||
在正式构建知识库前,我们先来了解下 FastGPT 是如何进行知识库检索的。首先了解几个基本概念:
|
|
||||||
|
|
||||||
1. 向量:将人类直观的语言(文字、图片、视频等)转成计算机可识别的语言(数组)。
|
|
||||||
2. 向量相似度:两个向量之间可以进行计算,得到一个相似度,即代表:两个语言相似的程度。
|
|
||||||
3. 语言大模型的一些特点:上下文理解、总结和推理。
|
|
||||||
|
|
||||||
结合上述 3 个概念,便有了 “向量搜索 + 大模型 = 知识库问答” 的公式。下图是 FastGPT V3 中知识库问答功能的完整逻辑:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
与大部分其他知识库问答产品不一样的是, FastGPT 采用了 QA 问答对进行存储,而不是仅进行 chunk(文本分块)处理。目的是为了减少向量化内容的长度,让向量能更好的表达文本的含义,从而提高搜索精准度。
|
|
||||||
此外 FastGPT 还提供了搜索测试和对话测试两种途径对数据进行调整,从而方便用户调整自己的数据。根据上述流程和方式,我们以构建一个 FastGPT 常见问题机器人为例,展示如何构建一个高质量的 AI 知识库。
|
|
||||||
|
|
||||||
## 构建知识库应用
|
|
||||||
|
|
||||||
首先,先创建一个 FastGPT 常见问题知识库
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 通过 QA 拆分,获取基础知识
|
|
||||||
|
|
||||||
我们先直接把 FastGPT Git 上一些已有文档,进行 QA 拆分,从而获取一些 FastGPT 基础的知识。下面是 README 例子。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 修正 QA
|
|
||||||
|
|
||||||
通过 README 我们一共得到了 11 组数据,整体的质量还是不错的,图片和链接都提取出来了。不过最后一个知识点出现了一些截断,我们需要手动的修正一下。
|
|
||||||
|
|
||||||
此外,我们观察到第一列第三个知识点。这个知识点是介绍了 FastGPT 一些资源链接,但是 QA 拆分将答案放置在了 A 中,但通常来说用户的提问并不会直接问“有哪些链接”,通常会问:“部署教程”,“问题文档”之类的。因此,我们需要将这个知识点进行简单的一个处理,如下图:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
我们先来创建一个应用,看看效果如何。 首先需要去创建一个应用,并且在知识库中关联相关的知识库。另外还需要在配置页的提示词中,告诉 GPT:“知识库的范围”。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
整体的效果还是不错的,链接和对应的图片都可以顺利的展示。
|
|
||||||
|
|
||||||
### 录入社区常见问题
|
|
||||||
|
|
||||||
接着,我们再把 FastGPT 常见问题的文档导入,由于平时整理不当,我们只能手动的录入对应的问答。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
导入结果如上图。可以看到,我们均采用的是问答对的格式,而不是粗略的直接导入。目的就是为了模拟用户问题,进一步的提高向量搜索的匹配效果。可以为同一个问题设置多种问法,效果更佳。
|
|
||||||
FastGPT 还提供了 openapi 功能,你可以在本地对特殊格式的文件进行处理后,再上传到 FastGPT,具体可以参考:[FastGPT Api Docs](https://doc.fastgpt.in/docs/development/openapi)
|
|
||||||
|
|
||||||
## 知识库微调和参数调整
|
|
||||||
|
|
||||||
FastGPT 提供了搜索测试和对话测试两种途径对知识库进行微调,我们先来使用搜索测试对知识库进行调整。我们建议你提前收集一些用户问题进行测试,根据预期效果进行跳转。可以先进行搜索测试调整,判断知识点是否合理。
|
|
||||||
|
|
||||||
### 搜索测试
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
你可能会遇到下面这种情况,由于“知识库”这个关键词导致一些无关内容的相似度也被搜索进去,此时就需要给第四条记录也增加一个“知识库”关键词,从而去提高它的相似度。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 提示词设置
|
|
||||||
|
|
||||||
提示词的作用是引导模型对话的方向。在设置提示词时,遵守 2 个原则:
|
|
||||||
|
|
||||||
1. 告诉 Gpt 回答什么方面内容。
|
|
||||||
2. 给知识库一个基本描述,从而让 Gpt 更好的判断用户的问题是否属于知识库范围。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 更好的限定模型聊天范围
|
|
||||||
|
|
||||||
首先,你可以通过调整知识库搜索时的相似度和最大搜索数量,实现从知识库层面限制聊天范围。通常我们可以设置相似度为 0.82,并设置空搜索回复内容。这意味着,如果用户的问题无法在知识库中匹配时,会直接回复预设的内容。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
由于 openai 向量模型并不是针对中文,所以当问题中有一些知识库内容的关键词时,相似度
|
|
||||||
会较高,此时无法从知识库层面进行限定。需要通过限定词进行调整,例如:
|
|
||||||
|
|
||||||
> 我的问题如果不是关于 FastGPT 的,请直接回复:“我不确定”。你仅需要回答知识库中的内容,不在其中的内容,不需要回答。
|
|
||||||
|
|
||||||
效果如下:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
当然,gpt35 在一定情况下依然是不可控的。
|
|
||||||
|
|
||||||
### 通过对话调整知识库
|
|
||||||
|
|
||||||
与搜索测试类似,你可以直接在对话页里,点击“引用”,来随时修改知识库内容。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 总结
|
|
||||||
|
|
||||||
1. 向量搜索是一种可以比较文本相似度的技术。
|
|
||||||
2. 大模型具有总结和推理能力,可以从给定的文本中回答问题。
|
|
||||||
3. 最有效的知识库构建方式是 QA 和手动构建。
|
|
||||||
4. Q 的长度不宜过长。
|
|
||||||
5. 需要调整提示词,来引导模型回答知识库内容。
|
|
||||||
6. 可以通过调整搜索相似度、最大搜索数量和限定词来控制模型回复的范围。
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
---
|
|
||||||
title: '快速开始本地开发'
|
|
||||||
description: '对 FastGPT 进行开发调试'
|
|
||||||
icon: 'developer_guide'
|
|
||||||
draft: false
|
|
||||||
toc: true
|
|
||||||
weight: 705
|
|
||||||
---
|
|
||||||
|
|
||||||
本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://fastgpt.in)。
|
|
||||||
|
|
||||||
|
|
||||||
## 前置依赖项
|
|
||||||
|
|
||||||
您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://fastgpt.in):
|
|
||||||
|
|
||||||
- [Git](http://git-scm.com/)
|
|
||||||
- [Docker](https://www.docker.com/)(构建镜像)
|
|
||||||
- [Node.js v18.x (不推荐最新的,可能有兼容问题)](http://nodejs.org)
|
|
||||||
- [pnpm](https://pnpm.io/) 版本 8.x.x
|
|
||||||
|
|
||||||
## 开始本地开发
|
|
||||||
|
|
||||||
{{% alert context="success" %}}
|
|
||||||
1. 用户默认的时区为 `Asia/Shanghai`,非 linux 环境时候,获取系统时间会异常,本地开发时候,可以将用户的时区调整成 UTC(+0)。
|
|
||||||
2. 建议先服务器装好**数据库**,再进行本地开发。
|
|
||||||
{{% /alert %}}
|
|
||||||
|
|
||||||
### 1. Fork 存储库
|
|
||||||
|
|
||||||
您需要 Fork [存储库](https://github.com/labring/FastGPT)。
|
|
||||||
|
|
||||||
### 2. 克隆存储库
|
|
||||||
|
|
||||||
克隆您在 GitHub 上 Fork 的存储库:
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone git@github.com:<github_username>/FastGPT.git
|
|
||||||
```
|
|
||||||
|
|
||||||
**目录简要说明**
|
|
||||||
|
|
||||||
1. `projects` 目录下为 FastGPT 应用代码。其中 `app` 为 FastGPT 核心应用。(后续可能会引入其他应用)
|
|
||||||
2. NextJS 框架前后端放在一起,API 服务位于 `src/pages/api` 目录内。
|
|
||||||
3. `packages` 目录为共用代码,通过 workspace 被注入到 `projects` 中,已配置 monorepo 自动注入,无需额外打包。
|
|
||||||
|
|
||||||
### 3. 安装数据库
|
|
||||||
|
|
||||||
第一次开发,需要先部署数据库,建议本地开发可以随便找一台 2C2G 的轻量小数据库实践。数据库部署教程:[Docker 快速部署](/docs/development/docker/)。部署完了,可以本地访问其数据库。
|
|
||||||
|
|
||||||
Mongo 数据库需要注意,需要注意在连接地址中增加 `directConnection=true` 参数,才能连接上副本集的数据库。
|
|
||||||
|
|
||||||
### 4. 初始配置
|
|
||||||
|
|
||||||
以下文件均在 `projects/app` 路径下。
|
|
||||||
|
|
||||||
**1. 环境变量**
|
|
||||||
|
|
||||||
复制`.env.template`文件,在同级目录下生成一个`.env.local` 文件,修改`.env.local` 里内容才是有效的变量。变量说明见 .env.template
|
|
||||||
|
|
||||||
**2. config 配置文件**
|
|
||||||
|
|
||||||
复制 `data/config.json` 文件,生成一个 `data/config.local.json` 配置文件,具体配置参数说明,可参考 [config 配置说明](/docs/development/configuration)
|
|
||||||
|
|
||||||
**注意:json 配置文件不能包含注释,介绍中为了方便看才加入的注释**
|
|
||||||
|
|
||||||
这个文件大部分时候不需要修改。只需要关注 `systemEnv` 里的参数:
|
|
||||||
|
|
||||||
- `vectorMaxProcess`: 向量生成最大进程,根据数据库和 key 的并发数来决定,通常单个 120 号,2c4g 服务器设置 10~15。
|
|
||||||
- `qaMaxProcess`: QA 生成最大进程
|
|
||||||
- `pgHNSWEfSearch`: PostgreSQL vector 索引参数,越大搜索精度越高但是速度越慢,具体可看 pgvector 官方说明。
|
|
||||||
|
|
||||||
### 5. 运行
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 给自动化脚本代码执行权限(非 linux 系统, 可以手动执行里面的 postinstall.sh 文件内容)
|
|
||||||
chmod -R +x ./scripts/
|
|
||||||
# 代码根目录下执行,会安装根 package、projects 和 packages 内所有依赖
|
|
||||||
pnpm i
|
|
||||||
# 切换到应用目录
|
|
||||||
cd projects/app
|
|
||||||
# 开发模式运行
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
### 6. 部署打包
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 根目录下执行
|
|
||||||
docker build -t dockername/fastgpt:tag --build-arg name=app .
|
|
||||||
# 使用代理
|
|
||||||
docker build -t dockername/fastgpt:tag --build-arg name=app --build-arg proxy=taobao .
|
|
||||||
```
|
|
||||||
|
|
||||||
## 提交代码至开源仓库
|
|
||||||
|
|
||||||
1. 确保你的代码是 Fork [FastGPT](https://github.com/labring/FastGPT) 仓库
|
|
||||||
2. 尽可能少量的提交代码,每次提交仅解决一个问题。
|
|
||||||
3. 向 FastGPT 的 main 分支提交一个 PR,提交请求后,FastGPT 团队/社区的其他人将与您一起审查它。
|
|
||||||
|
|
||||||
如果遇到问题,比如合并冲突或不知道如何打开拉取请求,请查看 GitHub 的[拉取请求教程](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests),了解如何解决合并冲突和其他问题。一旦您的 PR 被合并,您将自豪地被列为[贡献者表](https://github.com/labring/FastGPT/graphs/contributors)中的一员。
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## QA
|
|
||||||
|
|
||||||
### 本地数据库无法连接
|
|
||||||
|
|
||||||
1. 如果你是连接远程的数据库,先检查对应的端口是否开放。
|
|
||||||
2. 如果是本地运行的数据库,可尝试`host`改成`localhost`或`127.0.0.1`
|
|
||||||
|
|
||||||
### sh ./scripts/postinstall.sh 没权限
|
|
||||||
|
|
||||||
FastGPT 在`pnpm i`后会执行`postinstall`脚本,用于自动生成`ChakraUI`的`Type`。如果没有权限,可以先执行`chmod -R +x ./scripts/`,再执行`pnpm i`。
|
|
||||||
|
|
||||||
### 长时间运行后崩溃
|
|
||||||
|
|
||||||
似乎是由于 tiktoken 库的开发环境问题,生产环境中未遇到,暂时可忽略。
|
|
||||||
|
|
||||||
### TypeError: Cannot read properties of null (reading 'useMemo' )
|
|
||||||
|
|
||||||
删除所有的`node_modules`,用 Node18 重新 install 试试,可能最新的 Node 有问题。 本地开发流程:
|
|
||||||
|
|
||||||
1. 根目录: `pnpm i`
|
|
||||||
2. 复制 `config.json` -> `config.local.json`
|
|
||||||
3. 复制 `.env.template` -> `.env.local`
|
|
||||||
4. `cd projects/app`
|
|
||||||
5. `pnpm dev`
|
|
||||||
|
|
||||||
|
|
||||||
## 加入社区
|
|
||||||
|
|
||||||
遇到困难了吗?有任何问题吗? 加入微信群与开发者和用户保持沟通。
|
|
||||||
|
|
||||||
<img width="400px" src="https://oss.laf.run/htr4n1-images/fastgpt-qr-code.jpg" class="medium-zoom-image" />
|
|
||||||
@@ -1,254 +0,0 @@
|
|||||||
---
|
|
||||||
title: '对话接口'
|
|
||||||
description: 'FastGPT OpenAPI 对话接口'
|
|
||||||
icon: 'chat'
|
|
||||||
draft: false
|
|
||||||
toc: true
|
|
||||||
weight: 852
|
|
||||||
---
|
|
||||||
|
|
||||||
## 发起对话
|
|
||||||
|
|
||||||
{{% alert icon="🤖 " context="success" %}}
|
|
||||||
该接口的 API Key 需使用`应用特定的 key`,否则会报错。
|
|
||||||
|
|
||||||
有些包调用时,`BaseUrl`需要添加`v1`路径,有些不需要,如果出现404情况,可补充`v1`重试。
|
|
||||||
{{% /alert %}}
|
|
||||||
|
|
||||||
|
|
||||||
**对话接口兼容`GPT`的接口!如果你的项目使用的是标准的`GPT`官方接口,可以直接通过修改`BaseUrl`和 `Authorization`来访问 FastGpt 应用。**
|
|
||||||
|
|
||||||
## 请求
|
|
||||||
|
|
||||||
{{< tabs tabTotal="2" >}}
|
|
||||||
{{< tab tabName="请求示例" >}}
|
|
||||||
{{< markdownify >}}
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
|
||||||
--header 'Authorization: Bearer fastgpt-xxxxxx' \
|
|
||||||
--header 'Content-Type: application/json' \
|
|
||||||
--data-raw '{
|
|
||||||
"chatId": "abcd",
|
|
||||||
"stream": false,
|
|
||||||
"detail": false,
|
|
||||||
"variables": {
|
|
||||||
"uid": "asdfadsfasfd2323",
|
|
||||||
"name": "张三"
|
|
||||||
},
|
|
||||||
"messages": [
|
|
||||||
{
|
|
||||||
"content": "导演是谁",
|
|
||||||
"role": "user"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}'
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< /markdownify >}}
|
|
||||||
{{< /tab >}}
|
|
||||||
|
|
||||||
{{< tab tabName="参数说明" >}}
|
|
||||||
{{< markdownify >}}
|
|
||||||
|
|
||||||
{{% alert context="info" %}}
|
|
||||||
- headers.Authorization: Bearer {{apikey}}
|
|
||||||
- chatId: string | undefined 。
|
|
||||||
- 为 `undefined` 时(不传入),不使用 FastGpt 提供的上下文功能,完全通过传入的 messages 构建上下文。 不会将你的记录存储到数据库中,你也无法在记录汇总中查阅到。
|
|
||||||
- 为`非空字符串`时,意味着使用 chatId 进行对话,自动从 FastGpt 数据库取历史记录,并使用 messages 数组最后一个内容作为用户问题。请自行确保 chatId 唯一,长度小于250,通常可以是自己系统的对话框ID。
|
|
||||||
- messages: 结构与 [GPT接口](https://platform.openai.com/docs/api-reference/chat/object) chat模式一致。
|
|
||||||
- detail: 是否返回中间值(模块状态,响应的完整结果等),`stream模式`下会通过`event`进行区分,`非stream模式`结果保存在`responseData`中。
|
|
||||||
- variables: 模块变量,一个对象,会替换模块中,输入框内容里的`{{key}}`
|
|
||||||
{{% /alert %}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{< /markdownify >}}
|
|
||||||
{{< /tab >}}
|
|
||||||
{{< /tabs >}}
|
|
||||||
|
|
||||||
## 响应
|
|
||||||
|
|
||||||
{{< tabs tabTotal="4" >}}
|
|
||||||
{{< tab tabName="detail=false,stream=false 响应" >}}
|
|
||||||
{{< markdownify >}}
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"id": "adsfasf",
|
|
||||||
"model": "",
|
|
||||||
"usage": {
|
|
||||||
"prompt_tokens": 1,
|
|
||||||
"completion_tokens": 1,
|
|
||||||
"total_tokens": 1
|
|
||||||
},
|
|
||||||
"choices": [
|
|
||||||
{
|
|
||||||
"message": {
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "电影《铃芽之旅》的导演是新海诚。"
|
|
||||||
},
|
|
||||||
"finish_reason": "stop",
|
|
||||||
"index": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< /markdownify >}}
|
|
||||||
{{< /tab >}}
|
|
||||||
|
|
||||||
{{< tab tabName="detail=false,stream=true 响应" >}}
|
|
||||||
{{< markdownify >}}
|
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
data: {"id":"","object":"","created":0,"choices":[{"delta":{"content":""},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
data: {"id":"","object":"","created":0,"choices":[{"delta":{"content":"电"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
data: {"id":"","object":"","created":0,"choices":[{"delta":{"content":"影"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
data: {"id":"","object":"","created":0,"choices":[{"delta":{"content":"《"},"index":0,"finish_reason":null}]}
|
|
||||||
```
|
|
||||||
{{< /markdownify >}}
|
|
||||||
{{< /tab >}}
|
|
||||||
|
|
||||||
{{< tab tabName="detail=true,stream=false 响应" >}}
|
|
||||||
{{< markdownify >}}
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"responseData": [ // 不同模块的响应值, 不同版本具体值可能有差异,可先 log 自行查看最新值。
|
|
||||||
{
|
|
||||||
"moduleName": "Dataset Search",
|
|
||||||
"price": 1.2000000000000002,
|
|
||||||
"model": "Embedding-2",
|
|
||||||
"tokens": 6,
|
|
||||||
"similarity": 0.61,
|
|
||||||
"limit": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "AI Chat",
|
|
||||||
"price": 454.5,
|
|
||||||
"model": "FastAI-4k",
|
|
||||||
"tokens": 303,
|
|
||||||
"question": "导演是谁",
|
|
||||||
"answer": "电影《铃芽之旅》的导演是新海诚。",
|
|
||||||
"maxToken": 2050,
|
|
||||||
"quoteList": [
|
|
||||||
{
|
|
||||||
"dataset_id": "646627f4f7b896cfd8910e38",
|
|
||||||
"id": "8099",
|
|
||||||
"q": "本作的主人公是谁?",
|
|
||||||
"a": "本作的主人公是名叫铃芽的少女。",
|
|
||||||
"source": "手动修改"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dataset_id": "646627f4f7b896cfd8910e38",
|
|
||||||
"id": "8686",
|
|
||||||
"q": "电影《铃芽之旅》男主角是谁?",
|
|
||||||
"a": "电影《铃芽之旅》男主角是宗像草太,由松村北斗配音。",
|
|
||||||
"source": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dataset_id": "646627f4f7b896cfd8910e38",
|
|
||||||
"id": "19339",
|
|
||||||
"q": "电影《铃芽之旅》的导演是谁?22",
|
|
||||||
"a": "电影《铃芽之旅》的导演是新海诚。",
|
|
||||||
"source": "手动修改"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"completeMessages": [
|
|
||||||
{
|
|
||||||
"obj": "System",
|
|
||||||
"value": "下面是知识库内容:\n1. [本作的主人公是谁?\n本作的主人公是名叫铃芽的少女。]\n2. [电影《铃芽之旅》男主角是谁?\n电影《铃芽之旅》男主角是宗像草太,由松村北斗配音。]\n3. [电影《铃芽之旅》的导演是谁?22\n电影《铃芽之旅》的导演是新海诚。]\n"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"obj": "System",
|
|
||||||
"value": "1.请记住,你的身份是百度的下一代知识增强语言模型,能够完全根据知识库提供的内容回答问题。\n\n2. 你忘记了关于电影《铃芽之旅》以外的内容。"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"obj": "System",
|
|
||||||
"value": "你仅回答关于电影《玲芽之旅》的问题,其余问题直接回复: 我不清楚。"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"obj": "Human",
|
|
||||||
"value": "导演是谁"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"obj": "AI",
|
|
||||||
"value": "电影《铃芽之旅》的导演是新海诚。"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"id": "",
|
|
||||||
"model": "",
|
|
||||||
"usage": {
|
|
||||||
"prompt_tokens": 1,
|
|
||||||
"completion_tokens": 1,
|
|
||||||
"total_tokens": 1
|
|
||||||
},
|
|
||||||
"choices": [
|
|
||||||
{
|
|
||||||
"message": {
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "电影《铃芽之旅》的导演是新海诚。"
|
|
||||||
},
|
|
||||||
"finish_reason": "stop",
|
|
||||||
"index": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< /markdownify >}}
|
|
||||||
{{< /tab >}}
|
|
||||||
|
|
||||||
|
|
||||||
{{< tab tabName="detail=true,stream=true 响应" >}}
|
|
||||||
{{< markdownify >}}
|
|
||||||
|
|
||||||
```bash
|
|
||||||
event: moduleStatus
|
|
||||||
data: {"status":"running","name":"知识库搜索"}
|
|
||||||
|
|
||||||
event: moduleStatus
|
|
||||||
data: {"status":"running","name":"AI 对话"}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: {"id":"","object":"","created":0,"model":"","choices":[{"delta":{"content":"电影"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: {"id":"","object":"","created":0,"model":"","choices":[{"delta":{"content":"《铃"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: {"id":"","object":"","created":0,"model":"","choices":[{"delta":{"content":"芽之旅》"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: {"id":"","object":"","created":0,"model":"","choices":[{"delta":{"content":"的导演是新"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: {"id":"","object":"","created":0,"model":"","choices":[{"delta":{"content":"海诚。"},"index":0,"finish_reason":null}]}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: {"id":"","object":"","created":0,"model":"","choices":[{"delta":{},"index":0,"finish_reason":"stop"}]}
|
|
||||||
|
|
||||||
event: answer
|
|
||||||
data: [DONE]
|
|
||||||
|
|
||||||
event: appStreamResponse
|
|
||||||
data: [{"moduleName":"知识库搜索","moduleType":"datasetSearchNode","runningTime":1.78},{"question":"导演是谁","quoteList":[{"id":"654f2e49b64caef1d9431e8b","q":"电影《铃芽之旅》的导演是谁?","a":"电影《铃芽之旅》的导演是新海诚!","indexes":[{"type":"qa","dataId":"3515487","text":"电影《铃芽之旅》的导演是谁?","_id":"654f2e49b64caef1d9431e8c","defaultIndex":true}],"datasetId":"646627f4f7b896cfd8910e38","collectionId":"653279b16cd42ab509e766e8","sourceName":"data (81).csv","sourceId":"64fd3b6423aa1307b65896f6","score":0.8935586214065552},{"id":"6552e14c50f4a2a8e632af11","q":"导演是谁?","a":"电影《铃芽之旅》的导演是新海诚。","indexes":[{"defaultIndex":true,"type":"qa","dataId":"3644565","text":"导演是谁?\n电影《铃芽之旅》的导演是新海诚。","_id":"6552e14dde5cc7ba3954e417"}],"datasetId":"646627f4f7b896cfd8910e38","collectionId":"653279b16cd42ab509e766e8","sourceName":"data (81).csv","sourceId":"64fd3b6423aa1307b65896f6","score":0.8890955448150635},{"id":"654f34a0b64caef1d946337e","q":"本作的主人公是谁?","a":"本作的主人公是名叫铃芽的少女。","indexes":[{"type":"qa","dataId":"3515541","text":"本作的主人公是谁?","_id":"654f34a0b64caef1d946337f","defaultIndex":true}],"datasetId":"646627f4f7b896cfd8910e38","collectionId":"653279b16cd42ab509e766e8","sourceName":"data (81).csv","sourceId":"64fd3b6423aa1307b65896f6","score":0.8738770484924316},{"id":"654f3002b64caef1d944207a","q":"电影《铃芽之旅》男主角是谁?","a":"电影《铃芽之旅》男主角是宗像草太,由松村北斗配音。","indexes":[{"type":"qa","dataId":"3515538","text":"电影《铃芽之旅》男主角是谁?","_id":"654f3002b64caef1d944207b","defaultIndex":true}],"datasetId":"646627f4f7b896cfd8910e38","collectionId":"653279b16cd42ab509e766e8","sourceName":"data (81).csv","sourceId":"64fd3b6423aa1307b65896f6","score":0.8607980012893677},{"id":"654f2fc8b64caef1d943fd46","q":"电影《铃芽之旅》的编剧是谁?","a":"新海诚是本片的编剧。","indexes":[{"defaultIndex":true,"type":"qa","dataId":"3515550","text":"电影《铃芽之旅》的编剧是谁?22","_id":"654f2fc8b64caef1d943fd47"}],"datasetId":"646627f4f7b896cfd8910e38","collectionId":"653279b16cd42ab509e766e8","sourceName":"data (81).csv","sourceId":"64fd3b6423aa1307b65896f6","score":0.8468944430351257}],"moduleName":"AI 对话","moduleType":"chatNode","runningTime":1.86}]
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< /markdownify >}}
|
|
||||||
{{< /tab >}}
|
|
||||||
{{< /tabs >}}
|
|
||||||
|
|
||||||
|
|
||||||
## 使用案例
|
|
||||||
|
|
||||||
- [接入 NextWeb/ChatGPT web 等应用](/docs/use-cases/openapi)
|
|
||||||
- [接入 onwechat](/docs/use-cases/onwechat)
|
|
||||||
- [接入 飞书](/docs/use-cases/feishu)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
title: '线上版定价'
|
|
||||||
description: 'FastGPT 线上版定价'
|
|
||||||
icon: 'currency_yen'
|
|
||||||
draft: false
|
|
||||||
toc: true
|
|
||||||
weight: 1200
|
|
||||||
type: redirect
|
|
||||||
target: https://cloud.fastgpt.in/price
|
|
||||||
---
|
|
||||||
|
|
||||||
线上版价格请查看:[https://cloud.fastgpt.in/price](https://cloud.fastgpt.in/price)
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
---
|
|
||||||
title: " 接入飞书(社区文章)"
|
|
||||||
description: "FastGPT 接入飞书机器人"
|
|
||||||
icon: "chat"
|
|
||||||
draft: false
|
|
||||||
toc: true
|
|
||||||
weight: 503
|
|
||||||
---
|
|
||||||
|
|
||||||
# FastGPT 一分钟接入飞书
|
|
||||||
|
|
||||||
[Feishu OpenAI GitHub 地址](https://github.com/ConnectAI-E/Feishu-OpenAI)
|
|
||||||
|
|
||||||
[查看视频教程](https://www.bilibili.com/video/BV1Su4y1r7R3/?spm_id_from=333.999.list.card_archive.click)
|
|
||||||
|
|
||||||
由于 FastGPT 的 API 接口和 OpenAI 的规范一致,可以无需变更第三方应用即可使用 FastGPT 上编排好的应用。API 使用可参考 [这篇文章](/docs/use-cases/openapi/)。编排示例,可参考 [高级编排介绍](/docs/workflow/intro)
|
|
||||||
|
|
||||||
## 1. 获取 FastGPT 的 OpenAPI 秘钥
|
|
||||||
|
|
||||||
依次选择应用 -> 「API 访问」,然后点击「API 密钥」来创建密钥。 [参考这篇文章](/docs/use-cases/openapi/)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 2. 部署飞书服务
|
|
||||||
|
|
||||||
推荐使用 Railway 一键部署
|
|
||||||
|
|
||||||
[](https://railway.app/template/10D-TF?referralCode=oMcVS2)
|
|
||||||
|
|
||||||
参考环境变量配置:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
FastGPT 集成**重点参数:**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
#上一步FastGPT的OpenAPI 秘钥
|
|
||||||
OPENAI_KEY=fastgpt-z51pkjqm9nrk03a1rx2funoy
|
|
||||||
#调用OpenAI的BaseUrl要换成FastGPT的
|
|
||||||
API_URL=https://api.fastgpt.in/api/openapi
|
|
||||||
```
|
|
||||||
|
|
||||||
## 3. 创建飞书机器人
|
|
||||||
|
|
||||||
1. 前往 [开发者平台](https://open.feishu.cn/app?lang=zh-CN) 创建应用 , 并获取到 APPID 和 Secret
|
|
||||||
2. 前往`应用功能-机器人`, 创建机器人
|
|
||||||
3. 从 cpolar、serverless 或 Railway 获得公网地址,在飞书机器人后台的 `事件订阅` 板块填写。例如,
|
|
||||||
- `http://xxxx.r6.cpolar.top` 为 cpolar 暴露的公网地址
|
|
||||||
- `/webhook/event` 为统一的应用路由
|
|
||||||
- 最终的回调地址为 `http://xxxx.r6.cpolar.top/webhook/event`
|
|
||||||
4. 在飞书机器人后台的 `机器人` 板块,填写消息卡片请求网址。例如,
|
|
||||||
- `http://xxxx.r6.cpolar.top` 为 cpolar 暴露的公网地址
|
|
||||||
- `/webhook/card` 为统一的应用路由
|
|
||||||
- 最终的消息卡片请求网址为 `http://xxxx.r6.cpolar.top/webhook/card`
|
|
||||||
5. 在事件订阅板块,搜索三个词`机器人进群`、 `接收消息`、 `消息已读`, 把他们后面所有的权限全部勾选。 进入权限管理界面,搜索`图片`, 勾选`获取与上传图片或文件资源`。 最终会添加下列回调事件
|
|
||||||
- im:resource(获取与上传图片或文件资源)
|
|
||||||
- im:message
|
|
||||||
- im:message.group_at_msg(获取群组中所有消息)
|
|
||||||
- im:message.group_at_msg:readonly(接收群聊中 @ 机器人消息事件)
|
|
||||||
- im:message.p2p_msg(获取用户发给机器人的单聊消息)
|
|
||||||
- im:message.p2p_msg:readonly(读取用户发给机器人的单聊消息)
|
|
||||||
- im:message:send_as_bot(获取用户在群组中 @ 机器人的消息)
|
|
||||||
- im:chat:readonly(获取群组信息)
|
|
||||||
- im:chat(获取与更新群组信息)
|
|
||||||
|
|
||||||
## 4. 测试飞书机器人
|
|
||||||
|
|
||||||
私聊机器人,或者群里艾特它,就可以基于 FastGPT 的应用进行回答啦
|
|
||||||
|
|
||||||

|
|
||||||
@@ -1,489 +0,0 @@
|
|||||||
---
|
|
||||||
title: '发送飞书webhook通知'
|
|
||||||
description: '利用工具调用模块,发送一个飞书webhook通知'
|
|
||||||
icon: 'image'
|
|
||||||
draft: false
|
|
||||||
toc: true
|
|
||||||
weight: 404
|
|
||||||
---
|
|
||||||
|
|
||||||
该文章展示如何发送一个简单的飞书webhook通知,以此类推,发送其他类型的通知也可以这么操作。
|
|
||||||
|
|
||||||
| | |
|
|
||||||
| --------------------- | --------------------- |
|
|
||||||
|  |  |
|
|
||||||
|
|
||||||
## 1. 准备飞书机器人
|
|
||||||
|
|
||||||
| | | |
|
|
||||||
| --------------------- | --------------------- |--------------------- |
|
|
||||||
|  |  | |
|
|
||||||
|
|
||||||
## 2. 导入编排代码
|
|
||||||
|
|
||||||
复制下面配置,点击「高级编排」右上角的导入按键,导入该配置,导入后将飞书提供的接口地址复制到「HTTP 模块」。
|
|
||||||
|
|
||||||
{{% details title="编排配置" closed="true" %}}
|
|
||||||
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"nodeId": "userGuide",
|
|
||||||
"name": "core.module.template.App system setting",
|
|
||||||
"intro": "core.app.tip.userGuideTip",
|
|
||||||
"avatar": "/imgs/workflow/userGuide.png",
|
|
||||||
"flowNodeType": "userGuide",
|
|
||||||
"position": {
|
|
||||||
"x": -92.26884681344463,
|
|
||||||
"y": 710.9354029649536
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"key": "welcomeText",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "core.app.Welcome Text",
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"value": "",
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "variables",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "any",
|
|
||||||
"label": "core.module.Variable",
|
|
||||||
"value": [],
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "questionGuide",
|
|
||||||
"valueType": "boolean",
|
|
||||||
"type": "switch",
|
|
||||||
"label": "",
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"value": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "tts",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "any",
|
|
||||||
"label": "",
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"value": {
|
|
||||||
"type": "web"
|
|
||||||
},
|
|
||||||
"connected": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "userChatInput",
|
|
||||||
"name": "core.module.template.Chat entrance",
|
|
||||||
"intro": "当用户发送一个内容后,流程将会从这个模块开始执行。",
|
|
||||||
"avatar": "/imgs/workflow/userChatInput.svg",
|
|
||||||
"flowNodeType": "questionInput",
|
|
||||||
"position": {
|
|
||||||
"x": 241.60980819261408,
|
|
||||||
"y": 1330.9528898009685
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"key": "userChatInput",
|
|
||||||
"type": "systemInput",
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "core.module.input.label.user question",
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"key": "userChatInput",
|
|
||||||
"label": "core.module.input.label.user question",
|
|
||||||
"type": "source",
|
|
||||||
"valueType": "string",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"nodeId": "n84rvg",
|
|
||||||
"key": "userChatInput"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "n84rvg",
|
|
||||||
"name": "工具调用(实验)",
|
|
||||||
"intro": "通过AI模型自动选择一个或多个功能块进行调用,也可以对插件进行调用。",
|
|
||||||
"avatar": "/imgs/workflow/tool.svg",
|
|
||||||
"flowNodeType": "tools",
|
|
||||||
"showStatus": true,
|
|
||||||
"position": {
|
|
||||||
"x": 809.4264785615641,
|
|
||||||
"y": 873.3971746859133
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"key": "model",
|
|
||||||
"type": "settingLLMModel",
|
|
||||||
"label": "core.module.input.label.aiModel",
|
|
||||||
"required": true,
|
|
||||||
"valueType": "string",
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"llmModelType": "all",
|
|
||||||
"value": "gpt-3.5-turbo",
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "temperature",
|
|
||||||
"type": "hidden",
|
|
||||||
"label": "",
|
|
||||||
"value": 0,
|
|
||||||
"valueType": "number",
|
|
||||||
"min": 0,
|
|
||||||
"max": 10,
|
|
||||||
"step": 1,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "maxToken",
|
|
||||||
"type": "hidden",
|
|
||||||
"label": "",
|
|
||||||
"value": 2000,
|
|
||||||
"valueType": "number",
|
|
||||||
"min": 100,
|
|
||||||
"max": 4000,
|
|
||||||
"step": 50,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "systemPrompt",
|
|
||||||
"type": "textarea",
|
|
||||||
"max": 3000,
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "core.ai.Prompt",
|
|
||||||
"description": "core.app.tip.chatNodeSystemPromptTip",
|
|
||||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
|
||||||
"showTargetInApp": true,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "history",
|
|
||||||
"type": "numberInput",
|
|
||||||
"label": "core.module.input.label.chat history",
|
|
||||||
"required": true,
|
|
||||||
"min": 0,
|
|
||||||
"max": 30,
|
|
||||||
"valueType": "chatHistory",
|
|
||||||
"value": 6,
|
|
||||||
"showTargetInApp": true,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "userChatInput",
|
|
||||||
"type": "custom",
|
|
||||||
"label": "",
|
|
||||||
"required": true,
|
|
||||||
"valueType": "string",
|
|
||||||
"showTargetInApp": true,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"connected": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"key": "userChatInput",
|
|
||||||
"label": "core.module.input.label.user question",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "string",
|
|
||||||
"targets": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "selectedTools",
|
|
||||||
"valueType": "tools",
|
|
||||||
"type": "hidden",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"nodeId": "3mbu91",
|
|
||||||
"key": "selectedTools"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "finish",
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"valueType": "boolean",
|
|
||||||
"type": "hidden",
|
|
||||||
"targets": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "3mbu91",
|
|
||||||
"name": "HTTP 请求",
|
|
||||||
"intro": "调用飞书webhook,发送一个通知",
|
|
||||||
"avatar": "/imgs/workflow/http.png",
|
|
||||||
"flowNodeType": "httpRequest468",
|
|
||||||
"showStatus": true,
|
|
||||||
"position": {
|
|
||||||
"x": 1483.6437630977423,
|
|
||||||
"y": 798.9716928475544
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
|
|
||||||
{
|
|
||||||
"key": "system_httpMethod",
|
|
||||||
"type": "custom",
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "",
|
|
||||||
"value": "POST",
|
|
||||||
"required": true,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpReqUrl",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "",
|
|
||||||
"description": "core.module.input.description.Http Request Url",
|
|
||||||
"placeholder": "https://api.ai.com/getInventory",
|
|
||||||
"required": false,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"value": "这里填写你的飞书机器人地址",
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpHeader",
|
|
||||||
"type": "custom",
|
|
||||||
"valueType": "any",
|
|
||||||
"value": [],
|
|
||||||
"label": "",
|
|
||||||
"description": "core.module.input.description.Http Request Header",
|
|
||||||
"placeholder": "core.module.input.description.Http Request Header",
|
|
||||||
"required": false,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpParams",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "any",
|
|
||||||
"value": [],
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpJsonBody",
|
|
||||||
"type": "hidden",
|
|
||||||
"valueType": "any",
|
|
||||||
"value": "{\r\n \"msg_type\": \"text\",\r\n \"content\": {\r\n \"text\": \"{{text}}\"\r\n }\r\n}",
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "DYNAMIC_INPUT_KEY",
|
|
||||||
"type": "target",
|
|
||||||
"valueType": "any",
|
|
||||||
"label": "core.workflow.inputType.dynamicTargetInput",
|
|
||||||
"description": "core.module.input.description.dynamic input",
|
|
||||||
"required": false,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"hideInApp": true,
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_addInputParam",
|
|
||||||
"type": "addInputParam",
|
|
||||||
"valueType": "any",
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"showTargetInApp": false,
|
|
||||||
"showTargetInPlugin": false,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true,
|
|
||||||
"dataType": true
|
|
||||||
},
|
|
||||||
"defaultEditField": {
|
|
||||||
"label": "",
|
|
||||||
"key": "",
|
|
||||||
"description": "",
|
|
||||||
"inputType": "target",
|
|
||||||
"valueType": "string"
|
|
||||||
},
|
|
||||||
"connected": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "string",
|
|
||||||
"type": "hidden",
|
|
||||||
"key": "text",
|
|
||||||
"label": "text",
|
|
||||||
"toolDescription": "需要发送的通知内容",
|
|
||||||
"required": true,
|
|
||||||
"connected": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"key": "httpRawResponse",
|
|
||||||
"label": "原始响应",
|
|
||||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
|
||||||
"valueType": "any",
|
|
||||||
"type": "source",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"nodeId": "rzx4mj",
|
|
||||||
"key": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "psdhs1",
|
|
||||||
"key": "switch"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_addOutputParam",
|
|
||||||
"type": "addOutputParam",
|
|
||||||
"valueType": "any",
|
|
||||||
"label": "",
|
|
||||||
"targets": [],
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true,
|
|
||||||
"dataType": true,
|
|
||||||
"defaultValue": true
|
|
||||||
},
|
|
||||||
"defaultEditField": {
|
|
||||||
"label": "",
|
|
||||||
"key": "",
|
|
||||||
"description": "",
|
|
||||||
"outputType": "source",
|
|
||||||
"valueType": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "source",
|
|
||||||
"valueType": "string",
|
|
||||||
"key": "prompt",
|
|
||||||
"label": "prompt",
|
|
||||||
"description": "",
|
|
||||||
"required": false,
|
|
||||||
"edit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true,
|
|
||||||
"dataType": true,
|
|
||||||
"defaultValue": true
|
|
||||||
},
|
|
||||||
"targets": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "rzx4mj",
|
|
||||||
"name": "工具调用终止",
|
|
||||||
"intro": "该模块需配置工具调用使用。当该模块被执行时,本次工具调用将会强制结束,并且不再调用AI针对工具调用结果回答问题。",
|
|
||||||
"avatar": "/imgs/workflow/toolStop.svg",
|
|
||||||
"flowNodeType": "stopTool",
|
|
||||||
"position": {
|
|
||||||
"x": 2145.5070710160267,
|
|
||||||
"y": 1306.3581817783079
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"key": "switch",
|
|
||||||
"type": "triggerAndFinish",
|
|
||||||
"label": "",
|
|
||||||
"description": "core.module.input.description.Trigger",
|
|
||||||
"valueType": "any",
|
|
||||||
"showTargetInApp": true,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"connected": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "psdhs1",
|
|
||||||
"name": "指定回复",
|
|
||||||
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
|
||||||
"avatar": "/imgs/workflow/reply.png",
|
|
||||||
"flowNodeType": "answerNode",
|
|
||||||
"position": {
|
|
||||||
"x": 2117.0429459850598,
|
|
||||||
"y": 1658.4125434513746
|
|
||||||
},
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"key": "switch",
|
|
||||||
"type": "triggerAndFinish",
|
|
||||||
"label": "",
|
|
||||||
"description": "core.module.input.description.Trigger",
|
|
||||||
"valueType": "any",
|
|
||||||
"showTargetInApp": true,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"connected": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "text",
|
|
||||||
"type": "textarea",
|
|
||||||
"valueType": "any",
|
|
||||||
"label": "core.module.input.label.Response content",
|
|
||||||
"description": "core.module.input.description.Response content",
|
|
||||||
"placeholder": "core.module.input.description.Response content",
|
|
||||||
"showTargetInApp": true,
|
|
||||||
"showTargetInPlugin": true,
|
|
||||||
"value": "笑死发送成功啦",
|
|
||||||
"connected": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"key": "finish",
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"valueType": "boolean",
|
|
||||||
"type": "hidden",
|
|
||||||
"targets": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
{{% /details %}}
|
|
||||||
|
|
||||||
|
|
||||||
## 3. 流程说明
|
|
||||||
|
|
||||||
1. 为工具调用挂载一个HTTP模块,功能描述写上:调用飞书webhook,发送一个通知。
|
|
||||||
2. HTTP模块的输入参数中,填写飞书机器人的地址,填写发送的通知内容。
|
|
||||||
3. HTTP模块输出连接上一个工具终止模块,用于强制结束工具调用。不终止的话,会把调用结果返回给模型,模型会继续回答一次问题,浪费 Tokens
|
|
||||||
4. HTTP模块输出再连上一个指定回复,直接回复一个发送成功,用于替代AI的回答。
|
|
||||||
@@ -11,7 +11,7 @@ FastGPT 项目在 Apache License 2.0 许可下开源,同时包含以下附加
|
|||||||
|
|
||||||
+ FastGPT 允许被用于商业化,例如作为其他应用的“后端即服务”使用,或者作为应用开发平台提供给企业。然而,当满足以下条件时,必须联系作者获得商业许可:
|
+ FastGPT 允许被用于商业化,例如作为其他应用的“后端即服务”使用,或者作为应用开发平台提供给企业。然而,当满足以下条件时,必须联系作者获得商业许可:
|
||||||
|
|
||||||
+ 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 fastgpt.in 的源码来运营与 fastgpt.in 服务类似的多租户 SaaS 服务。
|
+ 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 tryfastgpt.ai 的源码来运营与 tryfastgpt.ai 服务类似的多租户 SaaS 服务。
|
||||||
+ LOGO 及版权信息:在使用 FastGPT 的过程中,不得移除或修改 FastGPT 控制台内的 LOGO 或版权信息。
|
+ LOGO 及版权信息:在使用 FastGPT 的过程中,不得移除或修改 FastGPT 控制台内的 LOGO 或版权信息。
|
||||||
|
|
||||||
请通过电子邮件 yujinlong@sealos.io 联系我们咨询许可事宜。
|
请通过电子邮件 yujinlong@sealos.io 联系我们咨询许可事宜。
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
weight: 1100
|
weight: 1100
|
||||||
title: '商业版介绍'
|
title: '收费说明'
|
||||||
description: 'FastGPT 商业版介绍'
|
description: 'FastGPT 收费说明'
|
||||||
icon: 'shopping_cart'
|
icon: 'shopping_cart'
|
||||||
draft: false
|
draft: false
|
||||||
images: []
|
images: []
|
||||||
@@ -19,16 +19,18 @@ FastGPT 商业版是基于 FastGPT 开源版的增强版本,增加了一些独
|
|||||||
| 应用管理与高级编排 | ✅ | ✅ | ✅ |
|
| 应用管理与高级编排 | ✅ | ✅ | ✅ |
|
||||||
| 文档知识库 | ✅ | ✅ | ✅ |
|
| 文档知识库 | ✅ | ✅ | ✅ |
|
||||||
| 外部使用 | ✅ | ✅ | ✅ |
|
| 外部使用 | ✅ | ✅ | ✅ |
|
||||||
|
| 最大应用数量 | 500 | 无限制 | 由付费套餐决定 |
|
||||||
|
| 最大知识库数量(单个知识库内容无限制) | 30 | 无限制 | 由付费套餐决定 |
|
||||||
| 自定义版权信息 | ❌ | ✅ | 设计中 |
|
| 自定义版权信息 | ❌ | ✅ | 设计中 |
|
||||||
| 多租户与支付 | ❌ | ✅ | ✅ |
|
| 多租户与支付 | ❌ | ✅ | ✅ |
|
||||||
| 团队空间 | ❌ | ✅ | ✅ |
|
| 团队空间 | ❌ | ✅ | ✅ |
|
||||||
| 应用发布安全配置 | ❌ | ✅ | ✅ |
|
| 应用发布安全配置 | ❌ | ✅ | ✅ |
|
||||||
| 内容审核 | ❌ | ✅ | ✅ |
|
| 内容审核 | ❌ | ✅ | ✅ |
|
||||||
| web站点同步 | ❌ | ✅ | ✅ |
|
| web站点同步 | ❌ | ✅ | ✅ |
|
||||||
| 管理后台 | ❌ | ✅ | ✅ |
|
| 管理后台 | ❌ | ✅ | 不需要 |
|
||||||
| 增强训练模式 | ❌ | ✅ | ✅ |
|
| 增强训练模式 | ❌ | ✅ | ✅ |
|
||||||
|
| 第三方应用快速接入(飞书、公众号) | ❌ | ✅ | ✅ |
|
||||||
| 图片知识库 | ❌ | 设计中 | 设计中 |
|
| 图片知识库 | ❌ | 设计中 | 设计中 |
|
||||||
| 自动规划召回 | ❌ | 设计中 | 设计中 |
|
|
||||||
| 对话日志运营分析 | ❌ | 设计中 | 设计中 |
|
| 对话日志运营分析 | ❌ | 设计中 | 设计中 |
|
||||||
| 完整商业授权 | ❌ | ✅ | ✅ |
|
| 完整商业授权 | ❌ | ✅ | ✅ |
|
||||||
{{< /table >}}
|
{{< /table >}}
|
||||||