Compare commits

...

103 Commits

Author SHA1 Message Date
Archer
13401294ad IOS safari whisper support (#2870)
* fix: variables check

* remove log

* perf: safari whisper

* feat: comment

* perf: connetion check

* doc
2024-10-10 12:24:07 +08:00
heheer
8273c96bbc fix: form-data not display in http node log (#2868)
* fix: fix form-data not display in http node log

* fix
2024-10-10 11:47:45 +08:00
Archer
61c6b1e471 Perf: delete app tip; fix: can't stop debug. (#2865)
* fix: variables check

* remove log

* perf: delete app tip

* perf: remove node code

* fix: can not stop debug

* update version

* update version intro

* fix: per error

* perf: apikey manager

* Add permission check

* update README
2024-10-10 11:30:36 +08:00
heheer
f06aca9874 fix: customize flow remove change (#2858)
* fix: customize flow remove change

* fix when mouse not in canvas
2024-10-09 22:02:17 +08:00
Archer
3a4b4a866b Team group (#2864)
* feat(member-group): Team (#2616)

* feat: member-group schema define

* feat(fe): create group

* feat: add group edit modal

* feat(fe): add avatar group component

* feat: edit group
fix: permission select menu style

* feat: bio-mode support for select-member component

* fix: avatar group key unique

* feat: group manage

* feat: divide member into group and clbs

* feat: finish team permission

* chore: adjust

* fix: get clbs

* perf: groups code

* pref: member group for team (#2706)

* chore: fe adjust
fix: remove the member from groups when removing from team
feat: change the groups avatar when updating the team's avatar

* chore: DefaultGroupName as a constant string ''

* fix: create default group when create team for root

* feat: comment

* feat: 4811 init

* pref: member group for team (#2732)

* chore: default group name

* feat: get default group when get by tmbid

* feat(fe): adjust

* member ui

* fix: delete group (#2736)

* perf: init4811

* pref: member group (#2818)

* fix: update clb per then refetch clb list

* fix: calculate group permission

* feat(fe): group tag

* refactor(fe): team and group manage

* feat: manage group member

* feat: add group transfer owner modal

* feat: group manage member

* chore: adjust the file structure

* pref: member group

* chore: adjust fe style

* fix: ts error

* chore: fe adjust

* chore: fe adjust

* chore: adjust

* chore: adjust the code

* perf: i18n and schema name

* pref: member-group (#2862)

* feat: group list ordered by updateTime

* fix: transfer ownership of group when deleting member

* fix: i18n fix

* feat: can not set member as admin/owner when user is not active

* fix: GroupInfoModal hover input do not change color

* fix(fe): searchinput do not scroll

* perf: team group ui

* doc

* remove enum

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
2024-10-09 18:32:10 +08:00
Finley Ge
7afa8f00b8 pref: trim the input of outlink (#2860) 2024-10-09 14:05:23 +08:00
Archer
f6c5695df4 Optimize base64 storage in files to support concurrent storage (#2856)
* fix: variables check

* remove log

* perf: file img saved

* update doc
2024-10-08 12:58:33 +08:00
papapatrick
dd3a1b910b docs: add FAQ (#2833) 2024-10-08 12:36:23 +08:00
Archer
a66d9d2e98 4.8.11 test (#2850)
* fix: variables check

* remove log

* fix: variables refresh

* perf: team select button

* perf: remove change fn
2024-10-04 10:25:20 +08:00
Archer
fc6f28f26e fix: variables check (#2849)
* fix: variables check

* remove log
2024-10-01 11:11:19 +08:00
Archer
d4b99ddcab fix: login ip check (#2848) 2024-09-30 18:24:03 +08:00
Archer
df328b2a73 fix: comment node cannot save (#2847) 2024-09-30 18:16:20 +08:00
Archer
fadb389294 fix: loop node cannot save parentId (#2845) 2024-09-30 17:58:17 +08:00
Archer
7c38d1da9a 4.8.11 test (#2843)
* feat: app version test

* update doc

* fix: paging num error

* fix: doc api domain

* rename variable

* perf: memment node min size
2024-09-30 17:28:03 +08:00
heheer
7c829febec feat: add context menu & comment node (#2834)
* feat: add comment node

* useMemo
2024-09-29 10:08:19 +08:00
heheer
7bdff9ce9c perf: change tool params type label & enum input conditional rendering (#2835) 2024-09-28 18:00:22 +08:00
heheer
1599d144ce feat: add tool params node & tool params add array type (#2824)
* add tool params node

* add tool params enum

* node response

* tool add array type params

* fix tool params

* fix

* fix

* fix
2024-09-28 15:58:55 +08:00
Archer
f2749cbb00 4.8.11 perf (#2832)
* save toast

* perf: surya ocr

* perf: remove same model name

* fix: indexes

* perf: ip check

* feat: Fixed the version number of the subapplication

* feat: simple app get latest child version

* perf: update child dispatch variables

* feat: variables update doc
2024-09-28 15:31:25 +08:00
heheer
f7a8203454 fix:variable not update in nested workflow runs (#2830) 2024-09-28 13:59:35 +08:00
Archer
d95f71e9e3 Update dataset_engine.md (#2829) 2024-09-28 10:08:54 +08:00
Deepturn
a43d845298 Update configuration.md (#2828)
修改 claude
2024-09-28 09:57:16 +08:00
papapatrick
3e64f46d92 fix: change ip detect url (#2827) 2024-09-27 22:19:48 +08:00
yiming-alicloud
0335f16742 submit ocr module (#2815) 2024-09-27 16:07:28 +08:00
Archer
98dbec2cf7 4.8.11 fix (#2822)
* fix: tool choice hostiry error

* fix: chat page auth error redirect

* perf: ip redirect tip

* feat: fedomain env

* fix: tool desc empty

* feat: 4811 doc
2024-09-27 15:52:33 +08:00
silencezhang7
d259eda6b4 新增BI圖標功能-柱狀圖 (#2779)
* 新增BI圖標功能-柱狀圖

* 新增BI图表功能-柱狀圖,优化代码,删除无用代码

* 优化生成逻辑,支持插件手动选择图表类型:目前支持柱状图,折线图,饼图

* 修改包名称,完成基础图表
2024-09-27 13:50:42 +08:00
heheer
7c8f2ab6f5 perf: support prompt editor dynamic height increase & modify aichat placeholder (#2817) 2024-09-27 13:45:44 +08:00
papapatrick
691476c821 feat: add login page ip detect (#2819)
* feat: add login page ip detect

* code perf
2024-09-27 13:39:10 +08:00
Archer
efcb53cd6d Rename node(#2814) 2024-09-26 18:25:42 +08:00
Archer
21ab855871 perf: stream response (#2813)
* perf: stream response

* fold code
2024-09-26 18:09:01 +08:00
heheer
aee5de29c7 fix: tool node fold (#2811)
* fix: tool node fold

* delete console
2024-09-26 18:04:43 +08:00
heheer
78d15c2a2f fix: form input value type & default form & ui (#2802)
* fix: form input value type & default form & ui

* variables form ui
2024-09-26 16:33:38 +08:00
Archer
54e0a0eab1 4.8.11 code perf (#2804)
* perf: support child layout

* perf: user form ui

* perf: plugin tool output code

* perf: code

* perf: node fold hook
2024-09-26 16:27:28 +08:00
papapatrick
e6bad93b32 fix: mobile history slider records disappear (#2806)
* fix: mobile history slider records disappear

* change h
2024-09-26 16:26:00 +08:00
heheer
12d7ba5d73 feat: support workflow node fold (#2797)
* feat: support workflow node fold

* fix

* fix
2024-09-26 15:44:04 +08:00
Zhenyi-Wang
5ad8c81ef3 fix: 网页抓取:正确处理//开头的超链接 (#2803)
Co-authored-by: zhenyiwang <zhenyiwang@intl.zju.edu.cn>
2024-09-26 14:53:24 +08:00
papapatrick
cb6fe9d0da feat: support select field as tool output (#2798)
* feat: support select field as tool output

* defaultOutput
2024-09-26 14:37:06 +08:00
heheer
1cf76ee7df feat: add form input node (#2773)
* add node

* dispatch

* extract InputTypeConfig component

* question tip

* fix build

* fix

* fix
2024-09-26 13:48:03 +08:00
Archer
edebfdf5ef fix: ts (#2799) 2024-09-26 13:20:05 +08:00
Archer
86436d55ff 4.8.11 test (#2794)
* perf: version list type

* perf: add node default value

* perf: snapshot status

* fix: version detail auth

* fix: export defalt
2024-09-26 11:02:09 +08:00
Archer
e31d6ec2c1 remove invalid code (#2785) 2024-09-25 09:49:51 +08:00
heheer
6bb10ca150 perf: optimize simple app history (#2782)
* simple app history

* ui

* extract context content into hooks
2024-09-24 21:09:59 +08:00
Archer
7aa75f8ee0 fix: chat page render performance (#2784)
* fix: chat page render performance

* fix: ts
2024-09-24 18:05:27 +08:00
Archer
afd2c394d8 Perf ui detail (#2775)
* perf: tool response tip

* perf: image extract

* perf: user question tool desc

* fix: simple mode load app module

* perf: simple mode plugin version

* perf: share page reload

* refresh simple mode data
2024-09-24 18:04:11 +08:00
Archer
434c03c955 Record scroll test (#2783)
* perf: history add scrollList (#2696)

* perf: chatHistorySlider add virtualList

* perf: chat records add scrollList

* delete console

* perf: ScrollData add ref props

* 优化代码

* optimize code && add line breaks

* add total records display

* finish test

* perf: ScrollComponent load data

* perf: Scroll components load

* perf: scroll code

---------

Co-authored-by: papapatrick <109422393+Patrickill@users.noreply.github.com>
2024-09-24 17:13:32 +08:00
Archer
f4d4d6516c Support simpleApp select workflow (#2772)
* fix: share page id error

* feat: simple workflow support childApp tool

* perf: aichat box animation
2024-09-23 15:43:57 +08:00
zqhong
b6833ca3ea updated: docs/docker.md,修改 config.json 的地址 (#2771)
原先 config.json 的地址是:
https://github.com/labring/FastGPT/blob/main/projects/app/data/config.json

如果没有考虑太多,直接 wget "https://github.com/labring/FastGPT/blob/main/projects/app/data/config.json",则会下载到网页版的 `config.json`。这不是一个 json 文件,而是 github 的网页。

所以,修改为 `https://raw.githubusercontent.com/labring/FastGPT/refs/heads/main/projects/app/data/config.json` 更加合理
2024-09-23 15:24:55 +08:00
Archer
3ab934771f 4.8.11 perf (#2768)
* perf: watch local

* perf: dataset list ui

* perf: Check workflow invalid edges in saved

* remove log

* perf: Forbid touch scale

* perf: rename dataset process

* feat: support child app unstream mode

* feat: Dispatch child app will record detail

* feat: Save childApp run log

* fix: share page init error

* perf: chatId reset
2024-09-23 10:17:49 +08:00
Archer
4245ea4998 Update README.md (#2769) 2024-09-22 14:40:09 +08:00
Archer
9eb02b7e38 feat: plan index;flat i18n and add variable value type (#2762)
* feat: plan index

* flat i18n and add variable value type

* fix: ts

* perf: free plan tip
2024-09-20 17:36:33 +08:00
Archer
75af549c7f Plugin support select file (#2756)
* feat: plugin support upload files (#2716)

* feat: plugin support file upload

* file history

* fix history & chattest

* chore: code

* plugin config icon & file preview padding

* perf: undefined fn

* fix: plugin file numbers & plugin template add config (#2743)

* perf: run plugin without human message (#2749)

* perf: run plugin without human message

* fix build

* fix build

* rename node

* perf: ui

* perf: plugin rerun with last params & plugin log add file (#2755)

* perf: plugin run with last params & plugin log add file

* delete console

* perf: plugin refresh code

* fix: ts

---------

Co-authored-by: heheer <heheer@sealos.io>
2024-09-20 14:12:58 +08:00
Archer
5e7c97b7b8 4.8.11 test fix (#2746)
* fix: refresh tool param

* perf: load image message

* fix: cannot remoce externalReadUrl

* perf: variables update dom

* perf: empty response tip

* fix: conflict
2024-09-20 11:28:58 +08:00
Finley Ge
6c2a7574c3 perf: app list (#2747) 2024-09-20 10:16:27 +08:00
Finley Ge
ca9f36ef9f chore: Jest Testing structure (#2707)
* deps: add jest deps

* chore: mock

* feat: use mocinggoose

* feat: jest

* chore: remove babel.config.js
2024-09-19 13:34:03 +08:00
Archer
265434799f Add externalfile api params (#2745)
* feat: external dataset api

* perf: doc
2024-09-19 13:28:55 +08:00
Archer
258de4471e Update 4810.md (#2744) 2024-09-19 11:34:33 +08:00
Archer
d83bb9d2c7 remove code (#2735) 2024-09-18 13:47:42 +08:00
Archer
093bfa2134 feat: dataset quote role support system; fix: adapt o1 model (#2733)
* feat: dataset quote support system role

* perf: adapt dataset quote role

* fix: adapt o1 model
2024-09-18 13:38:50 +08:00
Archer
539bc77934 fix: aichat response (#2728) 2024-09-17 23:07:30 +08:00
Archer
aabbe06e41 Update intro.md (#2726) 2024-09-16 16:18:05 +08:00
Archer
bb22fa6548 Update 4810.md (#2725) 2024-09-16 16:15:13 +08:00
Archer
bd2509bd41 Update doc and domain (#2722)
* feat: doc

* replace domain

* README
2024-09-16 01:39:50 +08:00
Archer
561516eeef feat: doc (#2721) 2024-09-15 23:02:52 +08:00
Archer
2bdda4638d Feat: Workflow loop node;feat: support openai o1;perf: query extension prompt;fix: intro was not delivered when the datase was created (#2719)
* feat: loop node (#2675)

* loop node frontend

* loop-node

* fix-code

* fix version

* fix

* fix

* fix

* perf: loop array code

* perf: get histories error tip

* feat: support openai o1

* perf: query extension prompt

* feat: 4811 doc

* remove log

* fix: loop node zindex & variable picker type (#2710)

* perf: performance

* perf: workflow performance

* remove uninvalid code

* perf:code

* fix: invoice table refresh

* perf: loop node data type

* fix: loop node store assistants

* perf: target connection

* feat: loop node support help line

* perf: add default icon

---------

Co-authored-by: heheer <heheer@sealos.io>
2024-09-15 22:41:05 +08:00
Finley Ge
1ebc95a282 feat: specify the api's auth type (#2715) 2024-09-15 13:06:51 +08:00
Archer
d0e8f7203c perf: plugin support files (#2708) 2024-09-14 15:11:44 +08:00
Archer
092bb9ab17 feat: sandbox support str to base64 function;feat: compiance text ui (#2702)
* feat: sandbox strToBase64 function

* feat: compiance text ui
2024-09-13 17:54:22 +08:00
Patrickill
9de8849193 优化代码 2024-09-13 17:25:45 +08:00
Patrickill
3d5da27079 add ComplianceTip for dataset&chat 2024-09-13 17:25:45 +08:00
Archer
c454fe07cb Update 4810.md 2024-09-13 15:28:56 +08:00
Patrickill
3e144c4227 remove the trailing #xx when copy 2024-09-13 13:18:08 +08:00
Archer
d8b2887625 feat: comment (#2697) 2024-09-13 11:37:32 +08:00
勤劳上班的卑微小张
ba3b3280b4 Fixed an issue where chunk splitter were lost when clicking on the link sync 2024-09-13 11:08:00 +08:00
Archer
390b8f5b86 Update index.tsx 2024-09-12 18:23:59 +08:00
Finley Ge
d74e6a47d6 fix: chat log get member info 2024-09-12 18:23:59 +08:00
shilin66
424c745cbb fix: Stream模式下使用toolChoice,toolCall的function和type可能为null 2024-09-12 18:12:17 +08:00
archer
0abbcf1401 fix: ts 2024-09-12 18:11:34 +08:00
Archer
da1126ed3c fix: share init error (#2690) 2024-09-12 18:04:31 +08:00
Archer
56281d92f2 Perf: worfklow scroll cannot wheel. Adapt wrokflow skip circle. Change tab alway output stream (#2688)
* perf: teaxtarea no wheel

* remove render error

* adapt workflow skip circle

* perf: change tab can stream output
2024-09-12 17:22:52 +08:00
Archer
fde1618af2 Workflow experience optimization (#2681)
* perf: workflow handle connect

* feat: pan drag mode

* perf: workflow keyboard and touchTable adapt

* perf: teaxtarea no wheel

* remove render error
2024-09-12 17:10:39 +08:00
Archer
22bb4c1e2e Update official_account.md (#2677) 2024-09-12 17:10:39 +08:00
Archer
6331f4b845 perf scroll components (#2676)
* perf: add scroll list && virtualist (#2665)

* perf: chatHistorySlider add virtualList

* perf: dataCard add scroll

* fix: ts

* perf: scroll list components

* perf: hook refresh

---------

Co-authored-by: papapatrick <109422393+Patrickill@users.noreply.github.com>
2024-09-11 19:53:49 +08:00
湛露先生
5101c7a6dc Fix typo location of python bge-rerank (#2674)
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2024-09-11 19:46:12 +08:00
Archer
02bf400bf3 Add workflow rename; Fix: userselect chatId unrefresh (#2672)
* feat: workflow node support rename

* perf: push data to training queue

* fix: userselect chatId unrefresh
2024-09-11 15:27:47 +08:00
Archer
11cbcca2d4 Update 4810.md (#2668) 2024-09-11 10:09:56 +08:00
Finley Ge
34422f9549 fix: sso (#2661) 2024-09-10 18:24:29 +08:00
Archer
aeba79267a Workflow deep and workflow connection performance (#2664)
* feat: Workflow dispatch deep

* perf: workflow connection
2024-09-10 16:57:59 +08:00
Archer
7473be5922 pay pre wrap (#2659) 2024-09-10 14:04:57 +08:00
Finley Ge
de59b3d2e5 fix: app select dataset (#2660) 2024-09-10 13:50:23 +08:00
Archer
08190c2f0d fix: toolNode max tokens and toolDescription i18n (#2655)
* fix: toolNode max tokens

* fix: toolNode max tokens

* fix: workflow  tool desc i18n
2024-09-09 22:26:20 +08:00
heheer
6a85c8c2b6 fix: cq template missing chatconfig (#2654) 2024-09-09 19:37:15 +08:00
Archer
bbdab1d40e fix: entry (#2652) 2024-09-09 16:21:22 +08:00
Finley Ge
78ad2791cd chore: openapi doc generator (#2644)
* chore: extract the type and comment from apis

* chore: template code

* feat: openapi

* pref: openapi generator. send into public/openapi folder
2024-09-09 15:43:09 +08:00
Archer
5f3c8e9046 Fix: workflow init status (#2649)
* i18n

* fix: entry
2024-09-09 15:37:20 +08:00
papapatrick
30057f01a6 fix: workflow i18n (#2645)
* fix: workflow i18n

* i18n completion
2024-09-09 14:36:35 +08:00
Archer
3ea185315d fix: workflow clear repeat check run (#2646) 2024-09-09 14:14:32 +08:00
Finley Ge
a1ae08f62b perf: logs, auth root as super admin, etc (#2615)
* chore: usePagination hook type

* feat: chat log show outlinkuid or tmb avatar and name

* fix: ts error for pagination

* feat: auth root
2024-09-09 10:05:18 +08:00
Archer
91ec895fd2 fix: oauth (#2640)
* fix: oauth

* remove log

* fix: oauth dispatch
2024-09-08 20:56:33 +08:00
xianlezheng
1a33642635 Fixs:当最后一条数据因大模型没返回数据时导致调试时前端报错。 (#2637)
在lastMessageValue取值时需要提前判断空值。

Co-authored-by: zhengxianle <nopanic@ilikejobs.com>
2024-09-08 15:26:05 +08:00
archer
e9681c8ed5 log 2024-09-08 15:03:29 +08:00
imgbot[bot]
69ff65973f [ImgBot] Optimize images (#2639)
*Total -- 6,985.44kb -> 4,501.25kb (35.56%)

/python/sensevoice/app/iic/SenseVoiceSmall/fig/inference.png -- 935.23kb -> 292.81kb (68.69%)
/python/sensevoice/app/iic/SenseVoiceSmall/fig/asr_results.png -- 238.19kb -> 76.62kb (67.83%)
/python/sensevoice/app/iic/SenseVoiceSmall/fig/sensevoice.png -- 879.78kb -> 332.45kb (62.21%)
/python/sensevoice/app/iic/SenseVoiceSmall/fig/ser_table.png -- 318.12kb -> 145.67kb (54.21%)
/docSite/assets/imgs/wechat6.png -- 208.98kb -> 119.19kb (42.97%)
/docSite/assets/imgs/collection-tags-2.png -- 83.02kb -> 52.57kb (36.67%)
/.github/imgs/intro3.png -- 258.74kb -> 167.94kb (35.09%)
/python/sensevoice/app/iic/speech_fsmn_vad_zh-cn-16k-common-pytorch/fig/struct.png -- 27.26kb -> 17.81kb (34.66%)
/.github/imgs/intro1.png -- 259.12kb -> 173.33kb (33.11%)
/docSite/assets/imgs/fileinpu-2.png -- 214.61kb -> 147.20kb (31.41%)
/.github/imgs/intro4.png -- 227.64kb -> 158.71kb (30.28%)
/docSite/assets/imgs/questionGuide.png -- 38.89kb -> 27.95kb (28.13%)
/python/sensevoice/app/iic/SenseVoiceSmall/fig/aed_figure.png -- 115.93kb -> 85.46kb (26.28%)
/.github/imgs/intro2.png -- 370.64kb -> 273.45kb (26.22%)
/docSite/assets/imgs/offiaccount-9.png -- 38.62kb -> 28.89kb (25.18%)
/docSite/assets/imgs/collection-tags-3.png -- 125.71kb -> 98.27kb (21.83%)
/docSite/assets/imgs/offiaccount-3.png -- 90.57kb -> 71.85kb (20.66%)
/docSite/assets/imgs/feishu-bot-4.png -- 85.73kb -> 68.44kb (20.17%)
/docSite/assets/imgs/feishu-bot-2.png -- 92.49kb -> 73.94kb (20.05%)
/docSite/assets/imgs/offiaccount-1.png -- 99.70kb -> 79.77kb (19.98%)
/docSite/assets/imgs/feishu-bot-1.png -- 154.50kb -> 126.89kb (17.87%)
/docSite/assets/imgs/feishu-bot-6.png -- 160.72kb -> 133.59kb (16.88%)
/docSite/assets/imgs/fileinpu-6.jpg -- 179.04kb -> 150.60kb (15.88%)
/docSite/assets/imgs/feishu-bot-8.png -- 43.64kb -> 36.83kb (15.61%)
/docSite/assets/imgs/offiaccount-7.png -- 73.88kb -> 62.58kb (15.29%)
/python/sensevoice/app/iic/SenseVoiceSmall/fig/ser_figure.png -- 194.25kb -> 167.12kb (13.97%)
/docSite/assets/imgs/feishu-bot-5.png -- 169.50kb -> 146.65kb (13.48%)
/docSite/assets/imgs/offiaccount-8.png -- 129.99kb -> 114.37kb (12.02%)
/docSite/assets/imgs/offiaccount-6.png -- 131.04kb -> 115.30kb (12.01%)
/docSite/assets/imgs/feishu-bot-3.png -- 165.20kb -> 145.86kb (11.71%)
/docSite/assets/imgs/offiaccount-4.png -- 158.75kb -> 140.69kb (11.38%)
/docSite/assets/imgs/feishu-bot-7.png -- 95.10kb -> 84.29kb (11.37%)
/docSite/assets/imgs/offiaccount-5.png -- 158.34kb -> 140.59kb (11.21%)
/docSite/assets/imgs/offiaccount-2.png -- 163.30kb -> 145.59kb (10.84%)
/docSite/assets/imgs/gpt-translate-example.png -- 299.24kb -> 297.98kb (0.42%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2024-09-08 10:23:27 +08:00
Archer
52ac445557 fix: mobild sso login (#2636)
* fix: mobild sso login

* feat: max call tool times
2024-09-07 18:24:38 +08:00
Archer
d45cb2f84a Update 4810.md (#2634) 2024-09-06 17:29:23 +08:00
Archer
1cb71c6bfb 4.8.10 perf (#2633)
* perf: i18n init

* i18n

* 4.8.10 doc

* doc
2024-09-06 17:22:24 +08:00
569 changed files with 26149 additions and 10637 deletions

View File

@@ -11,7 +11,7 @@ assignees: ''
[//]: # '方框内填 x 表示打钩'
- [ ] 我已确认目前没有类似 issue
- [ ] 我已完整查看过项目 README以及[项目文档](https://doc.fastgpt.in/docs/intro/)
- [ ] 我已完整查看过项目 README以及[项目文档](https://doc.tryfastgpt.ai/docs/intro/)
- [ ] 我使用了自己的 key并确认我的 key 是可正常使用的
- [ ] 我理解并愿意跟进此 issue协助测试和提供反馈
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,**不遵循规则的 issue 可能会被无视或直接关闭**

View File

@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 飞书话题群
url: https://oss.laf.run/otnvvf-imgs/1719505774252.jpg
url: https://oss.laf.run/otnvvf-imgs/feishu3.png
about: FastGPT 全是问题群

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 KiB

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

@@ -50,5 +50,73 @@
"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);",
"});"
]
}
}

View File

@@ -21,8 +21,13 @@
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key",
"i18n-ally.translate.engines": ["deepl", "google"],
"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}`;"
}

View File

@@ -1,6 +1,6 @@
<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
@@ -15,13 +15,13 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开
</div>
<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">
</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">
</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">
</a>
<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,22 +50,22 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 💡 RoadMap
`1` 应用编排能力
- [x] 提供简易模式,无需操作编排
- [x] 工作流编排
- [x] 对话工作流、插件工作流
- [x] 工具调用
- [x] 插件 - 工作流封装能力
- [x] Code sandbox
- [ ] 循环调用
- [x] 循环调用
- [x] 用户选择
- [x] 表单输入
`2` 知识库能力
- [x] 多库复用,混用
- [x] chunk 记录修改和删除
- [x] 源文件存储
- [x] 支持手动输入直接分段QA 拆分导入
- [x] 支持 txtmdhtmlpdfdocxpptxcsvxlsx (有需要更多可 PR file loader)
- [x] 支持 url 读取、CSV 批量导入
- [x] 混合检索 & 重排
- [ ] 标签过滤
- [ ] 自定义文件读取服务
- [ ] 自定义分块服务
`3` 应用调试能力
- [x] 知识库单点搜索测试
@@ -88,7 +88,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
`6` 其他
- [x] 支持语音输入和输出 (可配置语音输入语音回答)
- [x] 模糊输入提示
- [ ] 模板市场
- [x] 模板市场
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@@ -102,15 +102,15 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
> 使用 [Sealos](https://sealos.io) 服务,无需采购服务器、无需域名,支持高并发 & 动态伸缩,并且数据库应用采用 kubeblocks 的数据库,在 IO 性能方面,远超于简单的 Docker 容器部署。
[点击查看 Sealos 一键部署 FastGPT 教程](https://doc.fastgpt.in/docs/development/sealos/)
[点击查看 Sealos 一键部署 FastGPT 教程](https://doc.tryfastgpt.ai/docs/development/sealos/)
* [快速开始本地开发](https://doc.fastgpt.in/docs/development/intro/)
* [部署 FastGPT](https://doc.fastgpt.in/docs/development/sealos)
* [系统配置文件说明](https://doc.fastgpt.in/docs/development/configuration/)
* [多模型配置](https://doc.fastgpt.in/docs/development/one-api/)
* [版本更新/升级介绍](https://doc.fastgpt.in/docs/development/upgrading)
* [OpenAPI API 文档](https://doc.fastgpt.in/docs/development/openapi/)
* [知识库结构详解](https://doc.fastgpt.in/docs/course/dataset_engine/)
* [快速开始本地开发](https://doc.tryfastgpt.ai/docs/development/intro/)
* [部署 FastGPT](https://doc.tryfastgpt.ai/docs/development/sealos)
* [系统配置文件说明](https://doc.tryfastgpt.ai/docs/development/configuration/)
* [多模型配置](https://doc.tryfastgpt.ai/docs/development/one-api/)
* [版本更新/升级介绍](https://doc.tryfastgpt.ai/docs/development/upgrading)
* [OpenAPI API 文档](https://doc.tryfastgpt.ai/docs/development/openapi/)
* [知识库结构详解](https://doc.tryfastgpt.ai/docs/course/dataset_engine/)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@@ -120,7 +120,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
扫码加入飞书话题群 (新开,逐渐弃用微信群)
![](https://oss.laf.run/otnvvf-imgs/飞书20240806-114214.png)
![](https://oss.laf.run/otnvvf-imgs/feishu3.png)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@@ -149,7 +149,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 🌿 第三方生态
- [OnWeChat 个人微信/企微机器人](https://doc.fastgpt.in/docs/use-cases/onwechat/)
- [OnWeChat 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/onwechat/)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@@ -212,4 +212,4 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
1. 允许作为后台服务直接商用,但不允许提供 SaaS 服务。
2. 未经商业授权,任何形式的商用服务均需保留相关版权信息。
3. 完整请查看 [FastGPT Open Source License](./LICENSE)
4. 联系方式Dennis@sealos.io[点击查看商业版定价策略](https://doc.fastgpt.in/docs/commercial)
4. 联系方式Dennis@sealos.io[点击查看商业版定价策略](https://doc.tryfastgpt.ai/docs/commercial)

View File

@@ -1,6 +1,6 @@
<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
@@ -15,13 +15,13 @@ FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive
</div>
<p align="center">
<a href="https://fastgpt.in/">
<a href="https://tryfastgpt.ai/">
<img height="21" src="https://img.shields.io/badge/Try it Online-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
</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/Documents-7d09f1?style=flat-square" alt="document">
</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/Local Development-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
</a>
<a href="https://github.com/labring/FastGPT/blob/main/LICENSE">
@@ -39,7 +39,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 🛸 Use Cloud Services
Cloud: [fastgpt.in](https://fastgpt.in/)
Cloud: [tryfastgpt.ai](https://tryfastgpt.ai/)
| | |
| ---------------------------------- | ---------------------------------- |
@@ -113,16 +113,16 @@ Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)
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.
- [Getting Started with Local Development](https://doc.fastgpt.in/docs/development)
- [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 & support
+ 🌐 Visit the [FastGPT website](https://fastgpt.in/) for full documentation and useful links.
+ 🌐 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.

View File

@@ -1,6 +1,6 @@
<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
@@ -15,13 +15,13 @@ FastGPT は、LLM 上 に 構築 された 知識 ベースの Q&A システム
</div>
<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">
</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">
</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">
</a>
<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
デプロイ 後、データベースをセットアップするので、24分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。
- [ローカル 開発入門](https://doc.fastgpt.in/docs/development)
- [FastGPT のデプロイ](https://doc.fastgpt.in/docs/installation)
- [システム 設定 ガイド](https://doc.fastgpt.in/docs/installation/reference)
- [複数 モデルの 設定](https://doc.fastgpt.in/docs/installation/reference/models)
- [バージョン 更新 とアップグレード](https://doc.fastgpt.in/docs/installation/upgrading)
- [ローカル 開発入門](https://doc.tryfastgpt.ai/docs/development)
- [FastGPT のデプロイ](https://doc.tryfastgpt.ai/docs/installation)
- [システム 設定 ガイド](https://doc.tryfastgpt.ai/docs/installation/reference)
- [複数 モデルの 設定](https://doc.tryfastgpt.ai/docs/installation/reference/models)
- [バージョン 更新 とアップグレード](https://doc.tryfastgpt.ai/docs/installation/upgrading)
<!-- ## :point_right: ロードマップ
- [FastGPT ロードマップ](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte) -->

4
dev.md
View File

@@ -29,6 +29,10 @@ Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` pa
NODE_OPTIONS=--no-node-snapshot pnpm i
```
### Jest
https://fael3z0zfze.feishu.cn/docx/ZOI1dABpxoGhS7xzhkXcKPxZnDL
## I18N
### Install i18n-ally Plugin

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 KiB

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

@@ -11,7 +11,7 @@ FastGPT 项目在 Apache License 2.0 许可下开源,同时包含以下附加
+ FastGPT 允许被用于商业化,例如作为其他应用的“后端即服务”使用,或者作为应用开发平台提供给企业。然而,当满足以下条件时,必须联系作者获得商业许可:
+ 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 fastgpt.in 的源码来运营与 fastgpt.in 服务类似的多租户 SaaS 服务。
+ 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 tryfastgpt.ai 的源码来运营与 tryfastgpt.ai 服务类似的多租户 SaaS 服务。
+ LOGO 及版权信息:在使用 FastGPT 的过程中,不得移除或修改 FastGPT 控制台内的 LOGO 或版权信息。
请通过电子邮件 yujinlong@sealos.io 联系我们咨询许可事宜。

View File

@@ -1,7 +1,7 @@
---
weight: 1100
title: '商业版介绍'
description: 'FastGPT 商业版介绍'
title: '收费说明'
description: 'FastGPT 收费说明'
icon: 'shopping_cart'
draft: false
images: []

View File

@@ -0,0 +1,12 @@
---
title: '线上版定价'
description: 'FastGPT 线上版定价'
icon: 'currency_yen'
draft: false
toc: true
weight: 1002
type: redirect
target: https://cloud.tryfastgpt.ai/price
---
线上版价格请查看:[https://cloud.tryfastgpt.ai/price](https://cloud.tryfastgpt.ai/price)

View File

@@ -42,7 +42,7 @@ FastGPT 采用了 RAG 中的 Embedding 方案构建知识库,要使用好 Fast
FastGPT 采用了`PostgresSQL``PG Vector`插件作为向量检索器,索引为`HNSW`。且`PostgresSQL`仅用于向量检索(该引擎可以替换成其它数据库),`MongoDB`用于其他数据的存取。
`MongoDB``dataset.datas`表中,会存储向量原数据的信息,同时有一个`indexes`字段会记录其对应的向量ID这是一个数组也就是说一组向量可以对应多组数据
`MongoDB``dataset.datas`表中,会存储向量原数据的信息,同时有一个`indexes`字段会记录其对应的向量ID这是一个数组也就是说一组数据可以对应多个向量
`PostgresSQL`的表中,设置一个`vector`字段用于存储向量。在检索时会先召回向量再根据向量的ID`MongoDB`中寻找原数据内容,如果对应了同一组原数据,则进行合并,向量得分取最高得分。

View File

@@ -114,7 +114,7 @@ ${content}
它接收一个`string`类型的输入,除了可以引用文档解析结果外,还可以实现自定义内容引用,最终会进行提示词拼接,放置在 role=system 的消息中。提示词模板如下:
```
将 <Quote></Quote> 中的内容作为你的知识:
将 <Quote></Quote> 中的内容作为本次对话的参考:
<Quote>
{{quote}}
</Quote>

View File

@@ -36,7 +36,7 @@ weight: 113
私有部署的用户可自行查阅自己的 IP 地址。
海外版用户fastgpt.in)可以填写下面的 IP 白名单:
海外版用户(cloud.tryfastgpt.ai)可以填写下面的 IP 白名单:
```
34.87.20.17

View File

@@ -18,7 +18,7 @@ Web 站点同步利用爬虫的技术,可以通过一个入口网站,自动
Tips: 国内的媒体站点基本不可用公众号、csdn、知乎等。可以通过终端发送`curl`请求检测是否为静态站点,例如:
```bash
curl https://doc.fastgpt.in/docs/intro/
curl https://doc.tryfastgpt.ai/docs/intro/
```
## 如何使用

View File

@@ -13,9 +13,7 @@ weight: 708
这个配置文件中包含了系统参数和各个模型配置:
## 4.6.8+ 版本新配置文件
llm模型全部合并
## 4.6.8+ 版本新配置文件示例
```json
{
@@ -29,16 +27,16 @@ llm模型全部合并
},
"llmModels": [
{
"model": "gpt-3.5-turbo", // 模型名(对应OneAPI中渠道的模型名)
"name": "gpt-3.5-turbo", // 别名
"model": "gpt-4o-mini", // 模型名(对应OneAPI中渠道的模型名)
"name": "gpt-4o-mini", // 模型别名
"avatar": "/imgs/model/openai.svg", // 模型的logo
"maxContext": 16000, // 最大上下文
"maxResponse": 4000, // 最大回复
"quoteMaxToken": 13000, // 最大引用内容
"maxContext": 125000, // 最大上下文
"maxResponse": 16000, // 最大回复
"quoteMaxToken": 120000, // 最大引用内容
"maxTemperature": 1.2, // 最大温度
"charsPointsPrice": 0, // n积分/1k token商业版
"charsPointsPrice": 0, // n积分/1k token商业版
"censor": false, // 是否开启敏感校验(商业版)
"vision": false, // 是否支持图片输入
"vision": true, // 是否支持图片输入
"datasetProcess": true, // 是否设置为知识库处理模型QA务必保证至少有一个为true否则知识库会报错
"usedInClassify": true, // 是否用于问题分类务必保证至少有一个为true
"usedInExtractFields": true, // 是否用于内容提取务必保证至少有一个为true
@@ -49,20 +47,20 @@ llm模型全部合并
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
"customExtractPrompt": "", // 自定义内容提取提示词
"defaultSystemChatPrompt": "", // 对话默认携带的系统提示词
"defaultConfig":{} // 请求API时挟带一些默认配置比如 GLM4 的 top_p
"defaultConfig": {} // 请求API时挟带一些默认配置比如 GLM4 的 top_p
},
{
"model": "gpt-4-0125-preview",
"name": "gpt-4-turbo",
"model": "gpt-4o",
"name": "gpt-4o",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 100000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
"censor": false,
"vision": false,
"datasetProcess": false,
"vision": true,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
@@ -72,30 +70,61 @@ llm模型全部合并
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig":{}
"defaultConfig": {}
},
{
"model": "gpt-4-vision-preview",
"name": "gpt-4-vision",
"model": "o1-mini",
"name": "o1-mini",
"avatar": "/imgs/model/openai.svg",
"maxContext": 128000,
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 100000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
"censor": false,
"vision": true,
"datasetProcess": false,
"usedInClassify": false,
"usedInExtractFields": false,
"usedInToolCall": false,
"usedInQueryExtension": false,
"toolChoice": true,
"vision": false,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
"usedInQueryExtension": true,
"toolChoice": false,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig":{}
"defaultConfig": {
"temperature": 1,
"max_tokens": null,
"stream": false
}
},
{
"model": "o1-preview",
"name": "o1-preview",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
"censor": false,
"vision": false,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
"usedInQueryExtension": true,
"toolChoice": false,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {
"temperature": 1,
"max_tokens": null,
"stream": false
}
}
],
"vectorModels": [
@@ -107,9 +136,30 @@ llm模型全部合并
"defaultToken": 700, // 默认文本分割时候的 token
"maxToken": 3000, // 最大 token
"weight": 100, // 优先训练权重
"defaultConfig":{}, // 自定义额外参数。例如,如果希望使用 embedding3-large 的话,可以传入 dimensions:1024来返回1024维度的向量。目前必须小于1536维度
"defaultConfig": {}, // 自定义额外参数。例如,如果希望使用 embedding3-large 的话,可以传入 dimensions:1024来返回1024维度的向量。目前必须小于1536维度
"dbConfig": {}, // 存储时的额外参数(非对称向量模型时候需要用到)
"queryConfig": {} // 参训时的额外参数
},
{
"model": "text-embedding-3-large",
"name": "text-embedding-3-large",
"avatar": "/imgs/model/openai.svg",
"charsPointsPrice": 0,
"defaultToken": 512,
"maxToken": 3000,
"weight": 100,
"defaultConfig": {
"dimensions": 1024
}
},
{
"model": "text-embedding-3-small",
"name": "text-embedding-3-small",
"avatar": "/imgs/model/openai.svg",
"charsPointsPrice": 0,
"defaultToken": 512,
"maxToken": 3000,
"weight": 100
}
],
"reRankModels": [],
@@ -142,7 +192,7 @@ llm模型全部合并
- /imgs/model/baichuan.svg - 百川
- /imgs/model/chatglm.svg - 智谱
- /imgs/model/calude.svg - calude
- /imgs/model/claude.svg - claude
- /imgs/model/ernie.svg - 文心一言
- /imgs/model/moonshot.svg - 月之暗面
- /imgs/model/openai.svg - OpenAI GPT

View File

@@ -110,7 +110,7 @@ brew install orbstack
非 Linux 环境或无法访问外网环境,可手动创建一个目录,并下载配置文件和对应版本的`docker-compose.yml`在这个文件夹中依据下载的配置文件运行docker若作为本地开发使用推荐`docker-compose-pgvector`版本,并且自行拉取并运行`sandbox``fastgpt`并在docker配置文件中注释掉`sandbox``fastgpt`的部分
- [config.json](https://github.com/labring/FastGPT/blob/main/projects/app/data/config.json)
- [config.json](https://raw.githubusercontent.com/labring/FastGPT/refs/heads/main/projects/app/data/config.json)
- [docker-compose.yml](https://github.com/labring/FastGPT/blob/main/files/docker) (注意,不同向量库版本的文件不一样)
{{% alert icon="🤖" context="success" %}}

View File

@@ -121,4 +121,148 @@ OneAPI 的 API Key 配置错误,需要修改`OPENAI_API_KEY`环境变量,并
1. 模型服务不可用
2. 模型接口参数异常温度、max token等可能不适配
3. ....
3. ....
## 四、常见模型问题
### 报错 - 模型响应为空
该错误是由于 stream 模式下oneapi 直接结束了流请求,并且未返回任何内容导致。
4.8.10 版本新增了错误日志,报错时,会在日志中打印出实际发送的 Body 参数,可以复制该参数后,通过 curl 向 oneapi 发起请求测试。
由于 oneapi 在 stream 模式下,无法正确捕获错误,可以设置成 `stream=false` 后进行测试。
### 如何测试模型是否支持工具调用
需要模型提供商和 oneapi 同时支持工具调用才可使用,测试方法如下:
1. 通过 `curl``oneapi` 发起第一轮 stream 模式的 tool 测试。
```bash
curl --location --request POST 'https://oneapi.xxx/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o-mini",
"temperature": 0.01,
"max_tokens": 8000,
"stream": true,
"messages": [
{
"role": "user",
"content": "几点了"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "hCVbIY",
"description": "获取用户当前时区的时间。",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
}
],
"tool_choice": "auto"
}'
```
2. 检查响应参数
如果能正常调用工具,会返回对应 `tool_calls` 参数。
```json
{
"id": "chatcmpl-A7kwo1rZ3OHYSeIFgfWYxu8X2koN3",
"object": "chat.completion.chunk",
"created": 1726412126,
"model": "gpt-4o-mini-2024-07-18",
"system_fingerprint": "fp_483d39d857",
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"index": 0,
"id": "call_0n24eiFk8OUyIyrdEbLdirU7",
"type": "function",
"function": {
"name": "mEYIcFl84rYC",
"arguments": ""
}
}
],
"refusal": null
},
"logprobs": null,
"finish_reason": null
}
],
"usage": null
}
```
3. 通过 `curl``oneapi` 发起第二轮 stream 模式的 tool 测试。
第二轮请求是把工具结果发送给模型。发起后会得到模型回答的结果。
```bash
curl --location --request POST 'https://oneapi.xxxx/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o-mini",
"temperature": 0.01,
"max_tokens": 8000,
"stream": true,
"messages": [
{
"role": "user",
"content": "几点了"
},
{
"role": "assistant",
"tool_calls": [
{
"id": "kDia9S19c4RO",
"type": "function",
"function": {
"name": "hCVbIY",
"arguments": "{}"
}
}
]
},
{
"tool_call_id": "kDia9S19c4RO",
"role": "tool",
"name": "hCVbIY",
"content": "{\n \"time\": \"2024-09-14 22:59:21 Sunday\"\n}"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "hCVbIY",
"description": "获取用户当前时区的时间。",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
}
],
"tool_choice": "auto"
}'
```

View File

@@ -7,11 +7,11 @@ toc: true
weight: 705
---
本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://fastgpt.in),。
本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://tryfastgpt.ai),。
## 前置依赖项
您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://fastgpt.in)
您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://tryfastgpt.ai)
- [Git](http://git-scm.com/)
- [Docker](https://www.docker.com/)(构建镜像)

View File

@@ -135,7 +135,7 @@ CHAT_API_KEY=sk-xxxxxx
"charsPointsPrice": 0,
"censor": false,
"vision": false, // 是否支持图片输入
"datasetProcess": false, // 是否设置为知识库处理模型
"datasetProcess": true, // 是否设置为知识库处理模型
"usedInClassify": true, // 是否用于问题分类
"usedInExtractFields": true, // 是否用于字段提取
"usedInToolCall": true, // 是否用于工具调用

View File

@@ -332,7 +332,7 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
},
{
"nodeId": "pluginOutput",
"moduleName": "自定义插件输出",
"moduleName": "插件输出",
"moduleType": "pluginOutput",
"totalPoints": 0,
"pluginOutput": {
@@ -430,7 +430,7 @@ event: answer
data: [DONE]
event: flowResponses
data: [{"nodeId":"fdDgXQ6SYn8v","moduleName":"AI 对话","moduleType":"chatNode","totalPoints":0.033,"model":"FastAI-3.5","tokens":33,"query":"你好","maxToken":2000,"historyPreview":[{"obj":"Human","value":"你好"},{"obj":"AI","value":"你好!有什么可以帮助你的吗?"}],"contextTotalLen":2,"runningTime":1.42},{"nodeId":"pluginOutput","moduleName":"自定义插件输出","moduleType":"pluginOutput","totalPoints":0,"pluginOutput":{"result":"你好!有什么可以帮助你的吗?"},"runningTime":0}]
data: [{"nodeId":"fdDgXQ6SYn8v","moduleName":"AI 对话","moduleType":"chatNode","totalPoints":0.033,"model":"FastAI-3.5","tokens":33,"query":"你好","maxToken":2000,"historyPreview":[{"obj":"Human","value":"你好"},{"obj":"AI","value":"你好!有什么可以帮助你的吗?"}],"contextTotalLen":2,"runningTime":1.42},{"nodeId":"pluginOutput","moduleName":"插件输出","moduleType":"pluginOutput","totalPoints":0,"pluginOutput":{"result":"你好!有什么可以帮助你的吗?"},"runningTime":0}]
```
{{< /markdownify >}}

View File

@@ -312,6 +312,8 @@ curl --location --request DELETE 'http://localhost:3000/api/core/dataset/delete?
| chunkSize | 预估块大小 | |
| chunkSplitter | 自定义最高优先分割符号 | |
| qaPrompt | qa拆分提示词 | |
| tags | 集合标签(字符串数组) | |
| createTime | 文件创建时间Date / String | |
**出参**
@@ -466,7 +468,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio
--header 'Authorization: Bearer {{authorization}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"link":"https://doc.fastgpt.in/docs/course/quick-start/",
"link":"https://doc.tryfastgpt.ai/docs/course/quick-start/",
"datasetId":"6593e137231a2be9c5603ba7",
"parentId": null,
@@ -604,9 +606,11 @@ curl --location --request POST 'http://localhost:3000/api/proApi/core/dataset/co
--data-raw '{
"externalFileUrl":"https://image.xxxxx.com/fastgpt-dev/%E6%91%82.pdf",
"externalFileId":"1111",
"filename":"自定义文件名",
"createTime": "2024-05-01T00:00:00.000Z",
"filename":"自定义文件名.pdf",
"datasetId":"6642d105a5e9d2b00255b27b",
"parentId": null,
"tags": ["tag1","tag2"],
"trainingType": "chunk",
"chunkSize":512,
@@ -625,7 +629,8 @@ curl --location --request POST 'http://localhost:3000/api/proApi/core/dataset/co
| --- | --- | --- |
| externalFileUrl | 文件访问链接(可以是临时链接) | ✅ |
| externalFileId | 外部文件ID | |
| filename | 自定义文件名 | |
| filename | 自定义文件名,需要带后缀 | |
| createTime | 文件创建时间Date ISO 字符串都 ok | |
{{< /markdownify >}}
@@ -710,7 +715,21 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio
"updateTime": "2099-01-01T00:00:00.000Z",
"dataAmount": 3,
"trainingAmount": 0,
"canWrite": true
"externalFileId": "1111",
"tags": [
"11",
"测试的"
],
"forbid": false,
"trainingType": "chunk",
"permission": {
"value": 4294967295,
"isOwner": true,
"hasManagePer": true,
"hasWritePer": true,
"hasReadPer": true
}
},
{
"_id": "65abd0ad9d1448617cba6031",
@@ -718,11 +737,23 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio
"tmbId": "65422be6aa44b7da77729ec9",
"type": "link",
"name": "快速上手 | FastGPT",
"rawLink": "https://doc.fastgpt.in/docs/course/quick-start/",
"rawLink": "https://doc.tryfastgpt.ai/docs/course/quick-start/",
"updateTime": "2024-01-20T13:54:53.031Z",
"dataAmount": 3,
"trainingAmount": 0,
"canWrite": true
"externalFileId": "222",
"tags": [
"测试的"
],
"forbid": false,
"trainingType": "chunk",
"permission": {
"value": 4294967295,
"isOwner": true,
"hasManagePer": true,
"hasWritePer": true,
"hasReadPer": true
}
}
],
"total": 93
@@ -813,14 +844,36 @@ curl --location --request GET 'http://localhost:3000/api/core/dataset/collection
{{< tab tabName="请求示例" >}}
{{< markdownify >}}
**通过集合 ID 修改集合信息**
```bash
curl --location --request PUT 'http://localhost:3000/api/core/dataset/collection/update' \
--header 'Authorization: Bearer {{authorization}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"id":"65abcfab9d1448617cba5f0d",
"parentId":null,
"name":"测2222试"
"parentId": null,
"name": "测2222试",
"tags": ["tag1", "tag2"],
"forbid": false,
"createTime": "2024-01-01T00:00:00.000Z"
}'
```
**通过外部文件 ID 修改集合信息** 只需要把 id 换成 datasetId 和 externalFileId。
```bash
curl --location --request PUT 'http://localhost:3000/api/core/dataset/collection/update' \
--header 'Authorization: Bearer {{authorization}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"datasetId":"6593e137231a2be9c5603ba7",
"externalFileId":"1111",
"parentId": null,
"name": "测2222试",
"tags": ["tag1", "tag2"],
"forbid": false,
"createTime": "2024-01-01T00:00:00.000Z"
}'
```
@@ -834,6 +887,9 @@ curl --location --request PUT 'http://localhost:3000/api/core/dataset/collection
- id: 集合的ID
- parentId: 修改父级ID可选
- name: 修改集合名称(可选)
- tags: 修改集合标签(可选)
- forbid: 修改集合禁用状态(可选)
- createTime: 修改集合创建时间(可选)
{{% /alert %}}
{{< /markdownify >}}

View File

@@ -53,9 +53,9 @@ weight: 860
在分享链接的地址中,增加一个额外的参数: authToken。例如
原始的链接:`https://share.fastgpt.in/chat/share?shareId=648aaf5ae121349a16d62192`
原始的链接:`https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192`
完整链接: `https://share.fastgpt.in/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
完整链接: `https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
这个`authToken`通常是你系统生成的用户唯一凭证Token之类的。FastGPT 会在鉴权接口的`body`中携带 token={{authToken}} 的参数。
@@ -227,7 +227,7 @@ curl --location --request POST '{{host}}/shareAuth/finish' \
"historyPreview": [
{
"obj": "Human",
"value": "使用 <Data></Data> 标记中的内容作为你的知识:\n\n<Data>\n导演是谁\n电影《铃芽之旅》的导演是新海诚。\n------\n电影《铃芽之旅》的编剧是谁22\n新海诚是本片的编剧。\n------\n电影《铃芽之旅》的女主角是谁\n电影的女主角是铃芽。\n------\n电影《铃芽之旅》的制作团队中有哪位著名人士2\n川村元气是本片的制作团队成员之一。\n------\n你是谁\n我是电影《铃芽之旅》助手\n------\n电影《铃芽之旅》男主角是谁\n电影《铃芽之旅》男主角是宗像草太由松村北斗配音。\n------\n电影《铃芽之旅》的作者新海诚写了一本小说叫什么名字\n小说名字叫《铃芽之旅》。\n------\n电影《铃芽之旅》的女主角是谁\n电影《铃芽之旅》的女主角是岩户铃芽由原菜乃华配音。\n------\n电影《铃芽之旅》的故事背景是什么\n日本\n------\n谁担任电影《铃芽之旅》中岩户环的配音\n深津绘里担任电影《铃芽之旅》中岩户环的配音。\n</Data>\n\n回答要求\n- 如果你不清楚答案,你需要澄清。\n- 避免提及你是从 <Data></Data> 获取的知识。\n- 保持答案与 <Data></Data> 中描述的一致。\n- 使用 Markdown 语法优化回答格式。\n- 使用与问题相同的语言回答。\n\n问题:\"\"\"导演是谁\"\"\""
"value": "使用 <Data></Data> 标记中的内容作为本次对话的参考:\n\n<Data>\n导演是谁\n电影《铃芽之旅》的导演是新海诚。\n------\n电影《铃芽之旅》的编剧是谁22\n新海诚是本片的编剧。\n------\n电影《铃芽之旅》的女主角是谁\n电影的女主角是铃芽。\n------\n电影《铃芽之旅》的制作团队中有哪位著名人士2\n川村元气是本片的制作团队成员之一。\n------\n你是谁\n我是电影《铃芽之旅》助手\n------\n电影《铃芽之旅》男主角是谁\n电影《铃芽之旅》男主角是宗像草太由松村北斗配音。\n------\n电影《铃芽之旅》的作者新海诚写了一本小说叫什么名字\n小说名字叫《铃芽之旅》。\n------\n电影《铃芽之旅》的女主角是谁\n电影《铃芽之旅》的女主角是岩户铃芽由原菜乃华配音。\n------\n电影《铃芽之旅》的故事背景是什么\n日本\n------\n谁担任电影《铃芽之旅》中岩户环的配音\n深津绘里担任电影《铃芽之旅》中岩户环的配音。\n</Data>\n\n回答要求\n- 如果你不清楚答案,你需要澄清。\n- 避免提及你是从 <Data></Data> 获取的知识。\n- 保持答案与 <Data></Data> 中描述的一致。\n- 使用 Markdown 语法优化回答格式。\n- 使用与问题相同的语言回答。\n\n问题:\"\"\"导演是谁\"\"\""
},
{
"obj": "AI",
@@ -387,9 +387,9 @@ export default async function (ctx: FunctionContext) {
### 3. 修改分享链接参数
源分享链接:`https://share.fastgpt.in/chat/share?shareId=64be36376a438af0311e599c`
源分享链接:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c`
修改后:`https://share.fastgpt.in/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
修改后:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
### 4. 测试效果

View File

@@ -89,7 +89,7 @@ FastGPT 商业版共包含了2个应用fastgpt, fastgpt-plus和2个数据
点击右侧的详情,可以查看对应应用的详细信息。
### 如何更新/升级 FastGPT
[升级脚本文档](https://doc.fastgpt.in/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!!
[升级脚本文档](https://doc.tryfastgpt.ai/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!!
例如目前是4.5 版本要升级到4.5.1就先把镜像版本改成v4.5.1,执行一下升级脚本,等待完成后再继续升级。如果目标版本不需要执行初始化,则可以跳过。
@@ -124,7 +124,7 @@ FastGPT 商业版共包含了2个应用fastgpt, fastgpt-plus和2个数据
![](/imgs/onsealos5.png)
[配置文件参考](https://doc.fastgpt.in/docs/development/configuration/)
[配置文件参考](https://doc.tryfastgpt.ai/docs/development/configuration/)
### 修改站点名称以及 favicon
修改应用的环境变量,增加

View File

@@ -1,5 +1,5 @@
---
title: 'V4.8.10(进行中)'
title: 'V4.8.10(需要初始化)'
description: 'FastGPT V4.8.10 更新说明'
icon: 'upgrade'
draft: false
@@ -24,8 +24,8 @@ STORE_LOG_LEVEL=warn
### 3. 修改镜像tag
- 更新 FastGPT 镜像 tag: v4.8.10-alpha
- 更新 FastGPT 商业版镜像 tag: v4.8.10-alpha
- 更新 FastGPT 镜像 tag: v4.8.10
- 更新 FastGPT 商业版镜像 tag: v4.8.10
- Sandbox 镜像,可以不更新
## 4. 执行初始化
@@ -45,46 +45,60 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4810' \
## V4.8.10 更新说明
完整内容请见:[4.8.10 release](https://github.com/labring/FastGPT/releases/tag/v4.8.10-alpha)
完整内容请见:[4.8.10 release](https://github.com/labring/FastGPT/releases/tag/v4.8.10)
1. 新增 - 模板市场
2. 新增 - 工作流节点拖动自动对齐吸附
3. 新增 - 用户选择节点Debug 模式暂未支持)
4. 新增 - 工作流撤销和重做
5. 新增 - 工作流本次编辑记录,取代自动保存
6. 新增 - 工作流版本支持重命名
7. 新增 - 应用调用迁移成单独节点,同时可以传递全局变量和用户的文件
8. 新增 - 插件增加使用说明配置
9. 新增 - 工作流导出导入,支持直接导出和导入 JSON 文件,便于交流
10. 新增 - HTTP模块支持超时配置、支持更多的 Body 类型params 和 headers 支持新的变量选择模式
11. 新增 - 发送验证码安全校验
12. 商业版新增 - 飞书机器人接入
13. 商业版新增 - 公众号接入接入
14. 商业版新增 - 自助开票申请
15. 商业版新增 - SSO 定制
16. 优化 - 工作流循环校验,避免 skip 循环空转。同时支持分支完全并发执行
17. 优化 - SSE 响应优化
18. 优化 - 无 SSL 证书情况下,优化复制。
19. 优化 - 单选框打开后自动滚动到选中的位置
20. 优化 - 知识库集合禁用,目录禁用会递归修改其下所有 children 的禁用状态
21. 优化 - 节点选择,避免切换 tab 时候path 加载报错
22. 优化 - 最新 React Markdown 组件,支持 Base64 图片
23. 优化 - 知识库列表 UI
24. 优化 - 知识库详情页 UI
25. 优化 - 支持无网络配置情况下运行
26. 优化 - 部分全局变量,增加数据类型约束
27. 优化 - 查看工作流详情,切换 tab 时,自动滚动到顶部
28. 优化 - 对话框性能问题
29. 修复 - 全局变量 key 可能重复
30. 修复 - Prompt 模式调用工具stream=false 模式下,会携带 0: 开头标记
31. 修复 - 对话日志鉴权问题:仅为 APP 管理员的用户,无法查看对话日志详情
32. 修复 - 选择 Milvus 部署时,无法导出知识库。
33. 修复 - 创建 APP 副本,无法复制系统配置
34. 修复 - 图片识别模式下,自动解析图片链接正则不够严谨问题
35. 修复 - 内容提取的数据类型与输出数据类型未一致
36. 修复 - 工作流运行时间统计错误
37. 修复 - stream 模式下,工具调用有可能出现 undefined
38. 修复 - 全局变量在 API 中无法持久化
39. 修复 - OpenAPIdetail=false模式下不应该返回 tool 调用结果,仅返回文字。(可解决 cow 不适配问题
40. 修复 - 知识库标签重复加载
41. 修复 - Debug 模式下,循环调用边问题。
1. 新增 - 模板市场
2. 新增 - 工作流节点拖动自动对齐吸附
3. 新增 - 用户选择节点Debug 模式暂未支持)
4. 新增 - 工作流增加 uid 全局变量。
5. 新增 - 工作流撤销和重做。
6. 新增 - 工作流本次编辑记录,取代自动保存。
7. 新增 - 工作流版本支持重命名
8. 新增 - 工作流的“应用调用”节点弃用,迁移成单独节点,与插件使用方式相同,同时可以传递全局变量和用户上传的文件
9. 新增 - 插件增加使用说明配置
10. 新增 - 插件自定义输入支持单选框
11. 新增 - HTTP 节点支持 text/plain 模式
12. 新增 - HTTP模块支持超时配置、支持更多的 Body 类型params 和 headers 支持新的变量选择模式。
13. 新增 - 工作流导出导入,支持直接导出和导入 JSON 文件,便于交流。
14. 新增 - 发送验证码安全校验。
15. 商业版新增 - 飞书机器人接入。
16. 商业版新增 - 公众号接入接入
17. 商业版新增 - 自助开票申请
18. 商业版新增 - SSO 定制。
19. 优化 - 工作流循环校验,避免 skip 循环空转。同时支持分支完全并发执行
20. 优化 - 工作流嵌套执行,参数可能存在的污染问题
21. 优化 - 部分全局变量,增加数据类型约束
22. 优化 - 节点选择,避免切换 tab 时候path 加载报错
23. 优化 - 最新 React Markdown 组件,支持 Base64 图片
24. 优化 - 对话框性能问题
25. 优化 - 单选框打开后自动滚动到选中的位置
26. 优化 - 知识库集合禁用,目录禁用会递归修改其下所有 children 的禁用状态
27. 优化 - SSE 响应代码优化
28. 优化 - 无 SSL 证书情况下,优化复制
29. 优化 - 知识库列表 UI
30. 优化 - 知识库详情页 UI
31. 优化 - 支持无网络配置情况下运行
32. 优化 - 调整.env.template关于mongodb的说明使得更易于理解。
33. 优化 - 新的支付模式
34. 优化 - 用户默认头像
35. 修复 - Prompt 模式调用工具stream=false 模式下,会携带 0: 开头标记
36. 修复 - 对话日志鉴权问题:仅为 APP 管理员的用户,无法查看对话日志详情
37. 修复 - 选择 Milvus 部署时,无法导出知识库。
38. 修复 - 创建 APP 副本,无法复制系统配置
39. 修复 - 图片识别模式下,自动解析图片链接正则不够严谨问题
40. 修复 - 内容提取的数据类型与输出数据类型未一致
41. 修复 - 工作流运行时间统计错误。
42. 修复 - stream 模式下,工具调用有可能出现 undefined。
43. 修复 - reranker typo。
44. 修复 - home host typo。
45. 修复 - i18n display。
46. 修复 - 全局变量可重复定义 key。
47. 修复 - 全局变量在 Debug 模式下不可持久化。
48. 修复 - 全局变量在 API 中无法持久化。
49. 修复 - OpenAPIdetail=false模式下不应该返回 tool 调用结果,仅返回文字。(可解决 cow 不适配问题)。
50. 修复 - 知识库标签重复加载。
51. 修复 - 网络链接重新获取时,自定义分割符不生效。
52. 修复 - 插件运行时,会传递额外的全局变量,可能造成插件内变量污染。
53. 文档 - qa docs。
54. 文档 - Update feishu.md。
55. 文档 - update baseURL。

View File

@@ -11,13 +11,118 @@ weight: 813
### 1. 做好数据备份
### 2. 修改配置文件
如需增加 openai o1 模型,可添加如下配置:
```json
{
"model": "o1-mini",
"name": "o1-mini",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
"censor": false,
"vision": false,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
"usedInQueryExtension": true,
"toolChoice": false,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {
"temperature": 1,
"stream": false
},
"fieldMap": {
"max_tokens": "max_completion_tokens"
}
},
{
"model": "o1-preview",
"name": "o1-preview",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
"censor": false,
"vision": false,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
"usedInQueryExtension": true,
"toolChoice": false,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {
"temperature": 1,
"stream": false
},
"fieldMap": {
"max_tokens": "max_completion_tokens"
}
}
```
-------
## V4.8.11 更新预告
### 3. 修改镜像 tag 并重启
1.
2. 新增 - 插件自定义输入支持单选框
3. 新增 - 插件输出,支持指定某些字段为工具调用结果
4. 新增 - 插件支持配置使用引导、全局变量和文件输入
5. 优化 - SSE 响应代码。
6. 优化 - 非 HTTPS 环境下支持复制(除非 textarea 复制也不支持)
- 更新 FastGPT 镜像 tag: v4.8.11-beta
- 更新 FastGPT 商业版镜像 tag: v4.8.11-beta
- 更新 FastGPT Sandbox 镜像 tag: v4.8.11-beta
### 4. 商业版初始化
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`{{host}} 替换成**FastGPT 商业版域名**。
```bash
curl --location --request POST 'https://{{host}}/api/admin/init/4811' \
--header 'rootkey: {{rootkey}}' \
--header 'Content-Type: application/json'
```
会初始化团队成员组。
## V4.8.11 更新说明
1. 新增 - 表单输入节点,允许用户在工作流中让用户输入一些信息。
2. 新增 - 循环运行节点,可传入数组进行批量调用,目前最多支持 50 长度的数组串行执行。
3. 新增 - 自定义工具变量节点,可以为工具调用子流程完全自定义变量。在构建复杂 Agent 时有帮助。
4. 新增 - 节点支持折叠。
5. 新增 - 聊天记录滚动加载,不再只加载 30 条。
6. 新增 - 工作流增加触摸板优先模式,可以通过工作流右下角按键进行切换。
7. 新增 - 沙盒增加字符串转 base64 全局方法(全局变量 strToBase64)。
8. 新增 - 支持 Openai o1 模型,需增加模型的 `defaultConfig` 配置,覆盖 `temperature``max_tokens``stream`配置o1 不支持 stream 模式, 详细可重新拉取 `config.json` 配置文件查看。
9. 新增 - AI 对话节点知识库引用,支持配置 role=system 和 role=user已配置的过自定义提示词的节点将会保持 user 模式,其余用户将转成 system 模式。
10. 新增 - 插件支持上传系统文件。
11. 新增 - 子应用嵌套调用时,版本锁定。主应用未主动更新版本时,不会取最新版进行执行,保证主应用服务稳定。
12. 新增 - 插件输出,支持指定字段作为工具响应。
13. 新增 - 支持工作流嵌套子应用时,可以设置`非流模式`,同时简易模式也可以选择工作流作为插件了,简易模式调用子应用时,都将强制使用非流模式。
14. 新增 - 调试模式下,子应用调用,支持返回详细运行数据。
15. 新增 - 保留所有模式下子应用嵌套调用的日志。
16. 新增 - 商业版支持团队成员组,后续将逐渐覆盖工作台和知识库权限。
17. 优化 - 工作流嵌套层级限制 20 层,避免因编排不合理导致的无限死循环。
18. 优化 - 工作流 handler 性能优化。
19. 优化 - 工作流快捷键,避免调试测试时也会触发复制和回退。
20. 修复 - 工作流工具调用中修改全局变量后,无法传递到后续流程。
21. 优化 - 流输出,切换浏览器 Tab 后仍可以继续输出。
22. 优化 - 完善外部文件知识库相关 API
23. 优化 - IOS Safari 浏览器,语音输入不准确。
24. 修复 - 知识库选择权限问题。
25. 修复 - 空 chatId 发起对话,首轮携带用户选择时会异常。
26. 修复 - createDataset 接口intro 为赋值。
27. 修复 - 对话框渲染性能问题。
28. 修复 - 工具调用历史记录存储不正确。

View File

@@ -60,6 +60,11 @@ docker-compose up -d
## QA
### 为什么需要初始化
数据表出现大幅度变更,无法通过设置默认值,或复杂度较高时,会通过初始化来更新部分数据表字段。
严格按初始化步骤进行操作,不会造成旧数据丢失。但在初始化过程中,如果数据量大,需要初始化的时间较长,这段时间可能会造成服务无法正常使用。
### {{host}} 是什么
{{}} 代表变量, {{host}}代表一个名为 host 的变量。指的是你服务器的域名或 IP。
@@ -85,4 +90,4 @@ sealos 中可以从上图左侧的环境变量中获取。
4. 修改镜像到4.6,执行初始化
5. .....
逐一升级
逐一升级

View File

@@ -0,0 +1,11 @@
---
title: 'FAQ'
description: '常见问题的解答'
icon: 'quiz'
draft: false
toc: true
weight: 900
---
<!-- 9800 ~ 1000 -->
FastGPT 是一个由用户和贡献者参与推动的开源项目,如果您对产品使用存在疑问和建议,可尝试[加入社区](community)寻求支持。我们的团队与社区会竭尽所能为您提供帮助。

View File

@@ -0,0 +1,16 @@
---
title: '应用使用问题'
description: 'FastGPT 常见应用使用问题,包括简易应用、工作流和插件'
icon: 'quiz'
draft: false
toc: true
weight: 903
---
## 工作流中多轮对话场景中如何使连续问题被问题分类节点正确的归类
问题分类节点具有获取上下文信息的能力,当处理两个关联性较大的问题时,模型的判断准确性往往依赖于这两个问题之间的联系和模型的能力。例如,当用户先问“我该如何使用这个功能?”接着又询问“这个功能有什么限制?”时,模型借助上下文信息,就能够更精准地理解并响应。
但是,当连续问题之间的关联性较小,模型判断的准确度可能会受到限制。在这种情况下,我们可以引入全局变量的概念来记录分类结果。在后续的问题分类阶段,首先检查全局变量是否存有分类结果。如果有,那么直接沿用该结果;若没有,则让模型自行判断。
建议:构建批量运行脚本进行测试,评估问题分类的准确性。

View File

@@ -0,0 +1,18 @@
---
title: '聊天框问题'
description: 'FastGPT 常见聊天框问题'
icon: 'quiz'
draft: false
toc: true
weight: 905
---
## 我修改了工作台的应用,为什么在“聊天”时没有更新配置?
应用需要点击发布后,聊天才会更新应用。
## 浏览器不支持语音输入
1. 首先需要确保浏览器、电脑本身麦克风权限的开启。
2. 确认浏览器允许该站点使用麦克风,并且选择正确的麦克风来源。
3. 需有 SSL 证书的站点才可以使用麦克风。

View File

@@ -0,0 +1,17 @@
---
title: '知识库使用问题'
description: '常见知识库使用问题'
icon: 'quiz'
draft: false
toc: true
weight: 904
---
## 上传的文件内容出现中文乱码
将文件另存为 UTF-8 编码格式。
## 知识库配置里的文件处理模型是什么?与索引模型有什么区别?
* **文件处理模型**:用于数据处理的【增强处理】和【问答拆分】。在【增强处理】中,生成相关问题和摘要,在【问答拆分】中执行问答对生成。
* **索引模型**:用于向量化,即通过对文本数据进行处理和组织,构建出一个能够快速查询的数据结构。

View File

@@ -0,0 +1,10 @@
---
title: 'Docker 部署问题'
description: 'FastGPT Docker 部署问题'
icon: ''
draft: false
toc: true
weight: 901
type: redirect
target: /docs/development/docker/#faq
---

View File

@@ -0,0 +1,7 @@
---
title: '常见错误'
icon: 'quiz'
draft: false
toc: true
weight: 920
---

View File

@@ -0,0 +1,11 @@
---
title: '其他问题'
icon: 'quiz'
draft: false
toc: true
weight: 925
---
## oneapi 官网是哪个
只有开源的 README没官网GitHub: https://github.com/songquanpeng/one-api

View File

@@ -0,0 +1,10 @@
---
title: "私有部署常见问题"
description: "FastGPT 私有部署常见问题"
icon: upgrade
draft: false
images: []
weight: 902
type: redirect
target: /docs/development/faq/
---

View File

@@ -10,7 +10,7 @@ weight: -10
FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景!
{{% alert icon="🤖 " context="success" %}}
FastGPT 在线使用:[https://fastgpt.in](https://fastgpt.in)
FastGPT 在线使用:[https://tryfastgpt.ai](https://tryfastgpt.ai)
{{% /alert %}}
| | |

View File

@@ -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)

View File

@@ -965,7 +965,7 @@ export default async function (ctx: FunctionContext) {
"required": true,
"description": "",
"canEdit": false,
"value": "请使用下面<data> </data>中的数据作为你的知识。请直接输出答案,不要提及你是从<data> </data>中获取的知识。\n\n当前时间:{{cTime}}\n\n<data>\n{{response}}\n</data>\n\n我的问题:\"{{q}}\"",
"value": "请使用下面<data> </data>中的数据作为本次对话的参考。请直接输出答案,不要提及你是从<data> </data>中获取的知识。\n\n当前时间:{{cTime}}\n\n<data>\n{{response}}\n</data>\n\n我的问题:\"{{q}}\"",
"editField": {
"key": true
},

View File

@@ -70,7 +70,7 @@ HTTP 模块会向对应的地址发送一个 `HTTP` 请求,实际操作与 Pos
"array": [1, 2, 3],
"obj": {
"name": "FastGPT",
"url": "https://fastgpt.in"
"url": "https://tryfastgpt.ai"
}
}
```
@@ -109,7 +109,7 @@ HTTP 模块会向对应的地址发送一个 `HTTP` 请求,实际操作与 Pos
"array2": [1, 2, 3],
"object": {
"name": "FastGPT",
"url": "https://fastgpt.in"
"url": "https://tryfastgpt.ai"
}
}
```

View File

@@ -0,0 +1,87 @@
---
title: "代码运行"
description: "FastGPT 代码运行节点介绍"
icon: "input"
draft: false
toc: true
weight: 364
---
![alt text](/imgs/image.png)
## 功能
可用于执行一段简单的 js 代码用于进行一些复杂的数据处理。代码运行在沙盒中无法进行网络请求、dom和异步操作。如需复杂操作需外挂 HTTP 实现。
**注意事项**
- 私有化用户需要部署`fastgpt-sandbox` 镜像,并配置`SANDBOX_URL`环境变量。
- 沙盒最大运行 10s 32M 内存限制。
## 变量输入
可在自定义输入中添加代码运行需要的变量,在代码的 main 函数中,可解构出相同名字的变量。
如上图,自定义输入中有 data1 和 data2 两个变量main 函数中可以解构出相同名字的变量。
## 结果输出
务必返回一个 object 对象
自定义输出中,可以添加变量名来获取 object 对应 key 下的值。例如上图中,返回了一个对象:
```json
{
result: data1,
data2
}
```
他有 2 个 keyresult和 data2(js 缩写key=data2value=data2)。这时候自定义输出中就可以添加 2 个变量来获取对应 key 下的 value。
## 内置 JS 全局变量
### delay 延迟
延迟 1 秒后返回
```js
async function main({data1, data2}){
await delay(1000)
return {
result: "111"
}
}
```
### countToken 统计 token
```js
function main({input}){
return {
result: countToken(input)
}
}
```
![alt text](/imgs/image-1.png)
### strToBase64 字符串转 base64(4.8.11 版本新增)
可用于将 SVG 图片转换为 base64 格式展示。
```js
function main({input}){
return {
/*
param1: input 需要转换的字符串
param2: base64 prefix 前缀
*/
result: strToBase64(input,'data:image/svg+xml;base64,')
}
}
```
![alt text](/imgs/image-2.png)

View File

@@ -35,8 +35,6 @@ weight: 356
1. 无必须的参数尽管上下文中没有适合的参数也可以调用该工具。但有时候LLM会自己伪造一个参数。
2. 有必须的参数如果没有适合的参数LLM可能不会调用该工具。可以通过提示词引导用户提供参数。
### 工具调用逻辑
在支持`函数调用`的模型中,可以一次性调用多个工具,调用逻辑如下:
![](/imgs/flow-tool2.png)
@@ -49,10 +47,24 @@ weight: 356
高级编排中,托动工具调用的连接点,可用的工具头部会出现一个菱形,可以将它与工具调用模块底部的菱形相连接。
被连接的工具,会自动分离工具输入与普通的输入,并且可以编辑`介绍`,可以通过调整介绍,使得该工具调用时机更加精确。
被连接的工具,会自动分离工具输入与普通的输入,并且可以编辑`描述`,可以通过调整介绍,使得该工具调用时机更加精确。对于一些内置的节点,务必修改`描述`才能让模型正常调用。
关于工具调用,如何调试仍然是一个玄学,所以建议,不要一次性增加太多工具,选择少量工具调优后再进一步尝试。
## 组合节点
### 工具调用终止
工具调用默认会把子流程运行的结果作为`工具结果`,返回给模型进行回答。有时候,你可能不希望模型做回答,你可以给对应子流程的末尾增加上一个`工具调用终止`节点,这样,子流程的结果就不会被返回给模型。
![alt text](/imgs/image-3.png)
### 自定义工具变量
工具调用的子流程运行,有时候会依赖`AI`生成的一些变量,为了简化交互流程,我们给系统内置的节点都指定了`工具变量`。然而,有些时候,你需要的变量不仅是目标流程的`首个节点`的变量,而是需要更复杂的变量,此时你可以使用`自定义工具变量`。它允许你完全自定义该`工具流程`的变量。
![alt text](/imgs/image-4.png)
## 相关示例
- [谷歌搜索](/docs/workflow/examples/google_search/)

View File

@@ -113,7 +113,7 @@ defaultContentLanguageInSubdir = false
# Link behaviour
intLinkTooltip = true # Enable a tooltip for internal links that displays info about the destination? default false
# extLinkNewTab = false # Open external links in a new Tab? default true
logoLinkURL = "https://fastgpt.in/" # Set a custom URL destination for the top header logo link.
logoLinkURL = "https://tryfastgpt.ai/" # Set a custom URL destination for the top header logo link.
[params.flexsearch] # Parameters for FlexSearch
# enabled = true

View File

@@ -19,7 +19,7 @@ data:
"charsPointsPrice": 0,
"censor": false,
"vision": false,
"datasetProcess": false,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
@@ -63,7 +63,7 @@ data:
"charsPointsPrice": 0,
"censor": false,
"vision": false,
"datasetProcess": false,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
@@ -85,7 +85,7 @@ data:
"charsPointsPrice": 0,
"censor": false,
"vision": true,
"datasetProcess": false,
"datasetProcess": true,
"usedInClassify": false,
"usedInExtractFields": false,
"usedInToolCall": false,

View File

@@ -10,8 +10,7 @@
"postinstall": "sh ./scripts/postinstall.sh",
"initIcon": "node ./scripts/icon/init.js",
"previewIcon": "node ./scripts/icon/index.js",
"i18n:delete-unused-keys": "node ./scripts/i18n/delete-unused-keys.js",
"i18n:query": "node ./scripts/i18n/query.js"
"api:gen": "tsc ./scripts/openapi/index.ts && node ./scripts/openapi/index.js && npx @redocly/cli build-docs ./scripts/openapi/openapi.json -o ./projects/app/public/openapi/index.html"
},
"devDependencies": {
"@chakra-ui/cli": "^2.4.1",

View File

@@ -10,7 +10,12 @@ export enum TeamErrEnum {
appAmountNotEnough = 'appAmountNotEnough',
pluginAmountNotEnough = 'pluginAmountNotEnough',
websiteSyncNotEnough = 'websiteSyncNotEnough',
reRankNotEnough = 'reRankNotEnough'
reRankNotEnough = 'reRankNotEnough',
groupNameEmpty = 'groupNameEmpty',
groupNameDuplicate = 'groupNameDuplicate',
groupNotExist = 'groupNotExist',
cannotDeleteDefaultGroup = 'cannotDeleteDefaultGroup',
userNotActive = 'userNotActive'
}
const teamErr = [
@@ -46,6 +51,26 @@ const teamErr = [
{
statusText: TeamErrEnum.reRankNotEnough,
message: i18nT('common:code_error.team_error.re_rank_not_enough')
},
{
statusText: TeamErrEnum.groupNameEmpty,
message: i18nT('common:code_error.team_error.group_name_empty')
},
{
statusText: TeamErrEnum.groupNotExist,
message: i18nT('common:code_error.team_error.group_not_exist')
},
{
statusText: TeamErrEnum.cannotDeleteDefaultGroup,
message: i18nT('common:code_error.team_error.cannot_delete_default_group')
},
{
statusText: TeamErrEnum.groupNameDuplicate,
message: i18nT('common:code_error.team_error.group_name_duplicate')
},
{
statusText: TeamErrEnum.userNotActive,
message: i18nT('common:code_error.team_error.user_not_active')
}
];

View File

@@ -16,6 +16,6 @@ export const bucketNameMap = {
}
};
export const ReadFileBaseUrl = '/api/common/file/read';
export const ReadFileBaseUrl = `${process.env.FE_DOMAIN || ''}/api/common/file/read`;
export const documentFileType = '.txt, .docx, .csv, .xlsx, .pdf, .md, .html, .pptx';

View File

@@ -7,6 +7,7 @@ export enum MongoImageTypeEnum {
datasetAvatar = 'datasetAvatar',
userAvatar = 'userAvatar',
teamAvatar = 'teamAvatar',
groupAvatar = 'groupAvatar',
chatImage = 'chatImage',
collectionImage = 'collectionImage'
@@ -36,6 +37,10 @@ export const mongoImageTypeMap = {
label: 'teamAvatar',
unique: true
},
[MongoImageTypeEnum.groupAvatar]: {
label: 'groupAvatar',
unique: true
},
[MongoImageTypeEnum.chatImage]: {
label: 'chatImage',

View File

@@ -8,3 +8,24 @@ export const retryRun = <T>(fn: () => T, retry = 2): T => {
throw error;
}
};
export const batchRun = async <T>(arr: T[], fn: (arr: T) => any, batchSize = 10) => {
const batchArr = new Array(batchSize).fill(null);
const result: any[] = [];
const batchFn = async () => {
const data = arr.shift();
if (data) {
result.push(await fn(data));
return batchFn();
}
};
await Promise.all(
batchArr.map(async () => {
await batchFn();
})
);
return result;
};

View File

@@ -1,3 +1,4 @@
import { batchRun } from '../fn/utils';
import { simpleText } from './tools';
/* Delete redundant text in markdown */
@@ -53,16 +54,19 @@ export const uploadMarkdownBase64 = async ({
const base64Arr = rawText.match(base64Regex) || [];
// upload base64 and replace it
for await (const base64Img of base64Arr) {
try {
const str = await uploadImgController(base64Img);
rawText = rawText.replace(base64Img, str);
} catch (error) {
rawText = rawText.replace(base64Img, '');
rawText = rawText.replace(/!\[.*\]\(\)/g, '');
}
}
await batchRun(
base64Arr,
async (base64Img) => {
try {
const str = await uploadImgController(base64Img);
rawText = rawText.replace(base64Img, str);
} catch (error) {
rawText = rawText.replace(base64Img, '');
rawText = rawText.replace(/!\[.*\]\(\)/g, '');
}
},
20
);
}
// Remove white space on both sides of the picture

View File

@@ -91,6 +91,13 @@ ${mdSplitString}
};
};
/*
1. 自定义分隔符:不需要重叠
2. Markdown 标题:不需要重叠;标题嵌套共享。
3. 特殊 markdown 语法:不需要重叠
4. 段落:尽可能保证它是一个完整的段落。
5. 标点分割:重叠
*/
const commonSplit = (props: SplitProps): SplitResponse => {
let { text = '', chunkLen, overlapRatio = 0.2, customReg = [] } = props;

View File

@@ -1,3 +1,4 @@
export const HUMAN_ICON = `/icon/human.svg`;
export const LOGO_ICON = `/icon/logo.svg`;
export const HUGGING_FACE_ICON = `/imgs/model/huggingface.svg`;
export const DEFAULT_TEAM_AVATAR = `/imgs/avatar/defaultTeamAvatar.svg`;

View File

@@ -34,6 +34,7 @@ export type FastGPTFeConfigsType = {
show_openai_account?: boolean;
show_promotion?: boolean;
show_team_chat?: boolean;
show_compliance_copywriting?: boolean;
concatMd?: string;
docUrl?: string;

View File

@@ -7,3 +7,7 @@ export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Omit<T, Keys> &
{
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
}[Keys];
export type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};

View File

@@ -27,6 +27,7 @@ export type LLMModelItemType = {
defaultSystemChatPrompt?: string;
defaultConfig?: Record<string, any>;
fieldMap?: Record<string, string>;
};
export type VectorModelItemType = {

View File

@@ -1,11 +1,16 @@
import { PromptTemplateItem } from '../type.d';
import { i18nT } from '../../../../web/i18n/utils';
export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: i18nT('app:template.standard_template_des'),
value: `{{q}}
{{a}}`
value: `{
"sourceName": "{{source}}",
"updateTime": "{{updateTime}}",
"content": "{{q}}\n{{a}}"
}
`
},
{
title: i18nT('app:template.qa_template'),
@@ -20,8 +25,12 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_strict'),
desc: i18nT('app:template.standard_strict_des'),
value: `{{q}}
{{a}}`
value: `{
"sourceName": "{{source}}",
"updateTime": "{{updateTime}}",
"content": "{{q}}\n{{a}}"
}
`
},
{
title: i18nT('app:template.hard_strict'),
@@ -35,20 +44,20 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
}
];
export const Prompt_QuotePromptList: PromptTemplateItem[] = [
export const Prompt_userQuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: '',
value: `使用 <Data></Data> 标记中的内容作为你的知识:
value: `使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Data>
<Reference>
{{quote}}
</Data>
</Reference>
回答要求:
- 如果你不清楚答案,你需要澄清。
- 避免提及你是从 <Data></Data> 获取的知识。
- 保持答案与 <Data></Data> 中描述的一致。
- 避免提及你是从 <Reference></Reference> 获取的知识。
- 保持答案与 <Reference></Reference> 中描述的一致。
- 使用 Markdown 语法优化回答格式。
- 使用与问题相同的语言回答。
@@ -74,20 +83,20 @@ export const Prompt_QuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_strict'),
desc: '',
value: `忘记你已有的知识,仅使用 <Data></Data> 标记中的内容作为你的知识:
value: `忘记你已有的知识,仅使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Data>
<Reference>
{{quote}}
</Data>
</Reference>
思考流程:
1. 判断问题是否与 <Data></Data> 标记中的内容有关。
1. 判断问题是否与 <Reference></Reference> 标记中的内容有关。
2. 如果有关,你按下面的要求回答。
3. 如果无关,你直接拒绝回答本次问题。
回答要求:
- 避免提及你是从 <Data></Data> 获取的知识。
- 保持答案与 <Data></Data> 中描述的一致。
- 避免提及你是从 <Reference></Reference> 获取的知识。
- 保持答案与 <Reference></Reference> 中描述的一致。
- 使用 Markdown 语法优化回答格式。
- 使用与问题相同的语言回答。
@@ -120,9 +129,86 @@ export const Prompt_QuotePromptList: PromptTemplateItem[] = [
}
];
// Document quote prompt
export const Prompt_DocumentQuote = `将 <Quote></Quote> 中的内容作为你的知识:
<Quote>
export const Prompt_systemQuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: '',
value: `使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Quote>
</Reference>
回答要求:
- 如果你不清楚答案,你需要澄清。
- 避免提及你是从 <Reference></Reference> 获取的知识。
- 保持答案与 <Reference></Reference> 中描述的一致。
- 使用 Markdown 语法优化回答格式。
- 使用与问题相同的语言回答。`
},
{
title: i18nT('app:template.qa_template'),
desc: '',
value: `使用 <QA></QA> 标记中的问答对进行回答。
<QA>
{{quote}}
</QA>
回答要求:
- 选择其中一个或多个问答对进行回答。
- 回答的内容应尽可能与 <答案></答案> 中的内容一致。
- 如果没有相关的问答对,你需要澄清。
- 避免提及你是从 QA 获取的知识,只需要回复答案。`
},
{
title: i18nT('app:template.standard_strict'),
desc: '',
value: `忘记你已有的知识,仅使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
思考流程:
1. 判断问题是否与 <Reference></Reference> 标记中的内容有关。
2. 如果有关,你按下面的要求回答。
3. 如果无关,你直接拒绝回答本次问题。
回答要求:
- 避免提及你是从 <Reference></Reference> 获取的知识。
- 保持答案与 <Reference></Reference> 中描述的一致。
- 使用 Markdown 语法优化回答格式。
- 使用与问题相同的语言回答。`
},
{
title: i18nT('app:template.hard_strict'),
desc: '',
value: `忘记你已有的知识,仅使用 <QA></QA> 标记中的问答对进行回答。
<QA>
{{quote}}
</QA>
思考流程:
1. 判断问题是否与 <QA></QA> 标记中的内容有关。
2. 如果无关,你直接拒绝回答本次问题。
3. 判断是否有相近或相同的问题。
4. 如果有相同的问题,直接输出对应答案。
5. 如果只有相近的问题,请把相近的问题和答案一起输出。
回答要求:
- 如果没有相关的问答对,你需要澄清。
- 回答的内容应尽可能与 <QA></QA> 标记中的内容一致。
- 避免提及你是从 QA 获取的知识,只需要回复答案。
- 使用 Markdown 语法优化回答格式。
- 使用与问题相同的语言回答。`
}
];
// Document quote prompt
export const Prompt_DocumentQuote = `将 <Reference></Reference> 中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
`;

View File

@@ -9,8 +9,7 @@ import type {
ChatCompletionUserMessageParam as SdkChatCompletionUserMessageParam
} from 'openai/resources';
import { ChatMessageTypeEnum } from './constants';
import { InteractiveNodeResponseItemType } from '../workflow/template/system/userSelect/type';
import { InteractiveNodeResponseItemType } from '../workflow/template/system/interactive/type';
export * from 'openai/resources';
// Extension of ChatCompletionMessageParam, Add file url type

View File

@@ -97,7 +97,10 @@ export const appWorkflow2Form = ({
node.inputs,
NodeInputKeyEnum.datasetSearchExtensionBg
);
} else if (node.flowNodeType === FlowNodeTypeEnum.pluginModule) {
} else if (
node.flowNodeType === FlowNodeTypeEnum.pluginModule ||
node.flowNodeType === FlowNodeTypeEnum.appModule
) {
if (!node.pluginId) return;
defaultAppForm.selectedTools.push({
@@ -108,7 +111,7 @@ export const appWorkflow2Form = ({
intro: node.intro || '',
flowNodeType: node.flowNodeType,
showStatus: node.showStatus,
version: '481',
version: node.version,
inputs: node.inputs,
outputs: node.outputs,
templateType: FlowNodeTemplateTypeEnum.other

View File

@@ -12,3 +12,12 @@ export type AppVersionSchemaType = {
versionName: string;
tmbId: string;
};
export type VersionListItemType = {
_id: string;
appId: string;
versionName: string;
time: Date;
isPublish: boolean | undefined;
tmbId: string;
};

View File

@@ -289,7 +289,7 @@ export const GPTMessages2Chats = (
})
.filter((item) => item.value.length > 0);
// Merge data with the same dataId
// Merge data with the same dataIdSequential obj merging
const result = chatMessages.reduce((result: ChatItemType[], currentItem) => {
const lastItem = result[result.length - 1];
@@ -344,7 +344,7 @@ export const runtimePrompt2ChatsValue = (
return value;
};
export const getSystemPrompt = (prompt?: string): ChatItemType[] => {
export const getSystemPrompt_ChatItemType = (prompt?: string): ChatItemType[] => {
if (!prompt) return [];
return [
{

View File

@@ -15,7 +15,7 @@ import type { AppSchema as AppType } from '@fastgpt/global/core/app/type.d';
import { DatasetSearchModeEnum } from '../dataset/constants';
import { DispatchNodeResponseType } from '../workflow/runtime/type.d';
import { ChatBoxInputType } from '../../../../projects/app/src/components/core/chat/ChatContainer/ChatBox/type';
import { InteractiveNodeResponseItemType } from '../workflow/template/system/userSelect/type';
import { InteractiveNodeResponseItemType } from '../workflow/template/system/interactive/type';
export type ChatSchema = {
_id: string;

View File

@@ -178,6 +178,7 @@ export type DatasetDataItemType = {
id: string;
teamId: string;
datasetId: string;
updateTime: Date;
collectionId: string;
sourceName: string;
sourceId?: string;

View File

@@ -24,6 +24,7 @@ export enum WorkflowIOValueTypeEnum {
arrayNumber = 'arrayNumber',
arrayBoolean = 'arrayBoolean',
arrayObject = 'arrayObject',
arrayAny = 'arrayAny',
any = 'any',
chatHistory = 'chatHistory',
@@ -36,6 +37,60 @@ export enum WorkflowIOValueTypeEnum {
selectDataset = 'selectDataset'
}
export const toolValueTypeList = [
{
label: WorkflowIOValueTypeEnum.string,
value: WorkflowIOValueTypeEnum.string,
jsonSchema: {
type: 'string'
}
},
{
label: WorkflowIOValueTypeEnum.number,
value: WorkflowIOValueTypeEnum.number,
jsonSchema: {
type: 'number'
}
},
{
label: WorkflowIOValueTypeEnum.boolean,
value: WorkflowIOValueTypeEnum.boolean,
jsonSchema: {
type: 'boolean'
}
},
{
label: 'array<string>',
value: WorkflowIOValueTypeEnum.arrayString,
jsonSchema: {
type: 'array',
items: {
type: 'string'
}
}
},
{
label: 'array<number>',
value: WorkflowIOValueTypeEnum.arrayNumber,
jsonSchema: {
type: 'array',
items: {
type: 'number'
}
}
},
{
label: 'array<boolean>',
value: WorkflowIOValueTypeEnum.arrayBoolean,
jsonSchema: {
type: 'array',
items: {
type: 'boolean'
}
}
}
];
/* reg: modulename key */
export enum NodeInputKeyEnum {
// old
@@ -69,6 +124,7 @@ export enum NodeInputKeyEnum {
anyInput = 'system_anyInput',
textareaInput = 'system_textareaInput',
addInputParam = 'system_addInputParam',
forbidStream = 'system_forbid_stream',
// history
historyMaxAmount = 'maxContext',
@@ -78,6 +134,7 @@ export enum NodeInputKeyEnum {
aiChatMaxToken = 'maxToken',
aiChatSettingModal = 'aiSettings',
aiChatIsResponseText = 'isResponseAnswerText',
aiChatQuoteRole = 'aiChatQuoteRole',
aiChatQuoteTemplate = 'quoteTemplate',
aiChatQuotePrompt = 'quotePrompt',
aiChatDatasetQuote = 'quoteQA',
@@ -135,7 +192,24 @@ export enum NodeInputKeyEnum {
fileUrlList = 'fileUrlList',
// user select
userSelectOptions = 'userSelectOptions'
userSelectOptions = 'userSelectOptions',
// loop
loopInputArray = 'loopInputArray',
childrenNodeIdList = 'childrenNodeIdList',
nodeWidth = 'nodeWidth',
nodeHeight = 'nodeHeight',
// loop start
loopStartInput = 'loopStartInput',
// loop end
loopEndInput = 'loopEndInput',
// form input
userInputForms = 'userInputForms',
// comment
commentText = 'commentText',
commentSize = 'commentSize'
}
export enum NodeOutputKeyEnum {
@@ -178,7 +252,16 @@ export enum NodeOutputKeyEnum {
ifElseResult = 'ifElseResult',
//user select
selectResult = 'selectResult'
selectResult = 'selectResult',
// loop
loopArray = 'loopArray',
// loop start
loopStartInput = 'loopStartInput',
// form input
formInputResult = 'formInputResult'
}
export enum VariableInputEnum {

View File

@@ -118,6 +118,7 @@ export enum FlowNodeTypeEnum {
queryExtension = 'cfr',
tools = 'tools',
stopTool = 'stopTool',
toolParams = 'toolParams',
lafModule = 'lafModule',
ifElseNode = 'ifElseNode',
variableUpdate = 'variableUpdate',
@@ -125,7 +126,12 @@ export enum FlowNodeTypeEnum {
textEditor = 'textEditor',
customFeedback = 'customFeedback',
readFiles = 'readFiles',
userSelect = 'userSelect'
userSelect = 'userSelect',
loop = 'loop',
loopStart = 'loopStart',
loopEnd = 'loopEnd',
formInput = 'formInput',
comment = 'comment'
}
// node IO value type
@@ -162,6 +168,10 @@ export const FlowValueTypeMap = {
label: 'array<object>',
value: WorkflowIOValueTypeEnum.arrayObject
},
[WorkflowIOValueTypeEnum.arrayAny]: {
label: 'array',
value: WorkflowIOValueTypeEnum.arrayAny
},
[WorkflowIOValueTypeEnum.any]: {
label: 'any',
value: WorkflowIOValueTypeEnum.any

View File

@@ -24,7 +24,9 @@ export enum DispatchNodeResponseKeyEnum {
assistantResponses = 'assistantResponses', // assistant response
rewriteHistories = 'rewriteHistories', // If have the response, workflow histories will be rewrite
interactive = 'INTERACTIVE' // is interactive
interactive = 'INTERACTIVE', // is interactive
runTimes = 'runTimes', // run times
newVariables = 'newVariables' // new variables
}
export const needReplaceReferenceInputTypeList = [

View File

@@ -20,6 +20,7 @@ import { RuntimeEdgeItemType } from './edge';
import { ReadFileNodeResponse } from '../template/system/readFiles/type';
import { UserSelectOptionType } from '../template/system/userSelect/type';
import { WorkflowResponseType } from '../../../../service/core/workflow/dispatch/type';
import { AiChatQuoteRoleType } from '../template/system/aiChat/type';
/* workflow props */
export type ChatDispatchProps = {
@@ -45,6 +46,7 @@ export type ChatDispatchProps = {
maxRunTimes: number;
isToolCall?: boolean;
workflowStreamResponse?: WorkflowResponseType;
workflowDispatchDeep?: number;
};
export type ModuleDispatchProps<T> = ChatDispatchProps & {
@@ -77,6 +79,7 @@ export type RuntimeNodeItemType = {
outputs: FlowNodeOutputItemType[];
pluginId?: string; // workflow id / plugin id
version: string;
};
export type PluginRuntimeType = {
@@ -171,6 +174,21 @@ export type DispatchNodeResponseType = {
// update var
updateVarResult?: any[];
// loop
loopResult?: any[];
loopInput?: any[];
loopDetail?: ChatHistoryItemResType[];
// loop start
loopInputValue?: any;
// loop end
loopOutputValue?: any;
// form input
formInputResult?: string;
// tool params
toolParamsResult?: Record<string, any>;
};
export type DispatchNodeResultType<T = {}> = {
@@ -181,6 +199,8 @@ export type DispatchNodeResultType<T = {}> = {
[DispatchNodeResponseKeyEnum.toolResponses]?: ToolRunResponseItemType; // Tool response
[DispatchNodeResponseKeyEnum.assistantResponses]?: AIChatItemValueItemType[]; // Assistant response(Store to db)
[DispatchNodeResponseKeyEnum.rewriteHistories]?: ChatItemType[];
[DispatchNodeResponseKeyEnum.runTimes]?: number;
[DispatchNodeResponseKeyEnum.newVariables]?: Record<string, any>;
} & T;
/* Single node props */
@@ -190,6 +210,7 @@ export type AIChatNodeProps = {
[NodeInputKeyEnum.aiChatTemperature]: number;
[NodeInputKeyEnum.aiChatMaxToken]: number;
[NodeInputKeyEnum.aiChatIsResponseText]: boolean;
[NodeInputKeyEnum.aiChatQuoteRole]?: AiChatQuoteRoleType;
[NodeInputKeyEnum.aiChatQuoteTemplate]?: string;
[NodeInputKeyEnum.aiChatQuotePrompt]?: string;
[NodeInputKeyEnum.aiChatVision]?: boolean;

View File

@@ -54,6 +54,11 @@ export const getLastInteractiveValue = (histories: ChatItemType[]) => {
) {
return lastValue.interactive;
}
// Check is user input
if (lastValue.interactive.type === 'userInput' && !lastValue.interactive.params.submitted) {
return lastValue.interactive;
}
}
return null;
@@ -119,7 +124,8 @@ export const storeNodes2RuntimeNodes = (
isEntry: entryNodeIds.includes(node.nodeId),
inputs: node.inputs,
outputs: node.outputs,
pluginId: node.pluginId
pluginId: node.pluginId,
version: node.version
};
}) || []
);
@@ -228,7 +234,8 @@ export const getReferenceVariableValue = ({
nodes: RuntimeNodeItemType[];
variables: Record<string, any>;
}) => {
if (!isReferenceValue(value)) {
const nodeIds = nodes.map((node) => node.nodeId);
if (!isReferenceValue(value, nodeIds)) {
return value;
}
const sourceNodeId = value[0];

View File

@@ -27,26 +27,33 @@ import { VariableUpdateNode } from './system/variableUpdate';
import { CodeNode } from './system/sandbox';
import { TextEditorNode } from './system/textEditor';
import { CustomFeedbackNode } from './system/customFeedback';
import { ReadFilesNodes } from './system/readFiles';
import { UserSelectNode } from './system/userSelect/index';
import { ReadFilesNode } from './system/readFiles';
import { UserSelectNode } from './system/interactive/userSelect';
import { LoopNode } from './system/loop/loop';
import { LoopStartNode } from './system/loop/loopStart';
import { LoopEndNode } from './system/loop/loopEnd';
import { FormInputNode } from './system/interactive/formInput';
import { ToolParamsNode } from './system/toolParams';
const systemNodes: FlowNodeTemplateType[] = [
AiChatModule,
TextEditorNode,
AssignedAnswerModule,
DatasetSearchModule,
DatasetConcatModule,
ToolModule,
StopToolNode,
ClassifyQuestionModule,
ContextExtractModule,
ReadFilesNodes,
DatasetConcatModule,
ToolModule,
ToolParamsNode,
StopToolNode,
ReadFilesNode,
HttpNode468,
AiQueryExtension,
LafModule,
IfElseNode,
VariableUpdateNode,
CodeNode
CodeNode,
LoopNode
];
/* app flow module templates */
export const appSystemModuleTemplates: FlowNodeTemplateType[] = [
@@ -54,7 +61,8 @@ export const appSystemModuleTemplates: FlowNodeTemplateType[] = [
WorkflowStart,
...systemNodes,
CustomFeedbackNode,
UserSelectNode
UserSelectNode,
FormInputNode
];
/* plugin flow module templates */
export const pluginSystemModuleTemplates: FlowNodeTemplateType[] = [
@@ -74,5 +82,7 @@ export const moduleTemplatesFlat: FlowNodeTemplateType[] = [
EmptyNode,
RunPluginModule,
RunAppNode,
RunAppModule
RunAppModule,
LoopStartNode,
LoopEndNode
];

Some files were not shown because too many files have changed in this diff Show More