Compare commits

...

441 Commits

Author SHA1 Message Date
heheer 4fbe27f2df
add plan activity config (#6139)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* activity points

* modal

* ui

* fix

* pref: zod schema

* perf: ad api with zod

* perf: plan year switch

* perf: plan

* i18n

* fix: hook

* fix: activity checker

* fix: i18n

* fix clear token

* fix

* back

* can close modal in pay

* ad token

* rename

* fix

* total points

* eng i18n

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-24 18:22:25 +08:00
Archer e53242e8bc
4.14.5 dev (#6146)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* stop design doc

* remove invalid doc

* action
2025-12-24 17:09:26 +08:00
heheer f175a1a30c
optimize app update time (#6127)
* feat: add chat visibility controls and improve quote reader permissions (#6102)

* feat: add chat visibility controls and improve quote reader permissions

* fix test

* zod

* fix

* test & openapi

* frontend filter

* update name

* fix

* fix

* rename variables

* fix

* test

* fix build

* fix

* fix

---------

Co-authored-by: archer <545436317@qq.com>

* app update time

* recent app

* fix

* type

* fix

* context

* perf: update app usingtime code

* fix: ts

* update parent

* doc

* perf: code per

* unauth refresh

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-24 14:28:42 +08:00
Archer ab743b9358
fix: ticktime (#6134)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* stop design doc

* remove invalid doc

* del s3 tip

* fix: ticktime

* fix: ticktime

* fix: ticktime
2025-12-22 00:02:23 +08:00
Archer 6fb93ef8a5
fix: s3 del worker while (#6133)
* stop design doc

* remove invalid doc

* fix: s3 del worker while

* fix: s3 del worker while

* perf: regx
2025-12-21 23:28:19 +08:00
Archer b0a48603f8
perf: remove dataset code (#6132)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* stop design doc

* perf: init worker

* perf: remove dataset cide

* remove invalid doc
2025-12-21 20:56:50 +08:00
Archer 2fea73bb68
perf: index (#6131)
* perf: index

* stop design doc

* perf: stop workflow;perf: mongo connection

* fix: ts

* mq export
2025-12-21 19:15:10 +08:00
heheer 4f95f6867e
app delete queue (#6122)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* app delete queue

* test

* perf: del app queue

* perf: log

* perf: query

* perf: retry del s3

* fix: ts

* perf: add job

* redis retry

* perf: mq check

* update log

* perf: mq concurrency

* perf: error check

* perf: mq

* perf: init model

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-20 13:11:02 +08:00
heheer 36821600a4
limit custom param name width in http tools (#6125)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* limit custom param name width in http tools

* scroll

* cron log

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-19 14:13:34 +08:00
Archer 5631ec781e
rename log (#6124)
* rename log

* mq del log
2025-12-19 12:13:44 +08:00
Archer d398c9cd39
fix: openapi (#6121)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* fix: openapi

* fix: openapi

* fix: default maxResponse load

* fix: default maxResponse load

* doc
2025-12-19 00:08:30 +08:00
heheer 5231f4281f
image compatibility for various content-types (#6119)
* image compatibility for various content-types

* perf: image type detect

* perf: gethistory

* update test

* update rerank log

* perf: login

* fix: query extension use

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-18 23:25:48 +08:00
Archer ea7c37745a
add savechat test (#6118)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-12-18 14:34:44 +08:00
Archer c6fe6f18da
fix: create time (#6117) 2025-12-18 13:58:12 +08:00
Archer 0d88761378
perf: redis del (#6115)
* fix: log

* fix: redirect api
2025-12-18 13:49:45 +08:00
heheer 527237d019
limit custom param description width in http tools (#6116) 2025-12-18 13:37:36 +08:00
Archer 44c0e9e83f
perf: redis del;perf: cron app run (#6113)
* cron app run

* perf: redis del
2025-12-18 11:09:13 +08:00
ROKY 7f715a8752
add mineru_saas_api for fastgpt (#5923)
* add pdf-mineru

添加了基于MinerU的PDF转Markdown接口服务,调用方式与pdf-marker一致,开箱即用。

* Rename Readme.md to README.md

* Rename pdf_parser_mineru.py to main.py

* mineru_saas_api for fastgpt

已有成熟本地部署方案,现提供使用mineru官方saas服务api的调用方法
2025-12-18 11:08:24 +08:00
Archer cffe395e9a
perf: Get redis kes function (#6112)
* perf: replace redis KEYS with SCAN (#6101)

* perf: replace redis KEYS with SCAN

* test: add redis scan mock to fix unit tests

* Fix formatting in redis.ts mock functions

* fix comment word

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* perf: get redis keys function

* replace prefix code

* add pipeline delete keys

---------

Co-authored-by: lgphone <inboxcvt@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-18 10:50:37 +08:00
heheer 09b9fa517b
chat log soft delete (#6110)
* chat log soft delete

* perf: history api

* add history test

* Update packages/web/i18n/en/app.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* zod parse error

* fix: ts

---------

Co-authored-by: archer <545436317@qq.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-18 10:17:10 +08:00
Archer 463b02d127
perf log (#6107)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* perf: html2md

* perf: index

* Add model log

* update next version

* log index
2025-12-17 17:44:38 +08:00
heheer abc2b6d20d
support add pay form url env (#6086)
* support add pay form url env

* optimize

* fix
2025-12-17 17:28:40 +08:00
heheer 285e2b5c93
fix mcp header (#6105)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix mcp header

* perf: del tip

* secret type

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-16 21:32:40 +08:00
Archer 71936eeb1d
deploy doc (#6100)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* deploy doc

* name
2025-12-16 14:56:04 +08:00
Archer 0e3676579d
refresh plugins (#6099)
* doc

* refresh plugins

* perf: loading in install

* background index
2025-12-16 13:02:00 +08:00
Archer 7bfd02a490
perf: init shell (#6097)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* perf: init shell

* init shell

* init shell

* fix: custom domain check

* support

* perf: init shell
2025-12-16 01:46:51 +08:00
Archer 106417b109
fix: index (#6096)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-12-16 00:11:47 +08:00
Archer af669a1cfc
4.14.4 features (#6090)
* perf: zod with app log (#6083)

* perf: safe decode

* perf: zod with app log

* fix: text

* remove log

* rename field

* refactor: improve like/dislike interaction (#6080)

* refactor: improve like/dislike interaction

* button style & merge status

* perf

* fix

* i18n

* feedback ui

* format

* api optimize

* openapi

* read status

---------

Co-authored-by: archer <545436317@qq.com>

* perf: remove empty chat

* perf: delete resource tip

* fix: confirm

* feedback filter

* fix: ts

* perf: linker scroll

* perf: feedback ui

* fix: plugin file input store

* fix: max tokens

* update comment

* fix: condition value type

* fix feedback (#6095)

* fix feedback

* text

* list

* fix: versionid

---------

Co-authored-by: archer <545436317@qq.com>

* fix: chat setting render;export logs filter

* add test

* perf: log list api

* perf: redirect check

* perf: log list

* create ui

* create ui

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-12-15 23:36:54 +08:00
Deepturn 13681c9246
Modify FastGPT environment variable names (#6094)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Updated FastGPT environment variable names for clarity.
2025-12-15 11:50:00 +08:00
Archer 0b02f66283
fix: form input default value (#6088)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* rename

* fix: form input default value

* remove log
2025-12-12 17:20:02 +08:00
heheer 8ad9e15571
free plan workorder entrance (#6085) 2025-12-12 16:08:20 +08:00
Finley Ge b22ba1aa53
chore: customDomain openapi doc && new nextapi code snippets (#6082)
* perf: faq

* index

* delete dataset

* delete dataset

* perf: delete dataset

* init

* fix: faq

* refresh

* empty tip

* chore: customDomain openapi doc && new nextapi code snippets

* chore: update doc

* remove ivalid code

* snippets

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-12 15:28:03 +08:00
dependabot[bot] 805cd33a77
chore(deps): bump next from 15.5.7 to 15.5.9 in /document (#6081)
Bumps [next](https://github.com/vercel/next.js) from 15.5.7 to 15.5.9.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.7...v15.5.9)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-12 14:06:53 +08:00
Archer eaeabf825a
fix: value type (#6076)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* fix: value type

* perf: empty val check
2025-12-10 22:23:40 +08:00
Archer 2da73a6555
V4.14.4 features (#6075)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* perf: faq

* index

* delete dataset

* delete dataset

* perf: delete dataset

* init

* fix: faq

* refresh

* empty tip

* perf: delete type

* fix: some bugs (#6071)

* fix: publish channel doc link

* fix: checkbox disable hover style

* fix: huggingface.svg missing; update doc

* chore: update doc

* fix: typo

* fix: export log dateend;feat: file selector render (#6072)

* fix: export log dateend

* feat: file selector render

* perf: s3 controller

* team qpm limit & plan tracks (#6066)

* team qpm limit & plan tracks

* api entry qpm

* perf: computed days

* Revert "api entry qpm"

This reverts commit 1210c07217.

* perf: code

* system qpm limit

* system qpm limit

---------

Co-authored-by: archer <545436317@qq.com>

* perf: track

* remove export chat test

* doc

* feat: global agent (#6057)

* feat: global agent

* fix: agent

* fix: order display

* CHORE

* feat: error page log

* fix: var update

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Roy <whoeverimf5@gmail.com>
2025-12-10 20:07:05 +08:00
heheer ed1623bd7f
fix bugs (#6074)
* fix bugs

* doc
2025-12-10 17:45:00 +08:00
YeYuheng 2dd48afe39
max-token display (#6070)
Co-authored-by: xxyyh <2289112474@qq>
2025-12-10 13:23:38 +08:00
Archer 36d1ff3679
feat: custom domain (#6067)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* perf: faq

* index

* delete dataset

* delete dataset

* perf: delete dataset

* init

* fix: faq

* doc

* fix: share link auth (#6063)

* standard plan add custom domain config (#6061)

* standard plan add custom domain config

* bill detail modal

* perf: vector count api

* feat: custom domain & wecom bot SaaS integration (#6047)

* feat: custom Domain type define

* feat: custom domain

* feat: wecom custom domain

* chore: i18n

* chore: i18n; team auth

* feat: wecom multi-model message support

* chore: wecom edit modal

* chore(doc): custom domain && wecom bot

* fix: type

* fix: type

* fix: file detect

* feat: fe

* fix: img name

* fix: test

* compress img

* rename

* editor initial status

* fix: chat url

* perf: s3 upload by buffer

* img

* refresh

* fix: custom domain selector (#6069)

* empty tip

* perf: s3 init

* sort provider

* fix: extend

* perf: extract filename

---------

Co-authored-by: Roy <whoeverimf5@gmail.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
2025-12-09 23:33:32 +08:00
heheer d354fd4d67
fix: price page back button display (#6060)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-12-09 12:18:59 +08:00
Archer bdee2db74a
V4.14.4 dev (#6058)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* perf: faq

* index

* delete dataset

* delete dataset

* perf: delete dataset

* init

* fix: outLink UID (#6048)

* perf: query extension

* fix: s3 configs (#6050)

* fix: s3 configs

* s3

---------

Co-authored-by: archer <545436317@qq.com>

* s3 valid string check

* perf: completion api

* fix: model test

* perf: init

* fix: init

* fix: init shell

* fix: faq

---------

Co-authored-by: Roy <whoeverimf5@gmail.com>
2025-12-08 21:02:38 +08:00
heheer 44f95038b0
bill coupon detail (#6054)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* bill coupon detail

* enum

* fix
2025-12-08 18:07:31 +08:00
heheer e979f69cba
fix: mcp sse params (#6056)
* mcp sse params

* add console

* fix

* node version
2025-12-08 18:03:21 +08:00
heheer 5aaf123135
chat file url white list (#6053)
* chat file url white list

* perf: white list

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-08 17:10:23 +08:00
Archer 2ccb5b50c6
V4.14.4 features (#6036)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* feat: add query optimize and bill (#6021)

* add query optimize and bill

* perf: query extension

* fix: embe model

* remove log

* remove log

* fix: test

---------

Co-authored-by: xxyyh <2289112474@qq>
Co-authored-by: archer <545436317@qq.com>

* feat: notice (#6013)

* feat: record user's language

* feat: notice points/dataset indexes; support count limit; update docker-compose.yml

* fix: ts error

* feat: send auth code i18n

* chore: dataset notice limit

* chore: adjust

* fix: ts

* fix: countLimit race condition; i18n en-prefix locale fallback to en

---------

Co-authored-by: archer <545436317@qq.com>

* perf: comment

* perf: send inform code

* fix: type error (#6029)

* feat: add ip region for chat logs (#6010)

* feat: add ip region for chat logs

* refactor: use Geolite2.mmdb

* fix: export chat logs

* fix: return location directly

* test: add unit test

* perf: log show ip data

* adjust commercial plans (#6008)

* plan frontend

* plan limit

* coupon

* discount coupon

* fix

* type

* fix audit

* type

* plan name

* legacy plan

* track

* feat: add discount coupon

* fix

* fix discount coupon

* openapi

* type

* type

* env

* api type

* fix

* fix: simple agent plugin input & agent dashboard card (#6034)

* refactor: remove gridfs (#6031)

* fix: replace gridfs multer operations with s3 compatible ops

* wip: s3 features

* refactor: remove gridfs

* fix

* perf: mock test

* doc

* doc

* doc

* fix: test

* fix: s3

* fix: mock s3

* remove invalid config

* fix: init query extension

* initv4144 (#6037)

* chore: initv4144

* fix

* version

* fix: new plans (#6039)

* fix: new plans

* qr modal tip

* fix: buffer raw text filename (#6040)

* fix: initv4144 (#6041)

* fix: pay refresh (#6042)

* fix: migration shell

* rename collection

* clear timerlock

* clear timerlock

* perf: faq

* perf: bill schema

* fix: openapi

* doc

* fix: share var render

* feat: delete dataset queue

* plan usage display (#6043)

* plan usage display

* text

* fix

* fix: ts

* perf: remove invalid code

* perf: init shell

* doc

* perf: rename field

* perf: avatar presign

* init

* custom plan text (#6045)

* fix plans

* fix

* fixed

* computed

---------

Co-authored-by: archer <545436317@qq.com>

* init shell

* plan text & price page back button (#6046)

* init

* index

* delete dataset

* delete dataset

* perf: delete dataset

* init

---------

Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
Co-authored-by: xxyyh <2289112474@qq>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: Roy <whoeverimf5@gmail.com>
Co-authored-by: heheer <heheer@sealos.io>
2025-12-08 01:44:15 +08:00
Archer 9d72f238c0
fix: csv check (#6044)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: csv check

* fix: template

* Update packages/global/common/file/utils.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-07 15:02:36 +08:00
Archer 003e66883c
fix: loop filter (#6033)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-12-05 11:37:21 +08:00
dependabot[bot] 48aaa73f3d
chore(deps): bump next from 15.3.5 to 15.5.7 in /document (#6030)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Bumps [next](https://github.com/vercel/next.js) from 15.3.5 to 15.5.7.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.3.5...v15.5.7)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-04 09:47:20 +08:00
dependabot[bot] c1ac30ef2e
chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /document (#6018)
Some checks failed
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 14:35:04 +08:00
dependabot[bot] f192c8aaa3
chore(deps): bump express in /plugins/webcrawler/SPIDER (#6019)
Bumps [express](https://github.com/expressjs/express) from 4.21.2 to 4.22.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.22.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.2...4.22.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 14:34:47 +08:00
Finley Ge e191ea4915
fix: dev deploy yaml (#6026) 2025-12-03 12:48:20 +08:00
Finley Ge 670c3ca3b0
chore: update deploy scripts (#6016) 2025-12-03 11:08:43 +08:00
dependabot[bot] 2213e95b48
chore(deps): bump @modelcontextprotocol/sdk from 1.12.2 to 1.24.0 (#6023)
Bumps [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) from 1.12.2 to 1.24.0.
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/1.12.2...1.24.0)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.24.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 10:16:27 +08:00
Deepturn 36ea6700b7
Update alert message for model configuration (#6017) 2025-12-03 08:36:19 +08:00
heheer 735a6722b5
fix: filter pro request (#6022) 2025-12-03 08:35:31 +08:00
dependabot[bot] a56e5dd55a
chore(deps): bump express from 4.21.2 to 4.22.0 (#6015)
Bumps [express](https://github.com/expressjs/express) from 4.21.2 to 4.22.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.22.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.2...4.22.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 11:41:24 +08:00
Archer e93cc8afa4
doc (#6014)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-12-01 21:46:30 +08:00
Roy 499b797d0d
fix: longer timeout (#6012) 2025-12-01 21:14:39 +08:00
Archer b0a58b98f1
feat: toolcall stream response (#6009)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-11-29 09:24:47 +08:00
dependabot[bot] a7929bd565
chore(deps): bump js-yaml from 3.14.1 to 4.1.1 (#5996)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-28 21:34:35 +08:00
Finley Ge 9890911be1
Revert "fix: get file buffer and upload file to S3 (#6004)" (#6006)
This reverts commit f1253a1f5a.
2025-11-28 17:11:53 +08:00
Roy f1253a1f5a
fix: get file buffer and upload file to S3 (#6004) 2025-11-28 15:02:59 +08:00
Roy ac1a07d91c
fix: correct external url check condition in readFiles (#6003)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-11-28 11:13:11 +08:00
Roy 88805564ad
fix: limit s3 filename and metadata "origin-finename" max length to 50 (#6000)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-11-27 11:51:54 +08:00
Finley Ge dbcf5b003d
chore: 4.14.3 doc (#5997)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-11-26 20:52:05 +08:00
Archer 58000324e2
feature: V4.14.3 (#5970)
* feat(marketplace): update plugin/ download count statistic (#5957)

* feat: download count

* feat: update ui

* fix: ui

* chore: update sdk verison

* chore: update .env.template

* chore: adjust

* chore: remove console.log

* chore: adjust

* Update projects/marketplace/src/pages/index.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update projects/marketplace/src/pages/index.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update projects/app/src/pages/config/tool/marketplace.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: update refresh; feat: marketplace download count per hour

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* download

* marketplace code

* fix: ui (#5963)

* feat: support dataset and files as global variables (#5961)

* json & dataset

* file

* fix file var

* fix

* fix init

* remove

* perf: file vars

* fix: file uploading errors (#5969)

* fix: file uploading errors

* fix build

* perf: fileselector ux

* feat: integrate S3 for dataset with compatibility (#5941)

* fix: text split

* remove test

* feat: integrate S3 for dataset with compatibility

* fix: delay s3 files delete timing

* fix: remove imageKeys

* fix: remove parsed images' TTL

* fix: improve codes by pr comments

---------

Co-authored-by: archer <545436317@qq.com>

* remove log

* perf: request limit

* chore: s3 migration script (#5971)

* test

* perf: s3 code

* fix: migration script (#5972)

* perf: s3 move object

* wip: fix s3 bugs (#5976)

* fix: incorrect replace origin logic (#5978)

* fix: add downloadURL (#5980)

* perf: file variable ttl & quick create dataset with temp s3 bucket (#5973)

* perf: file variable ttl & quick create dataset with temp s3 bucket

* fix

* plugin & form input variables (#5979)

* plugin & form input variables

* fix

* docs: 4143.mdx (#5981)

* doc: update 4143.mdx (#5982)

* fix form input file ttl (#5983)

* trans file type (#5986)

* trans file type

* fix

* fix: S3 script early return (#5985)

* fix: S3 script typeof

* fix: truncate large filename to fit S3 name

* perf(permission): add a schema verification for resource permission, tmbId, groupId, orgId should be set at least one of them (#5987)

* fix: version & typo (#5988)

* fix-v4.14.3 (#5991)

* fix: empty alt make replace JWT failed & incorrect image dataset preview url (#5989)

* fix: empty alt make replace JWT failed & incorrect image dataset preview url

* fix: s3 files recovery script

* fix: incorrect chat external url parsing (#5993)

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Roy <whoeverimf5@gmail.com>
2025-11-26 20:47:28 +08:00
Finley Ge 91156f13e7
feat: team rate limitation (#5931)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-11-21 18:05:17 +08:00
Archer c1c2b46884
fix: initv4141 script (#5967) (#5968)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
2025-11-21 10:27:28 +08:00
Archer 6c759a76ab
Update 4141.mdx (#5955)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-11-19 10:15:27 +08:00
Archer f08f3a8a26
deploy doc (#5953)
Some checks failed
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* fix: text split

* remove test

* perf: create dataset modal

* remove log

* deploy doc
2025-11-18 19:27:14 +08:00
Archer 6adee71c7a
fix dataset quick create modal (#5951)
* fix: text split

* remove test

* perf: create dataset modal

* remove log

* fix dataset quick create modal (#5949)

* fix dataset quick create modal

* fix ui

* doc

* fix: text width

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-11-18 18:31:28 +08:00
heheer 3f47b58a73
fix: tool select modal item width (#5952) 2025-11-18 18:18:14 +08:00
dependabot[bot] 64759b862f
chore(deps): bump js-yaml in /document (#5943)
Bumps  and [js-yaml](https://github.com/nodeca/js-yaml). These dependencies needed to be updated together.

Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

Updates `js-yaml` from 3.14.1 to 3.14.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 18:03:54 +08:00
Edge-Seven 88331e4659
Fix typos in some files (#5947)
Co-authored-by: khanhkhanhlele <namkhanh20xx@gmail.com>
2025-11-18 16:44:12 +08:00
heheer b6d3083585
fix: mcp tool description & tool select ui (#5948) 2025-11-18 16:43:45 +08:00
Archer 29e9e3fecd
Rename tool call (#5946)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: text split

* remove test

* perf: create dataset modal

* remove log

* rename
2025-11-18 11:39:54 +08:00
Archer 7b82e1dcf8
Update doc (#5934)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: text split

* remove test

* doc

* doc

* feat: support quick create dataset in app (#5940)

* feat: support quick create dataset in app

* doc

* perf: create dataset modal

* remove log

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-11-17 21:02:39 +08:00
Archer 2c681bcdd1
fix: text split (#5933)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: text split

* remove test
2025-11-17 12:30:56 +08:00
dependabot[bot] e7eb44650e
chore(deps): bump js-yaml in /plugins/webcrawler/SPIDER (#5932)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 12:00:33 +08:00
dependabot[bot] 1b08a043a6
chore(deps): bump js-yaml from 4.1.0 to 4.1.1 (#5930)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 12:00:16 +08:00
heheer 18efdb5421
fix: chat page team app types (#5927)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-11-14 16:58:43 +08:00
heheer fea7c51d87
fix: support upload import duplicate plugin (#5926) 2025-11-14 16:15:01 +08:00
heheer b0c6e687aa
fix template creating (#5924) 2025-11-14 16:07:55 +08:00
Archer 48c0c150eb
V4.14.2 fearured (#5922)
* fix: chat agent template create (#5912)

* doc

* template market ui (#5917)

* Compress tool (#5919)

* Compress tool (#5914)

* rename file

* feat: agent call request

* perf: Agent call  (#5916)

* fix: interactive in tool call

* doc

* fix: merge node response

* fix: test

* fix:修改 message 对话中的压缩提示词 (#5918)

Co-authored-by: xxyyh <2289112474@qq>

* perf: compress code

* perf: agent call comment

---------

Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
Co-authored-by: xxyyh <2289112474@qq>

* remove pr

* feat: auto password

* perf: app template cache

* fix template market ui (#5921)

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
Co-authored-by: xxyyh <2289112474@qq>
2025-11-14 13:21:17 +08:00
caigua 21de152fd7
fix: 避免日志记录触发递归日志风暴,排除日志模型的性能监控中间件 (#5910)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
初始慢操作触发日志写入,增加系统负载;日志写入因负载过高变缓,被判定为新的慢操作,进而触发更多日志;持续升高的负载让所有操作进一步变慢,生成更多日志。最终形成“越慢越写、越写越慢”的自我强化正反馈循环,即便初始高并发业务流量结束,循环仍会持续耗尽系统资源,直至服务崩溃。

修复方案:
- 对日志模型(Log)跳过 addCommonMiddleware 中间件注册
- 避免日志写入操作被自身监控逻辑拦截,从源头切断循环触发条件
- 不影响业务模型的慢操作监控功能,仅豁免日志自身的性能统计
2025-11-13 12:15:16 +08:00
Archer fa163a5456
doc (#5908)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-11-12 12:19:02 +08:00
Archer 21b9f61506
fix: action (#5905) 2025-11-12 11:18:41 +08:00
Archer 245d6e0d02
fix: action (#5904) 2025-11-12 11:08:18 +08:00
Archer 3a5318c012
fix: action (#5903) 2025-11-12 10:53:31 +08:00
Finley Ge 8eb6f37b30
fix: sso doc (#5901)
* hide api

* fix: sso doc

* fix: rebase

---------

Co-authored-by: archer <545436317@qq.com>
2025-11-12 10:04:39 +08:00
Archer d571c768ea
V4.14.1 feature (#5880)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* feat: app split (#5858)

* feat: app split script

* fix: app split

* chore: app split script try-catch

* adjust dashborad page (#5872)

* create page

* create page

* create button

* router name

* bot

* template

* create page

* mobile

* toolfolder

* fix

* fix

* fix build

* split tool select

* img

* doc

* rename enum

* fix page adjust (#5883)

* fix page adjust

* fix ad store

* fix: initv4141 (#5886)

* fix: create app

* doc

* hide api

* doc

* feat: payment pause interactive (#5892)

* fix: copy clbs (#5889)

* fix: copy clbs

* fix: copy clbs

* fix: http protocol handling in baseURL (#5890)

* fix: http protocol handling in baseURL

* ui fix

* auto saved version

* fix

* auto save

* fix: model permission modal (#5895)

* folder

* fix: del app

* navbar

* fix: plugin file selector (#5893)

* fix: plugin file selector

* fix: plugin file selector

* workflow tool inputform

* pick

---------

Co-authored-by: archer <545436317@qq.com>

* fix: workflow tool time

* doc

* fix workorder button (#5896)

* add inform track (#5897)

* remove invalid track

* comment

* feat: marketplace refresh api (#5884)

* marketplace refresh

* fix: helper bot menu button (#5898)

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
2025-11-11 14:05:02 +08:00
伍闲犬 74e16204e3
fix: plugin file selector (#5871)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* fix: plugin file selector

* fix: render

* fix: upload

* fix: file selector auth

---------

Co-authored-by: archer <545436317@qq.com>
2025-11-07 16:48:10 +08:00
Finley Ge 8ca5ebecd4
perf: read file node return splited raw texts (#5881) 2025-11-07 14:20:34 +08:00
Archer 7225ebec01
perf: model reload (#5879)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* Version doc

* perf: model reload
2025-11-07 12:15:08 +08:00
Archer 1f9c8d32ac
fix: child app run error (#5876) 2025-11-07 10:55:05 +08:00
Archer edf06a0ffe
fix: trim check (#5873)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-11-06 22:20:37 +08:00
Finley Ge 57e37c91d3
chore: edit upgrading doc (#5870)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* chore: edit upgrading doc

* Update doc-last-modified.json

---------

Co-authored-by: Archer <545436317@qq.com>
2025-11-06 15:43:00 +08:00
Archer 7aaa28ed08
fix: document deploy (#5868)
* mcp memory

* Editor space parse error

* fix: ts

* fix: debug interactive

* fix: templateId

* fix: editor in debug

* doc
2025-11-06 14:47:55 +08:00
Archer 89ca81d1a4
fix: document deploy (#5867)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-11-05 17:05:58 +08:00
Archer bf33f7af2e
add templateId to apps (#5866)
* fix: timeselector ui error

* var update node

* add templateId to apps
2025-11-05 14:58:02 +08:00
Archer 45869fa058
Upgrade document (#5865)
* fix: timeselector ui error

* var update node

* version doc

* doc
2025-11-05 14:16:14 +08:00
Archer adf9981845
fix: http inputs (#5864)
* fix: timeselector ui error

* var update node

* fix: http
2025-11-05 13:49:13 +08:00
Archer 3a030e8c33
Fix: Tag filter scroll (#5863)
* fix: timeselector ui error

* var update node

* tag filter scroll
2025-11-05 13:29:40 +08:00
heheer c9edba3539
fix scrollbar (#5862) 2025-11-05 13:19:11 +08:00
Archer 5163e704ed
fix: editor (#5859)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: timeselector ui error

* var update node

* fix: editor

* feat: add name watch
2025-11-05 11:31:37 +08:00
Archer 44e87e3053
fix: var render (#5857)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: timeselector ui error

* var update node

* fix: var render

* fix: prompt editor

* perf: init

* fix: retry input

* fix: prompt editor

* fix: editor
2025-11-04 22:15:47 +08:00
Archer a499d05a02
V4.14.0 features (#5850)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* feat: migrate chat files to s3 (#5802)

* feat: migrate chat files to s3

* feat: add delete jobs for deleting s3 files

* chore: improvements

* fix: lockfile

* fix: imports

* feat: add ttl for those uploaded files but not send yet

* feat: init bullmq worker

* fix: s3 key

* perf: s3 internal url

* remove env

* fix: re-sign a new url

* fix: re-sign a new url

* perf: s3 code

---------

Co-authored-by: archer <545436317@qq.com>

* update pacakge

* feat: add more file type for uploading (#5807)

* fix: re-sign a new url

* wip: file selector

* feat: add more file type for uploading

* feat: migrate chat files to s3 (#5802)

* feat: migrate chat files to s3

* feat: add delete jobs for deleting s3 files

* chore: improvements

* fix: lockfile

* fix: imports

* feat: add ttl for those uploaded files but not send yet

* feat: init bullmq worker

* fix: s3 key

* perf: s3 internal url

* remove env

* fix: re-sign a new url

* fix: re-sign a new url

* perf: s3 code

---------

Co-authored-by: archer <545436317@qq.com>

* fix: limit minmax available file upload number

* perf: file select modal code

* fix: fileselect refresh

* fix: ts

---------

Co-authored-by: archer <545436317@qq.com>

* bugfix: chat page (#5809)

* fix: upload avatar

* fix: chat page username display issue and setting button visibility

* doc

* Markdown match base64 performance

* feat: improve global variables(time, file, dataset) (#5804)

* feat: improve global variables(time, file, dataset)

* feat: optimize code

* perf: time variables code

* fix: model, file

* fix: hide file upload

* fix: ts

* hide dataset select

---------

Co-authored-by: archer <545436317@qq.com>

* perf: insert training queue

* perf: s3 upload error i18n

* fix: share page s3

* fix: timeselector ui error

* var update node

* Timepicker ui

* feat: plugin support password

* fix: password disabled UX

* fix: button size

* fix: no model cache for chat page (#5820)

* rename function

* fix: workflow bug

* fix: interactive loop

* fix test

* perf: common textare no richtext

* move system plugin config (#5803) (#5813)

* move system plugin config (#5803)

* move system plugin config

* extract tag bar

* filter

* tool detail temp

* marketplace

* params

* fix

* type

* search

* tags render

* status

* ui

* code

* connect to backend (#5815)

* feat: marketplace apis & type definitions (#5817)

* chore: marketplace init

* chore: marketplace list api type

* chore: detail api

* marketplace & import

* feat: marketplace ui (#5826)

* temp

* marketplace

* import

* feat: detail return readme

* chore: cache data expire 10 mins

* chore: update docs

* feat: marketplace ui

---------

Co-authored-by: heheer <zhiyu44@qq.com>

* feat: marketplace (#5830)

* temp

* marketplace

* chore: tool list tag filter

* chore: adjust

---------

Co-authored-by: heheer <zhiyu44@qq.com>

* tool detail drawer

* remove tag filter

* fix

* fix

* fix build

* update pnpm-lock

* fix type

* perf code

* marketplace router

* fix build

* navbar icon

* fix ui

* fix init

* docs: marketplace/plugin (#5832)

* temp

* marketplace

* docs(plugin): system tool docs

---------

Co-authored-by: heheer <zhiyu44@qq.com>

* default url

* feat: i18n/ docker build (#5833)

* chore: docker build

* feat: i18n selector

* fix

* fix

* fix: i18n parse

* fix: i18n parse

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <zhiyu44@qq.com>

* marketplace url

* update action

* market place code

* market place code

* title

* fix: nextconfig

* fix: copilot review

* Remove bypassable regex-based XSS sanitization from marketplace search (#5835)

* Initial plan

* Remove problematic regex-based XSS sanitization from search inputs

Co-authored-by: c121914yu <50446880+c121914yu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: c121914yu <50446880+c121914yu@users.noreply.github.com>

* feat: tool tag openapi

* api check

* fix: tsc

* fix: ts

* fix: lock

* sdk version

* ts

* sdk version

* remove invalid tip

* perf: export data add timezone

* perf: admin plugin api move

* perf: tool code

* move tag code

* perf: marketplace and team plugin code

* remove workflow invalid request

* rename global tool code

* rename global tool code

* rename api

* fix some bugs (#5841)

* fix some bugs

* fix

* perf: Tag filter

* fix: ts

* fix: ts

---------

Co-authored-by: archer <545436317@qq.com>

* perf: Concat function

* fix: workflow snapshot push

* fix: ts type

* fix: login to config/*

* fix: ts

* fix: model avatar (#5848)

* fix: model avatar

* fix: ts

* fix: avatar migration to s3

* update lock

* fix: avatar redirect

---------

Co-authored-by: archer <545436317@qq.com>

* fix tool detail (#5847)

* fix tool detail

* init script

* fix build

* perf: plugin detail modal

* change tooltags to tags

* fix icon

---------

Co-authored-by: archer <545436317@qq.com>

* fix tag filter scroll (#5852)

* fix create app plugin & import info (#5853)

* tag size

* rename toolkit

* download url

* import plugin status (#5854)

* init doc

* fix: init shell

---------

Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
Co-authored-by: Zeng Qingwen <143274079+fishwww-ww@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <zhiyu44@qq.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-11-04 16:58:12 +08:00
Archer fac170306e
Update 4130.mdx (#5855) 2025-11-04 15:06:39 +08:00
mmagi f79dbf8e8d
fix: 修复Markdown渲染加粗链接时显示[object Object]的问题 (#5839)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-11-03 21:23:27 +08:00
Archer e1b616a4e4
Update README.md (#5844) 2025-11-03 15:53:26 +08:00
dependabot[bot] f7448fb2b1
chore(deps): bump starlette in /plugins/model/llm-ChatGLM2 (#5825)
Bumps [starlette](https://github.com/Kludex/starlette) from 0.47.2 to 0.49.1.
- [Release notes](https://github.com/Kludex/starlette/releases)
- [Changelog](https://github.com/Kludex/starlette/blob/main/docs/release-notes.md)
- [Commits](https://github.com/Kludex/starlette/compare/0.47.2...0.49.1)

---
updated-dependencies:
- dependency-name: starlette
  dependency-version: 0.49.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-30 12:27:10 +08:00
Archer 3bd9b61bd4
remove invalid log (#5812)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-10-24 18:07:24 +08:00
Archer d87771a14a
fix: toolcall index not start zero (#5811) 2025-10-24 17:49:18 +08:00
John Chen 68271c0846
fix: 修复Plugin代理服务在处理通过nginx转发部署的Plugin服务时,req.headers中的host会导致返回404. (#5801)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
问题场景:
当Plugin服务不是直接通过ip\docker内路由直接访问,而是通过nginx做域名转发的方式部署时,30行headers: req.headers会直接将host(此时host=fastgpt主项目的域名)带入,nginx会使用host值判断转发路由,而导致请求无法被正确转发到plugin项目中。
此次修改参照了projects/app/src/pages/api/lafApi/[...path].ts中的做法,同时删除了cookie\host\origin三个header
2025-10-22 16:17:42 +08:00
Archer 038fee2130
fix path (#5797)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* fix: variables refresh

* fix: workflow start check

* fix path
2025-10-21 11:58:25 +08:00
Archer b59f2ccf1d
fix: loginout (#5796)
* fix: variables refresh

* fix: workflow start check

* doc

* fix: loginout

* fix: login
2025-10-21 11:46:53 +08:00
Archer ca274feb2e
perf: init s3 (#5795)
* fix: variables refresh

* fix: workflow start check

* perf: init s3
2025-10-21 11:18:53 +08:00
Archer 5054ccd487
fix: start node check (#5794)
* fix: start node check

* remove log

* fix: variables refresh

* fix: workflow start check

* fix: variables refresh

* perf: auto save

* perf: add log
2025-10-21 09:51:13 +08:00
Archer 44e9299d5e
V4.13.2 features (#5792)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* add manual create http toolset (#5743)

* add manual create http toolset

* optimize code

* optimize

* fix

* fix

* rename filename

* feat: integrate ts-rest (#5741)

* feat: integrate ts-rest

* chore: classify core contract and pro contract

* chore: update lockfile

* chore: tweak dir structure

* chore: tweak dir structure

* update tsrest code (#5755)

* doc

* update tsrest code

* fix http toolset (#5753)

* fix http toolset

* fix

* perf: http toolset

* fix: toolresponse result (#5760)

* doc

* fix: toolresponse result

* fix: mongo watch

* remove log

* feat: integrated to minio (#5748)

* feat: migrate to minio

* feat: migrate apps' and dataset's avatar to minio

* feat: migrate more avatars to minio

* fix: lock file

* feat: migrate copyright settings' logo to minio

* feat: integrate minio

* chore: improve code

* chore: rename variables

* refactor: s3 class

* fix: s3 and mongo operations

* chore: add session for avatar source

* fix: init s3 buckets

* fix: bugbot issues

* expired time code

* perf: avatar code

* union type

* export favouriteContract

* empty bucket check

---------

Co-authored-by: archer <545436317@qq.com>

* refactor: zod schema to generate OpenAPI instead (#5771)

* doc

* fix: text split code (#5773)

* fix: toolresponse result

* remove log

* stream remove

* fix: text split code

* fix: workflow (#5779)

* fix: toolresponse result

* remove log

* fix: value check

* fix: workflow

* openapi doc

* perf: bucket delete cron

* doc

* feat: apikey health

* feat: export variables

* api code move

* perf: workflow performance (#5783)

* perf: reactflow context

* perf: workflow context split

* perf: nodeList computed map

* perf: nodes dependen

* perf: workflow performance

* workflow performance

* removel og

* lock

* version

* loop drag

* reactflow size

* reactflow size

* fix: s3init (#5784)

* doc

* fix: s3init

* perf: dynamic import

* remove moongose dep

* worker build

* worker code

* perf: worker build

* fix: error throw

* doc

* doc

* fix: build

* fix: dockerfile

* nextjs config

* fix: worker

* fix: build (#5791)

* fix: build

* vector cache code

* fix: app info modal avatar upload method replace (#5787)

* fix: app info modal avatar upload method replace

* chore: replace all useSelectFile with useUploadAvatar

* remove invalid code

* add size

* Update projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/CommonInputForm.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update projects/app/src/pageComponents/app/detail/WorkflowComponents/context/workflowInitContext.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-20 19:08:21 +08:00
Finley Ge ca3053f04d
fix: resolve MCP service modal checkbox double-click event issue (#5790)
Fixed the issue where clicking on checkboxes in the MCP service modal
would trigger double-click events, causing selections to be immediately
deselected.

Root cause:
- Checkbox onChange events were conflicting with parent HStack onClick events
- Both components were trying to handle the same selection logic

Solution:
- Extracted handleItemClick function to avoid code duplication
- Flex onClick: only e.stopPropagation() to prevent event bubbling
- Checkbox onChange: handleItemClick for checkbox-specific interactions
- HStack onClick: handleItemClick for row-level interactions

Benefits:
 Checkbox clicks work properly without double-toggle
 Full row click functionality preserved
 All checkbox hover/focus effects maintained
 Clean DRY code structure with shared logic
 Perfect visual alignment between checkbox and avatar

Changes made to:
- projects/app/src/pageComponents/dashboard/mcp/EditModal.tsx:159-194

🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2025-10-20 17:42:49 +08:00
heheer 703ef2cd56
add 10-minute auto-refresh for token login (#5788)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-10-20 14:44:49 +08:00
dependabot[bot] 2d0a956e60
chore(deps): bump mammoth from 1.9.0 to 1.11.0 (#5781)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Bumps [mammoth](https://github.com/mwilliamson/mammoth.js) from 1.9.0 to 1.11.0.
- [Release notes](https://github.com/mwilliamson/mammoth.js/releases)
- [Changelog](https://github.com/mwilliamson/mammoth.js/blob/master/NEWS)
- [Commits](https://github.com/mwilliamson/mammoth.js/compare/1.9.0...1.11.0)

---
updated-dependencies:
- dependency-name: mammoth
  dependency-version: 1.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-19 17:12:14 +08:00
Finley Ge 1ab2e922ec
feat: add health check to MongoDB service in Docker Compose templates (#5776)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* feat: add health check to MongoDB service in Docker Compose templates

- Add health check configuration to MongoDB service in both dev and prod templates
- Use mongo client ping command with authentication to verify service availability
- Configure 10s interval, 5s timeout, 5 retries, and 30s start period
- Ensures MongoDB service health monitoring consistent with other services

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* chore: regenerate Docker Compose files with MongoDB health check

- Run pnpm gen:deploy to regenerate all Docker Compose files
- MongoDB health checks are now included in all generated variants
- Health check configuration: 10s interval, 5s timeout, 5 retries, 30s start period
- Affects dev, prod and documentation Docker Compose files

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2025-10-17 18:28:48 +08:00
Archer 19846905ff
Update 4132.mdx (#5766)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-10-15 16:43:42 +08:00
Archer 12096f6c58
fix: set vision default false (#5758)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-10-13 16:27:44 +08:00
heheer 9ea1cbf19e
add user active tracks (#5754)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* add user active tracks

* remove console

* perf: track active

* perf: track active

---------

Co-authored-by: archer <545436317@qq.com>
2025-10-12 01:44:48 +08:00
Archer c6dfaaea8e
dockerfile (#5750)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* dockerfile

* dockerfile

* dockerfile
2025-10-10 21:24:14 +08:00
ZHIQUAN 2beb217006
Prompt: Fixing Display Image Error Issues (#5745)
-----
提示词:展示图片的错误问题修复
2025-10-10 20:56:16 +08:00
Archer 7dcff442fd
update dockerfile (#105) (#5749) 2025-10-10 20:22:29 +08:00
Archer aba0b4c824
hide audit (#5740)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-10-09 15:10:19 +08:00
Archer 7942805af9
fix: usage repeat (#5735)
* fix: usage repeat

* remove invalid code
2025-10-09 09:53:19 +08:00
Finley Ge b8c2c7ad98
fix: docker-compose pg_url removal; depends on pg -> vectorDB (#5733)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-10-06 11:42:57 +08:00
Archer 69559814e7
doc (#5730)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-09-30 16:00:10 +08:00
Archer 1d2fe012bf
deploy doc (#5729) 2025-09-30 15:47:06 +08:00
Archer a83ae8e6e8
4.13.1 features (#5728)
* fix(api): 修复二级路由下的页面判断逻辑

在请求错误处理中,添加基础URL前缀以正确判断当前是否为外部链接页面。

* perf: use global var

* remove invalid code

* feat: response limit;perf: copy avatar image;perf: markdown parse (#5719)

* feat: response limit

* remove placeholder

* perf: copy avatar image

* perf: markdown parse

* fix: child app cannot show cite

* doc

* fix: node template bugs (#5727)

* add dataset search count track (#5721)

* add dataset search count track

* remove pro

* change to track

* remove unused

* fix

* perf: track code

---------

Co-authored-by: archer <545436317@qq.com>

* http response limit

* deploy doc

* fix: test

* doc

* remove invalid code

* remove invalid code

---------

Co-authored-by: 戴盛利 <1639499287@qq.com>
Co-authored-by: heheer <heheer@sealos.io>
2025-09-30 15:05:43 +08:00
Finley Ge e4127b53af
chore: deploy update cn registry (#5726)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
* perf: rename docker-compose.yml after download

* chore: update cn registry for minio and redis
2025-09-29 17:57:15 +08:00
Finley Ge bea5fc0b41
fix: static file /deploy/* (#5725)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-09-29 12:13:38 +08:00
Archer d6fc27a892
Test doc (#5724)
* doc

* doc
2025-09-29 11:52:39 +08:00
Archer 5749f66197
update deploy doc (#5723) 2025-09-29 11:42:47 +08:00
Finley Ge 32a3b9216b
perf: deploy docs; docker-compose (#5722)
* docs: https://localhost => http://localhost

* chore: docker compose; deploy/dev docs

* chore: quick-start page

* chore: add comment & remove leading space of vector config

* chore: remove redundant install.sh scripts

* chore: adjust milvus and ob, image dyanmic config; readme.md

* chore: update pnpm-lock.yaml
2025-09-29 11:34:11 +08:00
heheer 5a2ba5a340
fix: add missing MongoAppChatLog updates for interactive chat sessions (#5716)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* fix: add missing MongoAppChatLog updates for interactive chat sessions

* fix: interactive response not update log

* doc

---------

Co-authored-by: archer <545436317@qq.com>
2025-09-27 19:43:37 +08:00
heheer ce3556c240
fix: react-hook-form Controller crash with special characters in field names (#5715) 2025-09-27 19:24:12 +08:00
heheer a6ba974167
fix: simple prompt editor list render (#5717) 2025-09-27 19:18:10 +08:00
Archer 53907af9f7
fix: loop interactive (#5714)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: loop interactive

* add buffer time
2025-09-26 16:01:20 +08:00
Archer c66c2ad8f9
feat: auth login in getSchemaApi (#5713)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* feat: auth api

* doc
2025-09-26 13:32:15 +08:00
Archer 3b3180480f
app doc (#5712)
* app doc

* app doc

---------

Co-authored-by: heheer <zhiyu44@qq.com>
2025-09-26 13:18:51 +08:00
Archer 93e260ebcf
Update 4130.mdx (#5709)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-09-25 21:02:34 +08:00
Archer 1e8e24a5a7
Update 4130.mdx (#5705) 2025-09-25 15:36:06 +08:00
Archer 34e5191558
fix: collection ui (#5704) 2025-09-25 15:12:53 +08:00
Finley Ge 7cdb16c816
perf: permission index & model table collaborator context lazy mount (#5703) 2025-09-25 14:11:05 +08:00
dependabot[bot] d4c1e25598
chore(deps): bump tar-fs in /plugins/webcrawler/SPIDER (#5699)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.9 to 3.1.1.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.9...v3.1.1)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 13:32:01 +08:00
Archer 70e0798489
update package (#5700) 2025-09-25 09:53:33 +08:00
Archer 88633a2a42
fix: child usage remove (#5698)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: child usage remove

* remove runloop empty usage
2025-09-24 23:15:46 +08:00
Archer 051455238c
V4.13.0 features (#5693)
* feat: concat usage code (#5657)

* feat: dataset parse queue (#5661)

* feat: chat usage concat (#5669)

* perf: search test usage

* feat: chat usage concat

* fix: ts

* fix: ts

* feat: chat node response store (#5675)

* feat: chat node response store

* limit export

* test

* add ai generate node (#5506)

* add node copilot

* apply code

* update dynamic input & output

* add code test

* usage

* dynamic input border render

* optimize input & output

* optimize code

* update style

* change card to popover

* prompt editor basic

* prompt editor

* handle key down

* update prompt

* merge

* fix

* fix

* fix

* perf: workflow performance (#5677)

* feat: chat node response store

* limit export

* perf: workflow performance

* remove log

* fix: app template get duplicate (#5682)

* fix: dynamic input lock & code param (#5680)

* fix: dynamic input lock & code param

* fix

* fix

* feat: multi node data sync & system tool hot-swapping (#5575)

* Enhance file upload functionality and system tool integration (#5257)

* Enhance file upload functionality and system tool integration

* Add supplementary documents and optimize the upload interface

* Refactor file plugin types and update upload configurations

* Refactor MinIO configuration variables and clean up API plugin handlers for improved readability and consistency

* File name change

* Refactor SystemTools component layout

* fix i18n

* fix

* fix

* fix

* optimize app logs sort (#5310)

* log keys config modal

* multiple select

* api

* fontsize

* code

* chatid

* fix build

* fix

* fix component

* change name

* log keys config

* fix

* delete unused

* fix

* chore: minio service class rewrite

* chore: s3 plugin upload

* feat: system global cache with multi node sync feature

* feat: cache

* chore: move images

* docs: update & remove useless code

* chore: resolve merge conflicts

* chore: adjust the code

* chore: adjust

* deps: upgrade @fastgpt-sdk/plugin to 0.1.17

* perf(s3): s3 config

* fix: cache syncKey refresh

* fix: update @fastgpt-sdk/plugin to v0.1.18 removing mongo definition for fixing vitest

* chore: adjust

---------

Co-authored-by: Ctrlz <143257420+ctrlz526@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Archer <545436317@qq.com>

* perf: s3 api code

* fix: toolbox empty when second open modal

* feat: http tool set (#5599)

* feat: http toolSet manual create front end

* feat: http toolSet manual create i18n

* feat: http toolSet manual create back end

* feat: auth, as tool param, adapt mcp

* fix: delete unused httpPlugin

* fix: delete FlowNodeTypeEnum.httpPlugin

* fix: AppTypeEnum include httpToolSet and httpPlugin

* fix

* delete console

* fix

* output schema

* fix

* fix bg

* fix base url

* fix

---------

Co-authored-by: heheer <zhiyu44@qq.com>

* feat: app count

* perf: type check

* feat: catch error

* perf: plugin hot-swapping (#5688)

* perf: plugin hot-swapping

* chore: adjust code

* perf: cite data auth

* fix http toolset (#5689)

* temp

* fix http tool set

* fix

* template author hide

* dynamic IO ui

* fix: auth test

* fix dynamic input & output (#5690)

Co-authored-by: Archer <545436317@qq.com>

* fix: dynamic output id

* doc

* feat: model permission (#5666)

* feat(permission): model permission definition & api

* chore: support update model's collaborators

* feat: remove unauthedmodel when paste and import

* fix: type error

* fix: test setup global model list

* fix: http tool api

* chore: update fastgpt-sdk version

* chore: remove useless code

* chore: myModelList cache

* perf: user who is not manager can not configure model permission (FE)

* perf: model => Set

* feat: getMyModels moved to opensource code; cache the myModelList

* fix: type error

* fix dynamic input reference select type (#5694)

* remove unique index

* read file usage

* perf: connection error

* fix: abort token count

* fix: debug usage concat

* fix: immer clone object

* fix: immer clone object

* perf: throw error when error chat

* update audit i18n

* fix: 修复识别pptx文件后,返回内容顺序错乱问题 (#5696)

* fix: pptx sort error

* fix prompt editor (#5695)

* fix prompt editor

* fix

* fix: redis cache prefix (#5697)

* fix: redis cache prefix

* fix: cache

* fix: get model collaborator by model.model

* feat: hint for model per

* rename bucket name

* model ui

* doc

* doc

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: Ctrlz <143257420+ctrlz526@users.noreply.github.com>
Co-authored-by: Zeng Qingwen <143274079+fishwww-ww@users.noreply.github.com>
Co-authored-by: heheer <zhiyu44@qq.com>
Co-authored-by: Deepturn <33342819+Deepturn@users.noreply.github.com>
2025-09-24 22:40:31 +08:00
Archer 9f8f8dd3de
Update README.md (#5686) 2025-09-22 10:47:54 +08:00
Archer 984fbc8178
Update commercial.mdx (#5685)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-09-21 23:09:46 +08:00
John Chen 91269c91a1
fix: 修复最后一个流为[xxxx]格式时会重复输出1次 (#5673)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* fix: 修复最后一个流为[xxxx]格式时会重复输出1次

issue #5292
当最后一个流中包含[xxxx]格式时,会输出2次。第一次在parseCite方法中if (isStreamEnd) {分支内输出,第二次在调用getResponseData时会输出buffer中的内容,导致重复。

* add test case

---------

Co-authored-by: archer <545436317@qq.com>
2025-09-19 10:58:48 +08:00
heheer 206fd7e4a8
fix: question guide prompt save & sub route image (#5672)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* fix: question guide prompt save & sub route image

* fix markdown
2025-09-18 18:13:57 +08:00
Zeng Qingwen 3099b33343
fix: front end render wecom publish without update manually (#5670)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-09-18 14:35:08 +08:00
heheer ab29710945
fix: node copy, debug variables, auto-execution (#5664)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix debug variables

* auto execute condition

* fix autoTTSResponse

* node copy

* memory debug nodes

* doc

* yuque doc

* fix: debug

* img

* i18n

---------

Co-authored-by: archer <545436317@qq.com>
2025-09-17 22:29:56 +08:00
YeYuheng 1581a08082
doc_mineru (#5662)
* doc_mineru

* Delete bun.lock

---------

Co-authored-by: xxYyh <xxyyh@xxYyhdeMacBook-Pro.local>
Co-authored-by: Archer <545436317@qq.com>
2025-09-17 18:33:31 +08:00
伍闲犬 ae3fbafa34
fix: permission for favourite apps chatting (#5668) 2025-09-17 18:31:17 +08:00
Archer fb536d1697
Update lark_dataset.mdx (#5667) 2025-09-17 17:40:47 +08:00
Archer 235b50c07f
tool author (#5665)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* tool author

* doc

* doc
2025-09-17 17:06:18 +08:00
Zeng Qingwen 4333eb9caa
doc: update wecom doc (#5656)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
2025-09-16 14:22:28 +08:00
Archer e68a801302
Update 4124.mdx (#5654) 2025-09-16 10:46:55 +08:00
Archer cb7d1a3205
perf: init shell (#5651)
Some checks failed
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* perf: init shell

* fix: tool run select

* border radius
2025-09-15 22:21:24 +08:00
Archer 2ed1545eb5
V4.12.4 features (#5626)
* fix: push again, user select option button and form input radio content overflow (#5601)

* fix: push again, user select option button and form input radio content overflow

* fix: use useCallback instead of useMemo, fix unnecessary delete

* fix: Move the variable inside the component

* fix: do not pass valueLabel to MySelect

* ui

* del collection api adapt

* refactor: inherit permission (#5529)

* refactor: permission update conflict check function

* refactor(permission): app collaborator update api

* refactor(permission): support app update collaborator

* feat: support fe permission conflict check

* refactor(permission): app permission

* refactor(permission): dataset permission

* refactor(permission): team permission

* chore: fe adjust

* fix: type error

* fix: audit pagiation

* fix: tc

* chore: initv4130

* fix: app/dataset auth logic

* chore: move code

* refactor(permission): remove selfPermission

* fix: mock

* fix: test

* fix: app & dataset auth

* fix: inherit

* test(inheritPermission): test syncChildrenPermission

* prompt editor add list plugin (#5620)

* perf: search result (#5608)

* fix: table size (#5598)

* temp: list value

* backspace

* optimize code

---------

Co-authored-by: Archer <545436317@qq.com>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>

* fix: fe & member list (#5619)

* chore: initv4130

* fix: MemberItemCard

* fix: MemberItemCard

* chore: fe adjust & init script

* perf: test code

* doc

* fix debug variables (#5617)

* perf: search result (#5608)

* fix: table size (#5598)

* fix debug variables

* fix

---------

Co-authored-by: Archer <545436317@qq.com>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>

* perf: member ui

* fix: inherit bug (#5624)

* refactor(permission): remove getClbsWithInfo, which is useless

* fix: app list privateApp

* fix: get infos

* perf(fe): remove delete icon when it is disable in MemberItemCard

* fix: dataset private dataset

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Archer <545436317@qq.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* perf: auto coupon

* chore: upgrade script & get infos avatar  (#5625)

* fix: get infos

* chore: initv4130

* feat: support WecomRobot publish, and fix AesKey can not save bug (#5526)

* feat: resolve conflicts

* fix: add param 'show_publish_wecom'

* feat: abstract out WecomCrypto type

* doc: wecom robot document

* fix: solve instability in AI output

* doc: update some pictures

* feat: remove functions from request.ts to chat.ts and toolCall.ts

* doc: wecom robot doc update

* fix

* delete unused code

* doc: update version and prompt

* feat: remove wecom crypto, delete wecom code in workflow

* feat: delete unused codes

---------

Co-authored-by: heheer <zhiyu44@qq.com>

* remove test

* rename init shell

* feat: collection page store

* reload sandbox

* pysandbox

* remove log

* chore: remove useless code (#5629)

* chore: remove useless code

* fix: checkConflict

* perf: support hidden type for RoleList

* fix: copy node

* update doc

* fix(permission): some bug (#5632)

* fix: app/dataset list

* fix: inherit bug

* perf: del app;i18n;save chat

* fix: test

* i18n

* fix: sumper overflow return OwnerRoleVal (#5633)

* remove invalid code

* fix: scroll

* fix: objectId

* update next

* update package

* object id

* mock redis

* feat: add redis append to resolve wecom stream response  (#5643)

* feat: resolve conflicts

* fix: add param 'show_publish_wecom'

* feat: abstract out WecomCrypto type

* doc: wecom robot document

* fix: solve instability in AI output

* doc: update some pictures

* feat: remove functions from request.ts to chat.ts and toolCall.ts

* doc: wecom robot doc update

* fix

* delete unused code

* doc: update version and prompt

* feat: remove wecom crypto, delete wecom code in workflow

* feat: delete unused codes

* feat: add redis append method

---------

Co-authored-by: heheer <zhiyu44@qq.com>

* cache per

* fix(test): init team sub when creating mocked user (#5646)

* fix: button is not vertically centered (#5647)

* doc

* fix: gridFs objectId (#5649)

---------

Co-authored-by: Zeng Qingwen <143274079+fishwww-ww@users.noreply.github.com>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: heheer <zhiyu44@qq.com>
2025-09-15 20:02:54 +08:00
dependabot[bot] c8934e3d22
chore(deps): bump jsondiffpatch from 0.6.0 to 0.7.2 (#5634)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
Bumps [jsondiffpatch](https://github.com/benjamine/jsondiffpatch) from 0.6.0 to 0.7.2.
- [Release notes](https://github.com/benjamine/jsondiffpatch/releases)
- [Commits](https://github.com/benjamine/jsondiffpatch/commits)

---
updated-dependencies:
- dependency-name: jsondiffpatch
  dependency-version: 0.7.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 13:16:30 +08:00
dependabot[bot] 1f0b62e895
chore(deps): bump axios in /plugins/webcrawler/SPIDER (#5637)
Bumps [axios](https://github.com/axios/axios) from 1.8.2 to 1.12.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.8.2...v1.12.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 13:15:24 +08:00
Zeng Qingwen 768fb63b88
feat: scan QRCode auto redeem coupon (#5616)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* feat: scan QRCode auto redeem coupon

* feat: use hook to auto redeem, instead of modify auth
2025-09-12 09:54:36 +08:00
heheer 635e606ef1
fix http plugin chatconfig undefined (#5621)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix http plugin chatconfig undefined

* fix
2025-09-11 16:04:16 +08:00
伍闲犬 bdb89a3e0c
fix: table size (#5598)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-09-09 15:05:45 +08:00
Archer 25207c5060
perf: search result (#5608) 2025-09-09 14:06:31 +08:00
Deepturn 3fc163c5a0
Update 4101.mdx (#5602) 2025-09-08 20:07:20 +08:00
Deepturn deced4c67f
Update sso.mdx (#5603) 2025-09-08 20:07:04 +08:00
Finley Ge 4e17fcfdda
fix: node card copy toolConfig (#5605) 2025-09-08 20:06:49 +08:00
Archer c4632a2222
V4.12.3 document (#5600)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* doc

* doc

* perf: log
2025-09-07 20:55:14 +08:00
Archer 3f9b0fa1d4
V4.12.3 features (#5595)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* refactor: remove ModelProviderIdType and update related types (#5549)

* perf: model provider

* fix eval create split (#5570)

* git rebase --continuedoc

* add more variable types (#5540)

* variable types

* password

* time picker

* internal var

* file

* fix-test

* time select default value & range

* password & type render

* fix

* fix build

* fix

* move method

* split date select

* icon

* perf: variable code

* prompt editor add markdown plugin (#5556)

* editor markdown

* fix build

* pnpm lock

* add props

* update code

* fix list

* editor ui

* fix variable reset (#5586)

* perf: variables type code

* customize lexical indent (#5588)

* perf: multiple selector

* perf: tab plugin

* doc

* refactor: update workflow constants to use ToolTypeEnum (#5491)

* refactor: replace FlowNodeTemplateTypeEnum with string literals in workflow templates

* perf: tool type

---------

Co-authored-by: archer <545436317@qq.com>

* update doc

* fix: make table's row more natural while dragging it (#5596)

* feat: add APIGetTemplate function and refactor template fetching logic (#5498)

* feat: add APIGetTemplate function and refactor template fetching logic

* chore: adjust the code

* chore: update sdk

---------

Co-authored-by: FinleyGe <m13203533462@163.com>

* perf init system

* doc

* remove log

* remove i18n

* perf: variables render

---------

Co-authored-by: Ctrlz <143257420+ctrlz526@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
Co-authored-by: FinleyGe <m13203533462@163.com>
2025-09-07 14:41:48 +08:00
Archer c747fc03ad
Update docs-deploy.yml (#5594)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-09-04 23:03:47 +08:00
Archer 0ede427a96
fix: var selector (#5593)
* fix: var selector

* doc

* doc time

* doc time

* doc time

* doc time

* doc time

* doc time

* doc time
2025-09-04 22:46:19 +08:00
Archer 85ea117481
Fix workflow (#5592)
* fix: fileselector default

* fix: workflow run process
2025-09-04 20:22:35 +08:00
伍闲犬 9be1e591d3
fix: delete "Content-Length" while redirect request to pro api (#5589)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-09-04 14:17:07 +08:00
Archer c67e645469
perf: login page (#5571)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-09-01 21:03:58 +08:00
Finley Ge f41775fe56
fix: leave team (#5554)
* chore: fe copywrite

* feat: auto accept invitation when login

* perf: only show forbidden filter in sync mode

* chore: auto accept invitation
2025-09-01 20:33:29 +08:00
伍闲犬 76a03a8363
fix: incorrect popover position (#5568)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-09-01 11:52:20 +08:00
伍闲犬 6e8bf8c804
fix: favorite apps ui and permission; fix favorite settings' table row (#5553)
* fix: fix favorite apps ui and permission; fix favorite settings' table row

* fix: tag overflow

* chore: remove default value
2025-09-01 11:32:37 +08:00
Archer 42e249f30f
perf: rrf code (#5559)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-08-29 01:32:08 +08:00
Archer a952539875
perf: rrf code (#5558) 2025-08-29 01:24:19 +08:00
YeYuheng e4756c76dd
rrf_weight (#5551)
Co-authored-by: xxYyh <xxyyh@xxYyhdeMacBook-Pro.local>
2025-08-29 00:54:29 +08:00
Finley Ge 486d791b94
fix: extract node can not extract when using tool-calling-able model. (#5555) 2025-08-28 18:09:33 +08:00
Deepturn 8e77060f9c
Update teamMode.mdx (#5550)
Synchronization mode cannot add users.
2025-08-27 16:59:57 +08:00
Archer c4799df3fd
perf: workflow code (#5548)
* perf: workflow code

* add tool call limit
2025-08-27 11:45:46 +08:00
Finley Ge 610634e1a1
fix: mcp tool node hide the version selection (#5547) 2025-08-27 10:52:32 +08:00
Archer 4e194d64e1
Update doc (#5545)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* fix: app list

* fix: toolset conflict interactive node

* fix: doc

* update yml
2025-08-27 00:31:33 +08:00
Archer 324aaae769
fix: ai response test (#5544)
* fix: ai response test

* fix: skip edge check

* fix: app list

* fix: toolset conflict interactive node

* fix: username show
2025-08-27 00:08:22 +08:00
Archer d2d4c76bd5
update doc (#5543) 2025-08-26 21:14:41 +08:00
Archer 4d7e0ed78f
fix: team avatar select (#5542) 2025-08-26 18:27:32 +08:00
伍闲犬 3fb1ff2614
fix: read permission; incorrect name; redirect (#5541) 2025-08-26 17:57:59 +08:00
Archer 93e9cb675d
fix: oceanbase insert (#5539) 2025-08-26 17:29:42 +08:00
伍闲犬 4939271abb
fix: fix redirect timing while `enableHome` is false; tweak UI (#5538)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-26 15:57:38 +08:00
Archer 2e2e919d1d
fix: chat navbar (#5537) 2025-08-26 15:15:21 +08:00
Archer 970476950a
update package (#5535) 2025-08-26 15:09:47 +08:00
Archer 7cd4a8b0bc
feat: Store pdfparse in local (#5534) 2025-08-26 14:35:39 +08:00
伍闲犬 3c2bf20666
feat: add switch to control if enable `home` (#5531) 2025-08-26 12:00:18 +08:00
Archer 3b25bf57c4
perf: search key refresh parentId (#5530) 2025-08-26 11:30:02 +08:00
Archer 830eb19055
feature: V4.12.2 (#5525)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* feat: favorite apps & quick apps with their own configuration (#5515)

* chore: extract chat history and drawer; fix model selector

* feat: display favourite apps and make it configurable

* feat: favorite apps & quick apps with their own configuration

* fix: fix tab title and add loading state for searching

* fix: cascade delete favorite app and quick app while deleting relative app

* chore: make improvements

* fix: favourite apps ui

* fix: add permission for quick apps

* chore: fix permission & clear redundant code

* perf: chat home page code

* chatbox ui

* fix: 4.12.2-dev (#5520)

* fix: add empty placeholder; fix app quick status; fix tag and layout

* chore: add tab query for the setting tabs

* chore: use `useConfirm` hook instead of `MyModal`

* remove log

* fix: fix modal padding (#5521)

* perf: manage app

* feat: enhance model provider handling and update icon references (#5493)

* perf: model provider

* sdk package

* refactor: create llm response (#5499)

* feat: add LLM response processing functions, including the creation of stream-based and complete responses

* feat: add volta configuration for node and pnpm versions

* refactor: update LLM response handling and event structure in tool choice logic

* feat: update LLM response structure and integrate with tool choice logic

* refactor: clean up imports and remove unused streamResponse function in chat and toolChoice modules

* refactor: rename answer variable to answerBuffer for clarity in LLM response handling

* feat: enhance LLM response handling with tool options and integrate tools into chat and tool choice logic

* refactor: remove volta configuration from package.json

* refactor: reorganize LLM response types and ensure default values for token counts

* refactor: streamline LLM response handling by consolidating response structure and removing redundant checks

* refactor: enhance LLM response handling by consolidating tool options and streamlining event callbacks

* fix: build error

* refactor: update tool type definitions for consistency in tool handling

* feat: llm request function

* fix: ts

* fix: ts

* fix: ahook ts

* fix: variable name

* update lock

* ts version

* doc

* remove log

* fix: translation type

* perf: workflow status check

* fix: ts

* fix: prompt tool call

* fix: fix missing plugin interact window & make tag draggable (#5527)

* fix: incorrect select quick apps state; filter apps type (#5528)

* fix: usesafe translation

* perf: add quickapp modal

---------

Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
Co-authored-by: Ctrlz <143257420+ctrlz526@users.noreply.github.com>
Co-authored-by: francis <zhichengfan18@gmail.com>
2025-08-25 19:19:43 +08:00
Mingcheng Su d6af93074b
fix: increase MCP auth config value field maxLength (#5523)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Fixes #5229
2025-08-24 16:08:50 +08:00
Zeng Qingwen b5169436cb
feat: new code block style in document (#5468)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* feat: new code block style in document

* feat: update fonts and icon in code block

* feat: dark theme color, delete fonts files, move copy icon to correct position

* style: code block more obvious in light and dark theme
2025-08-23 13:29:46 +08:00
Archer d9e28a5b1a
Fix: document preview action (#5524)
* perf: tag popver color

* fix: action
2025-08-23 13:25:50 +08:00
dependabot[bot] 84127a31b9
chore(deps): bump mermaid from 10.9.3 to 10.9.4 (#5522)
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.9.3 to 10.9.4.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.9.3...v10.9.4)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-version: 10.9.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-23 13:08:41 +08:00
dependabot[bot] 1da44a1db1
chore(deps): bump sha.js in /plugins/webcrawler/SPIDER (#5519)
Bumps [sha.js](https://github.com/crypto-browserify/sha.js) from 2.4.11 to 2.4.12.
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/sha.js/compare/v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-23 13:08:26 +08:00
Archer b6318aa35a
fix: version schema ref error (#5518)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-22 11:34:46 +08:00
Archer 95325346ff
perf: vector format (#5516)
* perf: vector format

* feat: embedding batch size
2025-08-22 10:18:24 +08:00
heheer a92917c05f
fix team app template search (#5514)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-21 20:41:46 +08:00
Archer e19eddf976
fix: model selector overlay (#5511)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-08-20 21:58:13 +08:00
伍闲犬 c7fd9308a3
fix: ui & hide history list (#5510)
* fix: hidden history list

* fix: ui
2025-08-20 21:35:48 +08:00
伍闲犬 ff9c6c9b81
chore: extract chat history and drawer; fix model selector (#5492)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* chore: extract chat history and drawer; fix model selector

* refactor: chat slider components structure
2025-08-20 20:22:21 +08:00
Finley Ge 6da65ea53d
docs: update dev system tool (#5486) 2025-08-20 19:00:48 +08:00
gru-agent[bot] 1e7a1a738b
Add unit tests for WorkflowComponents utility functions in utils.test.ts (#5467)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-08-20 18:43:59 +08:00
gru-agent[bot] 14b4c08837
Add unit tests for utility functions in the app workflow module. (#5466)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-08-20 18:43:36 +08:00
Finley Ge 37eec3d452
perf: customizable embedding chunk size via env var (#5494)
* perf: customizable embedding chunk size via env var

* Update .env.template

---------

Co-authored-by: Archer <545436317@qq.com>
2025-08-20 18:42:15 +08:00
Finley Ge f41e3ffc68
fix: multiple select value type when empty string does not have map function (#5487)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-19 14:32:58 +08:00
伍闲犬 f59d70baa0
fix: fix the chat/share page pane (#5485)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-18 17:33:37 +08:00
Archer a4991ecd06
Update 4121.mdx (#5475)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-08-15 22:53:06 +08:00
Archer e945e84edf
doc (#5474) 2025-08-15 22:50:11 +08:00
Archer 1f65bfb1bb
deploy doc (#5473) 2025-08-15 22:48:33 +08:00
Archer c166a57398
doc (#5472)
* doc

* fix: pane undefined

* fix: pane undefined
2025-08-15 22:29:03 +08:00
Archer 2c91137444
fix: fe (#5471) 2025-08-15 18:33:02 +08:00
Archer d21d1e23fa
version package (#5470) 2025-08-15 17:58:15 +08:00
Archer ce36230285
perf: page ui (#5469)
* perf: page ui

* fix: icon

* limit chat items

* limit chat items
2025-08-15 17:56:49 +08:00
Archer 76dc23c2e4
perF: getInitData api cache;perf: tool description field;signoz store level (#5465)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* perf: auto focus

* perF: getInitData api cache

* perf: tool description field

* signoz store level

* perF: chat logs index
2025-08-15 15:01:20 +08:00
Ctrlz d78a0e9e4b
feat: add toolDescription field across various schemas and update related functions (#5452) 2025-08-15 14:13:14 +08:00
Archer 5cd1c2af14
perf: chat pane (#5462)
* fix: sync pane with URL appId vs Home appId to avoid cross-tab interference (#5456)

* perf: chat pane

* perf: markdown render

* update app chat logs index

* doc

* doc redirect

---------

Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
2025-08-15 11:03:38 +08:00
Archer eadf2fd54c
fix: index (#5458)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* doc

* fix: home app name

* fix: char init error status

* fix: index

* fix: secret input
2025-08-14 18:54:47 +08:00
heheer 9a9f094e15
prompt optimze loading (#5461) 2025-08-14 18:26:16 +08:00
heheer c5cabd0efc
export chat detail (#5454)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* export chat detail

* fix

* key name
2025-08-14 16:25:40 +08:00
Ctrlz 8f3424cea1
feat: enhance SystemPluginTemplateItemType to include user instructions (#5455) 2025-08-14 16:00:35 +08:00
heheer d72929dcf8
fix dataset auth filter (#5457) 2025-08-14 15:59:59 +08:00
Archer 9fbfabac61
perf: variabel replace;Feat: prompt optimizer code (#5453)
* feat: add prompt optimizer (#5444)

* feat: add prompt optimizer

* fix

* perf: variabel replace

* perf: prompt optimizer code

* feat: init charts shell

* perf: user error remove

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-08-14 15:48:22 +08:00
Ctrlz 6a02d2a2e5
fix: concatenate answerText in dispatchRunTool function (#5451)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-13 21:05:00 +08:00
heheer 77bf4eac7f
fix log chart display (#5449) 2025-08-13 20:21:11 +08:00
Ctrlz ef56912e44
fix: update runningUserInfo retrieval in chat completions API (#5446) 2025-08-13 16:33:03 +08:00
Deepturn cc86aced2c
Update dataset.mdx (#5448)
update dataset api
2025-08-13 16:31:28 +08:00
dependabot[bot] f29229e0ac
chore(deps): bump transformers in /plugins/model/llm-ChatGLM2 (#5442)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Bumps [transformers](https://github.com/huggingface/transformers) from 4.52.1 to 4.53.0.
- [Commits](https://github.com/huggingface/transformers/compare/v4.52.1...v4.53.0)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.53.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-13 14:56:54 +08:00
gru-agent[bot] dfef662ba7
Add unit tests for useChatStore and createCustomStorage functions in the chat context. (#5441)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-08-13 14:56:15 +08:00
Archer ad550f4444
perf: workflow response field (#5443) 2025-08-13 14:29:13 +08:00
Archer 83aa3a855f
redirect (#5440)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-12 23:08:00 +08:00
Archer 3cbcb1e3b6
Fix doc (#5439)
* doc

* doc

* remove workflow
2025-08-12 22:45:19 +08:00
Archer c51395b2c8
V4.12.0 features (#5435)
* add logs chart (#5352)

* charts

* chart data

* log chart

* delete

* rename api

* fix

* move api

* fix

* fix

* pro config

* fix

* feat: Repository interaction (#5356)

* feat: 1好像功能没问题了,明天再测

* feat: 2 解决了昨天遗留的bug,但全选按钮又bug了

* feat: 3 第三版,解决了全选功能bug

* feat: 4 第四版,下面改小细节

* feat: 5 我勒个痘

* feat: 6

* feat: 6 pr

* feat: 7

* feat: 8

* feat: 9

* feat: 10

* feat: 11

* feat: 12

* perf: checkbox ui

* refactor: tweak login loyout (#5357)

Co-authored-by: Archer <545436317@qq.com>

* login ui

* app chat log chart pro display (#5392)

* app chat log chart pro display

* add canopen props

* perf: pro tag tip

* perf: pro tag tip

* feat: openrouter provider (#5406)

* perf: login ui

* feat: openrouter provider

* provider

* perf: custom error throw

* perf: emb batch (#5407)

* perf: emb batch

* perf: vector retry

* doc

* doc (#5411)

* doc

* fix: team folder will add to workflow

* fix: generateToc shell

* Tool price (#5376)

* resolve conflicts for cherry-pick

* fix i18n

* Enhance system plugin template data structure and update ToolSelectModal to include CostTooltip component

* refactor: update systemKeyCost type to support array of objects in plugin and workflow types

* refactor: simplify systemKeyCost type across plugin and workflow types to a single number

* refactor: streamline systemKeyCost handling in plugin and workflow components

* fix

* fix

* perf: toolset price config;fix: workflow array selector ui (#5419)

* fix: workflow array selector ui

* update default model tip

* perf: toolset price config

* doc

* fix: test

* Refactor/chat (#5418)

* refactor: add homepage configuration; add home chat page; add side bar animated collapse and layout

* fix: fix lint rules

* chore: improve logics and code

* chore: more clearer logics

* chore: adjust api

---------

Co-authored-by: Archer <545436317@qq.com>

* perf: chat setting code

* del history

* logo image

* perf: home chat ui

* feat: enhance chat response handling with external links and user info (#5427)

* feat: enhance chat response handling with external links and user info

* fix

* cite code

* perf: toolset add in workflow

* fix: test

* fix: search paraentId

* Fix/chat (#5434)

* wip: rebase了upstream

* wip: adapt mobile UI

* fix: fix chat page logic and UI

* fix: fix UI and improve some logics

* fix: model selector missing logo; vision model to retrieve file

* perf: role selector

* fix: chat ui

* optimize export app chat log (#5436)

* doc

* chore: move components to proper directory; fix the api to get app list (#5437)

* chore: improve team app panel display form (#5438)

* feat: add home chat log tab

* chore: improve team app panel display form

* chore: improve log panel

* fix: spec

* doc

* fix: log permission

* fix: dataset schema required

* add loading status

* remove ui weight

* manage log

* fix: log detail per

* doc

* fix: log menu

* rename permission

* bg color

* fix: app log per

* fix: log key selector

* fix: log

* doc

---------

Co-authored-by: heheer <zhiyu44@qq.com>
Co-authored-by: colnii <1286949794@qq.com>
Co-authored-by: 伍闲犬 <76519998+xqvvu@users.noreply.github.com>
Co-authored-by: Ctrlz <143257420+ctrlz526@users.noreply.github.com>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
Co-authored-by: heheer <heheer@sealos.io>
2025-08-12 22:22:18 +08:00
Finley Ge c6e58291f7
fix: permission can not edit admin permission (#5433)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-11 21:46:27 +08:00
gru-agent[bot] 5019c6ec8b
Add unit tests for MCP utility functions in utils.test.ts (#5423)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-08-11 11:08:08 +08:00
Finley Ge 57e1ef1176
refactor: permission role & app read chat log permission (#5416)
* refactor: permission role

* refactor: permission type

* fix: permission manage

* fix: group owner cannot be deleted

* chore: common per map

* chore: openapi

* chore: rename

* fix: type error

* chore: app chat log permission

* chore: add initv4112
2025-08-11 10:51:44 +08:00
Archer 29edf1ea5f
Perf: llm parse paragraph (#5420)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* feat: llm directory optimization (#5400)

* perf: llm parse

* doc

---------

Co-authored-by: colnii <1286949794@qq.com>
2025-08-09 18:38:58 +08:00
Archer 1fc1e3fa80
fix: max tokens config (#5409)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-08-08 10:38:57 +08:00
Archer 0526411c05
doc (#5401)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-08-07 22:49:09 +08:00
Finley Ge 17599d95bb
fix: old mcp tool compatible (#5399)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-07 11:37:26 +08:00
dependabot[bot] 318d21ec25
chore(deps): bump transformers in /plugins/model/llm-Baichuan2 (#5397)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.52.1 to 4.53.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.52.1...v4.53.0)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.53.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-07 10:07:11 +08:00
Archer e5c91b7fae
fix: doc path (#5393)
Some checks failed
Document deploy / sync-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-08-05 23:20:39 +08:00
Deepturn 254680bfdf
Update dataset.mdx (#5391)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Update api:dataset/create
2025-08-05 12:30:17 +08:00
Archer 37648d5c71
fix: mcp not response output (#5388)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-05 10:51:42 +08:00
Archer f870a2de52
更新 4112.mdx (#5387)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-05 00:15:26 +08:00
Archer 6a0b0b1991
update doc search engine (#5386)
* update doc search engine

* custom tokenizer

* tokenizer
2025-08-04 22:07:52 +08:00
Archer 545d8150f2
fix docker file (#5385) 2025-08-04 20:20:42 +08:00
Archer 16a74c909d
fix: doc preview action;update doc (#5383)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: doc preview action

* update doc

* dpc
2025-08-04 18:10:58 +08:00
Oven 61899d9baf
fix: build mcp image proxy (#5379) 2025-08-04 18:05:37 +08:00
heheer 05bbba2761
fix dataset list item tag margin (#5380) 2025-08-04 18:05:06 +08:00
Deepturn 67cdc8faa8
Update dataset.mdx (#5381)
* Update dataset.mdx

* Update dataset.mdx

通用功能

---------

Co-authored-by: Archer <545436317@qq.com>
2025-08-04 18:04:39 +08:00
dreamer6680 517b0af022
feat: move robots.txt to toc.mdx (#5372)
* feat: move robots.txt to toc.mdx

* fix: add en toc
2025-08-04 13:42:36 +08:00
Archer 7bcee82f5f
perf: memory leak (#5370)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* perf: memory leak

* perf: workflow share buffer;Circle checker;Get file from stream

* doc

* remove report.md
2025-08-03 22:37:45 +08:00
Archer baf18b14d4
Fix: action (#5369)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* doc

* remove invalid doc

* fix: cdn
2025-08-02 20:00:20 +08:00
Archer 109bdbe9db
4.11.2 dev (#5368)
* 4.11.2 dev (#103)

* update document

* update doc

* update doc

* doc img

* action

* fix action

* fix: action

* fix: action

* perf: action

* doc

* perf: action
2025-08-02 19:38:37 +08:00
Oven 1014f349de
fix: missing build mcp image args (#5366) 2025-08-02 15:14:57 +08:00
Archer fb8587503c
fix: simple mode toolset not refresh tool config (#5365)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-08-02 00:12:46 +08:00
Archer 845f4d41c2
fix: tool not clone (#5364)
* fix: tool not clone

* perf: check invalid db tool
2025-08-01 23:44:18 +08:00
Archer 6ac03dbf82
fix: plugin not get system input config (#5363)
* doc

* fix: action

* fix: plugin not get system input config

* perf: rewrite toolset
2025-08-01 22:40:48 +08:00
Archer 00f00f6161
Update doc (#5358)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* doc

* fix: action

* doc

* doc
2025-08-01 16:41:51 +08:00
Archer e25d7efb5b
feature: V4.11.1 (#5350)
* perf: system toolset & mcp (#5200)

* feat: support system toolset

* fix: type

* fix: system tool config

* chore: mcptool config migrate

* refactor: mcp toolset

* fix: fe type error

* fix: type error

* fix: show version

* chore: support extract tool's secretInputConfig out of inputs

* chore: compatible with old version mcp

* chore: adjust

* deps: update dependency @fastgpt-skd/plugin

* fix: version

* fix: some bug (#5316)

* chore: compatible with old version mcp

* fix: version

* fix: compatible bug

* fix: mcp object params

* fix: type error

* chore: update test cases

* chore: remove log

* fix: toolset node name

* optimize app logs sort (#5310)

* log keys config modal

* multiple select

* api

* fontsize

* code

* chatid

* fix build

* fix

* fix component

* change name

* log keys config

* fix

* delete unused

* fix

* perf: log code

* perf: send auth code modal enter press

* fix log (#5328)

* perf: mcp toolset comment

* perf: log ui

* remove log (#5347)

* doc

* fix: action

* remove log

* fix: Table Optimization (#5319)

* feat: table test: 1

* feat: table test: 2

* feat: table test: 3

* feat: table test: 4

* feat: table test : 5 把maxSize改回chunkSize

* feat: table test : 6 都删了,只看maxSize

* feat: table test : 7 恢复初始,接下来删除标签功能

* feat: table test : 8 删除标签功能

* feat: table test : 9 删除标签功能成功

* feat: table test : 10 继续调试,修改trainingStates

* feat: table test : 11 修改第一步

* feat: table test : 12 修改第二步

* feat: table test : 13 修改了HtmlTable2Md

* feat: table test : 14 修改表头分块规则

* feat: table test : 15 前面表格分的太细了

* feat: table test : 16 改着改着表头又不加了

* feat: table test : 17 用CUSTOM_SPLIT_SIGN不行,重新改

* feat: table test : 18 表头仍然还会多加,但现在分块搞的合理了终于

* feat: table test : 19 还是需要搞好表头问题,先保存一下调试情况

* feat: table test : 20 调试结束,看一下replace有没有问题,没问题就pr

* feat: table test : 21 先把注释删了

* feat: table test : 21 注释replace都改了,下面切main分支看看情况

* feat: table test : 22 修改旧文件

* feat: table test : 23 修改测试文件

* feat: table test : 24 xlsx表格处理

* feat: table test : 25 刚才没保存先com了

* feat: table test : 26 fix

* feat: table test : 27 先com一版调试

* feat: table test : 28 试试放format2csv里

* feat: table test : 29 xlsx解决

* feat: table test : 30 tablesplit解决

* feat: table test : 31

* feat: table test : 32

* perf: table split

* perf: mcp old version compatibility (#5342)

* fix: system-tool secret inputs

* fix: rewrite runtime node i18n for system tool

* perf: mcp old version compatibility

* fix: splitPluginId

* fix: old mcp toolId

* fix: filter secret key

* feat: support system toolset activation

* chore: remove log

* perf: mcp update

* perf: rewrite toolset

* fix:delete variable id (#5335)

* perf: variable update

* fix: multiple select ui

* perf: model config move to plugin

* fix: var conflit

* perf: variable checker

* Avoid empty number

* update doc time

* fix: test

* fix: mcp object

* update count app

* update count app

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: heheer <zhiyu44@qq.com>
Co-authored-by: colnii <1286949794@qq.com>
Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-08-01 16:08:20 +08:00
Finley Ge e0c21a949c
docs: update plugin guide (#5345)
Some checks failed
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
* docs: update plugin guide

* update: docker compose

* chore: update bussiness contact info
2025-07-30 22:30:03 +08:00
dreamer6680 6c37776de1
fix: resole crawl cannot get docs (#5344) 2025-07-30 15:38:30 +08:00
dreamer6680 061547a983
feat: add robots.txt (#5339)
Some checks are pending
Document deploy / generate-timestamp (push) Waiting to run
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
2025-07-30 09:58:23 +08:00
伍闲犬 a45d93338f
fix: fix the login container; fix the incorrect input of captcha enter trigger (#5327)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-07-29 20:34:50 +08:00
W.H 6ed9198c60
fix: page /404 translator not working bug (#5320)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-28 13:55:10 +08:00
Archer 8460ee50b2
Update 4100.mdx (#5325)
Some checks failed
Document deploy / generate-timestamp (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
2025-07-27 12:42:13 +08:00
dreamer6680 47ef1a581f
feat:get lastmodified time by git log (#5314)
Some checks failed
Document deploy / generate-timestamp (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Has been cancelled
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Has been cancelled
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* feat:get lastmodified time by git log

* fix:add sentence to run github.js for lastmodified time in pre-commit
2025-07-25 16:43:37 +08:00
heheer 45010cf5aa
add tool params return (#5312)
* add tool params return

* fix
2025-07-25 13:29:01 +08:00
dreamer6680 4bc6814cb3
fix:useeffect cannot returm jsx (#5311)
Some checks are pending
Document deploy / generate-timestamp (push) Waiting to run
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-24 18:57:12 +08:00
dreamer6680 51268f1187
fix:add not-found path map (#5309) 2025-07-24 17:35:14 +08:00
Archer c390eb186c
Fix document action and content (#5308)
* fix: action

* remove cache

* update action

* doc (#102)

* doc (#101)

* do

* add redirect

* doc

* fix: action

* action

* doc

* fix: action

* fix: action

* action
2025-07-24 14:23:04 +08:00
heheer 68136febec
doc: evaluation (#5276)
* doc: evaluation

* new doc
2025-07-24 13:10:25 +08:00
dreamer6680 fa60f546d4
fix:change docs url (#5307) 2025-07-24 13:00:27 +08:00
Archer 8e61029505
fix: doc (#5306)
Some checks are pending
Document deploy / generate-timestamp (push) Waiting to run
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-24 10:51:37 +08:00
Archer 4838a2c9fd
remove old doc (#5305)
* auto update index

* update index

* remove old doc
2025-07-24 10:39:41 +08:00
dependabot[bot] 455cee65b4
chore(deps): bump starlette in /plugins/model/llm-ChatGLM2 (#5300)
Bumps [starlette](https://github.com/encode/starlette) from 0.27.0 to 0.47.2.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.27.0...0.47.2)

---
updated-dependencies:
- dependency-name: starlette
  dependency-version: 0.47.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-24 10:19:25 +08:00
dependabot[bot] 2b99be1eb9
chore(deps): bump form-data in /plugins/webcrawler/SPIDER (#5301)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.2 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-24 10:19:08 +08:00
Archer 393b7abe7d
Document action (#5304)
Some checks are pending
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Waiting to run
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Waiting to run
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: context

* fix: context

* action

* update scripts

* update action

* fix: kubeconfig

* update preview

* docker file

* perf: action per

* update doc deploy yml

* doc (#99)

* doc

* doc

* rename

* doc

* fix: action on

* doc (#100)
2025-07-23 23:27:37 +08:00
dreamer6680 55ad9085df
feat:add 4111.mdx and remove unuse doc (#5303) 2025-07-23 22:58:36 +08:00
Archer e9db592a49
Doc action test (#5302)
* doc

* fix: action

* fix: action
2025-07-23 21:39:34 +08:00
Archer fe7abf22a9
New document (#5299)
* add new doc (#5175)

Co-authored-by: dreamer6680 <146868355@qq.com>

* Test docs (#5235)

* fix: change the page of doc

* chore: add new dependencies, update global styles/layout, optimize docs, add Feishu & GitHub icons, update API examples

* fix: docs/index 404 not found

* Update environment variable names, optimize styles, add new API routes, fix component styles, adjust documentation, and update GitHub and Feishu icons

* update readme

* feat: add a linkfastgpt compontent

* feat: update new doc

* fix:remove unuse page and redirect homepage to docs (#5288)

* fix:remove some unuse doc

* fix: redirect homepage to doc

* git ignore

* fix:navbar to index (#5295)

* sidbar

* fix: navtab unlight (#5298)

* doc

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-07-23 21:35:03 +08:00
Archer ce9ec1bf57
fix: i18n (#5297) 2025-07-23 20:48:13 +08:00
Archer 5131ab21cf
extra point (#5296)
* fix: ts

* extra point

* doc
2025-07-23 19:01:16 +08:00
酒川户 662c790fe4
feat: enhance wallet billing features (#5293)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
* feat: enhance wallet billing features with new dataset and points options

* chore: removed local state for dataset month and replaced it with form state management

* chore: remove redundant state
2025-07-23 18:22:28 +08:00
Archer e008b21954
feat: deleted user (#5289)
* add desc to coupon

* deleted user
2025-07-23 17:00:23 +08:00
Archer 0fa083894a
feat: coupoun support bank pay way (#5285) 2025-07-23 12:01:26 +08:00
Archer bebe213891
perf: read file internal (#5282)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-22 17:28:55 +08:00
Zhuangzai fa 5c95fa2b9a
Refactor login initialization logic to remove unused configuration check for bd_vid and simplify OAuth visibility condition. (#5283) 2025-07-22 17:21:12 +08:00
dependabot[bot] 8e94fdb988
chore(deps): bump form-data from 4.0.2 to 4.0.4 (#5279)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.2 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-22 17:02:05 +08:00
Zhuangzai fa a3007417e8
Fix API method for retrieving WX login result from GET to POST (#5281) 2025-07-22 16:31:25 +08:00
Archer 366bccb833
update secret (#5278) 2025-07-22 13:08:00 +08:00
Archer a2f83567d7
action (#5277) 2025-07-22 12:58:06 +08:00
Archer 208d8cfdf1
version doc (#5275) 2025-07-22 11:26:06 +08:00
Deepturn f0bfe2cc86
Update 4100.md (#5273) 2025-07-22 10:02:59 +08:00
Archer da34e857d2
update version doc (#5272) 2025-07-22 10:02:35 +08:00
Archer d0730e665d
doc (#5271)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-22 09:45:31 +08:00
Archer 13b7e0a192
V4.11.0 features (#5270)
* feat: workflow catch error (#5220)

* feat: error catch

* feat: workflow catch error

* perf: add catch error to node

* feat: system tool error catch

* catch error

* fix: ts

* update doc

* perf: training queue code (#5232)

* doc

* perf: training queue code

* Feat: 优化错误提示与重试逻辑 (#5192)

* feat: 批量重试异常数据 & 报错信息国际化

  - 新增“全部重试”按钮,支持批量重试所有训练异常数据
  - 报错信息支持国际化,常见错误自动映射为 i18n key
  - 相关文档和 i18n 资源已同步更新

* feat: enhance error message and retry mechanism

* feat: enhance error message and retry mechanism

* feat: add retry_failed i18n key

* feat: enhance error message and retry mechanism

* feat: enhance error message and retry mechanism

* feat: enhance error message and retry mechanism : 5

* feat: enhance error message and retry mechanism : 6

* feat: enhance error message and retry mechanism : 7

* feat: enhance error message and retry mechanism : 8

* perf: catch chat error

* perf: copy hook (#5246)

* perf: copy hook

* doc

* doc

* add app evaluation (#5083)

* add app evaluation

* fix

* usage

* variables

* editing condition

* var ui

* isplus filter

* migrate code

* remove utils

* name

* update type

* build

* fix

* fix

* fix

* delete comment

* fix

* perf: eval code

* eval code

* eval code

* feat: ttfb time in model log

* Refactor chat page (#5253)

* feat: update side bar layout; add login and logout logic at chat page

* refactor: encapsulate login logic and reuse it in `LoginModal` and `Login` page

* chore: improve some logics and comments

* chore: improve some logics

* chore: remove redundant side effect; add translations

---------

Co-authored-by: Archer <545436317@qq.com>

* perf: chat page code

* doc

* perf: provider redirect

* chore: ui improvement (#5266)

* Fix: SSE

* Fix: SSE

* eval pagination (#5264)

* eval scroll pagination

* change eval list to manual pagination

* number

* fix build

* fix

* version doc (#5267)

* version doc

* version doc

* doc

* feat: eval model select

* config eval model

* perf: eval detail modal ui

* doc

* doc

* fix: chat store reload

* doc

---------

Co-authored-by: colnii <1286949794@qq.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: 酒川户 <76519998+chuanhu9@users.noreply.github.com>
2025-07-22 09:42:50 +08:00
Finley Ge de208d6c3f
fix: error (#5269)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-21 22:19:34 +08:00
dependabot[bot] 59e2b2f0bf
chore(deps): bump multer from 2.0.1 to 2.0.2 (#5249)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Bumps [multer](https://github.com/expressjs/multer) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 13:30:49 +08:00
gru-agent[bot] cfefe69a96
Add unit tests for request utility functions in the API module. (#5254)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-07-21 13:30:10 +08:00
Archer ab69b317a0
update doc (#5261) 2025-07-19 13:02:35 +08:00
Archer 5f26aa7399
update doc (#5259)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
2025-07-19 01:21:27 +08:00
Archer ef7047584a
doc (#5256)
Some checks failed
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-07-18 17:09:37 +08:00
Archer 593c816c1a
perf: value type checker (#5255)
* perf: value type checker

* fix: ts
2025-07-18 16:39:42 +08:00
heheer 6f75c1b80e
fix node variable update render (#5251)
* fix node variable update render

* editor value formatted

* fix
2025-07-18 15:48:26 +08:00
Archer 530f30e3e8
Var render (#5248)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* add resize to json editor

* fix: ts
2025-07-18 00:30:24 +08:00
Archer 0d0bf06307
fix: variablesinit (#5247) 2025-07-18 00:25:12 +08:00
Archer 9860a7a978
fix default model select (#5243)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-17 18:15:04 +08:00
Finley Ge 06e708756e
docs: update design plugin doc (#5241) 2025-07-17 18:05:17 +08:00
Zhuangzai fa 986daadfba
add 'search' field ; update setFastGPTSem to validate input before storing. (#5230)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* Enhance WeChat login functionality

* Add inviterId

* add 'search' field ; update setFastGPTSem to validate input before storing.

* improve setFastGPTSem validation logic
2025-07-17 13:48:41 +08:00
Shiver 983137b6c5
doc: Add recommended configuration for Oceanbase deployment (#5225)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-16 17:30:14 +08:00
Finley Ge 44a474d49f
feat: support signoz (#5218)
* feat: support signoz

* chore: restructure otel
2025-07-16 15:20:17 +08:00
Archer b50c4373b3
Update doc (#5223)
* doc

* update version type
2025-07-16 15:02:21 +08:00
heheer 4816d2346b
compatible with old enums\ (#5221) 2025-07-16 14:36:27 +08:00
Archer 4275de96fd
Revert "compatible with old enums (#5219)" (#5222)
This reverts commit f000fbb19d.
2025-07-16 14:35:18 +08:00
gru-agent[bot] d102adca59
Add unit tests for user API functions in api.test.ts (#5214)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-07-16 14:29:12 +08:00
heheer f000fbb19d
compatible with old enums (#5219)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* compatible with old enums\

* add id
2025-07-16 13:09:16 +08:00
Zhuangzai fa 4e2ab1f63b
Enhance WeChat login functionality (#5213)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* Enhance WeChat login functionality

* Add inviterId
2025-07-15 17:29:36 +08:00
dingzhenznen 0c0e54cb05
fix:collection search (#5217) 2025-07-15 17:29:04 +08:00
Archer a506f6615a
update version doc (#5210)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
2025-07-15 09:33:56 +08:00
Archer 885a419178
fix: ns (#5211)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-14 19:38:31 +08:00
dreamer6680 f648011ff0
fix: apidataset don`t support pdfEnhance (#5209)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-07-14 10:48:34 +08:00
Archer 8ff0e8bd34
update project domain (#5208) 2025-07-14 10:13:21 +08:00
Archer 1ba52d876c
Update README.md (#5207) 2025-07-14 10:03:43 +08:00
Archer dae1093139
Feat: system tool support stream response (#5206)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* Match SSE for FastGPT (#5168)

* Match SSE for FastGPT

* Modify the judgment

* Optimize logic for SSE transmission

* Refactor imports

* directly use workflowStreamResponse from props

* improve error handling and streamline onStreamData logic

* Refactor API client configuration

* perf: system tool support sse

* update doc

---------

Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>
2025-07-12 16:39:01 +08:00
Archer b591a16399
Update 4101.md (#5204) 2025-07-12 11:26:08 +08:00
Archer a266bba554
doc (#5203)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-11 17:06:33 +08:00
Archer 3a5d725efd
feature: 4.10.1 (#5201)
* add dynamic inputRender (#5127)

* dynamic input component

* fix

* fix

* fix

* perf: dynamic render input

* update doc

* perf: error catch

* num input ui

* fix form render (#5177)

* perf: i18n check

* add log

* doc

* Sync dataset  (#5181)

* perf: api dataset create (#5047)

* Sync dataset (#5120)

* add

* wait

* restructure dataset sync, update types and APIs, add sync hints, and remove legacy logic

* feat: add function to retrieve real file ID from third-party doc library and rename team permission check function for clarity

* fix come console

* refactor: rename team dataset limit check functions for clarity, update API dataset sync limit usage, and rename root directory to "ROOT_FOLDER"

* frat: update sync dataset login

* fix delete.ts

* feat: update pnpm-lock.yaml to include bullmq, fix comments in api.d.ts and type.d.ts, rename API file ID field, optimize dataset sync logic, and add website sync feature with related APIs

* feat: update CollectionCard to support site dataset sync, add API root ID constant and init sync API

* feat: add RootCollectionId constant to replace hardcoded root ID

---------

Co-authored-by: dreamer6680 <146868355@qq.com>

* perf: code

* feat: update success message for dataset sync, revise related i18n texts, and optimize file selection logic (#5166)

Co-authored-by: dreamer6680 <146868355@qq.com>

* perf: select file

* Sync dataset (#5180)

* feat: update success message for dataset sync, revise related i18n texts, and optimize file selection logic

* fix: make listfile function return rawid string

---------

Co-authored-by: dreamer6680 <146868355@qq.com>

* init sh

* fix: ts

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: dreamer6680 <146868355@qq.com>

* update doc

* i18n

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-07-11 17:02:48 +08:00
gru-agent[bot] 2865419952
Add unit tests for updateTrainingData API handler and modify dataId to be optional for retrying all error data. (#5194)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-07-10 18:28:39 +08:00
heheer 7a6a396f2a
optimize ParentPaths component (#5179)
* optimize ParentPaths component

* fix dataset list diaplay

* component
2025-07-10 18:16:03 +08:00
heheer ac493db00f
fix tag manage modal scroll (#5193) 2025-07-10 18:07:57 +08:00
Zhuangzai fa 286138a454
Bing ad (#5195)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* Bing Ad

* Add msclkid parameter to login provider and registration API
2025-07-10 17:10:19 +08:00
dependabot[bot] 9b24b35695
chore(deps): bump transformers in /plugins/model/llm-Baichuan2 (#5184)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Bumps [transformers](https://github.com/huggingface/transformers) from 4.51.0 to 4.52.1.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.51.0...v4.52.1)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.52.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-09 08:52:52 +08:00
SweenyYang 150e68f20a
Fixed the issue where anchor (`<a>`) tags in reply content could not properly open links in a new tab or window. For security reasons, it is recommended to add `rel="noopener"` when using `target="_blank"` in `<a>` tags. (#5176)
Co-authored-by: 杨欣雨 <yangxinyu@cmdi.chinamobile.com>
2025-07-09 08:51:54 +08:00
dependabot[bot] 626ffec0ee
chore(deps): bump transformers in /plugins/model/llm-ChatGLM2 (#5183)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.50.0 to 4.52.1.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.50.0...v4.52.1)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.52.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-09 08:51:03 +08:00
heheer 53bcd413b8
app detail visibility (#5178)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-08 20:34:04 +08:00
dependabot[bot] b01506352b
chore(deps): bump transformers in /plugins/model/llm-Baichuan2 (#5172)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.50.0 to 4.51.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.50.0...v4.51.0)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.51.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-08 14:06:45 +08:00
heheer f0ae5b14f3
echarts crush catch (#5156)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
2025-07-07 10:08:24 +08:00
许宇鹏 40bc05d026
fix: update community contact method and correct typos in documentation (#5160) 2025-07-07 10:07:55 +08:00
Archer a54fed421d
Update 4101.md (#5162) 2025-07-07 09:37:06 +08:00
Archer ea8b14cd32
fix: reference history format;perf: add error to chat log (#5153)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* perf: add error to chat log

* fix: reference history format
2025-07-04 12:12:54 +08:00
Archer cd1d80488c
update yml (#5152) 2025-07-04 10:15:03 +08:00
Archer 79ca54b3ee
Update README.md (#5151) 2025-07-04 09:51:30 +08:00
Archer e7782ff345
update doc (#5150)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-04 00:24:42 +08:00
Archer 8b0d09e241
fix: search type (#5149)
* fix: search type

* update preview
2025-07-04 00:13:14 +08:00
Theresa 6c00e205cd
fix: typo (#5146)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
2025-07-03 20:01:53 +08:00
Archer 0719d56bcc
update deploy doc (#5145) 2025-07-03 16:56:07 +08:00
Archer 8d8b062e6b
add max count to image import (#5144) 2025-07-03 16:48:58 +08:00
Wenhao Zhu 2078cdf040
ci: 修复镜像构建工作流 (#5074)
* ci: update fastgpt-build-image-personal

* ci: fix cache
2025-07-03 13:53:19 +08:00
Theresa 3378420e25
update yaml and yml.js (#5139)
* update: modify MINIO_HOST to accept IP or domain and comment out port exposure in docker configuration

* update: standardize MINIO_HOST format to accept IP or domain across multiple docker-compose files

* update: replace MINIO_HOST with MINIO_ENDPOINT and CUSTOM_CUSTOM_ENDPOINT in multiple docker-compose files

* update: standardize environment variable names for MinIO across multiple docker-compose files

* update: add additional MinIO environment variables for plugin service configuration in docker documentation

* update: standardize table formatting and improve MinIO configuration descriptions in docker documentation

* update: 修改 fastgpt-plugin 镜像版本为 v0.1.0

* update: 修改 fastgpt-plugin 中 MINIO_CUSTOM_ENDPOINT 的说明,添加协议前缀
2025-07-03 13:18:54 +08:00
Finley Ge 07768d1d23
docs: update plugin design doc (#5135)
* docs(plugin): add design document for plugin

* chore: move design plugin to development

* fix: remove trailing back quote

* fix: docs preview workflow

* chore: remove mermaid to fix build
2025-07-03 12:08:03 +08:00
Theresa 94b0188cfd
update: modify MINIO_HOST to accept IP or domain and comment out port… (#5136)
* update: modify MINIO_HOST to accept IP or domain and comment out port exposure in docker configuration

* update: standardize MINIO_HOST format to accept IP or domain across multiple docker-compose files
2025-07-03 09:29:19 +08:00
Archer 7add717876
fix: yml (#5134)
Some checks failed
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Sync images / sync (push) Has been cancelled
2025-07-02 18:56:12 +08:00
Archer ad45ed05a6
update version (#5133) 2025-07-02 18:51:27 +08:00
Archer 1c2bc71137
update doc (#5132)
* update doc

* update doc

* update doc
2025-07-02 18:37:41 +08:00
Archer 33d40fd077
feature: System plugin (#5131)
* feat: system Tool (#4959)

* feat: independent system tool

* chore: use ToolNode instead of PluginModule

* chore: tools

* chore: tools templateDir

* refactor: templates

* feat: flush code

* chore: update template

* refactor: migrate delay

* feat: worker pool

* chore: Dockerfile

* docs:  add tools.template.json

* feat: auto flush system tools

* fix: ts error

* chore: create new pool temporarily

* chore: system tool migration

* chore: migration

* fix: fix pnpm-workspace.yaml

* chore: update pnpm-lock.yaml to integrate tool

* chore(systemTool): chore

* chore: add system plugin

* chore(deps): update @fastgpt-sdk/plugin

* fix: type error

* chore: remove plugin package

* chore: move pro plugins code to open source

* feat: support system tool config input

* fix: type error

* perf: i18n

* fix: cr

* chore: update sdk

* feat: system plugin cache

* update mcp server (#5076)

* update mcp server

* fix: action

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* feat: system Tool (#4959)

* feat: independent system tool

* chore: use ToolNode instead of PluginModule

* chore: tools

* chore: tools templateDir

* refactor: templates

* feat: flush code

* chore: update template

* refactor: migrate delay

* feat: worker pool

* chore: Dockerfile

* docs:  add tools.template.json

* feat: auto flush system tools

* fix: ts error

* chore: create new pool temporarily

* chore: system tool migration

* chore: migration

* fix: fix pnpm-workspace.yaml

* chore: update pnpm-lock.yaml to integrate tool

* chore(systemTool): chore

* chore: add system plugin

* chore(deps): update @fastgpt-sdk/plugin

* fix: type error

* chore: remove plugin package

* chore: move pro plugins code to open source

* feat: support system tool config input

* fix: type error

* perf: i18n

* fix: cr

* chore: update sdk

* feat: system plugin cache

* perf: run tool

* update package

* perf: config key

* fix: tool ini

* tool config params

* perf: workflow type

* rename tools to  agent

* version list

* perf: tool error

* config secret ux

* perf: config secret ux

* fix: tool config field

* add course to secret input

* feat: support inputConfig switch (#5099)

* feat: support inputConfig switch

* deps: update @fastgpt-sdk/plugin

* chore: update workflows

* fix: inputType

* fix: secret

* add default value to node

* update i18n

* eslint

* add precision to number input

* feat: add number input and select

* perf: number ux

* fix: code

* Proxies image requests to plugin service (#5111)

* Proxies image requests to plugin service

Adds a rewrite rule and API endpoint to proxy image requests
to the plugin service. This allows the app to fetch images from
the plugin's tools directory.

It also adds the plugin base URL to the service's constants, so that
it can use the plugin URL when proxying requests.

* fix: update FastGPTPluginUrl to remove unnecessary API path

* feat: update image proxy destination and add plugin image handler

* Adapt plugin id

* replace avatar

* remove rewrite

* fix: plugin avatar

* update system tool doc

* feat: system tool type

* yml sh

* yml sh

* update doc

* fix: simple app tool select

* fix: switch ui

* update pacakge

* Yamljs (#5129)

* update docker-compose configuration: bump fastgpt and fastgpt-plugin images, change minio host to service name, and adjust service dependencies

* refactor: comment out port exposure in docker-compose configuration

* update: uncomment port exposure in docker-compose configuration

* update: change MINIO_HOST to use specific IP address in docker configuration

* update: modify fastgpt-plugin image version in docker configuration

* update readme

* doc

* remove

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>
2025-07-02 18:15:00 +08:00
heheer 0ead423960
add send question condition check (#5130)
* add send question condition check

* fix
2025-07-02 17:35:30 +08:00
heheer 2bd534505d
mcp call tools timeout (#5123)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
2025-07-01 19:42:24 +08:00
heheer 58160409a9
fix collection tags create (#5117)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
2025-06-30 13:15:45 +08:00
Archer 1eb98ef0fe
fix: local file relatedImageId error (#5118) 2025-06-30 12:05:24 +08:00
Archer a70d2aa9f3
fix: input modal (#5108)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
* fix: input modal

* fix: input modal

* fix: chat logs count
2025-06-28 17:09:59 +08:00
Archer 8e18562c91
update version doc (#5106)
* update version doc

* fix: provider

* version doc

* perf: provider
2025-06-28 10:06:17 +08:00
Archer aafc0cef45
Update doc (#5093)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* doc

* doc
2025-06-27 16:02:52 +08:00
heheer b6a258d494
fix vulnerability (#5098)
* safe

* add get cookie

* fix

* fix

* fix
2025-06-27 14:35:38 +08:00
dreamer6680 1cc86f9eb7
fix loginout don`t delete session (#5088)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-06-26 13:00:31 +08:00
Theresa 25c00cdef6
Mcp db fix (#5096)
* fix: correct input schema property name in getTools method

* fix: refactor schema definitions for AppSchema and AppVersionSchema
2025-06-26 12:59:34 +08:00
Theresa 626055836f
fix: correct input schema property name in getTools method (#5095) 2025-06-26 12:20:30 +08:00
dependabot[bot] b3562e9d0f
chore(deps): bump pbkdf2 in /plugins/webcrawler/SPIDER (#5084)
Bumps [pbkdf2](https://github.com/crypto-browserify/pbkdf2) from 3.1.2 to 3.1.3.
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/pbkdf2/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-26 10:16:06 +08:00
heheer e1819f48ee
fix bugs (#5087)
* fix metadata and forbid filter

* team plan init

* sync collection tags

* fix json import

* fix code

* fix
2025-06-26 10:15:51 +08:00
Theresa f31752ccd0
fix: update input schema structure in getTools method (#5089)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* fix: update input schema structure in getTools method

* Update mcp.ts

* Update mcp.ts

---------

Co-authored-by: Archer <545436317@qq.com>
2025-06-25 19:45:13 +08:00
Oven 5153ffad59
fix:sandbox misspelling (#5073)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
2025-06-22 14:40:35 +08:00
Archer 02dfbda1f8
update mcp server (#5076)
* update mcp server

* fix: action

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile
2025-06-22 14:36:56 +08:00
Archer 3ed3f2ad01
perf: image index (#5071)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
* doc

* perf: img cite prompt

* perf: image index

* perf: add api key to retrain api
2025-06-20 13:25:32 +08:00
Deepturn be72dda47e
Update sso.md (#5053)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
修改文档示例环境变量
2025-06-20 11:39:30 +08:00
Archer d44befeff0
Feat: admin audit (#5068)
Some checks failed
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
* add admin audit (#5041)

* Test audit (#5058)

* feat: operation index

* fix: delete update vector

* perf: Clear invalid data

* perf: index

* perf: cleare invalid data

* index

* perf: audit event

* fix: schema enum

* add audit.svg (#5060)

Co-authored-by: dreamer6680 <146868355@qq.com>

* update package

* perf: audit

* perf: code move

* eslint

* doc

---------

Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-06-19 10:35:21 +08:00
Archer 36fafd2149
feat: dataset index prefix (#5061)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
2025-06-18 17:26:53 +08:00
Archer 6b2ea696c5
feat: operation index (#5056)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* feat: operation index

* fix: delete update vector

* perf: Clear invalid data

* perf: index

* perf: cleare invalid data

* index
2025-06-18 00:46:31 +08:00
dependabot[bot] 6060543222
chore(deps): bump protobuf in /plugins/model/tts-cosevoice (#5046)
Bumps [protobuf](https://github.com/protocolbuffers/protobuf) from 4.25 to 4.25.8.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v4.25.0...v4.25.8)

---
updated-dependencies:
- dependency-name: protobuf
  dependency-version: 4.25.8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 20:46:57 +08:00
Agent Fitz ;-) 7487e173b9
Change the default MongoDB image source to Docker Hub. (#5050) 2025-06-17 20:46:27 +08:00
Archer 41f73e6f7b
Feat: Plan cache (#5052)
* add cache for team member,app,dataset (#5007)

* add cache for team member,app,dataset

* update for hook

* update redis

* update

* perf: cache code

* fix: i18n

---------

Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-06-17 18:14:38 +08:00
Archer af3221fa47
Fix some bug (#5048)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* fix: chat log time range

* fix: repeat system prompt

* perf: nanoid random

* fix: get files from histories

* fix: ts

* ts config

* perf: search dataset collection
2025-06-17 16:10:01 +08:00
Archer 7981b61ca9
perf: yuque dataset (#5040)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* perf: yuque dataset

* doc
2025-06-16 18:01:59 +08:00
Archer 450d0a54fe
perf: dashboard (#5038)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* perf: dashboard

* fix: path
2025-06-16 16:09:14 +08:00
Archer 9d6a48a62f
perf: mcp save raw schema (#5030)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
* perf: mcp save raw schema

* fix: test

* code

* perf: json schema test

* perf: mcp
2025-06-13 18:46:55 +08:00
Archer 0914eacb5e
Feat: IfElse node support variable reference (#5025)
* if else node support reference (#5016)

* if else node support reference

* optimize input render

* ui

* fix

---------

Co-authored-by: Archer <545436317@qq.com>

* fix: chat

* perf: download invoice

* optimize ifelse node ui (#5024)

* perf: ifelse node

* optimize type (#5027)

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-06-13 17:15:24 +08:00
heheer 8acb16f9f2
fix mcp tools save (#5028) 2025-06-13 17:04:42 +08:00
Archer 095b75ee27
V4.9.12 feature (#5022)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* New chatinput (#4995)

* feat: Change border style

* refactor: Improve layout and styling of ChatInput component

* style: Update ChatInput component styling and mobile layout

* fix: update key detection for Enter key in ChatInput component

* feat: 添加 WelcomePage 组件,支持变量输入和欢迎信息展示

* style: Updated the PC voice input interface of the VoiceInput component and optimized the layout and style

* style: Optimize the layout and style of the WelcomePage component, and adjust the responsive design

* feat: Dynamically load the WelcomePage component and optimize the welcome information display logic

* refactor: Adjust the style and behavior of the ChatInput component and delete the WelcomePage component

* style: Modify the minimum height setting of the ChatInput component to simplify responsive design

* style: Optimize the layout and style of PC voice input components, and enhance the processing and drawing logic of waveform data

* style: Adjust ChatInput component's margin and textarea height logic for improved layout and responsiveness; refine PCVoiceInput component's positioning and display elements

* style: Enhance PCVoiceInput component's time display styling with custom font properties

* feat: Change border style

* refactor: Improve layout and styling of ChatInput component

* style: Update ChatInput component styling and mobile layout

* fix: update key detection for Enter key in ChatInput component

* feat: 添加 WelcomePage 组件,支持变量输入和欢迎信息展示

* style: Updated the PC voice input interface of the VoiceInput component and optimized the layout and style

* style: Optimize the layout and style of the WelcomePage component, and adjust the responsive design

* feat: Dynamically load the WelcomePage component and optimize the welcome information display logic

* refactor: Adjust the style and behavior of the ChatInput component and delete the WelcomePage component

* style: Modify the minimum height setting of the ChatInput component to simplify responsive design

* style: Optimize the layout and style of PC voice input components, and enhance the processing and drawing logic of waveform data

* style: Adjust ChatInput component's margin and textarea height logic for improved layout and responsiveness; refine PCVoiceInput component's positioning and display elements

* style: Enhance PCVoiceInput component's time display styling with custom font properties

* style: Add new 'xxl' size to theme spacing for improved layout options

* style: Update close icon fill color to use currentColor for better theming support

* style: Enhance voice input functionality and UI responsiveness; improve waveform sensitivity and amplitude

* style: Conditionally render file preview based on voice input state

* style: 优化移动端音频波形渲染,增强清晰度和敏感度

* style: Update comments to English to enhance code readability and consistency

* style: Adjust the mobile audio waveform update frequency and optimize rendering performance

* style: Optimize the file preview rendering logic in voice input mode to enhance user experience

* style: Optimize the file preview rendering logic in voice input mode to enhance user experience

* style: Adjust the chat input box placeholder color and border color to enhance visual effects

* fix: pg test

* Test secret (#5011)

* add http header auth config (#4982)

* add http header auth config

* optimize code

* add mcp tools header auth

* fix build

* fix ui

* fix

* teamid

* secret value encrypt (#5002)

* perf: secret code

* header auth ui (#5012)

* header auth ui

* fix i18n

* doc

* perf: type

* header secret ui

* reset ui

* perf: check secret invalid

---------

Co-authored-by: heheer <heheer@sealos.io>

* feat: cq and extrat AI memory (#5013)

* fix: login xss

* feat: Users can download the invoice by self (#5015)

* Users can download the invoice by themselves

* Direct file stream implementation for transmission presentation

* i18n

* Chatbox-fix (#5018)

* feat: Change border style

* refactor: Improve layout and styling of ChatInput component

* style: Update ChatInput component styling and mobile layout

* fix: update key detection for Enter key in ChatInput component

* feat: 添加 WelcomePage 组件,支持变量输入和欢迎信息展示

* style: Updated the PC voice input interface of the VoiceInput component and optimized the layout and style

* style: Optimize the layout and style of the WelcomePage component, and adjust the responsive design

* feat: Dynamically load the WelcomePage component and optimize the welcome information display logic

* refactor: Adjust the style and behavior of the ChatInput component and delete the WelcomePage component

* style: Modify the minimum height setting of the ChatInput component to simplify responsive design

* style: Optimize the layout and style of PC voice input components, and enhance the processing and drawing logic of waveform data

* style: Adjust ChatInput component's margin and textarea height logic for improved layout and responsiveness; refine PCVoiceInput component's positioning and display elements

* style: Enhance PCVoiceInput component's time display styling with custom font properties

* feat: Change border style

* refactor: Improve layout and styling of ChatInput component

* style: Update ChatInput component styling and mobile layout

* fix: update key detection for Enter key in ChatInput component

* feat: 添加 WelcomePage 组件,支持变量输入和欢迎信息展示

* style: Updated the PC voice input interface of the VoiceInput component and optimized the layout and style

* style: Optimize the layout and style of the WelcomePage component, and adjust the responsive design

* feat: Dynamically load the WelcomePage component and optimize the welcome information display logic

* refactor: Adjust the style and behavior of the ChatInput component and delete the WelcomePage component

* style: Modify the minimum height setting of the ChatInput component to simplify responsive design

* style: Optimize the layout and style of PC voice input components, and enhance the processing and drawing logic of waveform data

* style: Adjust ChatInput component's margin and textarea height logic for improved layout and responsiveness; refine PCVoiceInput component's positioning and display elements

* style: Enhance PCVoiceInput component's time display styling with custom font properties

* style: Add new 'xxl' size to theme spacing for improved layout options

* style: Update close icon fill color to use currentColor for better theming support

* style: Enhance voice input functionality and UI responsiveness; improve waveform sensitivity and amplitude

* style: Conditionally render file preview based on voice input state

* style: 优化移动端音频波形渲染,增强清晰度和敏感度

* style: Update comments to English to enhance code readability and consistency

* style: Adjust the mobile audio waveform update frequency and optimize rendering performance

* style: Optimize the file preview rendering logic in voice input mode to enhance user experience

* style: Optimize the file preview rendering logic in voice input mode to enhance user experience

* style: Adjust the chat input box placeholder color and border color to enhance visual effects

* New chatinput (#4995)

* feat: Change border style

* refactor: Improve layout and styling of ChatInput component

* style: Update ChatInput component styling and mobile layout

* fix: update key detection for Enter key in ChatInput component

* feat: 添加 WelcomePage 组件,支持变量输入和欢迎信息展示

* style: Updated the PC voice input interface of the VoiceInput component and optimized the layout and style

* style: Optimize the layout and style of the WelcomePage component, and adjust the responsive design

* feat: Dynamically load the WelcomePage component and optimize the welcome information display logic

* refactor: Adjust the style and behavior of the ChatInput component and delete the WelcomePage component

* style: Modify the minimum height setting of the ChatInput component to simplify responsive design

* style: Optimize the layout and style of PC voice input components, and enhance the processing and drawing logic of waveform data

* style: Adjust ChatInput component's margin and textarea height logic for improved layout and responsiveness; refine PCVoiceInput component's positioning and display elements

* style: Enhance PCVoiceInput component's time display styling with custom font properties

* feat: Change border style

* refactor: Improve layout and styling of ChatInput component

* style: Update ChatInput component styling and mobile layout

* fix: update key detection for Enter key in ChatInput component

* feat: 添加 WelcomePage 组件,支持变量输入和欢迎信息展示

* style: Updated the PC voice input interface of the VoiceInput component and optimized the layout and style

* style: Optimize the layout and style of the WelcomePage component, and adjust the responsive design

* feat: Dynamically load the WelcomePage component and optimize the welcome information display logic

* refactor: Adjust the style and behavior of the ChatInput component and delete the WelcomePage component

* style: Modify the minimum height setting of the ChatInput component to simplify responsive design

* style: Optimize the layout and style of PC voice input components, and enhance the processing and drawing logic of waveform data

* style: Adjust ChatInput component's margin and textarea height logic for improved layout and responsiveness; refine PCVoiceInput component's positioning and display elements

* style: Enhance PCVoiceInput component's time display styling with custom font properties

* style: Add new 'xxl' size to theme spacing for improved layout options

* style: Update close icon fill color to use currentColor for better theming support

* style: Enhance voice input functionality and UI responsiveness; improve waveform sensitivity and amplitude

* style: Conditionally render file preview based on voice input state

* style: 优化移动端音频波形渲染,增强清晰度和敏感度

* style: Update comments to English to enhance code readability and consistency

* style: Adjust the mobile audio waveform update frequency and optimize rendering performance

* style: Optimize the file preview rendering logic in voice input mode to enhance user experience

* style: Optimize the file preview rendering logic in voice input mode to enhance user experience

* style: Adjust the chat input box placeholder color and border color to enhance visual effects

* fix: pg test

* Test secret (#5011)

* add http header auth config (#4982)

* add http header auth config

* optimize code

* add mcp tools header auth

* fix build

* fix ui

* fix

* teamid

* secret value encrypt (#5002)

* perf: secret code

* header auth ui (#5012)

* header auth ui

* fix i18n

* doc

* perf: type

* header secret ui

* reset ui

* perf: check secret invalid

---------

Co-authored-by: heheer <heheer@sealos.io>

* feat: cq and extrat AI memory (#5013)

* refactor: Refactored the ChatInput component, optimized the layout of the text area and button group, and improved the user experience

* refactor: Updated ChatInput component, optimized layout and style, and enhanced user experience

* feat: update docs

---------

Co-authored-by: archer <545436317@qq.com>
Co-authored-by: heheer <heheer@sealos.io>

* input ui

* fix: chat input ux

* Return in JSON format to handle checkres (#5019)

* Users can download the invoice by themselves

* Direct file stream implementation for transmission presentation

* Return in JSON format to handle checkres

* fix: invoice

* fix: ui

* doc

* update package

* fix: ts

* fix: login checker

* fix: team plan

* perf: aiproxy ux

---------

Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>
2025-06-13 00:42:09 +08:00
Archer 30ca3e3d5c
fix: dataset image will expired (#5021)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
2025-06-12 23:21:02 +08:00
gru-agent[bot] f32e0ff8a8
Update dashboard data test to reflect correct structure and parameters. (#5010)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-06-11 18:36:34 +08:00
gru-agent[bot] cc5e46c3f4
Update dashboard data test to reflect correct response structure with summary instead of models. (#4991)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-06-11 18:23:18 +08:00
Archer 9f8b75fd7c
Ai proxy monitor (#5009)
* Time granularity and Table of a single model (#4990)

* Aiproxy ModelBoard

* Add components LineChartComponent and Make some revisions

* Time granularity and Table of a single model

* Modify the logic and sort the tables in ascending or descending order

* Use theme and present in seconds

* Add the channel name section (#5005)

* Add components LineChartComponent and Make some revisions

* Time granularity and Table of a single model

* Modify the logic and sort the tables in ascending or descending order

* Add the channel name section

* The channel_name is transmitted from the outer layer

* Restore the channel

* perf: dashboard code

* perf: ai proxy monitor

* code

---------

Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>
2025-06-11 18:21:59 +08:00
dependabot[bot] abbfc436a3
chore(deps): bump requests in /plugins/model/pdf-mistral (#4998)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.3...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 22:50:42 +08:00
W.H 250ef4d96e
fix: resizer.svg load error (#4996) 2025-06-10 22:27:09 +08:00
Archer a848c2e3ba
feat: more sub plan info;fix: emprt index (#4997)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* feat: more sub plan info

* fix: emprt index

* doc
2025-06-10 19:01:10 +08:00
dreamer6680 ccae96a981
fix iframe.js to support microphone (#4993)
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-06-10 16:30:25 +08:00
gru-agent[bot] 4054164017
Add unit tests for channel API functions and response handling in channel.ts. (#4987)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-06-10 11:01:34 +08:00
Archer f50298b8e9
perf: charts ux (#4986)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
2025-06-10 01:54:25 +08:00
Archer 101a6e9516
Feat: ai proxy monitor (#4985)
* Aiproxy ModelBoard (#4983)

* Aiproxy ModelBoard

* Add components LineChartComponent and Make some revisions

* perf: ai proxy dashboard

* doc

* remove invalid i18n

* remove invalid i18n

---------

Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>
2025-06-10 01:46:10 +08:00
Archer 01ff56b42b
perf: password special chars;feat: llm paragraph;perf: chunk setting params;perf: text splitter worker (#4984)
* perf: password special chars

* feat: llm paragraph;perf: chunk setting params

* perf: text splitter worker

* perf: get rawtext buffer

* fix: test

* fix: test

* doc

* min chunk size
2025-06-10 00:05:54 +08:00
dependabot[bot] 068918a9ee
chore(deps): bump fastify from 4.29.0 to 4.29.1 (#4973)
Bumps [fastify](https://github.com/fastify/fastify) from 4.29.0 to 4.29.1.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v4.29.0...v4.29.1)

---
updated-dependencies:
- dependency-name: fastify
  dependency-version: 4.29.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-09 15:06:57 +08:00
Archer 6873af01d4
fix: popver ui (#4980)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* doc

* fix: ui
2025-06-08 22:55:36 +08:00
Archer 9b73d3f702
fix: ui (#4979)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
2025-06-08 19:13:46 +08:00
Archer 7494ce8453
perf: async read file (#4978)
* perf: async read file

* package

* doc
2025-06-08 18:46:36 +08:00
heheer 188008255d
fix curl create plugin button (#4976) 2025-06-08 18:15:10 +08:00
dreamer6680 63abb636ae
Fix the incompatibility of drag-and-drop upload to Windows (#4974)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Sync images / sync (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
2025-06-06 15:59:35 +08:00
dependabot[bot] 6edab35bfc
chore(deps): bump torch in /plugins/model/llm-ChatGLM2 (#4971)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.6.0 to 2.7.1.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/compare/v2.6.0...v2.7.1)

---
updated-dependencies:
- dependency-name: torch
  dependency-version: 2.7.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-06 15:34:24 +08:00
dependabot[bot] 498bd115fc
chore(deps): bump multer from 2.0.0 to 2.0.1 (#4972)
Bumps [multer](https://github.com/expressjs/multer) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-06 15:34:12 +08:00
dependabot[bot] de1dcf9370
chore(deps): bump multer from 2.0.0 to 2.0.1 in /packages/service (#4964)
Bumps [multer](https://github.com/expressjs/multer) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-06 15:29:35 +08:00
Archer c30f069f2f
V4.9.11 feature (#4969)
* Feat: Images dataset collection (#4941)

* New pic (#4858)

* 更新数据集相关类型,添加图像文件ID和预览URL支持;优化数据集导入功能,新增图像数据集处理组件;修复部分国际化文本;更新文件上传逻辑以支持新功能。

* 与原先代码的差别

* 新增 V4.9.10 更新说明,支持 PG 设置`systemEnv.hnswMaxScanTuples`参数,优化 LLM stream 调用超时,修复全文检索多知识库排序问题。同时更新数据集索引,移除 datasetId 字段以简化查询。

* 更换成fileId_image逻辑,并增加训练队列匹配的逻辑

* 新增图片集合判断逻辑,优化预览URL生成流程,确保仅在数据集为图片集合时生成预览URL,并添加相关日志输出以便调试。

* Refactor Docker Compose configuration to comment out exposed ports for production environments, update image versions for pgvector, fastgpt, and mcp_server, and enhance Redis service with a health check. Additionally, standardize dataset collection labels in constants and improve internationalization strings across multiple languages.

* Enhance TrainingStates component by adding internationalization support for the imageParse training mode and update defaultCounts to include imageParse mode in trainingDetail API.

* Enhance dataset import context by adding additional steps for image dataset import process and improve internationalization strings for modal buttons in the useEditTitle hook.

* Update DatasetImportContext to conditionally render MyStep component based on data source type, improving the import process for non-image datasets.

* Refactor image dataset handling by improving internationalization strings, enhancing error messages, and streamlining the preview URL generation process.

* 图片上传到新建的 dataset_collection_images 表,逻辑跟随更改

* 修改了除了controller的其他部分问题

* 把图片数据集的逻辑整合到controller里面

* 补充i18n

* 补充i18n

* resolve评论:主要是上传逻辑的更改和组件复用

* 图片名称的图标显示

* 修改编译报错的命名问题

* 删除不需要的collectionid部分

* 多余文件的处理和改动一个删除按钮

* 除了loading和统一的imageId,其他都resolve掉的

* 处理图标报错

* 复用了MyPhotoView并采用全部替换的方式将imageFileId变成imageId

* 去除不必要文件修改

* 报错和字段修改

* 增加上传成功后删除临时文件的逻辑以及回退一些修改

* 删除path字段,将图片保存到gridfs内,并修改增删等操作的代码

* 修正编译错误

---------

Co-authored-by: archer <545436317@qq.com>

* perf: image dataset

* feat: insert image

* perf: image icon

* fix: training state

---------

Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>

* fix: ts (#4948)

* Thirddatasetmd (#4942)

* add thirddataset.md

* fix thirddataset.md

* fix

* delete wrong png

---------

Co-authored-by: dreamer6680 <146868355@qq.com>

* perf: api dataset code

* perf: log

* add secondary.tsx (#4946)

* add secondary.tsx

* fix

---------

Co-authored-by: dreamer6680 <146868355@qq.com>

* perf: multiple menu

* perf: i18n

* feat: parse queue (#4960)

* feat: parse queue

* feat: sync parse queue

* fix thirddataset.md (#4962)

* fix thirddataset-4.png (#4963)

* feat: Dataset template import (#4934)

* 模版导入部分除了文档还没写

* 修复模版导入的 build 错误

* Document production

* compress pictures

* Change some constants to variables

---------

Co-authored-by: Archer <545436317@qq.com>

* perf: template import

* doc

* llm pargraph

* bocha tool

* fix: del collection

---------

Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>
Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-06-06 14:48:44 +08:00
gggaaallleee bb810a43a1
update python sandbox for safe (#4958)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Co-authored-by: root <root@DESKTOP-778RLJS.localdomain>
2025-06-04 16:02:28 +08:00
Archer f74e8f2ba9
fix: init (#4955) 2025-06-04 10:46:03 +08:00
gggaaallleee 9fb5d05865
add audit (#4923)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* add audit

* update audit

* update audit
2025-06-03 21:28:26 +08:00
dependabot[bot] b974574157
chore(deps): bump tar-fs in /plugins/webcrawler/SPIDER (#4945)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.0.9.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 16:02:05 +08:00
gggaaallleee 5a5367d30b
add Bocha search template (#4933)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
* add bocha

* Delete packages/service/support/operationLog/util.ts
2025-05-30 21:07:49 +08:00
Archer 8ed35ffe7e
Update dataset.md (#4927)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
2025-05-29 18:25:59 +08:00
Archer 0f866fc552
feat: text collecion auto save for a txt file (#4924) 2025-05-29 17:57:27 +08:00
Archer 05c7ba4483
feat: Workflow node search (#4920)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* add node find (#4902)

* add node find

* plugin header

* fix

* fix

* remove

* type

* add searched status

* optimize

* perf: search nodes

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-05-29 14:29:28 +08:00
heheer fa80ce3a77
fix child app external variables (#4919) 2025-05-29 13:37:59 +08:00
Archer 830358aa72
remove invalid code (#4915)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
2025-05-28 22:11:40 +08:00
Archer 02b214b3ec
feat: remove buffer;fix: custom pdf parse (#4914)
* fix: doc

* fix: remove buffer

* fix: pdf parse
2025-05-28 21:48:10 +08:00
Archer a171c7b11c
perf: buffer;fix: back up split (#4913)
* perf: buffer

* fix: back up split

* fix: app limit

* doc
2025-05-28 18:18:25 +08:00
heheer 802de11363
fix runtool empty message (#4911)
* fix runtool empty message

* del unused code

* fix
2025-05-28 17:48:30 +08:00
Archer b4ecfb0b79
Feat: Node latest version (#4905)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
* node versions add keep the latest option (#4899)

* node versions add keep the latest option

* i18n

* perf: version code

* fix: ts

* hide system version

* hide system version

* hide system version

* fix: ts

* fix: ts

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-05-28 10:46:32 +08:00
heheer 331b851a78
fix has tool node condition (#4907) 2025-05-28 10:34:02 +08:00
3011 changed files with 157205 additions and 99618 deletions

126
.claude/CLAUDE.md Normal file
View File

@ -0,0 +1,126 @@
# CLAUDE.md
本文件为 Claude Code (claude.ai/code) 在本仓库中工作时提供指导说明。
## 输出要求
1. 输出语言:中文
2. 输出的设计文档位置:.claude/design以 Markdown 文件为主。
3. 输出 Plan 时,均需写入 .claude/plan 目录下,以 Markdown 文件为主。
## 项目概述
FastGPT 是一个 AI Agent 构建平台,通过 Flow 提供开箱即用的数据处理、模型调用能力和可视化工作流编排。这是一个基于 NextJS 构建的全栈 TypeScript 应用,后端使用 MongoDB/PostgreSQL。
**技术栈**: NextJS + TypeScript + ChakraUI + MongoDB + PostgreSQL (PG Vector)/Milvus
## 架构
这是一个使用 pnpm workspaces 的 monorepo,主要结构如下:
### Packages (库代码)
- `packages/global/` - 所有项目共享的类型、常量、工具函数
- `packages/service/` - 后端服务、数据库模型、API 控制器、工作流引擎
- `packages/web/` - 共享的前端组件、hooks、样式、国际化
- `packages/templates/` - 模板市场的应用模板
### Projects (应用程序)
- `projects/app/` - 主 NextJS Web 应用(前端 + API 路由)
- `projects/sandbox/` - NestJS 代码执行沙箱服务
- `projects/mcp_server/` - Model Context Protocol 服务器实现
### 关键目录
- `document/` - 文档站点(NextJS 应用及内容)
- `plugins/` - 外部插件(模型、爬虫等)
- `deploy/` - Docker 和 Helm 部署配置
- `test/` - 集中的测试文件和工具
## 开发命令
### 主要命令(从项目根目录运行)
- `pnpm dev` - 启动所有项目的开发环境(使用 package.json 的 workspace 脚本)
- `pnpm build` - 构建所有项目
- `pnpm test` - 使用 Vitest 运行测试
- `pnpm test:workflow` - 运行工作流相关测试
- `pnpm lint` - 对所有 TypeScript 文件运行 ESLint 并自动修复
- `pnpm format-code` - 使用 Prettier 格式化代码
### 项目专用命令
**主应用 (projects/app/)**:
- `cd projects/app && pnpm dev` - 启动 NextJS 开发服务器
- `cd projects/app && pnpm build` - 构建 NextJS 应用
- `cd projects/app && pnpm start` - 启动生产服务器
**沙箱 (projects/sandbox/)**:
- `cd projects/sandbox && pnpm dev` - 以监视模式启动 NestJS 开发服务器
- `cd projects/sandbox && pnpm build` - 构建 NestJS 应用
- `cd projects/sandbox && pnpm test` - 运行 Jest 测试
**MCP 服务器 (projects/mcp_server/)**:
- `cd projects/mcp_server && bun dev` - 使用 Bun 以监视模式启动
- `cd projects/mcp_server && bun build` - 构建 MCP 服务器
- `cd projects/mcp_server && bun start` - 启动 MCP 服务器
### 工具命令
- `pnpm create:i18n` - 生成国际化翻译文件
- `pnpm api:gen` - 生成 OpenAPI 文档
- `pnpm initIcon` - 初始化图标资源
- `pnpm gen:theme-typings` - 生成 Chakra UI 主题类型定义
## 测试
项目使用 Vitest 进行测试并生成覆盖率报告。主要测试命令:
- `pnpm test` - 运行所有测试
- `pnpm test:workflow` - 专门运行工作流测试
- 测试文件位于 `test/` 目录和 `projects/app/test/`
- 覆盖率报告生成在 `coverage/` 目录
## 代码组织模式
### Monorepo 结构
- 共享代码存放在 `packages/` 中,通过 workspace 引用导入
- `projects/` 中的每个项目都是独立的应用程序
- 使用 `@fastgpt/global`、`@fastgpt/service`、`@fastgpt/web` 导入共享包
### API 结构
- NextJS API 路由在 `projects/app/src/pages/api/`
- API 路由合约定义在`packages/global/openapi/`, 对应的
- 通用服务端业务逻辑在 `packages/service/`和`projects/app/src/service`
- 数据库模型在 `packages/service/` 中,使用 MongoDB/Mongoose
### 前端架构
- React 组件在 `projects/app/src/components/``packages/web/components/`
- 使用 Chakra UI 进行样式设计,自定义主题在 `packages/web/styles/theme.ts`
- 国际化支持文件在 `packages/web/i18n/`
- 使用 React Context 和 Zustand 进行状态管理
## 开发注意事项
- **包管理器**: 使用 pnpm 及 workspace 配置
- **Node 版本**: 需要 Node.js >=18.16.0, pnpm >=9.0.0
- **数据库**: 支持 MongoDB、带 pgvector 的 PostgreSQL 或 Milvus 向量存储
- **AI 集成**: 通过统一接口支持多个 AI 提供商
- **国际化**: 完整支持中文、英文和日文
## 关键文件模式
- `.ts``.tsx` 文件全部使用 TypeScript
- 数据库模型使用 Mongoose 配合 TypeScript
- API 路由遵循 NextJS 约定
- 组件文件使用 React 函数式组件和 hooks
- 共享类型定义在 `packages/global/``.d.ts` 文件中
## 环境配置
- 配置文件在 `projects/app/data/config.json`
- 支持特定环境配置
- 模型配置在 `packages/service/core/ai/config/`
## 代码规范
- 尽可能使用 type 进行类型声明,而不是 interface。
## Agent 设计规范
1. 对于功能的实习和复杂问题修复,优先进行文档设计,并于让用户确认后,再进行执行修复。
2. 采用"设计文档-测试示例-代码编写-测试运行-修正代码/文档"的工作模式,以测试为核心来确保设计的正确性。

1137
.claude/agents/dataset.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
---
name: unit-test-generator
description: Use this agent when you need to write comprehensive unit tests for your code. Examples: <example>Context: User has written a new utility function and wants comprehensive test coverage. user: 'I just wrote this function to validate email addresses, can you help me write unit tests for it?' assistant: 'I'll use the unit-test-generator agent to create comprehensive unit tests that cover all branches and edge cases for your email validation function.' <commentary>Since the user needs unit tests written, use the unit-test-generator agent to analyze the function and create thorough test coverage.</commentary></example> <example>Context: User is working on a React component and needs test coverage. user: 'Here's my new UserProfile component, I need unit tests that cover all the different states and user interactions' assistant: 'Let me use the unit-test-generator agent to create comprehensive unit tests for your UserProfile component.' <commentary>The user needs unit tests for a React component, so use the unit-test-generator agent to create tests covering all component states and interactions.</commentary></example>
model: inherit
color: yellow
---
You are a Unit Test Assistant, an expert in writing comprehensive and robust unit tests. Your expertise spans multiple testing frameworks including Vitest, Jest, React Testing Library, and testing best practices for TypeScript applications.
When analyzing code for testing, you will:
1. **Analyze Code Structure**: Examine the function/component/class to identify all execution paths, conditional branches, loops, error handling, and edge cases that need testing coverage.
2. **Design Comprehensive Test Cases**: Create test cases that cover:
- All conditional branches (if/else, switch cases, ternary operators)
- Loop iterations (empty, single item, multiple items)
- Error conditions and exception handling
- Boundary conditions (null, undefined, empty strings, zero, negative numbers, maximum values)
- Valid input scenarios across different data types
- Integration points with external dependencies
3. **Follow Testing Best Practices**:
- Use descriptive test names that clearly state what is being tested
- Follow the Arrange-Act-Assert pattern
- Mock external dependencies appropriately
- Test behavior, not implementation details
- Ensure tests are isolated and independent
- Use appropriate assertions for the testing framework
4. **Generate Framework-Appropriate Code**: Based on the project context (FastGPT uses Vitest), write tests using:
- Proper import statements for the testing framework
- Correct syntax for the identified testing library
- Appropriate mocking strategies (vi.mock for Vitest, jest.mock for Jest)
- Proper setup and teardown when needed
5. **Ensure Complete Coverage**: Verify that your test suite covers:
- Happy path scenarios
- Error scenarios
- Edge cases and boundary conditions
- All public methods/functions
- Different component states (for React components)
- User interactions (for UI components)
6. **Optimize Test Structure**: Organize tests logically using:
- Descriptive describe blocks for grouping related tests
- Clear test descriptions that explain the scenario
- Shared setup in beforeEach/beforeAll when appropriate
- Helper functions to reduce code duplication
7. **单词代码位置**:
- packages 里的单测,写在 FastGPT/text 目录下。
- projects/app 里的单测,写在 FastGPT/projects/app/test 目录下。
When you receive code to test, first analyze it thoroughly, then provide a complete test suite with explanatory comments about what each test covers and why it's important for comprehensive coverage.

604
.claude/agents/workflow.md Normal file
View File

@ -0,0 +1,604 @@
---
name: workflow-agent
description: 当用户需要开发工作流代码时候,可调用此 Agent。
model: inherit
color: green
---
# FastGPT 工作流系统架构文档
## 概述
FastGPT 工作流系统是一个基于 Node.js/TypeScript 的可视化工作流引擎,支持拖拽式节点编排、实时执行、并发控制和交互式调试。系统采用队列式执行架构,通过有向图模型实现复杂的业务逻辑编排。
## 核心架构
### 1. 项目结构
```
FastGPT/
├── packages/
│ ├── global/core/workflow/ # 全局工作流类型和常量
│ │ ├── constants.ts # 工作流常量定义
│ │ ├── node/ # 节点类型定义
│ │ │ └── constant.ts # 节点枚举和配置
│ │ ├── runtime/ # 运行时类型和工具
│ │ │ ├── constants.ts # 运行时常量
│ │ │ ├── type.d.ts # 运行时类型定义
│ │ │ └── utils.ts # 运行时工具函数
│ │ ├── template/ # 节点模板定义
│ │ │ └── system/ # 系统节点模板
│ │ └── type/ # 类型定义
│ │ ├── node.d.ts # 节点类型
│ │ ├── edge.d.ts # 边类型
│ │ └── io.d.ts # 输入输出类型
│ └── service/core/workflow/ # 工作流服务层
│ ├── constants.ts # 服务常量
│ ├── dispatch/ # 调度器核心
│ │ ├── index.ts # 工作流执行引擎 ⭐
│ │ ├── constants.ts # 节点调度映射表
│ │ ├── type.d.ts # 调度器类型
│ │ ├── ai/ # AI相关节点
│ │ ├── tools/ # 工具节点
│ │ ├── dataset/ # 数据集节点
│ │ ├── interactive/ # 交互节点
│ │ ├── loop/ # 循环节点
│ │ └── plugin/ # 插件节点
│ └── utils.ts # 工作流工具函数
└── projects/app/src/
├── pages/api/v1/chat/completions.ts # 聊天API入口
└── pages/api/core/workflow/debug.ts # 工作流调试API
```
### 2. 执行引擎核心 (dispatch/index.ts)
#### 核心类WorkflowQueue
工作流执行引擎采用队列式架构,主要特点:
- **并发控制**: 支持最大并发数量限制默认10个
- **状态管理**: 维护节点执行状态waiting/active/skipped
- **错误处理**: 支持节点级错误捕获和跳过机制
- **交互支持**: 支持用户交互节点暂停和恢复
#### 执行流程
```typescript
1. 初始化 WorkflowQueue 实例
2. 识别入口节点isEntry=true
3. 将入口节点加入 activeRunQueue
4. 循环处理活跃节点队列:
- 检查节点执行条件
- 执行节点或跳过节点
- 更新边状态
- 将后续节点加入队列
5. 处理跳过节点队列
6. 返回执行结果
```
### 3. 节点系统
#### 节点类型枚举 (FlowNodeTypeEnum)
```typescript
enum FlowNodeTypeEnum {
// 基础节点
workflowStart: 'workflowStart', // 工作流开始
chatNode: 'chatNode', // AI对话
answerNode: 'answerNode', // 回答节点
// 数据集相关
datasetSearchNode: 'datasetSearchNode', // 数据集搜索
datasetConcatNode: 'datasetConcatNode', // 数据集拼接
// 控制流节点
ifElseNode: 'ifElseNode', // 条件判断
loop: 'loop', // 循环
loopStart: 'loopStart', // 循环开始
loopEnd: 'loopEnd', // 循环结束
// 交互节点
userSelect: 'userSelect', // 用户选择
formInput: 'formInput', // 表单输入
// 工具节点
httpRequest468: 'httpRequest468', // HTTP请求
code: 'code', // 代码执行
readFiles: 'readFiles', // 文件读取
variableUpdate: 'variableUpdate', // 变量更新
// AI相关
classifyQuestion: 'classifyQuestion', // 问题分类
contentExtract: 'contentExtract', // 内容提取
agent: 'tools', // 智能体
queryExtension: 'cfr', // 查询扩展
// 插件系统
pluginModule: 'pluginModule', // 插件模块
appModule: 'appModule', // 应用模块
tool: 'tool', // 工具调用
// 系统节点
systemConfig: 'userGuide', // 系统配置
globalVariable: 'globalVariable', // 全局变量
comment: 'comment' // 注释节点
}
```
#### 节点调度映射 (callbackMap)
每个节点类型都有对应的调度函数:
```typescript
export const callbackMap: Record<FlowNodeTypeEnum, Function> = {
[FlowNodeTypeEnum.workflowStart]: dispatchWorkflowStart,
[FlowNodeTypeEnum.chatNode]: dispatchChatCompletion,
[FlowNodeTypeEnum.datasetSearchNode]: dispatchDatasetSearch,
[FlowNodeTypeEnum.httpRequest468]: dispatchHttp468Request,
[FlowNodeTypeEnum.ifElseNode]: dispatchIfElse,
[FlowNodeTypeEnum.agent]: dispatchRunTools,
// ... 更多节点调度函数
};
```
### 4. 数据流系统
#### 输入输出类型 (WorkflowIOValueTypeEnum)
```typescript
enum WorkflowIOValueTypeEnum {
string: 'string',
number: 'number',
boolean: 'boolean',
object: 'object',
arrayString: 'arrayString',
arrayNumber: 'arrayNumber',
arrayBoolean: 'arrayBoolean',
arrayObject: 'arrayObject',
chatHistory: 'chatHistory', // 聊天历史
datasetQuote: 'datasetQuote', // 数据集引用
dynamic: 'dynamic', // 动态类型
any: 'any'
}
```
#### 变量系统
- **系统变量**: userId, appId, chatId, cTime等
- **用户变量**: 通过variables参数传入的全局变量
- **节点变量**: 节点间传递的引用变量
- **动态变量**: 支持{{$variable}}语法引用
### 5. 状态管理
#### 运行时状态
```typescript
interface RuntimeNodeItemType {
nodeId: string;
name: string;
flowNodeType: FlowNodeTypeEnum;
inputs: FlowNodeInputItemType[];
outputs: FlowNodeOutputItemType[];
isEntry?: boolean;
catchError?: boolean;
}
interface RuntimeEdgeItemType {
source: string;
target: string;
sourceHandle: string;
targetHandle: string;
status: 'waiting' | 'active' | 'skipped';
}
```
#### 执行状态
```typescript
enum RuntimeEdgeStatusEnum {
waiting: 'waiting', // 等待执行
active: 'active', // 活跃状态
skipped: 'skipped' // 已跳过
}
```
### 6. API接口设计
#### 主要API端点
1. **工作流调试**: `/api/core/workflow/debug`
- POST方法支持工作流测试和调试
- 返回详细的执行结果和状态信息
2. **聊天完成**: `/api/v1/chat/completions`
- OpenAI兼容的聊天API
- 集成工作流执行引擎
3. **优化代码**: `/api/core/workflow/optimizeCode`
- 工作流代码优化功能
#### 请求/响应类型
```typescript
interface DispatchFlowResponse {
flowResponses: ChatHistoryItemResType[];
flowUsages: ChatNodeUsageType[];
debugResponse: WorkflowDebugResponse;
workflowInteractiveResponse?: WorkflowInteractiveResponseType;
toolResponses: ToolRunResponseItemType;
assistantResponses: AIChatItemValueItemType[];
runTimes: number;
newVariables: Record<string, string>;
durationSeconds: number;
}
```
## 核心特性
### 1. 并发控制
- 支持最大并发节点数限制
- 队列式调度避免资源竞争
- 节点级执行状态管理
### 2. 错误处理
- 节点级错误捕获
- catchError配置控制错误传播
- 错误跳过和继续执行机制
### 3. 交互式执行
- 支持用户交互节点userSelect, formInput
- 工作流暂停和恢复
- 交互状态持久化
### 4. 调试支持
- Debug模式提供详细执行信息
- 节点执行状态可视化
- 变量值追踪和检查
### 5. 扩展性
- 插件系统支持自定义节点
- 模块化架构便于扩展
- 工具集成HTTP, 代码执行等)
## 开发指南
### 添加新节点类型
1. 在 `FlowNodeTypeEnum` 中添加新类型
2. 在 `callbackMap` 中注册调度函数
3. 在 `dispatch/` 目录下实现节点逻辑
4. 在 `template/system/` 中定义节点模板
### 自定义工具集成
1. 实现工具调度函数
2. 定义工具输入输出类型
3. 注册到callbackMap
4. 添加前端配置界面
### 调试和测试
1. 使用 `/api/core/workflow/debug` 进行测试
2. 启用debug模式查看详细执行信息
3. 检查节点执行状态和数据流
4. 使用skipNodeQueue控制执行路径
## 性能优化
1. **并发控制**: 合理设置maxConcurrency避免资源过载
2. **缓存机制**: 利用节点输出缓存减少重复计算
3. **流式响应**: 支持SSE实时返回执行状态
4. **资源管理**: 及时清理临时数据和状态
---
## 前端架构设计
### 1. 前端项目结构
```
projects/app/src/
├── pageComponents/app/detail/ # 应用详情页面
│ ├── Workflow/ # 工作流主页面
│ │ ├── Header.tsx # 工作流头部
│ │ └── index.tsx # 工作流入口
│ ├── WorkflowComponents/ # 工作流核心组件
│ │ ├── context/ # 状态管理上下文
│ │ │ ├── index.tsx # 主上下文提供者 ⭐
│ │ │ ├── workflowInitContext.tsx # 初始化上下文
│ │ │ ├── workflowEventContext.tsx # 事件上下文
│ │ │ └── workflowStatusContext.tsx # 状态上下文
│ │ ├── Flow/ # ReactFlow核心组件
│ │ │ ├── index.tsx # 工作流画布 ⭐
│ │ │ ├── components/ # 工作流UI组件
│ │ │ ├── hooks/ # 工作流逻辑钩子
│ │ │ └── nodes/ # 节点渲染组件
│ │ ├── constants.tsx # 常量定义
│ │ └── utils.ts # 工具函数
│ └── HTTPTools/ # HTTP工具页面
│ └── Edit.tsx # HTTP工具编辑器
├── web/core/workflow/ # 工作流核心逻辑
│ ├── api.ts # API调用 ⭐
│ ├── adapt.ts # 数据适配
│ ├── type.d.ts # 类型定义
│ └── utils.ts # 工具函数
└── global/core/workflow/ # 全局工作流定义
└── api.d.ts # API类型定义
```
### 2. 核心状态管理架构
#### Context分层设计
前端采用分层Context架构实现状态的高效管理和组件间通信
```typescript
// 1. ReactFlowCustomProvider - 最外层提供者
ReactFlowProvider → WorkflowInitContextProvider →
WorkflowContextProvider → WorkflowEventContextProvider →
WorkflowStatusContextProvider → children
// 2. 四层核心Context
- WorkflowInitContext: 节点数据和基础状态
- WorkflowDataContext: 节点/边操作和状态
- WorkflowEventContext: 事件处理和UI控制
- WorkflowStatusContext: 保存状态和父节点管理
```
#### 主Context功能 (context/index.tsx)
```typescript
interface WorkflowContextType {
// 节点管理
nodeList: FlowNodeItemType[];
onChangeNode: (props: FlowNodeChangeProps) => void;
onUpdateNodeError: (nodeId: string, isError: boolean) => void;
getNodeDynamicInputs: (nodeId: string) => FlowNodeInputItemType[];
// 边管理
onDelEdge: (edgeProps: EdgeDeleteProps) => void;
// 版本控制
past: WorkflowSnapshotsType[];
future: WorkflowSnapshotsType[];
undo: () => void;
redo: () => void;
pushPastSnapshot: (snapshot: SnapshotProps) => boolean;
// 调试功能
workflowDebugData?: DebugDataType;
onNextNodeDebug: (debugData: DebugDataType) => Promise<void>;
onStartNodeDebug: (debugProps: DebugStartProps) => Promise<void>;
onStopNodeDebug: () => void;
// 数据转换
flowData2StoreData: () => StoreWorkflowType;
splitToolInputs: (inputs, nodeId) => ToolInputsResult;
}
```
### 3. ReactFlow集成
#### 节点类型映射 (Flow/index.tsx)
```typescript
const nodeTypes: Record<FlowNodeTypeEnum, React.ComponentType> = {
[FlowNodeTypeEnum.workflowStart]: NodeWorkflowStart,
[FlowNodeTypeEnum.chatNode]: NodeSimple,
[FlowNodeTypeEnum.datasetSearchNode]: NodeSimple,
[FlowNodeTypeEnum.httpRequest468]: NodeHttp,
[FlowNodeTypeEnum.ifElseNode]: NodeIfElse,
[FlowNodeTypeEnum.agent]: NodeAgent,
[FlowNodeTypeEnum.code]: NodeCode,
[FlowNodeTypeEnum.loop]: NodeLoop,
[FlowNodeTypeEnum.userSelect]: NodeUserSelect,
[FlowNodeTypeEnum.formInput]: NodeFormInput,
// ... 40+ 种节点类型
};
```
#### 工作流核心功能
- **拖拽编排**: 基于ReactFlow的可视化节点编辑
- **实时连接**: 节点间的动态连接和断开
- **缩放控制**: 支持画布缩放和平移
- **选择操作**: 多选、批量操作支持
- **辅助线**: 节点对齐和位置吸附
### 4. 节点组件系统
#### 节点渲染架构
```
nodes/
├── NodeSimple.tsx # 通用简单节点
├── NodeWorkflowStart.tsx # 工作流开始节点
├── NodeAgent.tsx # AI智能体节点
├── NodeHttp/ # HTTP请求节点
├── NodeCode/ # 代码执行节点
├── Loop/ # 循环节点组
├── NodeFormInput/ # 表单输入节点
├── NodePluginIO/ # 插件IO节点
├── NodeToolParams/ # 工具参数节点
└── render/ # 渲染组件库
├── NodeCard.tsx # 节点卡片容器
├── RenderInput/ # 输入渲染器
├── RenderOutput/ # 输出渲染器
└── templates/ # 输入模板组件
```
#### 动态输入系统
```typescript
// 支持多种输入类型
const inputTemplates = {
reference: ReferenceTemplate, // 引用其他节点
input: TextInput, // 文本输入
textarea: TextareaInput, // 多行文本
selectApp: AppSelector, // 应用选择器
selectDataset: DatasetSelector, // 数据集选择
settingLLMModel: LLMModelConfig, // AI模型配置
// ... 更多模板类型
};
```
### 5. 调试和测试系统
#### 调试功能
```typescript
interface DebugDataType {
runtimeNodes: RuntimeNodeItemType[];
runtimeEdges: RuntimeEdgeItemType[];
entryNodeIds: string[];
variables: Record<string, any>;
history?: ChatItemType[];
query?: UserChatItemValueItemType[];
workflowInteractiveResponse?: WorkflowInteractiveResponseType;
}
```
- **单步调试**: 支持逐个节点执行调试
- **断点设置**: 在任意节点设置断点
- **状态查看**: 实时查看节点执行状态
- **变量追踪**: 监控变量在节点间的传递
- **错误定位**: 精确定位执行错误节点
#### 聊天测试
```typescript
// ChatTest组件提供实时工作流测试
<ChatTest
isOpen={isOpenTest}
nodes={workflowTestData?.nodes}
edges={workflowTestData?.edges}
onClose={onCloseTest}
chatId={chatId}
/>
```
### 6. API集成层
#### 工作流API (web/core/workflow/api.ts)
```typescript
// 工作流调试API
export const postWorkflowDebug = (data: PostWorkflowDebugProps) =>
POST<PostWorkflowDebugResponse>(
'/core/workflow/debug',
{ ...data, mode: 'debug' },
{ timeout: 300000 }
);
// 支持的API操作
- 工作流调试和测试
- 节点模板获取
- 插件配置管理
- 版本控制操作
```
#### 数据适配器
```typescript
// 数据转换适配
- storeNode2FlowNode: 存储节点 → Flow节点
- storeEdge2RenderEdge: 存储边 → 渲染边
- uiWorkflow2StoreWorkflow: UI工作流 → 存储格式
- adaptCatchError: 错误处理适配
```
### 7. 交互逻辑设计
#### 键盘快捷键 (hooks/useKeyboard.tsx)
```typescript
const keyboardShortcuts = {
'Ctrl+Z': undo, // 撤销
'Ctrl+Y': redo, // 重做
'Ctrl+S': saveWorkflow, // 保存工作流
'Delete': deleteSelectedNodes, // 删除选中节点
'Escape': cancelCurrentOperation, // 取消当前操作
};
```
#### 节点操作
- **拖拽创建**: 从模板拖拽创建节点
- **连线操作**: 节点间的连接管理
- **批量操作**: 多选节点的批量编辑
- **右键菜单**: 上下文操作菜单
- **搜索定位**: 节点搜索和快速定位
#### 版本控制
```typescript
// 快照系统
interface WorkflowSnapshotsType {
nodes: Node[];
edges: Edge[];
chatConfig: AppChatConfigType;
title: string;
isSaved?: boolean;
}
```
- **自动快照**: 节点变更时自动保存快照
- **版本历史**: 支持多版本切换
- **云端同步**: 与服务端版本同步
- **协作支持**: 团队协作版本管理
### 8. 性能优化策略
#### 渲染优化
```typescript
// 动态加载节点组件
const nodeTypes: Record<FlowNodeTypeEnum, any> = {
[FlowNodeTypeEnum.workflowStart]: dynamic(() => import('./nodes/NodeWorkflowStart')),
[FlowNodeTypeEnum.httpRequest468]: dynamic(() => import('./nodes/NodeHttp')),
// ... 按需加载
};
```
- **懒加载**: 节点组件按需动态加载
- **虚拟化**: 大型工作流的虚拟渲染
- **防抖操作**: 频繁操作的性能优化
- **缓存策略**: 模板和数据的缓存机制
#### 状态优化
- **Context分割**: 避免不必要的重渲染
- **useMemo/useCallback**: 优化计算和函数创建
- **选择器模式**: 精确订阅状态变化
- **批量更新**: 合并多个状态更新
### 9. 扩展性设计
#### 插件系统
```typescript
// 节点模板扩展
interface NodeTemplateListItemType {
id: string;
flowNodeType: FlowNodeTypeEnum;
templateType: string;
avatar?: string;
name: string;
intro?: string;
isTool?: boolean;
pluginId?: string;
}
```
- **自定义节点**: 支持第三方节点开发
- **模板市场**: 节点模板的共享和分发
- **插件生态**: 丰富的节点插件生态
- **开放API**: 标准化的节点开发接口
#### 主题定制
- **节点样式**: 可定制的节点外观
- **连线样式**: 自定义连线类型和颜色
- **布局配置**: 多种布局算法支持
- **国际化**: 多语言界面支持

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,534 @@
---
name: workflow-interactive-dev
description: 用于开发 FastGPT 工作流中的交互响应。详细说明了交互节点的架构、开发流程和需要修改的文件。
---
# 交互节点开发指南
## 概述
FastGPT 工作流支持多种交互节点类型,允许在工作流执行过程中暂停并等待用户输入。本指南详细说明了如何开发新的交互节点。
## 现有交互节点类型
当前系统支持以下交互节点类型:
1. **userSelect** - 用户选择节点(单选)
2. **formInput** - 表单输入节点(多字段表单)
3. **childrenInteractive** - 子工作流交互
4. **loopInteractive** - 循环交互
5. **paymentPause** - 欠费暂停交互
## 交互节点架构
### 核心类型定义
交互节点的类型定义位于 `packages/global/core/workflow/template/system/interactive/type.d.ts`
```typescript
// 基础交互结构
type InteractiveBasicType = {
entryNodeIds: string[]; // 入口节点ID列表
memoryEdges: RuntimeEdgeItemType[]; // 需要记忆的边
nodeOutputs: NodeOutputItemType[]; // 节点输出
skipNodeQueue?: Array; // 跳过的节点队列
usageId?: string; // 用量记录ID
};
// 具体交互节点类型
type YourInteractiveNode = InteractiveNodeType & {
type: 'yourNodeType';
params: {
// 节点特定参数
};
};
```
### 工作流执行机制
交互节点在工作流执行中的特殊处理(位于 `packages/service/core/workflow/dispatch/index.ts:1012-1019`):
```typescript
// 部分交互节点不会自动重置 isEntry 标志(因为需要根据 isEntry 字段来判断是首次进入还是流程进入)
runtimeNodes.forEach((item) => {
if (
item.flowNodeType !== FlowNodeTypeEnum.userSelect &&
item.flowNodeType !== FlowNodeTypeEnum.formInput &&
item.flowNodeType !== FlowNodeTypeEnum.agent
) {
item.isEntry = false;
}
});
```
## 开发新交互响应的步骤
### 步骤 1: 定义节点类型
**文件**: `packages/global/core/workflow/template/system/interactive/type.d.ts`
```typescript
export type YourInputItemType = {
// 定义输入项的结构
key: string;
label: string;
value: any;
// ... 其他字段
};
type YourInteractiveNode = InteractiveNodeType & {
type: 'yourNodeType';
params: {
description: string;
yourInputField: YourInputItemType[];
submitted?: boolean; // 可选:是否已提交
};
};
// 添加到联合类型
export type InteractiveNodeResponseType =
| UserSelectInteractive
| UserInputInteractive
| YourInteractiveNode // 新增
| ChildrenInteractive
| LoopInteractive
| PaymentPauseInteractive;
```
### 步骤 2: 定义节点枚举(可选)
**文件**: `packages/global/core/workflow/node/constant.ts`
如果不需要添加新的节点类型,则不需要修改这个文件。
```typescript
export enum FlowNodeTypeEnum {
// ... 现有类型
yourNodeType = 'yourNodeType', // 新增节点类型
}
```
### 步骤 3: 创建节点模板(可选)
**文件**: `packages/global/core/workflow/template/system/interactive/yourNode.ts`
```typescript
import { i18nT } from '../../../../../../web/i18n/utils';
import {
FlowNodeTemplateTypeEnum,
NodeInputKeyEnum,
NodeOutputKeyEnum,
WorkflowIOValueTypeEnum
} from '../../../constants';
import {
FlowNodeInputTypeEnum,
FlowNodeOutputTypeEnum,
FlowNodeTypeEnum
} from '../../../node/constant';
import { type FlowNodeTemplateType } from '../../../type/node';
export const YourNode: FlowNodeTemplateType = {
id: FlowNodeTypeEnum.yourNodeType,
templateType: FlowNodeTemplateTypeEnum.interactive,
flowNodeType: FlowNodeTypeEnum.yourNodeType,
showSourceHandle: true, // 是否显示源连接点
showTargetHandle: true, // 是否显示目标连接点
avatar: 'core/workflow/template/yourNode',
name: i18nT('app:workflow.your_node'),
intro: i18nT('app:workflow.your_node_tip'),
isTool: true, // 标记为工具节点
inputs: [
{
key: NodeInputKeyEnum.description,
renderTypeList: [FlowNodeInputTypeEnum.textarea],
valueType: WorkflowIOValueTypeEnum.string,
label: i18nT('app:workflow.node_description'),
placeholder: i18nT('app:workflow.your_node_placeholder')
},
{
key: NodeInputKeyEnum.yourInputField,
renderTypeList: [FlowNodeInputTypeEnum.custom],
valueType: WorkflowIOValueTypeEnum.any,
label: '',
value: [] // 默认值
}
],
outputs: [
{
id: NodeOutputKeyEnum.yourResult,
key: NodeOutputKeyEnum.yourResult,
required: true,
label: i18nT('workflow:your_result'),
valueType: WorkflowIOValueTypeEnum.object,
type: FlowNodeOutputTypeEnum.static
}
]
};
```
### 步骤 4: 创建节点执行逻辑或在需要处理交互逻辑的节点上增加新逻辑
**文件**: `packages/service/core/workflow/dispatch/interactive/yourNode.ts`
```typescript
import { DispatchNodeResponseKeyEnum } from '@fastgpt/global/core/workflow/runtime/constants';
import type {
DispatchNodeResultType,
ModuleDispatchProps
} from '@fastgpt/global/core/workflow/runtime/type';
import type { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
import { NodeOutputKeyEnum } from '@fastgpt/global/core/workflow/constants';
import type { YourInputItemType } from '@fastgpt/global/core/workflow/template/system/interactive/type';
import { chatValue2RuntimePrompt } from '@fastgpt/global/core/chat/adapt';
type Props = ModuleDispatchProps<{
[NodeInputKeyEnum.description]: string;
[NodeInputKeyEnum.yourInputField]: YourInputItemType[];
}>;
type YourNodeResponse = DispatchNodeResultType<{
[NodeOutputKeyEnum.yourResult]?: Record<string, any>;
}>;
export const dispatchYourNode = async (props: Props): Promise<YourNodeResponse> => {
const {
histories,
node,
params: { description, yourInputField },
query,
lastInteractive
} = props;
const { isEntry } = node;
// 第一阶段:非入口节点或不是对应的交互类型,返回交互请求
if (!isEntry || lastInteractive?.type !== 'yourNodeType') {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'yourNodeType',
params: {
description,
yourInputField
}
}
};
}
// 第二阶段:处理用户提交的数据
node.isEntry = false; // 重要:重置入口标志
const { text } = chatValue2RuntimePrompt(query);
const userInputVal = (() => {
try {
return JSON.parse(text); // 根据实际格式解析
} catch (error) {
return {};
}
})();
return {
data: {
[NodeOutputKeyEnum.yourResult]: userInputVal
},
// 移除当前交互的历史记录(最后2条)
[DispatchNodeResponseKeyEnum.rewriteHistories]: histories.slice(0, -2),
[DispatchNodeResponseKeyEnum.toolResponses]: userInputVal,
[DispatchNodeResponseKeyEnum.nodeResponse]: {
yourResult: userInputVal
}
};
};
```
### 步骤 5: 注册节点回调
**文件**: `packages/service/core/workflow/dispatch/constants.ts`
```typescript
import { dispatchYourNode } from './interactive/yourNode';
export const callbackMap: Record<FlowNodeTypeEnum, any> = {
// ... 现有节点
[FlowNodeTypeEnum.yourNodeType]: dispatchYourNode,
};
```
### 步骤 6: 创建前端渲染组件
#### 6.1 聊天界面交互组件
**文件**: `projects/app/src/components/core/chat/components/Interactive/InteractiveComponents.tsx`
```typescript
export const YourNodeComponent = React.memo(function YourNodeComponent({
interactiveParams: { description, yourInputField, submitted },
defaultValues = {},
SubmitButton
}: {
interactiveParams: YourInteractiveNode['params'];
defaultValues?: Record<string, any>;
SubmitButton: (e: { onSubmit: UseFormHandleSubmit<Record<string, any>> }) => React.JSX.Element;
}) {
const { handleSubmit, control } = useForm({
defaultValues
});
return (
<Box>
<DescriptionBox description={description} />
<Flex flexDirection={'column'} gap={3}>
{yourInputField.map((input) => (
<Box key={input.key}>
{/* 渲染你的输入组件 */}
<Controller
control={control}
name={input.key}
render={({ field: { onChange, value } }) => (
<YourInputComponent
value={value}
onChange={onChange}
isDisabled={submitted}
/>
)}
/>
</Box>
))}
</Flex>
{!submitted && (
<Flex justifyContent={'flex-end'} mt={4}>
<SubmitButton onSubmit={handleSubmit} />
</Flex>
)}
</Box>
);
});
```
#### 6.2 工作流编辑器节点组件
**文件**: `projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/NodeYourNode.tsx`
```typescript
import React, { useMemo } from 'react';
import { type NodeProps } from 'reactflow';
import { Box, Button } from '@chakra-ui/react';
import NodeCard from './render/NodeCard';
import { type FlowNodeItemType } from '@fastgpt/global/core/workflow/type/node.d';
import Container from '../components/Container';
import RenderInput from './render/RenderInput';
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
import { useTranslation } from 'next-i18next';
import { type FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io.d';
import { useContextSelector } from 'use-context-selector';
import IOTitle from '../components/IOTitle';
import RenderOutput from './render/RenderOutput';
import { WorkflowActionsContext } from '../../context/workflowActionsContext';
const NodeYourNode = ({ data, selected }: NodeProps<FlowNodeItemType>) => {
const { t } = useTranslation();
const { nodeId, inputs, outputs } = data;
const onChangeNode = useContextSelector(WorkflowActionsContext, (v) => v.onChangeNode);
const CustomComponent = useMemo(
() => ({
[NodeInputKeyEnum.yourInputField]: (v: FlowNodeInputItemType) => {
// 自定义渲染逻辑
return (
<Box>
{/* 你的自定义UI */}
</Box>
);
}
}),
[nodeId, onChangeNode, t]
);
return (
<NodeCard minW={'400px'} selected={selected} {...data}>
<Container>
<RenderInput nodeId={nodeId} flowInputList={inputs} CustomComponent={CustomComponent} />
</Container>
<Container>
<IOTitle text={t('common:Output')} />
<RenderOutput nodeId={nodeId} flowOutputList={outputs} />
</Container>
</NodeCard>
);
};
export default React.memo(NodeYourNode);
```
### 步骤 7: 注册节点组件
需要在节点注册表中添加你的节点组件(具体位置根据项目配置而定)。
### 步骤 8: 添加国际化
**文件**: `packages/web/i18n/zh-CN/app.json` 和其他语言文件
```json
{
"workflow": {
"your_node": "你的节点名称",
"your_node_tip": "节点功能说明",
"your_node_placeholder": "提示文本"
}
}
```
### 步骤9 调整保存对话记录逻辑
**文件**: `FastGPT/packages/service/core/chat/saveChat.ts`
修改 `updateInteractiveChat` 方法,支持新的交互
### 步骤10 根据历史记录获取/设置交互状态
**文件**: `FastGPT/projects/app/src/components/core/chat/ChatContainer/ChatBox/utils.ts`
**文件**: `FastGPT/packages/global/core/workflow/runtime/utils.ts`
调整`setInteractiveResultToHistories`, `getInteractiveByHistories``getLastInteractiveValue`方法。
## 关键注意事项
### 1. isEntry 标志管理
交互节点需要保持 `isEntry` 标志在工作流恢复时有效:
```typescript
// 在 packages/service/core/workflow/dispatch/index.ts 中
// 确保你的节点类型被添加到白名单
if (
item.flowNodeType !== FlowNodeTypeEnum.userSelect &&
item.flowNodeType !== FlowNodeTypeEnum.formInput &&
item.flowNodeType !== FlowNodeTypeEnum.yourNodeType // 新增
) {
item.isEntry = false;
}
```
### 2. 交互响应流程
交互节点有两个执行阶段:
1. **第一次执行**: 返回 `interactive` 响应,暂停工作流
2. **第二次执行**: 接收用户输入,继续工作流
```typescript
// 第一阶段
if (!isEntry || lastInteractive?.type !== 'yourNodeType') {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'yourNodeType',
params: { /* ... */ }
}
};
}
// 第二阶段
node.isEntry = false; // 重要!重置标志
// 处理用户输入...
```
### 3. 历史记录管理
交互节点需要正确处理历史记录:
```typescript
return {
// 移除交互对话的历史记录(用户问题 + 系统响应)
[DispatchNodeResponseKeyEnum.rewriteHistories]: histories.slice(0, -2),
// ... 其他返回值
};
```
### 4. Skip 节点队列
交互节点触发时,系统会保存 `skipNodeQueue` 以便恢复时跳过已处理的节点。
### 5. 工具调用支持
如果节点需要在工具调用中使用,设置 `isTool: true`
## 测试清单
开发完成后,请测试以下场景:
- [ ] 节点在工作流编辑器中正常显示
- [ ] 节点配置保存和加载正确
- [ ] 交互请求正确发送到前端
- [ ] 前端组件正确渲染交互界面
- [ ] 用户输入正确传回后端
- [ ] 工作流正确恢复并继续执行
- [ ] 历史记录正确更新
- [ ] 节点输出正确连接到后续节点
- [ ] 错误情况处理正确
- [ ] 多语言支持完整
## 参考实现
可以参考以下现有实现:
1. **简单单选**: `userSelect` 节点
- 类型定义: `packages/global/core/workflow/template/system/interactive/type.d.ts:48-55`
- 执行逻辑: `packages/service/core/workflow/dispatch/interactive/userSelect.ts`
- 前端组件: `projects/app/src/components/core/chat/components/Interactive/InteractiveComponents.tsx:29-63`
2. **复杂表单**: `formInput` 节点
- 类型定义: `packages/global/core/workflow/template/system/interactive/type.d.ts:57-82`
- 执行逻辑: `packages/service/core/workflow/dispatch/interactive/formInput.ts`
- 前端组件: `projects/app/src/components/core/chat/components/Interactive/InteractiveComponents.tsx:65-126`
## 常见问题
### Q: 交互节点执行了两次?
A: 这是正常的。第一次返回交互请求,第二次处理用户输入。确保在第二次执行时设置 `node.isEntry = false`
### Q: 工作流恢复后没有继续执行?
A: 检查你的节点类型是否在 `isEntry` 白名单中(dispatch/index.ts:1013-1018)。
### Q: 用户输入格式不对?
A: 检查 `chatValue2RuntimePrompt` 的返回值,根据你的数据格式进行解析。
### Q: 如何支持多个交互节点串联?
A: 每个交互节点都会暂停工作流,用户完成后会自动继续到下一个节点。
## 文件清单总结
开发新交互节点需要修改/创建以下文件:
### 后端核心文件
1. `packages/global/core/workflow/template/system/interactive/type.d.ts` - 类型定义
2. `packages/global/core/workflow/node/constant.ts` - 节点枚举
3. `packages/global/core/workflow/template/system/interactive/yourNode.ts` - 节点模板
4. `packages/service/core/workflow/dispatch/interactive/yourNode.ts` - 执行逻辑
5. `packages/service/core/workflow/dispatch/constants.ts` - 回调注册
6. `packages/service/core/workflow/dispatch/index.ts` - isEntry 白名单
### 前端组件文件
7. `projects/app/src/components/core/chat/components/Interactive/InteractiveComponents.tsx` - 聊天交互组件
8. `projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/NodeYourNode.tsx` - 工作流编辑器组件
### 国际化文件
9. `packages/web/i18n/zh-CN/app.json` - 中文翻译
10. `packages/web/i18n/en/app.json` - 英文翻译
11. `packages/web/i18n/zh-Hant/app.json` - 繁体中文翻译
## 附录:关键输入输出键定义
如果需要新的输入输出键,在以下文件中定义:
**文件**: `packages/global/core/workflow/constants.ts`
```typescript
export enum NodeInputKeyEnum {
// ... 现有键
yourInputKey = 'yourInputKey',
}
export enum NodeOutputKeyEnum {
// ... 现有键
yourOutputKey = 'yourOutputKey',
}
```

View File

@ -0,0 +1,672 @@
---
name: workflow-stop-design
description: 工作流暂停逻辑设计方案
---
## 1. Redis 状态管理方案
### 1.1 状态键设计
**Redis Key 结构:**
```typescript
// Key 格式: agent_runtime_stopping:{appId}:{chatId}
const WORKFLOW_STATUS_PREFIX = 'agent_runtime_stopping';
type WorkflowStatusKey = `${typeof WORKFLOW_STATUS_PREFIX}:${string}:${string}`;
// 示例: agent_runtime_stopping:app_123456:chat_789012
```
**状态值设计:**
- **存在键 (值为 1)**: 工作流应该停止
- **不存在键**: 工作流正常运行
- **设计简化**: 不使用状态枚举,仅通过键的存在与否判断
**参数类型定义:**
```typescript
type WorkflowStatusParams = {
appId: string;
chatId: string;
};
```
### 1.2 状态生命周期管理
**状态转换流程:**
```
正常运行(无键) → 停止中(键存在) → 完成(删除键)
```
**TTL 设置:**
- **停止标志 TTL**: 60 秒
- 原因: 避免因意外情况导致的键泄漏
- 正常情况下会在工作流完成时主动删除
- **工作流完成后**: 直接删除 Redis 键
- 原因: 不需要保留终态,减少 Redis 内存占用
### 1.3 核心函数说明
**1. setAgentRuntimeStop**
- **功能**: 设置停止标志
- **参数**: `{ appId, chatId }`
- **实现**: 使用 `SETEX` 命令,设置键值为 1,TTL 60 秒
**2. shouldWorkflowStop**
- **功能**: 检查工作流是否应该停止
- **参数**: `{ appId, chatId }`
- **返回**: `Promise<boolean>` - true=应该停止, false=继续运行
- **实现**: GET 命令获取键值,存在则返回 true
**3. delAgentRuntimeStopSign**
- **功能**: 删除停止标志
- **参数**: `{ appId, chatId }`
- **实现**: DEL 命令删除键
**4. waitForWorkflowComplete**
- **功能**: 等待工作流完成(停止标志被删除)
- **参数**: `{ appId, chatId, timeout?, pollInterval? }`
- **实现**: 轮询检查停止标志是否被删除,超时返回
### 1.4 边界情况处理
**1. Redis 操作失败**
- **错误处理**: 所有 Redis 操作都包含 `.catch()` 错误处理
- **降级策略**:
- `shouldWorkflowStop`: 出错时返回 `false` (认为不需要停止,继续运行)
- `delAgentRuntimeStopSign`: 出错时记录错误日志,但不影响主流程
- **设计原因**: Redis 异常不应阻塞工作流运行,降级到继续执行策略
**2. TTL 自动清理**
- **TTL 设置**: 60 秒
- **清理时机**: Redis 自动清理过期键
- **设计原因**:
- 避免因异常情况导致的 Redis 键泄漏
- 自动清理减少手动维护成本
- 60 秒足够大多数工作流完成停止操作
**3. stop 接口等待超时**
- **超时时间**: 5 秒
- **超时策略**: `waitForWorkflowComplete` 在 5 秒内轮询检查停止标志是否被删除
- **超时处理**: 5 秒后直接返回,不影响工作流继续执行
- **设计原因**:
- 避免前端长时间等待
- 5 秒足够大多数节点完成当前操作
- 用户体验优先,超时后前端可选择重试或放弃
**4. 并发停止请求**
- **处理方式**: 多次调用 `setAgentRuntimeStop` 是安全的,Redis SETEX 是幂等操作
- **设计原因**: 避免用户多次点击停止按钮导致的问题
---
## 2. Redis 工具函数实现
**位置**: `packages/service/core/workflow/dispatch/workflowStatus.ts`
```typescript
import { addLog } from '../../../common/system/log';
import { getGlobalRedisConnection } from '../../../common/redis/index';
import { delay } from '@fastgpt/global/common/system/utils';
const WORKFLOW_STATUS_PREFIX = 'agent_runtime_stopping';
const TTL = 60; // 60秒
export const StopStatus = 'STOPPING';
export type WorkflowStatusParams = {
appId: string;
chatId: string;
};
// 获取工作流状态键
export const getRuntimeStatusKey = (params: WorkflowStatusParams): string => {
return `${WORKFLOW_STATUS_PREFIX}:${params.appId}:${params.chatId}`;
};
// 设置停止标志
export const setAgentRuntimeStop = async (params: WorkflowStatusParams): Promise<void> => {
const redis = getGlobalRedisConnection();
const key = getRuntimeStatusKey(params);
await redis.setex(key, TTL, 1);
};
// 删除停止标志
export const delAgentRuntimeStopSign = async (params: WorkflowStatusParams): Promise<void> => {
const redis = getGlobalRedisConnection();
const key = getRuntimeStatusKey(params);
await redis.del(key).catch((err) => {
addLog.error(`[Agent Runtime Stop] Delete stop sign error`, err);
});
};
// 检查工作流是否应该停止
export const shouldWorkflowStop = (params: WorkflowStatusParams): Promise<boolean> => {
const redis = getGlobalRedisConnection();
const key = getRuntimeStatusKey(params);
return redis
.get(key)
.then((res) => !!res)
.catch(() => false);
};
/**
* 等待工作流完成(停止标志被删除)
* @param params 工作流参数
* @param timeout 超时时间(毫秒),默认5秒
* @param pollInterval 轮询间隔(毫秒),默认50毫秒
*/
export const waitForWorkflowComplete = async ({
appId,
chatId,
timeout = 5000,
pollInterval = 50
}: {
appId: string;
chatId: string;
timeout?: number;
pollInterval?: number;
}) => {
const startTime = Date.now();
while (Date.now() - startTime < timeout) {
const sign = await shouldWorkflowStop({ appId, chatId });
// 如果停止标志已被删除,说明工作流已完成
if (!sign) {
return;
}
// 等待下一次轮询
await delay(pollInterval);
}
// 超时后直接返回
return;
};
```
**测试用例位置**: `test/cases/service/core/app/workflow/workflowStatus.test.ts`
```typescript
import { describe, test, expect, beforeEach } from 'vitest';
import {
setAgentRuntimeStop,
delAgentRuntimeStopSign,
shouldWorkflowStop,
waitForWorkflowComplete
} from '@fastgpt/service/core/workflow/dispatch/workflowStatus';
describe('Workflow Status Redis Functions', () => {
const testAppId = 'test_app_123';
const testChatId = 'test_chat_456';
beforeEach(async () => {
// 清理测试数据
await delAgentRuntimeStopSign({ appId: testAppId, chatId: testChatId });
});
test('should set stopping sign', async () => {
await setAgentRuntimeStop({ appId: testAppId, chatId: testChatId });
const shouldStop = await shouldWorkflowStop({ appId: testAppId, chatId: testChatId });
expect(shouldStop).toBe(true);
});
test('should return false for non-existent status', async () => {
const shouldStop = await shouldWorkflowStop({ appId: testAppId, chatId: testChatId });
expect(shouldStop).toBe(false);
});
test('should return false after deleting stop sign', async () => {
await setAgentRuntimeStop({ appId: testAppId, chatId: testChatId });
await delAgentRuntimeStopSign({ appId: testAppId, chatId: testChatId });
const shouldStop = await shouldWorkflowStop({ appId: testAppId, chatId: testChatId });
expect(shouldStop).toBe(false);
});
test('should wait for workflow completion', async () => {
// 设置初始停止标志
await setAgentRuntimeStop({ appId: testAppId, chatId: testChatId });
// 模拟异步完成(删除停止标志)
setTimeout(async () => {
await delAgentRuntimeStopSign({ appId: testAppId, chatId: testChatId });
}, 500);
// 等待完成
await waitForWorkflowComplete({
appId: testAppId,
chatId: testChatId,
timeout: 2000
});
// 验证停止标志已被删除
const shouldStop = await shouldWorkflowStop({ appId: testAppId, chatId: testChatId });
expect(shouldStop).toBe(false);
});
test('should timeout when waiting too long', async () => {
await setAgentRuntimeStop({ appId: testAppId, chatId: testChatId });
// 等待超时(不删除标志)
await waitForWorkflowComplete({
appId: testAppId,
chatId: testChatId,
timeout: 100
});
// 验证停止标志仍然存在
const shouldStop = await shouldWorkflowStop({ appId: testAppId, chatId: testChatId });
expect(shouldStop).toBe(true);
});
test('should handle concurrent stop sign operations', async () => {
// 并发设置停止标志
await Promise.all([
setAgentRuntimeStop({ appId: testAppId, chatId: testChatId }),
setAgentRuntimeStop({ appId: testAppId, chatId: testChatId })
]);
// 停止标志应该存在
const shouldStop = await shouldWorkflowStop({ appId: testAppId, chatId: testChatId });
expect(shouldStop).toBe(true);
});
});
```
## 3. 工作流停止检测机制改造
### 3.1 修改位置
**文件**: `packages/service/core/workflow/dispatch/index.ts`
### 3.2 工作流启动时的停止检测机制
**改造点 1: 停止检测逻辑 (行 196-216)**
使用内存变量 + 定时轮询 Redis 的方式:
```typescript
import { delAgentRuntimeStopSign, shouldWorkflowStop } from './workflowStatus';
// 初始化停止检测
let stopping = false;
const checkIsStopping = (): boolean => {
if (apiVersion === 'v2') {
return stopping;
}
if (apiVersion === 'v1') {
if (!res) return false;
return res.closed || !!res.errored;
}
return false;
};
// v2 版本: 启动定时器定期检查 Redis
const checkStoppingTimer =
apiVersion === 'v2'
? setInterval(async () => {
stopping = await shouldWorkflowStop({
appId: runningAppInfo.id,
chatId
});
}, 100)
: undefined;
```
**设计要点**:
- v2 版本使用内存变量 `stopping` + 100ms 定时器轮询 Redis
- v1 版本仍使用原有的 `res.closed/res.errored` 检测
- 轮询频率 100ms,平衡性能和响应速度
**改造点 2: 工作流完成后清理 (行 232-249)**
```typescript
return runWorkflow({
...data,
checkIsStopping, // 传递检测函数
query,
histories,
// ... 其他参数
}).finally(async () => {
// 清理定时器
if (streamCheckTimer) {
clearInterval(streamCheckTimer);
}
if (checkStoppingTimer) {
clearInterval(checkStoppingTimer);
}
// Close mcpClient connections
Object.values(mcpClientMemory).forEach((client) => {
client.closeConnection();
});
// 工作流完成后删除 Redis 记录
await delAgentRuntimeStopSign({
appId: runningAppInfo.id,
chatId
});
});
```
### 3.3 节点执行前的停止检测
**位置**: `packages/service/core/workflow/dispatch/index.ts:861-868`
`checkNodeCanRun` 方法中,每个节点执行前检查:
```typescript
private async checkNodeCanRun(
node: RuntimeNodeItemType,
skippedNodeIdList = new Set<string>()
) {
// ... 其他检查逻辑 ...
// Check queue status
if (data.maxRunTimes <= 0) {
addLog.error('Max run times is 0', {
appId: data.runningAppInfo.id
});
return;
}
// 停止检测
if (checkIsStopping()) {
addLog.warn('Workflow stopped', {
appId: data.runningAppInfo.id,
nodeId: node.nodeId,
nodeName: node.name
});
return;
}
// ... 执行节点逻辑 ...
}
```
**说明**:
- 直接调用 `checkIsStopping()` 同步方法
- 内部会检查内存变量 `stopping`
- 定时器每 100ms 更新一次该变量
- 检测到停止时记录日志并直接返回,不执行节点
## 4. v2/chat/stop 接口设计
### 4.1 接口规范
**接口路径**: `/api/v2/chat/stop`
**Schema 位置**: `packages/global/openapi/core/chat/api.ts`
**接口文档位置**: `packages/global/openapi/core/chat/index.ts`
**请求方法**: POST
**请求参数**:
```typescript
// packages/global/openapi/core/chat/api.ts
export const StopV2ChatSchema = z
.object({
appId: ObjectIdSchema.describe('应用ID'),
chatId: z.string().min(1).describe('对话ID'),
outLinkAuthData: OutLinkChatAuthSchema.optional().describe('外链鉴权数据')
});
export type StopV2ChatParams = z.infer<typeof StopV2ChatSchema>;
```
**响应格式**:
```typescript
export const StopV2ChatResponseSchema = z
.object({
success: z.boolean().describe('是否成功停止')
});
export type StopV2ChatResponse = z.infer<typeof StopV2ChatResponseSchema>;
```
### 4.2 接口实现
**文件位置**: `projects/app/src/pages/api/v2/chat/stop.ts`
```typescript
import type { NextApiRequest, NextApiResponse } from 'next';
import { NextAPI } from '@/service/middleware/entry';
import { authChatCrud } from '@/service/support/permission/auth/chat';
import {
setAgentRuntimeStop,
waitForWorkflowComplete
} from '@fastgpt/service/core/workflow/dispatch/workflowStatus';
import { StopV2ChatSchema, type StopV2ChatResponse } from '@fastgpt/global/openapi/core/chat/controler/api';
async function handler(req: NextApiRequest, res: NextApiResponse): Promise<StopV2ChatResponse> {
const { appId, chatId, outLinkAuthData } = StopV2ChatSchema.parse(req.body);
// 鉴权 (复用聊天 CRUD 鉴权)
await authChatCrud({
req,
authToken: true,
authApiKey: true,
appId,
chatId,
...outLinkAuthData
});
// 设置停止标志
await setAgentRuntimeStop({
appId,
chatId
});
// 等待工作流完成 (最多等待 5 秒)
await waitForWorkflowComplete({ appId, chatId, timeout: 5000 });
return {
success: true
};
}
export default NextAPI(handler);
```
**接口文档** (`packages/global/openapi/core/chat/index.ts`):
```typescript
export const ChatPath: OpenAPIPath = {
// ... 其他路径
'/v2/chat/stop': {
post: {
summary: '停止 Agent 运行',
description: `优雅停止正在运行的 Agent, 会尝试等待当前节点结束后返回,最长 5s超过 5s 仍未结束,则会返回成功。
LLM 节点,流输出时会同时被终止,但 HTTP 请求节点这种可能长时间运行的,不会被终止。`,
tags: [TagsMap.chatPage],
requestBody: {
content: {
'application/json': {
schema: StopV2ChatSchema
}
}
},
responses: {
200: {
description: '成功停止工作流',
content: {
'application/json': {
schema: StopV2ChatResponseSchema
}
}
}
}
}
}
};
```
**说明**:
- 接口使用 `authChatCrud` 进行鉴权,支持 Token 和 API Key
- 支持分享链接和团队空间的鉴权数据
- 设置停止标志后等待最多 5 秒
- 无论是否超时,都返回 `success: true`
## 5. 前端改造
由于当前代码已经能够正常工作,且 v2 版本的后端已经实现了基于 Redis 的停止机制,前端可以保持现有的简单实现:
**保持现有实现的原因**:
1. 后端已经通过定时器轮询 Redis 实现了停止检测
2. 前端调用 `abort()` 后,后端会在下个检测周期(100ms内)发现停止标志
3. 简化前端逻辑,避免增加复杂性
4. 用户体验上,立即中断连接响应更快
**可选的增强方案**:
如果需要在前端显示更详细的停止状态,可以添加 API 客户端函数:
**文件位置**: `projects/app/src/web/core/chat/api.ts`
```typescript
import { POST } from '@/web/common/api/request';
import type { StopV2ChatParams, StopV2ChatResponse } from '@fastgpt/global/openapi/core/chat/controler/api';
/**
* 停止 v2 版本工作流运行
*/
export const stopV2Chat = (data: StopV2ChatParams) =>
POST<StopV2ChatResponse>('/api/v2/chat/stop', data);
```
**增强的 abortRequest 函数**:
```typescript
/* Abort chat completions, questionGuide */
const abortRequest = useMemoizedFn(async (reason: string = 'stop') => {
// 先调用 abort 中断连接
chatController.current?.abort(new Error(reason));
questionGuideController.current?.abort(new Error(reason));
pluginController.current?.abort(new Error(reason));
// v2 版本: 可选地通知后端优雅停止
if (chatBoxData?.app?.version === 'v2' && appId && chatId) {
try {
await stopV2Chat({
appId,
chatId,
outLinkAuthData
});
} catch (error) {
// 静默失败,不影响用户体验
console.warn('Failed to notify backend to stop workflow', error);
}
}
});
```
**建议**:
- **推荐**: 保持当前简单实现,后端已经足够健壮
- **可选**: 如果需要更精确的停止状态追踪,可以实现上述增强方案
## 6. 完整调用流程
### 6.1 正常停止流程
```
用户点击停止按钮
前端: abortRequest()
前端: chatController.abort() [立即中断 HTTP 连接]
[可选] 前端: POST /api/v2/chat/stop
后端: setAgentRuntimeStop(appId, chatId) [设置停止标志]
后端: 定时器检测到 Redis 停止标志,更新内存变量 stopping = true
后端: 下个节点执行前 checkIsStopping() 返回 true
后端: 停止处理新节点,记录日志
后端: 工作流 finally 块删除 Redis 停止标志
[可选] 后端: waitForWorkflowComplete() 检测到停止标志被删除
[可选] 前端: 显示停止成功提示
```
### 6.2 超时流程
```
[可选] 前端: POST /api/v2/chat/stop
后端: setAgentRuntimeStop(appId, chatId)
后端: waitForWorkflowComplete(timeout=5s)
后端: 5秒后停止标志仍存在
后端: 返回成功响应 (不区分超时)
[可选] 前端: 显示成功提示
后端: 工作流继续运行,最终完成后删除停止标志
```
### 6.3 工作流自然完成流程
```
工作流运行中
所有节点执行完成
dispatchWorkFlow.finally()
删除 Redis 停止标志
清理定时器
60秒 TTL 确保即使删除失败也会自动清理
```
### 6.4 时序说明
**关键时间点**:
- **100ms**: 后端定时器检查 Redis 停止标志的频率
- **5s**: stop 接口等待工作流完成的超时时间
- **60s**: Redis 键的 TTL,自动清理时间
**响应时间**:
- 用户点击停止 → HTTP 连接中断: **立即** (前端 abort)
- 停止标志写入 Redis: **< 50ms** (Redis SETEX 操作)
- 后端检测到停止: **< 100ms** (定时器轮询周期)
- 当前节点停止执行: **取决于节点类型**
- LLM 流式输出: **立即**中断流
- HTTP 请求节点: **等待请求完成**
- 其他节点: **等待当前操作完成**
## 7. 测试策略
### 7.1 单元测试
**Redis 工具函数测试**:
- `setAgentRuntimeStop` / `shouldWorkflowStop` 基本功能
- `delAgentRuntimeStopSign` 删除功能
- `waitForWorkflowComplete` 等待机制和超时
- 并发操作安全性
**文件位置**: `test/cases/service/core/app/workflow/workflowStatus.test.ts`
**测试用例**:
```typescript
describe('Workflow Status Redis Functions', () => {
test('should set stopping sign')
test('should return false for non-existent status')
test('should detect stopping status')
test('should return false after deleting stop sign')
test('should wait for workflow completion')
test('should timeout when waiting too long')
test('should delete workflow stop sign')
test('should handle concurrent stop sign operations')
});
```

View File

@ -0,0 +1,475 @@
---
name: create-skill-file
description: Guides Claude in creating well-structured SKILL.md files following best practices. Provides clear guidelines for naming, structure, and content organization to make skills easy to discover and execute.
---
# Claude Agent Skill 编写规范
> 如何创建高质量的 SKILL.md 文件
## 目录
- [快速开始](#快速开始)
- [核心原则](#核心原则)
- [文件结构规范](#文件结构规范)
- [命名和描述规范](#命名和描述规范)
- [内容编写指南](#内容编写指南)
- [质量检查清单](#质量检查清单)
---
## 快速开始
### 3步创建 Skill
**第1步: 创建目录**
```bash
mkdir -p .claude/skill/your-skill-name
cd .claude/skill/your-skill-name
```
**第2步: 创建 SKILL.md**
```markdown
---
name: your-skill-name
description: Brief description with trigger keywords and scenarios
---
# Your Skill Title
## When to Use This Skill
- User asks to [specific scenario]
- User mentions "[keyword]"
## How It Works
1. Step 1: [Action]
2. Step 2: [Action]
## Examples
**Input**: User request
**Output**: Expected result
```
**第3步: 测试**
- 在对话中使用 description 中的关键词触发
- 观察 Claude 是否正确执行
- 根据效果调整
---
## 核心原则
### 1. 保持简洁
只添加 Claude **不知道**的新知识:
- ✅ 项目特定的工作流程
- ✅ 特殊的命名规范或格式要求
- ✅ 自定义工具和脚本的使用方法
- ❌ 通用编程知识
- ❌ 显而易见的步骤
**示例对比**:
```markdown
# ❌ 过度详细
1. 创建 Python 文件
2. 导入必要的库
3. 定义函数
4. 编写主程序逻辑
# ✅ 简洁有效
使用 `scripts/api_client.py` 调用内部 API。
请求头必须包含 `X-Internal-Token`(从环境变量 `INTERNAL_API_KEY` 获取)。
```
### 2. 设定合适的自由度
| 自由度 | 适用场景 | 编写方式 |
|--------|---------|---------|
| **高** | 需要创造性、多种解决方案 | 提供指导原则,不限定具体步骤 |
| **中** | 有推荐模式但允许变化 | 提供参数化示例和默认流程 |
| **低** | 容易出错、需严格执行 | 提供详细的分步指令或脚本 |
**判断标准**:
- 任务是否有明确的"正确答案"? → 低自由度
- 是否需要适应不同场景? → 高自由度
- 错误的代价有多大? → 代价高则用低自由度
### 3. 渐进式披露
将复杂内容分层组织:
```
SKILL.md (主文档, 200-500行)
├── reference.md (详细文档)
├── examples.md (完整示例)
└── scripts/ (可执行脚本)
```
**规则**:
- SKILL.md 超过 500行 → 拆分子文件
- 子文件超过 100行 → 添加目录
- 引用深度 ≤ 1层
---
## 文件结构规范
### YAML Frontmatter
```yaml
---
name: skill-name-here
description: Clear description of what this skill does and when to activate it
---
```
**字段规范**:
| 字段 | 要求 | 说明 |
|------|------|------|
| `name` | 小写字母、数字、短横线,≤64字符 | 必须与目录名一致 |
| `description` | 纯文本,≤1024字符 | 用于检索和激活 |
**命名禁忌**:
- ❌ XML 标签、保留字(`anthropic`, `claude`)
- ❌ 模糊词汇(`helper`, `utility`, `manager`)
- ❌ 空格或下划线(用短横线 `-`)
**Description 技巧**:
```yaml
# ❌ 过于泛化
description: Helps with code tasks
# ✅ 具体且包含关键词
description: Processes CSV files and generates Excel reports with charts. Use when user asks to convert data formats or create visual reports.
# ✅ 说明触发场景
description: Analyzes Python code for security vulnerabilities using bandit. Activates when user mentions "security audit" or "vulnerability scan".
```
### 目录组织
**基础结构**(简单 Skill):
```
skill-name/
└── SKILL.md
```
**标准结构**(推荐):
```
skill-name/
├── SKILL.md
├── templates/
│ └── template.md
└── scripts/
└── script.py
```
---
## 命名和描述规范
### Skill 命名
**推荐格式**: 动名词形式 (verb-ing + noun)
```
✅ 好的命名:
- processing-csv-files
- generating-api-docs
- managing-database-migrations
❌ 不好的命名:
- csv (过于简短)
- data_processor (使用下划线)
- helper (过于模糊)
```
### Description 编写
**必须使用第三人称**:
```yaml
# ❌ 错误
description: I help you process PDFs
# ✅ 正确
description: Processes PDF documents and extracts structured data
```
**4C 原则**:
- **Clear** (清晰): 避免术语和模糊词汇
- **Concise** (简洁): 1-2句话说明核心功能
- **Contextual** (上下文): 说明适用场景
- **Complete** (完整): 功能 + 触发条件
---
## 内容编写指南
### "When to Use" 章节
明确说明触发场景:
```markdown
## When to Use This Skill
- User asks to analyze Python code for type errors
- User mentions "mypy" or "type checking"
- User is working in a Python project with type hints
- User needs to add type annotations
```
**模式**:
- 直接请求: "User asks to X"
- 关键词: "User mentions 'keyword'"
- 上下文: "User is working with X"
- 任务类型: "User needs to X"
### 工作流设计
**简单线性流程**:
```markdown
## How It Works
1. Scan the project for all `.py` files
2. Run `mypy --strict` on each file
3. Parse error output and categorize by severity
4. Generate summary report with fix suggestions
```
**条件分支流程**:
```markdown
## Workflow
1. **Check project type**
- If Django → Use `django-stubs` config
- If Flask → Use `flask-stubs` config
- Otherwise → Use default mypy config
2. **Run type checking**
- If errors found → Proceed to step 3
- If no errors → Report success and exit
```
**Checklist 模式**(验证型任务):
```markdown
## Pre-deployment Checklist
Execute in order. Stop if any step fails.
- [ ] Run tests: `npm test` (must pass)
- [ ] Build: `npm run build` (no errors)
- [ ] Check deps: `npm audit` (no critical vulnerabilities)
```
### 示例和模板
**输入-输出示例**:
```markdown
## Examples
### Example 1: Basic Check
**User Request**: "Check my code for type errors"
**Action**:
1. Scan for `.py` files
2. Run `mypy` on all files
**Output**:
Found 3 type errors in 2 files:
src/main.py:15: error: Missing return type
src/utils.py:42: error: Incompatible types
```
### 脚本集成
**何时使用脚本**:
- 简单命令 → 直接在 SKILL.md 中说明
- 复杂流程 → 提供独立脚本
**脚本编写规范**:
```python
#!/usr/bin/env python3
"""
Brief description of what this script does.
Usage:
python script.py <arg> [--option value]
"""
import argparse
DEFAULT_VALUE = 80 # Use constants, not magic numbers
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("directory", help="Directory to process")
parser.add_argument("--threshold", type=int, default=DEFAULT_VALUE)
args = parser.parse_args()
# Validate inputs
if not Path(args.directory).is_dir():
print(f"Error: {args.directory} not found")
return 1
# Execute
result = process(args.directory, args.threshold)
# Report
print(f"Processed {result['count']} files")
return 0
if __name__ == "__main__":
exit(main())
```
**关键规范**:
- ✅ Shebang 行和 docstring
- ✅ 类型注解和常量
- ✅ 参数验证和错误处理
- ✅ 清晰的返回值(0=成功, 1=失败)
### 最佳实践
**Do**:
- ✅ 提供可执行的命令和脚本
- ✅ 包含输入-输出示例
- ✅ 说明验证标准和成功条件
- ✅ 包含 Do/Don't 清单
**Don't**:
- ❌ 包含 Claude 已知的通用知识
- ❌ 使用抽象描述而非具体步骤
- ❌ 遗漏错误处理指导
- ❌ 示例使用伪代码而非真实代码
---
## 质量检查清单
### 核心质量
- [ ] `name` 符合命名规范(小写、短横线、≤64字符)
- [ ] `description` 包含触发关键词和场景(≤1024字符)
- [ ] 名称与目录名一致
- [ ] 只包含 Claude 不知道的信息
- [ ] 没有冗余或重复内容
### 功能完整性
- [ ] 有"When to Use"章节,列出 3-5 个触发场景
- [ ] 有清晰的执行流程或步骤
- [ ] 至少 2-3 个完整示例
- [ ] 包含输入和预期输出
- [ ] 错误处理有指导
### 结构规范
- [ ] 章节组织清晰
- [ ] 超过 200行有目录导航
- [ ] 引用层级 ≤ 1层
- [ ] 所有路径使用正斜杠 `/`
- [ ] 术语使用一致
### 脚本和模板
- [ ] 脚本包含使用说明和参数文档
- [ ] 脚本有错误处理
- [ ] 避免魔法数字,使用配置
- [ ] 模板格式清晰易用
### 最终检查
- [ ] 通读全文,确保流畅易读
- [ ] 使用实际场景测试触发
- [ ] 长度适中(200-500行,或已拆分)
---
## 常见问题
**Q: Skill 多长才合适?**
- 最小: 50-100行
- 理想: 200-500行
- 最大: 500行(超过则拆分)
**Q: 如何让 Skill 更容易激活?**
- 在 `description` 中使用用户会说的关键词
- 说明具体场景("when user asks to X")
- 提及相关工具名称
**Q: 多个 Skill 功能重叠怎么办?**
- 使用更具体的 `description` 区分
- 在"When to Use"中说明关系
- 考虑合并为一个 Skill
**Q: Skill 需要维护吗?**
- 每季度审查一次,更新过时信息
- 根据使用反馈迭代
- 工具或 API 变更时及时更新
---
## 快速参考
### Frontmatter 模板
```yaml
---
name: skill-name
description: Brief description with trigger keywords
---
```
### 基础结构模板
```markdown
# Skill Title
## When to Use This Skill
- Scenario 1
- Scenario 2
## How It Works
1. Step 1
2. Step 2
## Examples
### Example 1
...
## References
- [Link](url)
```
---
## 相关资源
- [Claude Agent Skills 官方文档](https://docs.claude.com/en/docs/agents-and-tools/agent-skills)
- [Best Practices Checklist](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices)
- [模板文件](templates/) - 开箱即用的模板
- [基础 skill 的模板](templates/basic-skill-template.md)
- [工作流 skill 的模板](templates/workflow-skill-template.md)
- [示例库](examples/) - 完整的 Skill 示例
- [优秀示例](examples/good-example.md)
- [常见错误示例](examples/bad-example.md)
---

View File

@ -0,0 +1,867 @@
# 不好的 Skill 示例与改进建议
本文档展示常见的 Skill 编写错误,并提供改进建议。
---
## 示例 1: 过于模糊的 Skill
### ❌ 不好的版本
```markdown
---
name: helper
description: Helps with code
---
# Code Helper
This skill helps you with coding tasks.
## Usage
Use this when you need help with code.
## How It Works
1. Analyzes your code
2. Provides suggestions
3. Helps improve it
```
### 问题分析
| 问题 | 说明 | 影响 |
|------|------|------|
| **模糊的名称** | "helper" 太泛化,没有说明具体做什么 | Claude 不知道何时激活 |
| **无关键词** | description 缺少具体触发词 | 用户很难激活这个 Skill |
| **无具体场景** | 没说明适用什么类型的代码 | 适用范围不清 |
| **抽象的步骤** | "Provides suggestions" 太模糊 | Claude 不知道具体做什么 |
| **无示例** | 没有实际例子 | 用户和 Claude 都不清楚预期输出 |
### ✅ 改进版本
```markdown
---
name: python-code-refactoring
description: Refactors Python code to improve readability and maintainability using standard patterns. Activates when user asks to clean up code, improve structure, or mentions refactoring. Focuses on function extraction, variable naming, and removing code smells.
---
# Python Code Refactoring Skill
Improves Python code quality through systematic refactoring.
## When to Use This Skill
- User asks to "refactor this code", "clean up this function", or "improve readability"
- User mentions "code smell", "technical debt", or "maintainability"
- User is working with Python code that has:
- Long functions (>50 lines)
- Nested conditionals (>3 levels)
- Repeated code patterns
- Unclear variable names
## How It Works
### 1. Identify Refactoring Opportunities
Scan code for common issues:
- Functions longer than 50 lines
- Repeated code blocks (DRY violations)
- Magic numbers without constants
- Unclear variable names (x, temp, data)
- Deep nesting (>3 levels)
### 2. Prioritize Changes
Focus on high-impact refactorings:
- **High**: Extract complex nested logic to functions
- **Medium**: Rename unclear variables
- **Low**: Minor style improvements
### 3. Apply Refactorings
**Extract Method**:
```python
# Before
def process_order(order):
# 50 lines of validation logic
# 30 lines of payment processing
# 20 lines of email notification
# After
def process_order(order):
validate_order(order)
process_payment(order)
send_confirmation_email(order)
```
**Replace Magic Numbers**:
```python
# Before
if user.age < 18:
return False
# After
MINIMUM_AGE = 18
if user.age < MINIMUM_AGE:
return False
```
**Simplify Conditionals**:
```python
# Before
if user.role == 'admin':
return True
elif user.role == 'moderator':
return True
elif user.role == 'editor':
return True
else:
return False
# After
PRIVILEGED_ROLES = {'admin', 'moderator', 'editor'}
return user.role in PRIVILEGED_ROLES
```
### 4. Verify Improvements
After refactoring:
- Run existing tests (all must pass)
- Check code length reduced
- Verify improved readability
## Example
**User Request**: "Refactor this function, it's too long"
```python
def process_user_registration(data):
if not data.get('email'):
return {'error': 'Email required'}
if '@' not in data['email']:
return {'error': 'Invalid email'}
if not data.get('password'):
return {'error': 'Password required'}
if len(data['password']) < 8:
return {'error': 'Password too short'}
if not any(c.isupper() for c in data['password']):
return {'error': 'Password needs uppercase'}
existing = db.query(User).filter_by(email=data['email']).first()
if existing:
return {'error': 'Email already registered'}
salt = bcrypt.gensalt()
hashed = bcrypt.hashpw(data['password'].encode(), salt)
user = User(email=data['email'], password_hash=hashed)
db.add(user)
db.commit()
token = jwt.encode({'user_id': user.id}, SECRET_KEY)
send_email(data['email'], 'Welcome!', 'Thanks for registering')
return {'success': True, 'token': token}
```
**Refactored**:
```python
def process_user_registration(data):
"""Register new user with validation and email confirmation."""
# Validation
validation_error = validate_registration_data(data)
if validation_error:
return {'error': validation_error}
# Check uniqueness
if user_exists(data['email']):
return {'error': 'Email already registered'}
# Create user
user = create_user(data['email'], data['password'])
# Generate token
token = generate_auth_token(user.id)
# Send welcome email
send_welcome_email(user.email)
return {'success': True, 'token': token}
def validate_registration_data(data):
"""Validate registration data, return error message or None."""
if not data.get('email'):
return 'Email required'
if '@' not in data['email']:
return 'Invalid email'
if not data.get('password'):
return 'Password required'
return validate_password_strength(data['password'])
def validate_password_strength(password):
"""Check password meets security requirements."""
MIN_PASSWORD_LENGTH = 8
if len(password) < MIN_PASSWORD_LENGTH:
return f'Password must be at least {MIN_PASSWORD_LENGTH} characters'
if not any(c.isupper() for c in password):
return 'Password must contain uppercase letter'
return None
def user_exists(email):
"""Check if user with given email already exists."""
return db.query(User).filter_by(email=email).first() is not None
def create_user(email, password):
"""Create and save new user with hashed password."""
salt = bcrypt.gensalt()
hashed = bcrypt.hashpw(password.encode(), salt)
user = User(email=email, password_hash=hashed)
db.add(user)
db.commit()
return user
def generate_auth_token(user_id):
"""Generate JWT authentication token."""
return jwt.encode({'user_id': user_id}, SECRET_KEY)
def send_welcome_email(email):
"""Send welcome email to new user."""
send_email(email, 'Welcome!', 'Thanks for registering')
```
**Improvements**:
- ✅ Main function reduced from 20 lines to 15 lines
- ✅ Each function has single responsibility
- ✅ Magic number (8) extracted to constant
- ✅ All functions documented with docstrings
- ✅ Easier to test individual functions
- ✅ Easier to modify validation rules
## Best Practices
- ✅ Extract functions with clear names
- ✅ Use constants instead of magic numbers
- ✅ Keep functions under 30 lines
- ✅ Maximum nesting depth of 2-3 levels
- ✅ Write docstrings for extracted functions
```
### 改进要点
1. ✅ 具体的名称: `python-code-refactoring` 而非 `helper`
2. ✅ 详细的 description: 包含触发词和适用场景
3. ✅ 明确的触发条件: 列出具体的使用场景
4. ✅ 可执行的步骤: 每个步骤都有具体操作
5. ✅ 实际代码示例: 展示完整的重构过程
6. ✅ 具体的改进指标: 列出可验证的改进效果
---
## 示例 2: 过度冗长的 Skill
### ❌ 不好的版本
```markdown
---
name: python-basics
description: Teaches Python programming basics
---
# Python Basics
This skill helps you learn Python programming.
## Variables
In Python, you can create variables like this:
```python
x = 5
y = "hello"
z = 3.14
```
Python supports different data types:
- Integers (int): whole numbers like 1, 2, 3
- Floats (float): decimal numbers like 3.14, 2.5
- Strings (str): text like "hello", 'world'
- Booleans (bool): True or False
## Conditional Statements
You can use if statements to make decisions:
```python
if x > 0:
print("Positive")
elif x < 0:
print("Negative")
else:
print("Zero")
```
The if statement checks a condition. If True, it runs the indented code.
The elif means "else if" and provides an alternative condition.
The else runs if none of the above conditions are True.
## Loops
Python has two main types of loops:
### For Loops
For loops iterate over a sequence:
```python
for i in range(5):
print(i)
```
This prints numbers 0 through 4. The range() function generates numbers.
### While Loops
While loops continue while a condition is True:
```python
i = 0
while i < 5:
print(i)
i += 1
```
This does the same thing as the for loop above.
## Functions
Functions are reusable blocks of code:
```python
def greet(name):
return f"Hello, {name}!"
```
The def keyword defines a function. The function name is greet.
It takes one parameter called name. The return statement sends back a value.
## Lists
Lists store multiple items:
```python
fruits = ["apple", "banana", "orange"]
```
You can access items by index:
```python
first_fruit = fruits[0] # "apple"
```
... [continues for 50 more sections about Python basics]
```
### 问题分析
| 问题 | 说明 | 影响 |
|------|------|------|
| **包含通用知识** | Python 基础知识 Claude 已经知道 | 浪费 token,增加检索成本 |
| **教程式内容** | 像教程而非工作指南 | Claude 不需要学习,需要的是工作指导 |
| **过度详细** | 解释显而易见的概念 | 信息过载,难以找到关键信息 |
| **缺少项目特定信息** | 没有项目相关的规范或约定 | 无法提供项目特定价值 |
### ✅ 改进版本
```markdown
---
name: project-python-conventions
description: Enforces Python coding conventions specific to this project. Activates when user writes Python code or asks about code style. Covers naming, imports, error handling, and project-specific patterns.
---
# Project Python Conventions
Project-specific Python coding standards and patterns.
## When to Use This Skill
- User is writing or reviewing Python code
- User asks about code style or conventions
- User needs guidance on project patterns
## Import Organization
Follow this order:
```python
# 1. Standard library
import os
import sys
from typing import Optional, List
# 2. Third-party packages
import numpy as np
from fastapi import FastAPI
# 3. Local application imports
from core.models import User
from utils.helpers import format_date
```
## Naming Conventions
### Project-Specific Rules
| Type | Pattern | Example |
|------|---------|---------|
| API endpoints | `/api/v1/{resource}` | `/api/v1/users` |
| Database tables | `{resource}_table` | `users_table` |
| Environment variables | `APP_{NAME}` | `APP_DATABASE_URL` |
| Config files | `{env}.config.py` | `prod.config.py` |
### Forbidden Patterns
```python
# ❌ Don't use single-letter variables (except i, j, k in loops)
d = get_data()
# ✅ Do use descriptive names
user_data = get_data()
# ❌ Don't use abbreviations
usr_mgr = UserManager()
# ✅ Do use full words
user_manager = UserManager()
```
## Error Handling Pattern
Use project's custom exceptions:
```python
from core.exceptions import UserNotFoundError, ValidationError
def get_user(user_id: int) -> User:
"""
Retrieve user by ID.
Raises:
UserNotFoundError: If user doesn't exist
ValidationError: If user_id is invalid
"""
if not isinstance(user_id, int) or user_id <= 0:
raise ValidationError(f"Invalid user_id: {user_id}")
user = db.query(User).get(user_id)
if user is None:
raise UserNotFoundError(f"User {user_id} not found")
return user
```
**Never** use bare `except:` - always catch specific exceptions.
## Database Queries
Always use the project's query helper:
```python
# ❌ Don't use raw SQLAlchemy queries
users = db.query(User).filter(User.age > 18).all()
# ✅ Do use query helper
from core.database import QueryBuilder
users = QueryBuilder(User).where('age', '>', 18).get()
```
## API Response Format
All API endpoints must return this format:
```python
{
"success": True,
"data": {
# ... response data
},
"error": None,
"meta": {
"timestamp": "2025-01-31T12:00:00Z",
"version": "1.0"
}
}
```
Use the response helper:
```python
from core.responses import success_response, error_response
@app.get("/users/{id}")
async def get_user(id: int):
try:
user = get_user_data(id)
return success_response(user)
except UserNotFoundError as e:
return error_response(str(e), status_code=404)
```
## Testing Patterns
### Test File Location
```
project/
├── src/
│ └── services/
│ └── user_service.py
└── tests/
└── services/
└── test_user_service.py
```
### Test Naming
```python
# Format: test_{function_name}_{scenario}_{expected_result}
def test_get_user_valid_id_returns_user():
"""Test getting user with valid ID returns User object."""
pass
def test_get_user_invalid_id_raises_validation_error():
"""Test getting user with invalid ID raises ValidationError."""
pass
def test_get_user_nonexistent_id_raises_not_found_error():
"""Test getting non-existent user raises UserNotFoundError."""
pass
```
## References
- [Full Style Guide](docs/STYLE_GUIDE.md)
- [API Standards](docs/API_STANDARDS.md)
- [Database Conventions](docs/DATABASE.md)
```
### 改进要点
1. ✅ 只包含项目特定信息: 不教 Python 基础
2. ✅ 简洁明了: 200 行 vs 原来的 500+ 行
3. ✅ 实用的规则: 直接可应用的约定
4. ✅ 清晰的示例: Do/Don't 对比
5. ✅ 引用详细文档: 用链接而非全部内容
---
## 示例 3: 缺少上下文的 Skill
### ❌ 不好的版本
```markdown
---
name: deployment
description: Deploys code
---
# Deployment
## Steps
1. Build the code
2. Run tests
3. Deploy to server
4. Verify deployment
```
### 问题分析
| 问题 | 说明 | 影响 |
|------|------|------|
| **无具体命令** | 没说明如何 build, test, deploy | Claude 无法执行 |
| **无环境区分** | 开发、测试、生产部署可能不同 | 可能部署到错误环境 |
| **无错误处理** | 没说明出错时怎么办 | 失败时不知如何恢复 |
| **无验证标准** | "Verify" 太模糊 | 不知道检查什么 |
### ✅ 改进版本
```markdown
---
name: deploy-to-production
description: Deploys application to production environment on AWS. Activates when user asks to deploy to prod or mentions production deployment. Includes pre-flight checks, blue-green deployment, and rollback procedures.
---
# Production Deployment
Safely deploy application to production with zero downtime.
## When to Use This Skill
- User asks to "deploy to production" or "push to prod"
- User mentions "production deployment", "go live"
- User needs to rollback a deployment
## Prerequisites
Before deployment, verify:
```bash
# 1. On main branch
git branch --show-current # Must be "main"
# 2. All tests pass
npm test # Exit code must be 0
# 3. Build succeeds
npm run build # Must complete without errors
# 4. No uncommitted changes
git status # Must show "nothing to commit"
# 5. Latest code pulled
git pull origin main # Must be up to date
```
If any prerequisite fails, **stop** and fix the issue.
## Deployment Process
### Step 1: Pre-flight Checks
```bash
# Run deployment readiness script
./scripts/preflight-check.sh
# Expected output:
# ✓ Tests passed
# ✓ Build succeeded
# ✓ Environment variables configured
# ✓ Database migrations ready
# ✓ Ready to deploy
```
### Step 2: Database Migrations (if needed)
```bash
# Connect to production database
aws rds describe-db-instances --db-instance-identifier prod-db
# Backup before migration
./scripts/backup-database.sh prod
# Run migrations
NODE_ENV=production npm run migrate
# Verify migration succeeded
npm run migrate:status
```
### Step 3: Blue-Green Deployment
```bash
# Deploy to green environment (inactive)
aws elasticbeanstalk create-environment \
--application-name myapp \
--environment-name myapp-prod-green \
--solution-stack-name "64bit Amazon Linux 2 v5.x.x running Node.js 18"
# Wait for green environment to be healthy
aws elasticbeanstalk wait environment-updated \
--environment-name myapp-prod-green
# Check green environment health
curl https://myapp-prod-green.aws.com/health
# Expected: {"status": "healthy"}
```
### Step 4: Smoke Tests
```bash
# Run smoke tests against green environment
BASE_URL=https://myapp-prod-green.aws.com npm run test:smoke
# Tests must include:
# - Health check endpoint
# - Authentication flow
# - Critical API endpoints
# - Database connectivity
```
### Step 5: Switch Traffic
```bash
# Swap URLs (blue becomes green, green becomes blue)
aws elasticbeanstalk swap-environment-cnames \
--source-environment-name myapp-prod-blue \
--destination-environment-name myapp-prod-green
# Wait 5 minutes for DNS propagation
echo "Waiting for DNS propagation..."
sleep 300
# Verify production URL serves new version
curl https://myapp.com/version
# Expected: {"version": "1.2.3"} (new version)
```
### Step 6: Monitor
```bash
# Monitor error rates for 15 minutes
aws cloudwatch get-metric-statistics \
--namespace AWS/ELB \
--metric-name HTTPCode_Backend_5XX \
--start-time $(date -u -d '15 minutes ago' +%Y-%m-%dT%H:%M:%S) \
--end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
--period 300 \
--statistics Sum
# Error rate must be < 1%
```
If error rate exceeds 1%:
- **Rollback immediately** (see Rollback section)
- Investigate issue
- Fix and redeploy
### Step 7: Cleanup
```bash
# After 24 hours, if no issues:
# Terminate old blue environment
aws elasticbeanstalk terminate-environment \
--environment-name myapp-prod-blue
```
## Rollback Procedure
If deployment fails:
```bash
# 1. Swap back to previous version
aws elasticbeanstalk swap-environment-cnames \
--source-environment-name myapp-prod-green \
--destination-environment-name myapp-prod-blue
# 2. Verify old version is serving
curl https://myapp.com/version
# Expected: {"version": "1.2.2"} (old version)
# 3. Rollback database migrations (if ran)
NODE_ENV=production npm run migrate:rollback
# 4. Notify team
./scripts/notify-rollback.sh "Deployment rolled back due to [reason]"
```
## Example Deployment
**User Request**: "Deploy v1.2.3 to production"
**Execution Log**:
```
[14:00:00] Starting deployment of v1.2.3 to production
[14:00:05] ✓ Pre-flight checks passed
[14:00:10] ✓ Database backup completed
[14:00:30] ✓ Database migrations applied (3 migrations)
[14:01:00] → Creating green environment
[14:05:00] ✓ Green environment healthy
[14:05:30] ✓ Smoke tests passed (12/12)
[14:06:00] → Switching traffic to green environment
[14:11:00] ✓ DNS propagated
[14:11:05] ✓ Production serving v1.2.3
[14:11:10] → Monitoring for 15 minutes
[14:26:10] ✓ Error rate: 0.05% (within threshold)
[14:26:15] ✓ Deployment successful
[14:26:20] → Old environment will be terminated in 24h
Deployment completed successfully in 26 minutes
```
## References
- [AWS Deployment Guide](docs/AWS_DEPLOYMENT.md)
- [Runbook](docs/RUNBOOK.md)
- [On-Call Procedures](docs/ONCALL.md)
```
### 改进要点
1. ✅ 具体命令: 每个步骤都有可执行的命令
2. ✅ 环境明确: 专注于生产环境部署
3. ✅ 验证标准: 说明检查什么和预期结果
4. ✅ 错误处理: 包含完整的回滚流程
5. ✅ 实际输出: 展示命令的预期输出
6. ✅ 监控指标: 定义具体的成功标准
---
## 常见错误总结
### 1. 命名和描述问题
| 错误 | 示例 | 改进 |
|------|------|------|
| 过于泛化 | `name: helper` | `name: python-type-hints` |
| 缺少关键词 | `description: Helps with code` | `description: Adds type hints to Python using mypy` |
| 使用第一人称 | `description: I help you...` | `description: Adds type hints...` |
### 2. 内容问题
| 错误 | 说明 | 改进 |
|------|------|------|
| 包含通用知识 | 教 Python 基础语法 | 只包含项目特定规范 |
| 过于抽象 | "分析代码并提供建议" | "检查函数长度、变量命名、重复代码" |
| 缺少示例 | 只有文字描述 | 包含输入-输出示例 |
### 3. 结构问题
| 错误 | 说明 | 改进 |
|------|------|------|
| 无层次结构 | 所有内容混在一起 | 使用标题、列表、代码块组织 |
| 缺少"When to Use" | 不知道何时激活 | 列出 3-5 个触发场景 |
| 无验证步骤 | 不知道如何确认成功 | 说明检查项和预期结果 |
### 4. 自由度问题
| 错误 | 说明 | 改进 |
|------|------|------|
| 创意任务低自由度 | 为架构设计提供分步指令 | 提供指导原则和考虑因素 |
| 危险任务高自由度 | 生产部署没有具体步骤 | 提供详细的检查清单 |
| 不匹配任务类型 | 代码生成用教程式内容 | 提供模板和实际示例 |
---
## 快速检查清单
在发布 Skill 之前,问自己:
### 基础检查
- [ ] Name 是否具体且描述性强?
- [ ] Description 包含触发关键词和场景?
- [ ] 有明确的"When to Use"章节?
- [ ] 内容只包含 Claude 不知道的信息?
### 内容检查
- [ ] 是否有实际的代码示例?
- [ ] 步骤是否具体可执行?
- [ ] 是否说明了如何验证成功?
- [ ] 是否包含错误处理指导?
### 结构检查
- [ ] 内容组织清晰(使用标题、列表)?
- [ ] 自由度设定合适(匹配任务类型)?
- [ ] 长度合适(200-500行,或拆分子文件)?
- [ ] 包含 Do/Don't 最佳实践?
如果有任何一项答"否",参考本文档的改进建议进行修改。

View File

@ -0,0 +1,908 @@
# 好的 Skill 示例
本文档展示几个编写良好的 SKILL.md 示例,说明最佳实践的实际应用。
---
## 示例 1: 数据库迁移 Skill (高质量基础 Skill)
```markdown
---
name: database-migration
description: Manages database schema migrations using Alembic for SQLAlchemy projects. Activates when user asks to create migrations, upgrade/downgrade database, or mentions Alembic. Handles both development and production scenarios with safety checks.
---
# Database Migration Skill
Automates database schema migration management using Alembic.
## When to Use This Skill
- User asks to "create migration", "update database schema", or "rollback migration"
- User mentions "Alembic", "database migration", or "schema change"
- User is working in a Python project with SQLAlchemy models
- User needs to apply or revert database changes
## Quick Start
Create a new migration:
```bash
alembic revision --autogenerate -m "Description of changes"
```
Apply migrations:
```bash
alembic upgrade head
```
## How It Works
### Creating Migrations
1. **Detect model changes**
- Scan SQLAlchemy models in `models/` directory
- Compare with current database schema
- Identify additions, modifications, deletions
2. **Generate migration script**
- Run `alembic revision --autogenerate`
- Review generated script for accuracy
- Edit if necessary (Alembic can't auto-detect everything)
3. **Verify migration**
- Check upgrade() function is correct
- Ensure downgrade() function reverses changes
- Test on development database first
### Applying Migrations
1. **Safety checks**
- Backup database (production only)
- Verify no pending migrations
- Check database connectivity
2. **Execute migration**
- Run `alembic upgrade head`
- Monitor for errors
- Verify schema matches expected state
3. **Post-migration validation**
- Run application tests
- Check data integrity
- Confirm application starts successfully
## Examples
### Example 1: Add New Column
**User Request**: "Add an email column to the users table"
**Step 1**: Update the model
```python
# models/user.py
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
username = Column(String(50), nullable=False)
email = Column(String(120), nullable=True) # ← New field
```
**Step 2**: Generate migration
```bash
alembic revision --autogenerate -m "Add email column to users table"
```
**Generated migration** (alembic/versions/abc123_add_email.py):
```python
def upgrade():
op.add_column('users', sa.Column('email', sa.String(120), nullable=True))
def downgrade():
op.drop_column('users', 'email')
```
**Step 3**: Review and apply
```bash
# Review the migration file
cat alembic/versions/abc123_add_email.py
# Apply migration
alembic upgrade head
```
**Output**:
```
INFO [alembic.runtime.migration] Running upgrade xyz789 -> abc123, Add email column to users table
```
### Example 2: Complex Migration with Data Changes
**User Request**: "Split the 'name' column into 'first_name' and 'last_name'"
**Step 1**: Create empty migration (can't auto-generate data changes)
```bash
alembic revision -m "Split name into first_name and last_name"
```
**Step 2**: Write custom migration
```python
def upgrade():
# Add new columns
op.add_column('users', sa.Column('first_name', sa.String(50)))
op.add_column('users', sa.Column('last_name', sa.String(50)))
# Migrate existing data
connection = op.get_bind()
users = connection.execute("SELECT id, name FROM users")
for user_id, name in users:
parts = name.split(' ', 1)
first = parts[0]
last = parts[1] if len(parts) > 1 else ''
connection.execute(
"UPDATE users SET first_name = %s, last_name = %s WHERE id = %s",
(first, last, user_id)
)
# Make new columns non-nullable and drop old column
op.alter_column('users', 'first_name', nullable=False)
op.alter_column('users', 'last_name', nullable=False)
op.drop_column('users', 'name')
def downgrade():
# Add back name column
op.add_column('users', sa.Column('name', sa.String(100)))
# Restore data
connection = op.get_bind()
users = connection.execute("SELECT id, first_name, last_name FROM users")
for user_id, first, last in users:
full_name = f"{first} {last}".strip()
connection.execute(
"UPDATE users SET name = %s WHERE id = %s",
(full_name, user_id)
)
op.alter_column('users', 'name', nullable=False)
op.drop_column('users', 'first_name')
op.drop_column('users', 'last_name')
```
**Step 3**: Test thoroughly
```bash
# Apply migration
alembic upgrade head
# Verify data
python -c "from models import User; print(User.query.first().first_name)"
# Test rollback
alembic downgrade -1
python -c "from models import User; print(User.query.first().name)"
# Reapply
alembic upgrade head
```
## Best Practices
### Do
- ✅ Always review auto-generated migrations before applying
- ✅ Test migrations on development database first
- ✅ Write reversible downgrade() functions
- ✅ Backup production databases before major migrations
- ✅ Use meaningful migration messages
### Don't
- ❌ Trust auto-generated migrations blindly
- ❌ Skip downgrade() implementation
- ❌ Apply untested migrations to production
- ❌ Modify existing migration files after they're committed
- ❌ Use raw SQL without bind parameters
## Troubleshooting
### "Target database is not up to date"
**Problem**: Someone else applied migrations you don't have locally
**Solution**:
```bash
git pull # Get latest migrations
alembic upgrade head # Apply them locally
```
### "Can't locate revision identified by 'xyz'"
**Problem**: Migration file deleted or branch conflict
**Solution**:
1. Check if migration file exists in `alembic/versions/`
2. If missing, restore from git history
3. If branch conflict, merge migration branches:
```bash
alembic merge -m "Merge migration branches" head1 head2
```
### Migration fails mid-execution
**Problem**: Error occurred during migration
**Solution**:
1. Check error message for specifics
2. Manually fix database to consistent state if needed
3. Update migration script to fix the issue
4. Mark migration as completed or retry:
```bash
# Mark as done without running
alembic stamp head
# Or fix and retry
alembic upgrade head
```
## Configuration
### Project Structure
```
project/
├── alembic/
│ ├── versions/ # Migration scripts
│ ├── env.py # Alembic environment
│ └── script.py.mako # Migration template
├── alembic.ini # Alembic configuration
└── models/ # SQLAlchemy models
├── __init__.py
├── user.py
└── post.py
```
### alembic.ini Configuration
```ini
[alembic]
script_location = alembic
sqlalchemy.url = driver://user:pass@localhost/dbname
[loggers]
keys = root,sqlalchemy,alembic
[logger_alembic]
level = INFO
handlers = console
qualname = alembic
```
## References
- [Alembic Documentation](https://alembic.sqlalchemy.org/)
- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/)
- [Project Migration Guidelines](docs/database-migrations.md)
```
### 为什么这是好的 Skill?
1. ✅ **清晰的 description**: 包含触发关键词 ("Alembic", "create migrations") 和场景 ("SQLAlchemy projects")
2. ✅ **具体的触发条件**: "When to Use" 列出 4 个明确场景
3. ✅ **分步工作流**: 每个操作都有清晰的 1-2-3 步骤
4. ✅ **实际示例**: 包含简单和复杂两个示例,有完整代码
5. ✅ **最佳实践**: Do/Don't 清单易于遵循
6. ✅ **故障排除**: 覆盖 3 个常见问题及解决方案
7. ✅ **项目特定信息**: 包含配置和目录结构
---
## 示例 2: API 文档生成 Skill (优秀的工作流 Skill)
```markdown
---
name: api-documentation-generation
description: Generates OpenAPI/Swagger documentation from FastAPI or Flask applications. Activates when user asks to create API docs, generate OpenAPI spec, or needs to document REST endpoints. Supports automatic extraction and custom annotations.
---
# API Documentation Generation Skill
Automates creation of comprehensive API documentation from Python web applications.
## When to Use This Skill
- User asks to "generate API docs" or "create OpenAPI spec"
- User mentions "Swagger", "OpenAPI", "API documentation"
- User has a FastAPI or Flask application
- User needs to document REST API endpoints
## Workflow
### Phase 1: Discovery
1. **Identify framework**
- Check for FastAPI: `from fastapi import FastAPI` in codebase
- Check for Flask: `from flask import Flask` in codebase
- Check for Flask-RESTful: `from flask_restful import Resource`
2. **Locate API definitions**
- Scan for route decorators: `@app.get()`, `@app.post()`, `@app.route()`
- Find API routers and blueprints
- Identify request/response models
3. **Extract metadata**
- Endpoint paths and HTTP methods
- Request parameters (path, query, body)
- Response schemas and status codes
- Authentication requirements
### Phase 2: Enhancement
1. **Review docstrings**
- Check if endpoints have docstrings
- Verify docstrings follow format (summary, description, params, returns)
- Flag missing documentation
2. **Add missing docs** (if user approves)
- Generate docstrings based on type hints
- Infer descriptions from parameter names
- Add example requests/responses
3. **Validate schemas**
- Ensure Pydantic models are well-documented
- Check for missing field descriptions
- Verify example values are provided
### Phase 3: Generation
1. **Generate OpenAPI spec**
```bash
# For FastAPI
python -c "from main import app; import json; print(json.dumps(app.openapi()))" > openapi.json
# For Flask with flasgger
python scripts/generate_swagger.py > swagger.json
```
2. **Create Swagger UI**
- Copy Swagger UI static files to `docs/api/`
- Configure to load generated spec
- Test in browser: `http://localhost:8000/docs`
3. **Generate Markdown docs**
- Use `openapi-to-md` to create human-readable docs
- Organize by tags/resource groups
- Add navigation and table of contents
### Phase 4: Validation
1. **Check completeness**
- All endpoints documented?
- All parameters described?
- Example requests provided?
2. **Validate spec**
```bash
openapi-spec-validator openapi.json
```
3. **Test interactive docs**
- Try sample requests in Swagger UI
- Verify authentication flows work
- Check response schemas match actual responses
## Examples
### Example 1: FastAPI Application
**User Request**: "Generate API documentation for my FastAPI app"
**Discovery**:
```
Found FastAPI application in: main.py
Endpoints discovered:
- GET /users (List users)
- POST /users (Create user)
- GET /users/{id} (Get user by ID)
- PUT /users/{id} (Update user)
- DELETE /users/{id} (Delete user)
```
**Enhancement**:
```
Checking documentation coverage...
✓ GET /users - Well documented
✗ POST /users - Missing response examples
✗ GET /users/{id} - No description
✗ PUT /users/{id} - No description
✗ DELETE /users/{id} - No description
Would you like me to add missing documentation?
```
**User**: Yes
**Adding docs**:
```python
@app.get("/users/{id}", summary="Get user by ID")
async def get_user(id: int):
"""
Retrieve a single user by their unique ID.
Args:
id: The unique identifier of the user
Returns:
User object with id, name, email, and created_at fields
Raises:
404: User not found
"""
# ... implementation
```
**Generation**:
```bash
Generating OpenAPI specification...
✓ openapi.json created (15.2 KB)
✓ Swagger UI deployed to docs/api/
✓ Markdown docs created in docs/api/endpoints/
View documentation at: http://localhost:8000/docs
```
### Example 2: Flask Application with Custom Schemas
**User Request**: "Document my Flask API and include request/response examples"
**Discovery**:
```
Found Flask application with Flask-RESTful
Endpoints:
- GET /api/products
- POST /api/products
- GET /api/products/<id>
- PATCH /api/products/<id>
- DELETE /api/products/<id>
```
**Custom Examples Added**:
```python
class ProductList(Resource):
def get(self):
"""
Get all products
Example Response:
```json
{
"products": [
{
"id": 1,
"name": "Widget",
"price": 29.99,
"stock": 100
}
],
"total": 1
}
```
"""
pass
def post(self):
"""
Create a new product
Example Request:
```json
{
"name": "New Widget",
"price": 39.99,
"stock": 50
}
```
Example Response:
```json
{
"id": 2,
"name": "New Widget",
"price": 39.99,
"stock": 50,
"created_at": "2025-01-31T12:00:00Z"
}
```
"""
pass
```
**Result**:
```
Generated documentation:
- openapi.json (with examples)
- Swagger UI at /api/docs
- Postman collection at docs/api/postman_collection.json
- Markdown API reference at docs/api/README.md
All endpoints now include:
✓ Request examples
✓ Response examples
✓ Error codes
✓ Authentication requirements
```
## Configuration
### FastAPI Projects
No additional configuration needed! FastAPI auto-generates OpenAPI docs.
Access at:
- Swagger UI: `http://localhost:8000/docs`
- ReDoc: `http://localhost:8000/redoc`
- OpenAPI JSON: `http://localhost:8000/openapi.json`
### Flask Projects
Install flasgger:
```bash
pip install flasgger
```
Configure in app:
```python
from flasgger import Swagger
app = Flask(__name__)
swagger = Swagger(app, template={
"info": {
"title": "My API",
"description": "API for managing resources",
"version": "1.0.0"
}
})
```
## Best Practices
- ✅ Use type hints - enables automatic schema generation
- ✅ Write descriptive docstrings for all endpoints
- ✅ Provide example requests and responses
- ✅ Document error codes and edge cases
- ✅ Keep docs in sync with code (auto-generate when possible)
## Tools Used
- **FastAPI**: Built-in OpenAPI support
- **flasgger**: Swagger for Flask
- **openapi-spec-validator**: Validates OpenAPI specs
- **openapi-to-md**: Converts OpenAPI to Markdown
## References
- [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)
- [FastAPI Documentation](https://fastapi.tiangolo.com/)
- [Swagger Documentation](https://swagger.io/docs/)
```
### 为什么这是优秀的工作流 Skill?
1. ✅ **清晰的工作流阶段**: 4 个阶段 (Discovery, Enhancement, Generation, Validation)
2. ✅ **决策点**: Phase 2 询问用户是否添加缺失文档
3. ✅ **实际输出示例**: 展示了命令输出和生成的代码
4. ✅ **多框架支持**: 处理 FastAPI 和 Flask 两种情况
5. ✅ **工具集成**: 列出所需工具及其用途
6. ✅ **可执行命令**: 提供完整的命令示例
7. ✅ **验证步骤**: Phase 4 确保生成的文档质量
---
## 示例 3: 代码审查 Skill (高自由度 Skill)
```markdown
---
name: code-review
description: Performs comprehensive code reviews focusing on best practices, security, performance, and maintainability. Activates when user asks to review code, check pull request, or mentions code quality. Provides actionable feedback with severity ratings.
---
# Code Review Skill
Conducts thorough code reviews with focus on quality, security, and best practices.
## When to Use This Skill
- User asks to "review my code" or "check this PR"
- User mentions "code review", "code quality", or "best practices"
- User wants feedback on specific code changes
- User needs security or performance analysis
## Review Criteria
Code is evaluated across 5 dimensions:
### 1. Correctness
- Logic errors and bugs
- Edge case handling
- Error handling and validation
- Type safety
### 2. Security
- SQL injection vulnerabilities
- XSS vulnerabilities
- Authentication/authorization issues
- Sensitive data exposure
- Dependency vulnerabilities
### 3. Performance
- Algorithm efficiency
- Database query optimization
- Memory leaks
- Unnecessary computations
- Caching opportunities
### 4. Maintainability
- Code clarity and readability
- Function/class size
- Code duplication
- Naming conventions
- Documentation
### 5. Best Practices
- Language-specific idioms
- Design patterns
- SOLID principles
- Testing coverage
- Error handling patterns
## Review Process
1. **Understand context**
- What does this code do?
- What problem does it solve?
- Are there any constraints or requirements?
2. **Identify issues**
- Scan for common anti-patterns
- Check against language best practices
- Look for security vulnerabilities
- Assess performance implications
3. **Prioritize feedback**
- **Critical**: Security issues, data loss risks, crashes
- **High**: Bugs, major performance issues
- **Medium**: Code smells, maintainability concerns
- **Low**: Style preferences, minor optimizations
4. **Provide suggestions**
- Explain the issue clearly
- Show better alternative (code example)
- Explain why the alternative is better
## Example Review
### Code Submitted
```python
def get_user_data(user_id):
conn = sqlite3.connect('users.db')
cursor = conn.cursor()
query = "SELECT * FROM users WHERE id = " + str(user_id)
cursor.execute(query)
result = cursor.fetchone()
return result
```
### Review Feedback
**❌ CRITICAL: SQL Injection Vulnerability**
The code concatenates user input directly into SQL query, allowing SQL injection attacks.
**Bad**:
```python
query = "SELECT * FROM users WHERE id = " + str(user_id)
```
**Good**:
```python
query = "SELECT * FROM users WHERE id = ?"
cursor.execute(query, (user_id,))
```
**Why**: Parameterized queries prevent SQL injection by properly escaping user input.
---
**⚠️ HIGH: Resource Leak**
Database connection is never closed, leading to resource exhaustion under load.
**Bad**:
```python
conn = sqlite3.connect('users.db')
# ... use connection
# connection never closed
```
**Good**:
```python
with sqlite3.connect('users.db') as conn:
cursor = conn.cursor()
# ... use connection
# automatically closed when exiting with block
```
---
** MEDIUM: Overly Broad SELECT**
Using `SELECT *` fetches unnecessary data and is fragile to schema changes.
**Bad**:
```python
query = "SELECT * FROM users WHERE id = ?"
```
**Good**:
```python
query = "SELECT id, name, email FROM users WHERE id = ?"
```
**Why**: Explicit column selection is more efficient and makes intent clear.
---
**📝 LOW: Missing Error Handling**
Function doesn't handle case where user doesn't exist.
**Suggestion**:
```python
def get_user_data(user_id: int) -> Optional[dict]:
"""
Retrieve user data by ID.
Args:
user_id: The unique identifier of the user
Returns:
Dictionary with user data, or None if user not found
"""
with sqlite3.connect('users.db') as conn:
cursor = conn.cursor()
query = "SELECT id, name, email FROM users WHERE id = ?"
cursor.execute(query, (user_id,))
result = cursor.fetchone()
if result is None:
return None
return {
'id': result[0],
'name': result[1],
'email': result[2]
}
```
### Revised Code
After applying all suggestions:
```python
from typing import Optional
import sqlite3
def get_user_data(user_id: int) -> Optional[dict]:
"""
Retrieve user data by ID.
Args:
user_id: The unique identifier of the user
Returns:
Dictionary with user data, or None if user not found
Raises:
ValueError: If user_id is not a positive integer
"""
if not isinstance(user_id, int) or user_id <= 0:
raise ValueError(f"Invalid user_id: {user_id}")
with sqlite3.connect('users.db') as conn:
conn.row_factory = sqlite3.Row # Enable dict-like access
cursor = conn.cursor()
query = "SELECT id, name, email, created_at FROM users WHERE id = ?"
cursor.execute(query, (user_id,))
result = cursor.fetchone()
if result is None:
return None
return dict(result) # Convert Row to dict
```
### Summary
**Issues Found**: 4
- 1 Critical (SQL Injection)
- 1 High (Resource Leak)
- 1 Medium (Inefficient Query)
- 1 Low (Missing Error Handling)
**All Issues Addressed**: ✓
## Best Practices
### When Reviewing
- 🎯 Focus on impact - prioritize critical issues
- 📝 Be specific - provide code examples
- 🎓 Be educational - explain why, not just what
- 🤝 Be constructive - suggest improvements, don't just criticize
- ⚖️ Be balanced - acknowledge good practices too
### What to Look For
**Python-specific**:
- Use of `with` for resource management
- Type hints on function signatures
- Proper exception handling
- List comprehensions vs loops
- Dictionary vs if-elif chains
**General**:
- DRY principle violations
- Magic numbers
- Long functions (>50 lines)
- Deep nesting (>3 levels)
- Missing tests for critical paths
## Automated Tools
Complement manual review with automated tools:
```bash
# Linting
pylint mycode.py
flake8 mycode.py
# Type checking
mypy mycode.py
# Security scanning
bandit -r .
safety check
# Code complexity
radon cc mycode.py -a
```
## References
- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
- [Python Best Practices](https://docs.python-guide.org/)
- [Clean Code Principles](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)
```
### 为什么这是高自由度 Skill?
1. ✅ **指导原则而非严格步骤**: 提供评审维度,不限定具体流程
2. ✅ **情境适应**: 根据代码类型和问题严重性调整重点
3. ✅ **教育性**: 解释"为什么",帮助 Claude 做出判断
4. ✅ **优先级框架**: 定义严重性级别,让 Claude 自行判断
5. ✅ **完整示例**: 展示从问题识别到解决的完整流程
6. ✅ **工具集成**: 提到自动化工具,但不强制使用
---
## 总结: 好 Skill 的共同特征
| 特征 | 说明 | 示例位置 |
|------|------|---------|
| **清晰触发** | description 包含关键词和场景 | 所有 frontmatter |
| **结构化内容** | 使用标题、列表、代码块组织信息 | 所有示例 |
| **实际示例** | 真实代码,不是伪代码 | Example sections |
| **决策指导** | 告诉 Claude 何时做什么 | 工作流 Skill 的 Phase 2 |
| **可执行命令** | 提供完整的命令,不是抽象描述 | 迁移 Skill 的命令 |
| **错误处理** | 包含故障排除章节 | 所有 Troubleshooting |
| **最佳实践** | Do/Don't 清单 | 所有 Best Practices |
| **工具引用** | 说明使用哪些工具及如何使用 | API 文档 Skill |
| **验证步骤** | 说明如何确认操作成功 | 迁移 Skill 的验证 |
| **合适的自由度** | 根据任务特性选择指导程度 | 代码审查 Skill |

View File

@ -0,0 +1,95 @@
---
name: your-skill-name
description: Brief description of what this skill does and when to activate it. Include trigger keywords and scenarios where this skill should be used.
---
# Your Skill Title
> Brief one-line summary of what this skill accomplishes
## When to Use This Skill
- User asks to [specific action or task]
- User mentions keywords like "[keyword1]", "[keyword2]", or "[keyword3]"
- User is working with [specific technology/framework/tool]
- User needs to [specific outcome or goal]
## Quick Start
```bash
# Basic usage example
command-to-run --option value
```
## How It Works
1. **Step 1**: Brief description of first step
- Detail about what happens
- Any prerequisites or conditions
2. **Step 2**: Brief description of second step
- Key actions taken
- Expected outputs
3. **Step 3**: Brief description of final step
- Validation or verification
- Success criteria
## Examples
### Example 1: Basic Usage
**User Request**: "Example of what user might say"
**Action**: What Claude does in response
**Output**:
```
Expected output or result
```
### Example 2: Advanced Usage
**User Request**: "More complex user request"
**Action**:
1. First action taken
2. Second action taken
3. Final action
**Output**:
```
Expected output showing more complex results
```
## Best Practices
- ✅ Do this for best results
- ✅ Follow this pattern
- ❌ Avoid this common mistake
- ❌ Don't do this
## Troubleshooting
### Common Issue 1
**Problem**: Description of the problem
**Solution**: How to fix it
### Common Issue 2
**Problem**: Description of another problem
**Solution**: Steps to resolve
## References
- [Related Documentation](link-to-docs)
- [Official Guide](link-to-guide)
- [Additional Resources](link-to-resources)
---
**Version**: 1.0
**Last Updated**: YYYY-MM-DD

View File

@ -0,0 +1,402 @@
---
name: your-workflow-skill
description: Guides Claude through a multi-step workflow for [specific task]. Activates when user needs to [trigger scenario] or mentions [key terms].
---
# Your Workflow Skill Title
> Automates a complex multi-step process with decision points and validation
## When to Use This Skill
- User needs to execute a multi-step workflow
- User asks to "[workflow trigger phrase]"
- User is working on [specific type of project or task]
- Task requires validation and error handling at each step
## Workflow Overview
```
┌─────────────┐
│ Start │
└──────┬──────┘
┌─────────────────┐
│ Preparation │
& Validation │
└────────┬────────┘
┌────▼────┐
│ Step 1 │
└────┬────┘
┌────▼────┐
│ Step 2 │──┐
└────┬────┘ │ (Loop if needed)
│ │
└───────┘
┌────▼────┐
│ Step 3 │
└────┬────┘
┌─────────────┐
│ Complete │
& Report │
└─────────────┘
```
## Detailed Workflow
### Preparation Phase
Before starting the main workflow:
- [ ] Check prerequisite 1
- [ ] Validate prerequisite 2
- [ ] Ensure prerequisite 3 is met
If any prerequisite fails:
- Stop execution
- Report which prerequisite failed
- Provide remediation steps
### Step 1: [Step Name]
**Purpose**: What this step accomplishes
**Actions**:
1. Action 1
2. Action 2
3. Action 3
**Validation**:
- Check condition 1
- Verify condition 2
**On Success**: → Proceed to Step 2
**On Failure**: → [Error handling procedure]
### Step 2: [Step Name]
**Purpose**: What this step accomplishes
**Actions**:
1. Action 1
2. Action 2
**Decision Point**:
- If condition A: → Action X
- If condition B: → Action Y
- Otherwise: → Default action
**Validation**:
- Verify expected output
- Check for errors
**On Success**: → Proceed to Step 3
**On Failure**: → [Error handling procedure]
### Step 3: [Step Name]
**Purpose**: Final actions and cleanup
**Actions**:
1. Finalize changes
2. Run validation tests
3. Generate summary report
**Success Criteria**:
- All tests pass
- No errors in logs
- Expected artifacts created
## Examples
### Example 1: Standard Workflow Execution
**User Request**: "Run the [workflow name]"
**Execution**:
**Preparation Phase** ✓
```
✓ Prerequisite 1 met
✓ Prerequisite 2 validated
✓ Ready to begin
```
**Step 1: [Step Name]** ✓
```
→ Action 1 completed
→ Action 2 completed
→ Validation passed
```
**Step 2: [Step Name]** ✓
```
→ Decision: Condition A detected
→ Executing Action X
→ Validation passed
```
**Step 3: [Step Name]** ✓
```
→ Finalization complete
→ All tests passed
→ Summary generated
```
**Result**: Workflow completed successfully
### Example 2: Workflow with Error Recovery
**User Request**: "Execute [workflow name]"
**Execution**:
**Step 1** ✓
```
→ Completed successfully
```
**Step 2** ⚠️
```
→ Action 1 completed
→ Action 2 failed: [Error message]
```
**Error Recovery**:
1. Identified root cause: [Explanation]
2. Applied fix: [Fix description]
3. Retrying Step 2...
**Step 2 (Retry)** ✓
```
→ Completed after fix
```
**Step 3** ✓
```
→ Completed successfully
```
**Result**: Workflow completed with 1 retry
## Error Handling
### Error Categories
| Category | Action |
|----------|--------|
| **Recoverable** | Attempt automatic fix, retry up to 3 times |
| **User Input Needed** | Pause workflow, ask user for guidance |
| **Critical** | Stop workflow, rollback changes if possible |
### Common Errors
**Error 1: [Error Name]**
- **Cause**: What causes this error
- **Detection**: How to identify it
- **Recovery**: Steps to fix
1. Recovery action 1
2. Recovery action 2
3. Retry from failed step
**Error 2: [Error Name]**
- **Cause**: What causes this error
- **Detection**: How to identify it
- **Recovery**: Manual intervention required
- Ask user: "[Question to ask]"
- Wait for user input
- Apply user's guidance
- Resume workflow
## Rollback Procedure
If the workflow fails critically:
1. **Identify last successful step**
- Step 1: ✓ Completed
- Step 2: ❌ Failed at action 3
2. **Undo changes from failed step**
- Revert action 1
- Revert action 2
- Clean up partial state
3. **Verify system state**
- Confirm rollback successful
- Check for side effects
4. **Report to user**
```
Workflow failed at Step 2, action 3
Reason: [Error message]
All changes have been rolled back
System is back to pre-workflow state
```
## Workflow Variations
### Variation 1: Quick Mode
**When to use**: User needs faster execution, can accept lower validation
**Changes**:
- Skip optional validations
- Use cached data where available
- Reduce logging verbosity
**Trade-offs**:
- ⚡ 50% faster
- ⚠️ Less detailed error messages
### Variation 2: Strict Mode
**When to use**: Production deployments, critical changes
**Changes**:
- Enable all validations
- Require explicit user confirmation at each step
- Generate detailed audit logs
**Trade-offs**:
- 🛡️ Maximum safety
- 🐢 Slower execution
## Monitoring and Logging
Throughout the workflow:
```
[TIMESTAMP] [STEP] [STATUS] Message
[2025-01-31 14:30:01] [PREP] [INFO] Starting preparation phase
[2025-01-31 14:30:02] [PREP] [OK] All prerequisites met
[2025-01-31 14:30:03] [STEP1] [INFO] Beginning Step 1
[2025-01-31 14:30:05] [STEP1] [OK] Step 1 completed successfully
[2025-01-31 14:30:06] [STEP2] [INFO] Beginning Step 2
[2025-01-31 14:30:08] [STEP2] [WARN] Condition B detected, using fallback
[2025-01-31 14:30:10] [STEP2] [OK] Step 2 completed with warnings
[2025-01-31 14:30:11] [STEP3] [INFO] Beginning Step 3
[2025-01-31 14:30:15] [STEP3] [OK] Step 3 completed successfully
[2025-01-31 14:30:16] [COMPLETE] [OK] Workflow finished successfully
```
## Post-Workflow Report
After completion, generate a summary:
```markdown
# Workflow Execution Report
**Workflow**: [Workflow Name]
**Started**: 2025-01-31 14:30:01
**Completed**: 2025-01-31 14:30:16
**Duration**: 15 seconds
**Status**: ✓ Success
## Steps Executed
1. ✓ Preparation Phase (1s)
2. ✓ Step 1: [Step Name] (2s)
3. ✓ Step 2: [Step Name] (4s) - 1 warning
4. ✓ Step 3: [Step Name] (4s)
## Warnings
- Step 2: Condition B detected, used fallback action
## Artifacts Generated
- `/path/to/output1.txt`
- `/path/to/output2.json`
- `/path/to/report.html`
## Next Steps
- Review generated artifacts
- Deploy to production (if applicable)
- Archive logs to `/logs/workflow-20250131-143001.log`
```
## Best Practices
### Do
- ✅ Validate inputs before starting workflow
- ✅ Provide clear progress updates at each step
- ✅ Log all decisions and actions
- ✅ Handle errors gracefully with recovery options
- ✅ Generate summary report at completion
### Don't
- ❌ Skip validation steps to save time
- ❌ Continue after critical errors
- ❌ Assume prerequisites are met without checking
- ❌ Lose partial progress on failure
- ❌ Leave system in inconsistent state
## Advanced Features
### Parallel Execution
Some steps can run in parallel:
```
Step 1 ─┬─→ Step 2A ─┐
│ ├─→ Step 3
└─→ Step 2B ─┘
```
**Requirements**:
- Steps 2A and 2B must be independent
- Both must complete before Step 3
**Implementation**:
1. Start Step 2A in background
2. Start Step 2B in background
3. Wait for both to complete
4. Verify both succeeded
5. Proceed to Step 3
### Conditional Branching
```
Step 1 → Decision
├─→ [Condition A] → Path A → Step 3
├─→ [Condition B] → Path B → Step 3
└─→ [Default] → Path C → Step 3
```
## Testing This Workflow
To test the workflow without side effects:
1. Use `--dry-run` flag to simulate execution
2. Check that all steps are logged correctly
3. Verify error handling with intentional failures
4. Confirm rollback procedure works
Example:
```bash
workflow-runner --dry-run --inject-error step2
```
Expected output:
```
[DRY RUN] Step 1: Would execute [actions]
[DRY RUN] Step 2: Injected error as requested
[DRY RUN] Error Recovery: Would attempt fix
[DRY RUN] Rollback: Would undo Step 1 changes
```
---
**Version**: 1.0
**Last Updated**: YYYY-MM-DD
**Maintainer**: Team Name

View File

@ -9,4 +9,5 @@ README.md
.yalc/
yalc.lock
testApi/
*.local.*
*.local.*
*.local

View File

@ -3,6 +3,7 @@ dist/
build/
.next/
out/
local/
# 依赖目录
node_modules/
@ -22,4 +23,6 @@ vitest.config.mts
bin/
scripts/
deploy/
docSite/
document/
projects/marketplace

View File

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

View File

@ -1,4 +0,0 @@
yangchuansheng/fastgpt-imgs:
- source: docSite/assets/imgs/
dest: imgs/
deleteOrphaned: true

View File

@ -1,71 +0,0 @@
name: Deploy doc image to cf
on:
workflow_dispatch:
push:
paths:
- 'docSite/**'
branches:
- 'main'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains jobs "deploy-production"
deploy-production:
# The environment this job references
environment:
name: Production
url: ${{ steps.vercel-action.outputs.preview-url }}
# The type of runner that the job will run on
runs-on: ubuntu-24.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Job outputs
outputs:
docs: ${{ steps.filter.outputs.docs }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Step 1 - Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive # Fetch submodules
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
# Step 2 Detect changes to Docs Content
- name: Detect changes in doc content
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
docs:
- 'docSite/content/docs/**'
base: main
- name: Add cdn for images
run: |
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)
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.117.0'
extended: true
# Step 4 - Builds the site using Hugo
- name: Build
run: cd docSite && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docSite/public

View File

@ -1,90 +0,0 @@
name: Deploy doc image by kubeconfig
on:
workflow_dispatch:
push:
paths:
- 'docSite/**'
branches:
- 'main'
jobs:
build-fastgpt-docs-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout
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
id: datetime
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT"
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/fastgpt-docs
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs
tags: |
${{ steps.datetime.outputs.datetime }}
flavor: latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Aliyun
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Build and push Docker images to ghcr.io and DockerHub
uses: docker/build-push-action@v5
with:
context: .
file: ./docSite/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs:
tags: ${{ steps.datetime.outputs.datetime }}
update-docs-image:
needs: build-fastgpt-docs-images
runs-on: ubuntu-24.04
if: github.repository == 'labring/FastGPT'
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: set image deployment/fastgpt-docs fastgpt-docs=registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs:${{ needs.build-fastgpt-docs-images.outputs.tags }}
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: annotate deployment/fastgpt-docs originImageName="registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs:${{ needs.build-fastgpt-docs-images.outputs.tags }}" --overwrite

169
.github/workflows/docs-deploy.yml vendored Normal file
View File

@ -0,0 +1,169 @@
name: Document deploy
on:
push:
branches:
- main
paths:
- 'document/**'
workflow_dispatch:
permissions:
contents: read
packages: write
attestations: write
id-token: write
pull-requests: write
jobs:
sync-images:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: labring/fastgpt-img
token: ${{ secrets.DOCS_IMGS_SYNC_TOKEN }}
path: fastgpt-img
- name: Sync images
run: |
# Create imgs directory if it doesn't exist
mkdir -p fastgpt-img
# Copy all images from document/public/imgs to the target repository
cp -r document/public/imgs/* fastgpt-img
# Navigate to target repository
cd fastgpt-img
# Configure git
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Add, commit and push changes
git add .
if ! git diff --cached --quiet; then
git commit -m "Sync images from FastGPT document at $(date)"
git push
echo "Images synced successfully"
else
echo "No changes to sync"
fi
# Add a new job to generate unified timestamp
generate-timestamp:
needs: sync-images
runs-on: ubuntu-latest
outputs:
datetime: ${{ steps.datetime.outputs.datetime }}
steps:
- name: Get current datetime
id: datetime
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
build-images:
needs: generate-timestamp
runs-on: ubuntu-latest
strategy:
matrix:
domain_config:
- domain: 'https://fastgpt.io'
suffix: 'io'
- domain: 'https://fastgpt.cn'
suffix: 'cn'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rewrite image paths
if: matrix.domain_config.suffix == 'io'
run: |
find document/content/docs -name "*.mdx" -type f | while read file; do
sed -i 's|](/imgs/|](https://cdn.jsdelivr.net/gh/labring/fastgpt-img@main/|g' "$file"
done
- name: Rewrite domain links for CN
if: matrix.domain_config.suffix == 'cn'
run: |
find document/content/docs -name "*.mdx" -type f | while read file; do
sed -i 's|doc\.fastgpt\.io|doc.fastgpt.cn|g' "$file"
done
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{ secrets.ALI_IMAGE_NAME }}/fastgpt-docs
tags: |
${{ matrix.domain_config.suffix }}-${{ needs.generate-timestamp.outputs.datetime }}
flavor: latest=false
- name: Login to Aliyun
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Build and push Docker images (CN)
if: matrix.domain_config.suffix == 'cn'
uses: docker/build-push-action@v5
with:
context: ./document
file: ./document/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
build-args: |
FASTGPT_HOME_DOMAIN=${{ matrix.domain_config.domain }}
- name: Build and push Docker images (IO)
if: matrix.domain_config.suffix == 'io'
uses: docker/build-push-action@v5
with:
context: ./document
file: ./document/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
build-args: |
FASTGPT_HOME_DOMAIN=${{ matrix.domain_config.domain }}
update-images:
needs: [generate-timestamp, build-images]
runs-on: ubuntu-24.04
strategy:
matrix:
domain_config:
- domain: 'https://fastgpt.io'
suffix: 'io'
deployment: 'fastgpt-docs'
kube_config: 'KUBE_CONFIG_IO'
- domain: 'https://fastgpt.cn'
suffix: 'cn'
deployment: 'fastgpt-docs'
kube_config: 'KUBE_CONFIG_CN'
steps:
- name: Checkout code
uses: actions/checkout@v4
# Add kubeconfig setup step to handle encoding issues
- name: Setup kubeconfig
run: |
mkdir -p $HOME/.kube
echo "${{ secrets[matrix.domain_config.kube_config] }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Update deployment image
run: |
kubectl set image deployment/${{ matrix.domain_config.deployment }} ${{ matrix.domain_config.deployment }}=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-docs:${{ matrix.domain_config.suffix }}-${{ needs.generate-timestamp.outputs.datetime }}
- name: Annotate deployment
run: |
kubectl annotate deployment/${{ matrix.domain_config.deployment }} originImageName="${{ secrets.ALI_IMAGE_NAME }}/fastgpt-docs:${{ matrix.domain_config.suffix }}-${{ needs.generate-timestamp.outputs.datetime }}" --overwrite

View File

@ -1,95 +1,96 @@
name: Preview FastGPT docs
name: Preview documents
on:
pull_request_target:
paths:
- 'docSite/**'
- 'document/**'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
packages: write
attestations: write
id-token: write
pull-requests: write
jobs:
# This workflow contains jobs "deploy-production"
deploy-preview:
permissions:
contents: read
packages: write
attestations: write
id-token: write
pull-requests: write
# The environment this job references
environment:
name: Preview
url: ${{ steps.vercel-action.outputs.preview-url }}
build-images:
runs-on: ubuntu-latest
# The type of runner that the job will run on
runs-on: ubuntu-24.04
# Job outputs
outputs:
url: ${{ steps.vercel-action.outputs.preview-url }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Step 1 - Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: recursive # Fetch submodules
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
# Step 2 Detect changes to Docs Content
- name: Detect changes in doc content
uses: dorny/paths-filter@v2
id: filter
- name: Get current datetime
id: datetime
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
filters: |
docs:
- 'docSite/content/docs/**'
base: main
# list of Docker images to use as base name for tags
images: |
${{ secrets.ALI_IMAGE_NAME }}/fastgpt-docs
tags: |
${{ steps.datetime.outputs.datetime }}
flavor: latest=false
# Step 3 - Install Hugo (specific version)
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
- name: Login to Aliyun
uses: docker/login-action@v3
with:
hugo-version: '0.117.0'
extended: true
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
# Step 4 - Builds the site using Hugo
- name: Build
run: cd docSite && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify
# Step 5 - Push our generated site to Cloudflare
- name: Deploy to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@v3
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./docSite/public --project-name=fastgpt-doc
packageManager: npm
context: ./document
file: ./document/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FASTGPT_HOME_DOMAIN=https://fastgpt.io
outputs:
tags: ${{ steps.datetime.outputs.datetime }}
- name: Create deployment status comment
if: always()
env:
JOB_STATUS: ${{ job.status }}
PREVIEW_URL: ${{ steps.deploy.outputs.deployment-url }}
uses: actions/github-script@v6
update-images:
needs: build-images
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# Add kubeconfig setup step to handle encoding issues
- name: Setup kubeconfig
run: |
mkdir -p $HOME/.kube
echo "${{ secrets.KUBE_CONFIG_CN }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Update deployment image
run: |
kubectl set image deployment/fastgpt-docs-preview fastgpt-docs-preview=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-docs:${{ needs.build-images.outputs.tags }}
- name: Annotate deployment
run: |
kubectl annotate deployment/fastgpt-docs-preview originImageName="${{ secrets.ALI_IMAGE_NAME }}/fastgpt-docs:${{ needs.build-images.outputs.tags }}" --overwrite
- name: '@finleyge/github-tools'
uses: FinleyGe/github-tools@0.0.1
id: print-image-label
if: success()
with:
token: ${{ secrets.GITHUB_TOKEN }}
script: |
const success = process.env.JOB_STATUS === 'success';
const deploymentUrl = `${process.env.PREVIEW_URL}`;
const status = success ? '✅ Success' : '❌ Failed';
console.log(process.env.JOB_STATUS);
tool: issue-comment
title: 'Docs Preview:'
body: |
---
🚀 **FastGPT Document Preview Ready!**
const commentBody = `**Deployment Status: ${status}**
${success ? `🔗 Preview URL: ${deploymentUrl}` : ''}`;
await github.rest.issues.createComment({
...context.repo,
issue_number: context.payload.pull_request.number,
body: commentBody
});
🔗 [👀 Click here to visit preview](https://pueuoharpgcl.sealoshzh.site)

View File

@ -1,28 +0,0 @@
name: Sync images
on:
pull_request:
branches:
- main
paths:
- docSite/assets/imgs/**
push:
branches:
- main
paths:
- docSite/assets/imgs/**
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run GitHub File Sync
uses: BetaHuhn/repo-file-sync-action@v1.21.0
with:
GH_PAT: ${{ secrets.IMG_GH_PAT }}
CONFIG_PATH: .github/doc-sync-image.yml
ORIGINAL_MESSAGE: true
SKIP_PR: true
COMMIT_EACH_FILE: false

View File

@ -7,51 +7,123 @@ on:
- 'packages/**'
branches:
- 'main'
jobs:
get-vars:
runs-on: ubuntu-24.04
outputs:
docker_repo: ${{ steps.set_docker_repo.outputs.docker_repo }}
docker_tag: ${{ steps.set_docker_repo.outputs.docker_tag }}
steps:
- name: Set docker repository and tag
id: set_docker_repo
run: |
echo "docker_repo=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "docker_tag=latest" >> $GITHUB_OUTPUT
else
echo "docker_tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
build-fastgpt-images:
needs: get-vars
permissions:
packages: write
contents: read
attestations: write
id-token: write
runs-on: ubuntu-24.04
strategy:
matrix:
archs:
- arch: amd64
runs-on: ubuntu-24.04
- arch: arm64
runs-on: ubuntu-24.04-arm
runs-on: ${{ matrix.archs.runs-on || 'ubuntu-24.04' }}
if: github.repository != 'labring/FastGPT'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-${{ matrix.archs.arch }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-${{ matrix.archs.arch }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set DOCKER_REPO_TAGGED based on branch or tag
- name: Build and push for ${{ matrix.archs.arch }}
id: build
uses: docker/build-push-action@v6
with:
context: .
file: projects/app/Dockerfile
platforms: linux/${{ matrix.archs.arch }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=fastgpt image
outputs: type=image,"name=${{ needs.get-vars.outputs.docker_repo }}",push-by-digest=true,push=true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Export digest
run: |
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV
- name: Build and publish image for main branch or tag push event
env:
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ github.sha }}-${{ matrix.archs.arch }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
release-fastgpt-images:
permissions:
packages: write
contents: read
attestations: write
id-token: write
needs: [get-vars, build-fastgpt-images]
runs-on: ubuntu-24.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-${{ github.sha }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set image name and tag
run: |
docker buildx build \
--build-arg name=app \
--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 \
.
echo "Git_Tag=${{ needs.get-vars.outputs.docker_repo }}:${{ needs.get-vars.outputs.docker_tag }}" >> $GITHUB_ENV
echo "Git_Latest=${{ needs.get-vars.outputs.docker_repo }}:latest" >> $GITHUB_ENV
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
run: |
TAGS="$(echo -e "${Git_Tag}\n${Git_Latest}")"
for TAG in $TAGS; do
docker buildx imagetools create -t $TAG \
$(printf '${{ needs.get-vars.outputs.docker_repo }}@sha256:%s ' *)
sleep 5
done

View File

@ -46,9 +46,9 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-${{ matrix.sub_routes.repo }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-${{ matrix.archs.arch }}-${{ matrix.sub_routes.repo }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.sub_routes.repo }}-buildx-
${{ runner.os }}-${{ matrix.archs.arch }}-${{ matrix.sub_routes.repo }}-buildx-
# login docker
- name: Login to GitHub Container Registry

View File

@ -41,12 +41,12 @@ jobs:
${{ runner.os }}-buildx-${{ github.sha }}-
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
- name: Login to Aliyun Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Set image config
id: config
@ -54,15 +54,15 @@ jobs:
if [[ "${{ matrix.image }}" == "fastgpt" ]]; then
echo "DOCKERFILE=projects/app/Dockerfile" >> $GITHUB_OUTPUT
echo "DESCRIPTION=fastgpt-pr image" >> $GITHUB_OUTPUT
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt-pr:fatsgpt_${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
echo "DOCKER_REPO_TAGGED=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pr:fatsgpt_${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
elif [[ "${{ matrix.image }}" == "sandbox" ]]; then
echo "DOCKERFILE=projects/sandbox/Dockerfile" >> $GITHUB_OUTPUT
echo "DESCRIPTION=fastgpt-sandbox-pr image" >> $GITHUB_OUTPUT
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt-pr:fatsgpt_sandbox_${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
echo "DOCKER_REPO_TAGGED=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pr:fatsgpt_sandbox_${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
elif [[ "${{ matrix.image }}" == "mcp_server" ]]; then
echo "DOCKERFILE=projects/mcp_server/Dockerfile" >> $GITHUB_OUTPUT
echo "DESCRIPTION=fastgpt-mcp_server-pr image" >> $GITHUB_OUTPUT
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt-pr:fatsgpt_mcp_server_${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
echo "DOCKER_REPO_TAGGED=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pr:fatsgpt_mcp_server_${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
fi
- name: Build ${{ matrix.image }} image for PR
@ -73,17 +73,18 @@ jobs:
--label "org.opencontainers.image.description=${{ steps.config.outputs.DESCRIPTION }}" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t ${{ steps.config.outputs.DOCKER_REPO_TAGGED }} \
.
- uses: actions/github-script@v7
- name: '@finleyge/github-tools'
uses: FinleyGe/github-tools@0.0.1
id: print-image-label
if: success()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Preview ${{ matrix.image }} Image: `${{ steps.config.outputs.DOCKER_REPO_TAGGED }}`'
})
token: ${{ secrets.GITHUB_TOKEN }}
tool: issue-comment
title: 'Preview ${{ matrix.image }} Image:'
body: |
```
${{ steps.config.outputs.DOCKER_REPO_TAGGED }}
```

147
.github/workflows/marketplace-image.yml vendored Normal file
View File

@ -0,0 +1,147 @@
name: Build fastgpt-marketplace images
on:
workflow_dispatch:
jobs:
build-fastgpt-marketplace-images:
permissions:
packages: write
contents: read
attestations: write
id-token: write
strategy:
matrix:
include:
- arch: amd64
- arch: arm64
runs-on: ubuntu-24.04-arm
runs-on: ${{ matrix.runs-on || 'ubuntu-24.04' }}
steps:
# install env
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-marketplace-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-marketplace-buildx-
# login docker
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Ali Hub
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Build for ${{ matrix.arch }}
id: build
uses: docker/build-push-action@v6
with:
context: .
file: projects/marketplace/Dockerfile
platforms: linux/${{ matrix.arch }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=fastgpt-marketplace image
outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace,${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace",push-by-digest=true,push=true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-fastgpt-marketplace-${{ github.sha }}-${{ matrix.arch }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
release-fastgpt-marketplace-images:
permissions:
packages: write
contents: read
attestations: write
id-token: write
needs: build-fastgpt-marketplace-images
runs-on: ubuntu-24.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Ali Hub
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-fastgpt-marketplace-${{ github.sha }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate random tag
id: tag
run: |
# Generate random hash tag (8 characters)
TAG=$(echo $RANDOM | md5sum | head -c 8)
echo "RANDOM_TAG=$TAG" >> $GITHUB_ENV
echo "Generated tag: $TAG"
- name: Set image name and tag
run: |
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
run: |
echo "Pushing image with tag: ${{ env.RANDOM_TAG }}"
echo "Available digests:"
ls -la
echo ""
# Create manifest for GitHub Container Registry
echo "Creating manifest for GitHub: ${Git_Tag}"
docker buildx imagetools create -t ${Git_Tag} \
$(printf 'ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace@sha256:%s ' *)
echo "✅ GitHub manifest created"
sleep 5
# Create manifest for Ali Cloud
echo "Creating manifest for Ali Cloud: ${Ali_Tag}"
docker buildx imagetools create -t ${Ali_Tag} \
$(printf '${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace@sha256:%s ' *)
echo "✅ Ali Cloud manifest created"
echo ""
echo "✅ All images pushed successfully:"
echo " - ${{ env.Git_Tag }}"
echo " - ${{ env.Ali_Tag }}"

11
.gitignore vendored
View File

@ -31,17 +31,12 @@ testApi/
local/
dist/
# hugo
**/.hugo_build.lock
docSite/public/
docSite/resources/_gen/
docSite/.vercel
*.local.*
.idea/
files/helm/fastgpt/fastgpt-0.1.0.tgz
files/helm/fastgpt/charts/*.tgz
tmp/
coverage
document/.source
projects/app/worker/

View File

@ -1,6 +1,8 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
if command -v npx >/dev/null 2>&1; then
if command -v pnpm >/dev/null 2>&1; then
pnpm lint-staged
elif command -v npx >/dev/null 2>&1; then
npx lint-staged
fi

View File

@ -2,8 +2,9 @@ dist
.vscode
**/.DS_Store
node_modules
docSite/
document/
*.md
*.mdx
pnpm-lock.yaml
cl100l_base.ts

View File

@ -1,35 +1,33 @@
{
// Place your FastGPT 工作区 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Place your FastGPT 工作区 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
"Next api template": {
"scope": "javascript,typescript",
"prefix": "nextapi",
"body": [
"import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';",
"import { NextAPI } from '@/service/middleware/entry';",
"",
"export type ${TM_FILENAME_BASE}Query = {};",
"",
"export type ${TM_FILENAME_BASE}Body = {};",
"",
"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",
" return {}",
"}",
"",
"export default NextAPI(handler);"
"import { NextAPI } from '@/service/middleware/entry';",
"import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';",
"",
"async function handler(",
" req: ApiRequestProps,",
" res: ApiResponseType<${1}ResponseType>",
"): Promise<${1}ResponseType> {",
" const body = ${1}BodySchema.parse(req.body);",
" const query = ${1}QuerySchema.parse(req.query);",
"",
" ${2}",
"",
" return {};",
"}",
"",
"export default NextAPI(handler);"
],
"description": "FastGPT Next API template"
"description": "FastGPT Next API template with Zod validation"
},
"use context template": {
"scope": "typescriptreact",
@ -38,7 +36,7 @@
"import React, { ReactNode } from 'react';",
"import { createContext } from 'use-context-selector';",
"",
"type ContextType = {$1};",
"type ContextType = {${1}};",
"",
"export const Context = createContext<ContextType>({});",
"",
@ -65,4 +63,4 @@
"});"
]
}
}
}

View File

@ -3,6 +3,7 @@
"editor.mouseWheelZoom": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.prettierPath": "node_modules/prettier",
"typescript.preferences.includePackageJsonAutoImports": "on",
"typescript.tsdk": "node_modules/typescript/lib",
"i18n-ally.localesPaths": [
"packages/web/i18n",
@ -25,7 +26,12 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"mdx.server.enable": true,
"markdown.copyFiles.overwriteBehavior": "nameIncrementally",
"markdown.copyFiles.destination": {
"/docSite/content/**/*": "${documentWorkspaceFolder}/docSite/assets/imgs/"
"/document/content/docs/**/*": "${documentWorkspaceFolder}/document/public/imgs/"
},
"files.associations": {
"*.mdx": "markdown"
}
}

View File

@ -7,7 +7,7 @@ The FastGPT is licensed under the Apache License 2.0, with the following additio
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 modify the LOGO or copyright information in the FastGPT console.
Please contact yujinlong@sealos.io by email to inquire about licensing matters.
Please contact dennis@sealos.io by email to inquire about licensing matters.
2. As a contributor, you should agree that your contributed code:

View File

@ -21,5 +21,5 @@ ifeq ($(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) .
docker build --progress=plain -f $(filePath) -t $(image) .
endif

View File

@ -1,6 +1,6 @@
<div align="center">
<a href="https://tryfastgpt.ai/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
<a href="https://fastgpt.io/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
# FastGPT
@ -15,13 +15,13 @@ FastGPT 是一个 AI Agent 构建平台,提供开箱即用的数据处理、
</div>
<p align="center">
<a href="https://tryfastgpt.ai/">
<a href="https://fastgpt.io/">
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
</a>
<a href="https://doc.tryfastgpt.ai/docs/intro">
<a href="https://doc.fastgpt.io/docs/introduction">
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
</a>
<a href="https://doc.tryfastgpt.ai/docs/development">
<a href="https://doc.fastgpt.io/docs/introduction/development/intro">
<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">
@ -33,7 +33,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 🛸 在线使用
- 🌍 国际版:[tryfastgpt.ai](https://tryfastgpt.ai/)
- 🌍 国际版:[fastgpt.io](https://fastgpt.io/)
| | |
| ---------------------------------- | ---------------------------------- |
@ -47,40 +47,40 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 💡 RoadMap
`1` 应用编排能力
- [x] 对话工作流、插件工作流
- [x] 工具调用
- [x] Code sandbox
- [x] 循环调用
- [x] 用户选择
- [x] 表单输入
- [x] 对话工作流、插件工作流,包含基础的 RPA 节点。
- [x] 用户交互
- [x] 双向 MCP
- [ ] Agent 模式
- [ ] AI 生成工作流
`2` 知识库能力
`2` 应用调试能力
- [x] 知识库单点搜索测试
- [x] 对话时反馈引用并可修改与删除
- [x] 完整调用链路日志
- [x] 应用评测
- [ ] 高级编排 DeBug 调试模式
- [ ] 应用节点日志
`3` 知识库能力
- [x] 多库复用,混用
- [x] chunk 记录修改和删除
- [x] 支持手动输入直接分段QA 拆分导入
- [x] 支持 txtmdhtmlpdfdocxpptxcsvxlsx (有需要更多可 PR file loader),支持 url 读取、CSV 批量导入
- [x] 混合检索 & 重排
- [x] API 知识库
- [ ] 自定义文件读取服务
- [ ] 自定义分块服务
`3` 应用调试能力
- [x] 知识库单点搜索测试
- [x] 对话时反馈引用并可修改与删除
- [x] 完整上下文呈现
- [x] 完整模块中间值呈现
- [ ] 高级编排 DeBug 模式
- [ ] RAG 模块热插拔
`4` OpenAPI 接口
- [x] completions 接口 (chat 模式对齐 GPT 接口)
- [x] 知识库 CRUD
- [x] 对话 CRUD
- [ ] 自动化 OpenAPI 接口
`5` 运营能力
- [x] 免登录分享窗口
- [x] Iframe 一键嵌入
- [x] 聊天窗口嵌入支持自定义 Icon默认打开拖拽等功能
- [x] 统一查阅对话记录,并对数据进行标注
- [x] 应用运营日志
`6` 其他
- [x] 可视化模型配置。
@ -100,26 +100,23 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
> 使用 [Sealos](https://sealos.io) 服务,无需采购服务器、无需域名,支持高并发 & 动态伸缩,并且数据库应用采用 kubeblocks 的数据库,在 IO 性能方面,远超于简单的 Docker 容器部署。
[点击查看 Sealos 一键部署 FastGPT 教程](https://doc.tryfastgpt.ai/docs/development/sealos/)
[点击查看 Sealos 一键部署 FastGPT 教程](https://doc.fastgpt.io/docs/introduction/development/sealos/)
* [快速开始本地开发](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/modelconfig/one-api/)
* [版本更新/升级介绍](https://doc.tryfastgpt.ai/docs/development/upgrading/)
* [OpenAPI API 文档](https://doc.tryfastgpt.ai/docs/development/openapi/)
* [知识库结构详解](https://doc.tryfastgpt.ai/docs/guide/knowledge_base/rag/)
* [快速开始本地开发](https://doc.fastgpt.io/docs/introduction/development/intro/)
* [部署 FastGPT](https://doc.fastgpt.io/docs/introduction/development/sealos/)
* [系统配置文件说明](https://doc.fastgpt.io/docs/introduction/development/configuration/)
* [多模型配置方案](https://doc.fastgpt.io/docs/introduction/development/modelConfig/one-api/)
* [版本更新/升级介绍](https://doc.fastgpt.io/docs/upgrading)
* [OpenAPI API 文档](https://doc.fastgpt.io/docs/introduction/development/openapi/)
* [知识库结构详解](https://doc.fastgpt.io/docs/introduction/guide/knowledge_base/RAG/)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
</a>
## 🏘️ 加入我们
我们正在寻找志同道合的小伙伴,加速 FastGPT 的发展。你可以通过 [FastGPT 2025 招聘](https://fael3z0zfze.feishu.cn/wiki/P7FOwEmPziVcaYkvVaacnVX1nvg)了解 FastGPT 的招聘信息。
## 💪 相关项目
- [FastGPT-plugin](https://github.com/labring/fastgpt-plugin)
- [Laf3 分钟快速接入三方应用](https://github.com/labring/laf)
- [Sealos快速部署集群应用](https://github.com/labring/sealos)
- [One API多模型管理支持 Azure、文心一言等](https://github.com/songquanpeng/one-api)
@ -132,7 +129,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
- [PPIO 派欧云:一键调用高性价比的开源模型 API 和 GPU 容器](https://ppinfra.com/user/register?invited_by=VITYVU&utm_source=github_fastgpt)
- [AI Proxy国内模型聚合服务](https://sealos.run/aiproxy/?k=fastgpt-github/)
- [SiliconCloud (硅基流动) —— 开源模型在线体验平台](https://cloud.siliconflow.cn/i/TR9Ym0c4)
- [COW 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@ -142,7 +138,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
扫码加入飞书话题群:
![](https://oss.laf.run/otnvvf-imgs/fastgpt-feishu1.png)
![](https://oss.laf.run/otnvvf-imgs/fastgpt-feishu2.png)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@ -215,4 +211,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.tryfastgpt.ai/docs/shopping_cart/intro/)
4. 联系方式Dennis@sealos.io[点击查看商业版定价策略](https://doc.fastgpt.io/docs/introduction/commercial/)

View File

@ -1,6 +1,6 @@
<div align="center">
<a href="https://tryfastgpt.ai/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
<a href="https://fastgpt.io/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
# FastGPT
@ -18,9 +18,9 @@ FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive
[![GitHub pull request](https://img.shields.io/badge/PRs-welcome-fffff?style=flat-square&labelColor=d4eaf7&color=7d09f1)](https://github.com/labring/FastGPT/pulls)
[![GitHub last commit](https://img.shields.io/github/last-commit/labring/FastGPT?style=flat-square&labelColor=d4eaf7&color=7d09f1)](https://github.com/labring/FastGPT/pulls)
[![License](https://img.shields.io/badge/License-Apache--2.0-ffffff?style=flat-square&labelColor=d4eaf7&color=7d09f1)](https://github.com/labring/FastGPT/blob/main/LICENSE)
[![Documentation](https://img.shields.io/badge/Documentation-7d09f1?style=flat-square)](https://doc.tryfastgpt.ai/docs/intro)
[![Local Development](https://img.shields.io/badge/Local_Development-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1)](https://doc.tryfastgpt.ai/docs/intro)
[![Explore our platform](https://img.shields.io/badge/Explore_our_platform-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1)](https://tryfastgpt.ai/)
[![Documentation](https://img.shields.io/badge/Documentation-7d09f1?style=flat-square)](https://doc.fastgpt.io/docs/introduction)
[![Local Development](https://img.shields.io/badge/Local_Development-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1)](https://doc.fastgpt.io/docs/introduction/development/intro)
[![Explore our platform](https://img.shields.io/badge/Explore_our_platform-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1)](https://fastgpt.io/)
[![discord](https://theme.zdassets.com/theme_assets/678183/cc59daa07820943e943c2fc283b9079d7003ff76.svg)](https://discord.gg/mp68xkZn2Q)&nbsp;&nbsp;&nbsp;&nbsp;
[![Wechat](https://upload.wikimedia.org/wikipedia/en/thumb/a/af/WeChat_logo.svg/100px-WeChat_logo.svg.png?20231125073656)](https://oss.laf.run/otnvvf-imgs/feishu3.png)
@ -33,7 +33,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 🛸 Online Use
Website: [tryfastgpt.ai](https://tryfastgpt.ai/)
Website: [fastgpt.io](https://fastgpt.io/)
| | |
| ---------------------------------- | ---------------------------------- |
@ -74,13 +74,13 @@ Project tech stack: NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector plu
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.
[sealos one click deployment tutorial](https://doc.tryfastgpt.ai/docs/development/sealos/)
[sealos one click deployment tutorial](https://doc.fastgpt.io/docs/introduction/development/sealos/)
- [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)
- [Getting Started with Local Development](https://doc.fastgpt.io/docs/introduction/development/intro)
- [Deploying FastGPT](https://doc.fastgpt.io/docs/introduction/development/docker)
- [Guide on System Configs](https://doc.fastgpt.io/docs/introduction/development/configuration)
- [Configuring Multiple Models](https://doc.fastgpt.io/docs//introduction/development/modelConfig/intro)
- [Version Updates & Upgrades](https://doc.fastgpt.io/docs/introduction/development/upgrading/index)
<a href="#FastGPT">
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">
@ -108,7 +108,7 @@ Project tech stack: NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector plu
## 🏘️ Community & Support
+ 🌐 Visit the [FastGPT website](https://tryfastgpt.ai/) for full documentation and useful links.
+ 🌐 Visit the [FastGPT website](https://fastgpt.io/) 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.
@ -185,7 +185,7 @@ This repository complies with the [FastGPT Open Source License](./LICENSE) open
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)
4. Contact: Dennis@sealos.io , [click to view commercial version pricing strategy](https://doc.fastgpt.io/docs/introduction/commercial/)
<a href="#FastGPT">
<img src="https://img.shields.io/badge/-Back_to_Top-7d09f1.svg" alt="#" align="right">

View File

@ -1,6 +1,6 @@
<div align="center">
<a href="https://tryfastgpt.ai/"><img src="/.github/imgs/logo.svg" width="120" height="120" alt="fastgpt logo"></a>
<a href="https://fastgpt.io/"><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://tryfastgpt.ai/">
<a href="https://fastgpt.io/">
<img height="21" src="https://img.shields.io/badge/在线使用-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1" alt="cloud">
</a>
<a href="https://doc.tryfastgpt.ai/docs/intro">
<a href="https://doc.fastgpt.io/docs/introduction">
<img height="21" src="https://img.shields.io/badge/相关文档-7d09f1?style=flat-square" alt="document">
</a>
<a href="https://doc.tryfastgpt.ai/docs/development">
<a href="https://doc.fastgpt.io/docs/introduction/development/intro">
<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
## 🛸 クラウドサービスの 利用
[tryfastgpt.ai](https://tryfastgpt.ai/)
[fastgpt.io](https://fastgpt.io/)
| | |
| ---------------------------------- | ---------------------------------- |
@ -98,11 +98,11 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
デプロイ 後、データベースをセットアップするので、24分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。
- [ローカル 開発入門](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)
- [ローカル 開発入門](https://doc.fastgpt.io/docs/introduction/development/intro)
- [FastGPT のデプロイ](https://doc.fastgpt.io/docs/introduction/development/docker)
- [システム 設定 ガイド](https://doc.fastgpt.io/docs/introduction/development/configuration)
- [複数 モデルの 設定](https://doc.fastgpt.io/docs/introduction/development/modelConfig/ai-proxy)
- [バージョン 更新 とアップグレード](https://doc.fastgpt.io/docs/introduction/development/upgrading/index)
<!-- ## :point_right: ロードマップ
- [FastGPT ロードマップ](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte) -->

View File

@ -5,7 +5,7 @@
如果您发现了 FastGPT 的安全漏洞,请按照以下步骤进行报告:
1. **报告方式**
发送邮件至:yujinlong@sealos.io
发送邮件至:archer@fastgpt.io
请备注版本以及您的 GitHub 账号
3. **响应时间**

73
deploy/README.md Normal file
View File

@ -0,0 +1,73 @@
## 更新 docker compose 脚本
### 正常更新(不动服务,只改版本)
1. 更新 `args.json` 中的版本号
2. 在 `FastGPT` 目录执行 `pnpm run gen:deploy` 即可
### 加服务
比如要添加 `example` 服务:
1. `init.mjs``Services Enum` 中添加 fastgptExample: fastgpt-example
2. 在 `args.json` 中添加 image 和 tag, 注意 `args.json``key` 值,要和 `init.mjs``value` 值一致。
3. 更新 templates/docker-compose.[dev|prod].yml 文件,把服务的相关配置加进去,并且:服务的 image 改为 ${{example.image}}:${{example.tag}}
### 加向量库
比如添加 `exampleDB` 向量库:
1. 添加 vector service 配置在 `templates/vector` 下面,例如 `templates/vector/exampleDB.txt` 内容可以参考其他 txt注意缩进image 名字也要替换成 ${{exampleDB.image}}:${{exampleDB:tag}}, service name 必须是 `vectorDB`
2. 在 `args.json` 中添加 `exampleDB` 的配置
3. init.mjs vector enum 中添加 `vector`
4. init.mjs 中添加 vector 的相关配置:
```ts
const vector = {
// pg, milvus, ob ...
vector: {
db: '', // 空即可
config: `/
VECTOR_URL:vectordb://xxxxx
`, //注意 第一行反引号后面的 / 不能少(去除首个换行符); 左边的两个空格的缩进不能变,否则会语法错误
extra: `` // 额外的配置,可以看 ob 的那个,需要一个 config 字段引入 init.sql
}
}
```
5. init.mjs 读入 vector 配置
```json
{ // 这是个块作用域, 直接搜 read in Vectors
// read in Vectors
// pg, ob ....
const vectordb = fs.readFileSync(path.join(process.cwd(), 'templates', 'vector', 'vector.txt'));
vector.vector.db = String(vectordb);
}
```
6. init.mjs 最后生成的时候,需要添加
```ts
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'cn', 'docker-compose.vector.yml'),
replace(template, 'cn', VectorEnum.vector)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'global', 'docker-compose.ziliiz.yml'),
replace(template, 'global', VectorEnum.vector)
),
```
## yaml 的锚点和引用
`&` 标志一个锚点
```yaml
x-share-config: &x-share-config 'I am the config content'
x-share-config-list: &x-share-config-list
key1: value
key2: value
```
`*` 引用一个锚点
```yaml
some_other_example: *x-share-config-list
```

52
deploy/args.json Normal file
View File

@ -0,0 +1,52 @@
{
"tags": {
"fastgpt": "v4.14.4",
"fastgpt-sandbox": "v4.14.4",
"fastgpt-mcp_server": "v4.14.4",
"fastgpt-plugin": "v0.3.4",
"aiproxy": "v0.3.2",
"aiproxy-pg": "0.8.0-pg15",
"mongo": "5.0.18",
"redis": "7.2-alpine",
"minio": "RELEASE.2025-09-07T16-13-09Z",
"pg": "0.8.0-pg15",
"milvus-minio": "RELEASE.2023-03-20T20-16-18Z",
"milvus-etcd": "v3.5.5",
"milvus-standalone": "v2.4.3",
"oceanbase": "4.3.5-lts"
},
"images": {
"cn": {
"fastgpt": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt",
"fastgpt-plugin": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin",
"fastgpt-sandbox": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox",
"fastgpt-mcp_server": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server",
"aiproxy": "registry.cn-hangzhou.aliyuncs.com/labring/aiproxy",
"aiproxy-pg": "registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector",
"mongo": "registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo",
"redis": "registry.cn-hangzhou.aliyuncs.com/fastgpt/redis",
"minio": "registry.cn-hangzhou.aliyuncs.com/fastgpt/minio",
"pg": "registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector",
"milvus-minio": "minio/minio",
"milvus-etcd": "quay.io/coreos/etcd",
"milvus-standalone": "milvusdb/milvus",
"oceanbase": "oceanbase/oceanbase-ce"
},
"global": {
"fastgpt": "ghcr.io/labring/fastgpt",
"fastgpt-plugin": "ghcr.io/labring/fastgpt-plugin",
"fastgpt-sandbox": "ghcr.io/labring/fastgpt-sandbox",
"fastgpt-mcp_server": "ghcr.io/labring/fastgpt-mcp_server",
"aiproxy": "ghcr.io/labring/aiproxy",
"aiproxy-pg": "pgvector/pgvector",
"mongo": "mongo",
"redis": "redis",
"minio": "minio/minio",
"pg": "pgvector/pgvector",
"milvus-minio": "minio/minio",
"milvus-etcd": "quay.io/coreos/etcd",
"milvus-standalone": "milvusdb/milvus",
"oceanbase": "oceanbase/oceanbase-ce"
}
}
}

4
deploy/dev/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*
!.gitignore
!docker-compose.yml
!docker-compose.cn.yml

View File

@ -0,0 +1,229 @@
# 用于开发的 docker-compose 文件:
# - 只包含 FastGPT 的最小化运行条件
# - 没有 FastGPT 本体
# - 所有端口都映射到外层
# - pg: 5432
# - mongo: 27017
# - redis: 6379
# - fastgpt-sandbox: 3002
# - fastgpt-plugin: 3003
# - aiproxy: 3010
# - 使用 pgvector 作为默认的向量库
services:
# Vector DB
pg:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15
container_name: pg
restart: always
ports: # 生产环境建议不要暴露
- 5432:5432
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
# DB
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
ports:
- 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test:
[
'CMD',
'mongo',
'-u',
'myusername',
'-p',
'mypassword',
'--authenticationDatabase',
'admin',
'--eval',
"db.adminCommand('ping')"
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/redis:7.2-alpine
container_name: redis
ports:
- 6379:6379
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
networks:
- fastgpt
ports:
- '9000:9000'
- '9001:9001'
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
sandbox:
container_name: sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.4
ports:
- 3002:3000
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.4
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
ports:
- 3003:3000
networks:
- fastgpt
environment:
- AUTH_TOKEN=token
- S3_EXTERNAL_BASE_URL=http://127.0.0.1:9000 # TODO: 改为你 Minio 的实际的 ip 地址
- S3_ENDPOINT=fastgpt-minio
- S3_PORT=9000
- S3_USE_SSL=false
- S3_ACCESS_KEY=minioadmin
- S3_SECRET_KEY=minioadmin
- S3_PUBLIC_BUCKET=fastgpt-public # 系统工具,创建的临时文件,存储的桶,要求公开读私有写。
- S3_PRIVATE_BUCKET=fastgpt-private # 系统插件热安装文件的桶,私有读写。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin&directConnection=true
- REDIS_URL=redis://default:mypassword@redis:6379
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
ports:
- 3010:3000
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
# 不需要计费
- BILLING_ENABLED=false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15 # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:

View File

@ -0,0 +1,229 @@
# 用于开发的 docker-compose 文件:
# - 只包含 FastGPT 的最小化运行条件
# - 没有 FastGPT 本体
# - 所有端口都映射到外层
# - pg: 5432
# - mongo: 27017
# - redis: 6379
# - fastgpt-sandbox: 3002
# - fastgpt-plugin: 3003
# - aiproxy: 3010
# - 使用 pgvector 作为默认的向量库
services:
# Vector DB
pg:
image: pgvector/pgvector:0.8.0-pg15
container_name: pg
restart: always
ports: # 生产环境建议不要暴露
- 5432:5432
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
# DB
mongo:
image: mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
ports:
- 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test:
[
'CMD',
'mongo',
'-u',
'myusername',
'-p',
'mypassword',
'--authenticationDatabase',
'admin',
'--eval',
"db.adminCommand('ping')"
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: redis:7.2-alpine
container_name: redis
ports:
- 6379:6379
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
networks:
- fastgpt
ports:
- '9000:9000'
- '9001:9001'
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.14.4
ports:
- 3002:3000
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.14.4
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
ports:
- 3003:3000
networks:
- fastgpt
environment:
- AUTH_TOKEN=token
- S3_EXTERNAL_BASE_URL=http://127.0.0.1:9000 # TODO: 改为你 Minio 的实际的 ip 地址
- S3_ENDPOINT=fastgpt-minio
- S3_PORT=9000
- S3_USE_SSL=false
- S3_ACCESS_KEY=minioadmin
- S3_SECRET_KEY=minioadmin
- S3_PUBLIC_BUCKET=fastgpt-public # 系统工具,创建的临时文件,存储的桶,要求公开读私有写。
- S3_PRIVATE_BUCKET=fastgpt-private # 系统插件热安装文件的桶,私有读写。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin&directConnection=true
- REDIS_URL=redis://default:mypassword@redis:6379
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ghcr.io/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
ports:
- 3010:3000
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
# 不需要计费
- BILLING_ENABLED=false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:

View File

@ -0,0 +1,311 @@
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
MILVUS_ADDRESS: http://milvusStandalone:19530
MILVUS_TOKEN: none
version: '3.3'
services:
# Vector DB
milvus-minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
networks:
- vector
volumes:
- ./milvus-minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
# milvus
milvus-etcd:
container_name: milvus-etcd
image: quay.io/coreos/etcd:v3.5.5
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
networks:
- vector
volumes:
- ./milvus/etcd:/etcd
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ['CMD', 'etcdctl', 'endpoint', 'health']
interval: 30s
timeout: 20s
retries: 3
vectorDB:
container_name: milvusStandalone
image: milvusdb/milvus:v2.4.3
command: ['milvus', 'run', 'standalone']
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: milvus-etcd:2379
MINIO_ADDRESS: milvus-minio:9000
networks:
- fastgpt
- vector
volumes:
- ./milvus/data:/var/lib/milvus
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9091/healthz']
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
depends_on:
- 'milvus-etcd'
- 'milvus-minio'
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/redis:7.2-alpine
container_name: redis
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
ports:
- 9000:9000
- 9001:9001
networks:
- fastgpt
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
ROOT_KEY: root_key
# 文件阅读加密
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
RETRY_TIMES: 3
# 不需要计费
BILLING_ENABLED: false
# 不需要严格检测模型
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15 # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:
vector:

View File

@ -0,0 +1,293 @@
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
OCEANBASE_URL: mysql://root%40tenantname:tenantpassword@ob:2881/test
version: '3.3'
services:
# Vector DB
vectorDB:
image: oceanbase/oceanbase-ce:4.3.5-lts
container_name: ob
restart: always
# ports: # 生产环境建议不要暴露
# - 2881:2881
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- OB_SYS_PASSWORD=obsyspassword
# 不同于传统数据库OceanBase 数据库的账号包含更多字段,包括用户名、租户名和集群名。经典格式为"用户名@租户名#集群名"
# 比如用mysql客户端连接时根据本文件的默认配置应该指定 "-uroot@tenantname"
- OB_TENANT_NAME=tenantname
- OB_TENANT_PASSWORD=tenantpassword
# MODE分为MINI和NORMAL 后者会最大程度使用主机资源
- MODE=MINI
- OB_SERVER_IP=127.0.0.1
# 更多环境变量配置见oceanbase官方文档 https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000002013494
volumes:
- ../ob/data:/root/ob
- ../ob/config:/root/.obd/cluster
configs:
- source: init_sql
target: /root/boot/init.d/init.sql
healthcheck:
# obclient -h127.0.0.1 -P2881 -uroot@tenantname -ptenantpassword -e "SELECT 1;"
test:
[
"CMD-SHELL",
'obclient -h$${OB_SERVER_IP} -P2881 -uroot@$${OB_TENANT_NAME} -p$${OB_TENANT_PASSWORD} -e "SELECT 1;"',
]
interval: 30s
timeout: 10s
retries: 1000
start_period: 10s
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/redis:7.2-alpine
container_name: redis
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
ports:
- 9000:9000
- 9001:9001
networks:
- fastgpt
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
ROOT_KEY: root_key
# 文件阅读加密
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
RETRY_TIMES: 3
# 不需要计费
BILLING_ENABLED: false
# 不需要严格检测模型
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15 # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:
vector:
configs:
init_sql:
name: init_sql
content: |
ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30;

View File

@ -0,0 +1,269 @@
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
PG_URL: postgresql://username:password@pg:5432/postgres
version: '3.3'
services:
# Vector DB
vectorDB:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15
container_name: pg
restart: always
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/redis:7.2-alpine
container_name: redis
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
ports:
- 9000:9000
- 9001:9001
networks:
- fastgpt
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
ROOT_KEY: root_key
# 文件阅读加密
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
RETRY_TIMES: 3
# 不需要计费
BILLING_ENABLED: false
# 不需要严格检测模型
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15 # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:
vector:

View File

@ -0,0 +1,252 @@
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
MILVUS_ADDRESS: zilliz_cloud_address
MILVUS_TOKEN: zilliz_cloud_token
version: '3.3'
services:
# Vector DB
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/redis:7.2-alpine
container_name: redis
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
ports:
- 9000:9000
- 9001:9001
networks:
- fastgpt
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
ROOT_KEY: root_key
# 文件阅读加密
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
RETRY_TIMES: 3
# 不需要计费
BILLING_ENABLED: false
# 不需要严格检测模型
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:0.8.0-pg15 # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:
vector:

View File

@ -1,2 +0,0 @@
ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30;

View File

@ -1,2 +0,0 @@
cp ./docker-compose /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

View File

@ -1,23 +1,45 @@
# 数据库的默认账号和密码仅首次运行时设置有效
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
# 如何无法访问 dockerhub 和 git可以用阿里云阿里云没有arm包
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
MILVUS_ADDRESS: http://milvusStandalone:19530
MILVUS_TOKEN: none
version: '3.3'
services:
minio:
container_name: minio
# Vector DB
milvus-minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
ports:
- '9001:9001'
- '9000:9000'
networks:
- fastgpt
- vector
volumes:
- ./minio:/minio_data
- ./milvus-minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
@ -25,8 +47,8 @@ services:
timeout: 20s
retries: 3
# milvus
milvusEtcd:
container_name: milvusEtcd
milvus-etcd:
container_name: milvus-etcd
image: quay.io/coreos/etcd:v3.5.5
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
@ -34,7 +56,7 @@ services:
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
networks:
- fastgpt
- vector
volumes:
- ./milvus/etcd:/etcd
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
@ -43,17 +65,18 @@ services:
interval: 30s
timeout: 20s
retries: 3
milvusStandalone:
vectorDB:
container_name: milvusStandalone
image: milvusdb/milvus:v2.4.3
command: ['milvus', 'run', 'standalone']
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: milvusEtcd:2379
MINIO_ADDRESS: minio:9000
ETCD_ENDPOINTS: milvus-etcd:2379
MINIO_ADDRESS: milvus-minio:9000
networks:
- fastgpt
- vector
volumes:
- ./milvus/data:/var/lib/milvus
healthcheck:
@ -63,15 +86,14 @@ services:
timeout: 20s
retries: 3
depends_on:
- 'milvusEtcd'
- 'minio'
- 'milvus-etcd'
- 'milvus-minio'
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
image: mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
ports:
- 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
@ -80,6 +102,12 @@ services:
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
@ -113,8 +141,6 @@ services:
redis:
image: redis:7.2-alpine
container_name: redis
# ports:
# - 6379:6379
networks:
- fastgpt
restart: always
@ -128,88 +154,112 @@ services:
start_period: 30s
volumes:
- ./redis/data:/data
# fastgpt
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10 # 阿里云
networks:
- fastgpt
fastgpt-minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10 # 阿里云
ports:
- 3005:3000
- 9000:9000
- 9001:9001
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10 # 阿里云
image: ghcr.io/labring/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- milvusStandalone
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
- FE_DOMAIN=
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234
# AI Proxy 的地址,如果配了该地址,优先使用
- AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- AIPROXY_API_TOKEN=aiproxy
# 模型中转地址(如果用了 AI Proxy下面 2 个就不需要了,旧版 OneAPI 用户,使用下面的变量)
# - OPENAI_BASE_URL=http://oneapi:3000/v1
# - CHAT_API_KEY=sk-fastgpt
# 数据库最大连接数
- DB_MAX_LINK=30
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
- TOKEN_KEY=any
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
- ROOT_KEY=root_key
ROOT_KEY: root_key
# 文件阅读加密
- FILE_TOKEN_KEY=filetoken
# MongoDB 连接参数. 用户名myusername,密码mypassword。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
# zilliz 连接参数
- MILVUS_ADDRESS=http://milvusStandalone:19530
- MILVUS_TOKEN=none
# Redis 地址
- REDIS_URL=redis://default:mypassword@redis:6379
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
- SANDBOX_URL=http://sandbox:3000
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
- LOG_LEVEL=info
- STORE_LOG_LEVEL=warn
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
- WORKFLOW_MAX_RUN_TIMES=1000
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
- WORKFLOW_MAX_LOOP_TIMES=100
# 自定义跨域,不配置时,默认都允许跨域(多个域名通过逗号分割)
- ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启
- USE_IP_LIMIT=false
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ghcr.io/labring/aiproxy:v0.1.7
# image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
image: ghcr.io/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
@ -217,19 +267,20 @@ services:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
RETRY_TIMES: 3
# 不需要计费
- BILLING_ENABLED=false
BILLING_ENABLED: false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
@ -237,13 +288,12 @@ services:
retries: 10
aiproxy_pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
@ -256,3 +306,6 @@ services:
retries: 10
networks:
fastgpt:
aiproxy:
vector:

View File

@ -1,14 +1,36 @@
# 数据库的默认账号和密码仅首次运行时设置有效
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
# 如何无法访问 dockerhub 和 git可以用阿里云阿里云没有arm包
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
OCEANBASE_URL: mysql://root%40tenantname:tenantpassword@ob:2881/test
version: '3.3'
services:
# vector db
ob:
image: oceanbase/oceanbase-ce:4.3.5-lts # docker hub
# image: quay.io/oceanbase/oceanbase-ce:4.3.5-lts # 镜像
# Vector DB
vectorDB:
image: oceanbase/oceanbase-ce:4.3.5-lts
container_name: ob
restart: always
# ports: # 生产环境建议不要暴露
@ -18,8 +40,8 @@ services:
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- OB_SYS_PASSWORD=obsyspassword
# 不同于传统数据库OceanBase 数据库的账号包含更多字段,包括用户名、租户名和集群名。经典格式为“用户名@租户名#集群名”
# 比如用mysql客户端连接时根据本文件的默认配置应该指定 “-uroot@tenantname”
# 不同于传统数据库OceanBase 数据库的账号包含更多字段,包括用户名、租户名和集群名。经典格式为"用户名@租户名#集群名"
# 比如用mysql客户端连接时根据本文件的默认配置应该指定 "-uroot@tenantname"
- OB_TENANT_NAME=tenantname
- OB_TENANT_PASSWORD=tenantpassword
# MODE分为MINI和NORMAL 后者会最大程度使用主机资源
@ -27,28 +49,28 @@ services:
- OB_SERVER_IP=127.0.0.1
# 更多环境变量配置见oceanbase官方文档 https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000002013494
volumes:
- ./ob/data:/root/ob
- ./ob/config:/root/.obd/cluster
- ./init.sql:/root/boot/init.d/init.sql
- ../ob/data:/root/ob
- ../ob/config:/root/.obd/cluster
configs:
- source: init_sql
target: /root/boot/init.d/init.sql
healthcheck:
# obclient -h127.0.0.1 -P2881 -uroot@tenantname -ptenantpassword -e "SELECT 1;"
test:
[
'CMD-SHELL',
'obclient -h$${OB_SERVER_IP} -P2881 -uroot@$${OB_TENANT_NAME} -p$${OB_TENANT_PASSWORD} -e "SELECT 1;"'
"CMD-SHELL",
'obclient -h$${OB_SERVER_IP} -P2881 -uroot@$${OB_TENANT_NAME} -p$${OB_TENANT_PASSWORD} -e "SELECT 1;"',
]
interval: 30s
timeout: 10s
retries: 1000
start_period: 10s
mongo:
image: mongo:5.0.18 # dockerhub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
# image: mongo:4.4.29 # cpu不支持AVX时候使用
image: mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
# ports:
# - 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
@ -57,6 +79,12 @@ services:
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
@ -90,102 +118,125 @@ services:
redis:
image: redis:7.2-alpine
container_name: redis
# ports:
# - 6379:6379
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
volumes:
- ./redis/data:/data
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
# fastgpt
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10 # 阿里云
networks:
- fastgpt
volumes:
- ./redis/data:/data
fastgpt-minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10 # 阿里云
ports:
- 3005:3000
- 9000:9000
- 9001:9001
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10 # 阿里云
image: ghcr.io/labring/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
mongo:
condition: service_started
ob:
condition: service_healthy
sandbox:
condition: service_started
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
- FE_DOMAIN=
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234
# # AI Proxy 的地址,如果配了该地址,优先使用
- AIPROXY_API_ENDPOINT=http://aiproxy:3000
# # AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- AIPROXY_API_TOKEN=aiproxy
# 数据库最大连接数
- DB_MAX_LINK=30
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
- TOKEN_KEY=any
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
- ROOT_KEY=root_key
ROOT_KEY: root_key
# 文件阅读加密
- FILE_TOKEN_KEY=filetoken
# MongoDB 连接参数. 用户名myusername,密码mypassword。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
# OceanBase 向量库连接参数
- OCEANBASE_URL=mysql://root%40tenantname:tenantpassword@ob:2881/test
# Redis 连接参数
- REDIS_URL=redis://default:mypassword@redis:6379
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
- SANDBOX_URL=http://sandbox:3000
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
- LOG_LEVEL=info
- STORE_LOG_LEVEL=warn
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
- WORKFLOW_MAX_RUN_TIMES=1000
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
- WORKFLOW_MAX_LOOP_TIMES=100
# 自定义跨域,不配置时,默认都允许跨域(多个域名通过逗号分割)
- ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启
- USE_IP_LIMIT=false
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ghcr.io/labring/aiproxy:v0.1.7
# image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
image: ghcr.io/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
@ -193,19 +244,20 @@ services:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
RETRY_TIMES: 3
# 不需要计费
- BILLING_ENABLED=false
BILLING_ENABLED: false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
@ -213,13 +265,12 @@ services:
retries: 10
aiproxy_pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
@ -232,3 +283,11 @@ services:
retries: 10
networks:
fastgpt:
aiproxy:
vector:
configs:
init_sql:
name: init_sql
content: |
ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30;

View File

@ -1,18 +1,37 @@
# 数据库的默认账号和密码仅首次运行时设置有效
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
# 如何无法访问 dockerhub 和 git可以用阿里云阿里云没有arm包
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
PG_URL: postgresql://username:password@pg:5432/postgres
version: '3.3'
services:
# db
pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
# Vector DB
vectorDB:
image: pgvector/pgvector:0.8.0-pg15
container_name: pg
restart: always
# ports: # 生产环境建议不要暴露
# - 5432:5432
networks:
- fastgpt
environment:
@ -23,18 +42,16 @@ services:
volumes:
- ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'postgres']
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
mongo:
image: mongo:5.0.18 # dockerhub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
# image: mongo:4.4.29 # cpu不支持AVX时候使用
image: mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
# ports:
# - 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
@ -43,6 +60,12 @@ services:
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
@ -73,12 +96,9 @@ services:
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: redis:7.2-alpine
container_name: redis
# ports:
# - 6379:6379
networks:
- fastgpt
restart: always
@ -92,84 +112,112 @@ services:
start_period: 30s
volumes:
- ./redis/data:/data
# fastgpt
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10 # 阿里云
networks:
- fastgpt
fastgpt-minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10 # 阿里云
ports:
- 3005:3000
- 9000:9000
- 9001:9001
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10 # 阿里云
image: ghcr.io/labring/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- pg
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
- FE_DOMAIN=
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234
# AI Proxy 的地址,如果配了该地址,优先使用
- AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- AIPROXY_API_TOKEN=aiproxy
# 数据库最大连接数
- DB_MAX_LINK=30
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
- TOKEN_KEY=any
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
- ROOT_KEY=root_key
ROOT_KEY: root_key
# 文件阅读加密
- FILE_TOKEN_KEY=filetoken
# MongoDB 连接参数. 用户名myusername,密码mypassword。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
# pg 连接参数
- PG_URL=postgresql://username:password@pg:5432/postgres
# Redis 连接参数
- REDIS_URL=redis://default:mypassword@redis:6379
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
- SANDBOX_URL=http://sandbox:3000
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
- LOG_LEVEL=info
- STORE_LOG_LEVEL=warn
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
- WORKFLOW_MAX_RUN_TIMES=1000
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
- WORKFLOW_MAX_LOOP_TIMES=100
# 自定义跨域,不配置时,默认都允许跨域(多个域名通过逗号分割)
- ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启
- USE_IP_LIMIT=false
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ghcr.io/labring/aiproxy:v0.1.7
# image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
image: ghcr.io/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
@ -177,19 +225,20 @@ services:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
RETRY_TIMES: 3
# 不需要计费
- BILLING_ENABLED=false
BILLING_ENABLED: false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
@ -197,13 +246,12 @@ services:
retries: 10
aiproxy_pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
@ -216,3 +264,6 @@ services:
retries: 10
networks:
fastgpt:
aiproxy:
vector:

View File

@ -1,18 +1,40 @@
# 数据库的默认账号和密码仅首次运行时设置有效
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
# 如何无法访问 dockerhub 和 git可以用阿里云阿里云没有arm包
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
MILVUS_ADDRESS: zilliz_cloud_address
MILVUS_TOKEN: zilliz_cloud_token
version: '3.3'
services:
# Vector DB
mongo:
image: mongo:5.0.18 # dockerhub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
# image: mongo:4.4.29 # cpu不支持AVX时候使用
image: mongo:5.0.18 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
ports:
- 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
@ -21,6 +43,12 @@ services:
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
@ -54,8 +82,6 @@ services:
redis:
image: redis:7.2-alpine
container_name: redis
# ports:
# - 6379:6379
networks:
- fastgpt
restart: always
@ -69,29 +95,30 @@ services:
start_period: 30s
volumes:
- ./redis/data:/data
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10 # 阿里云
networks:
- fastgpt
fastgpt-minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10 # 阿里云
ports:
- 3005:3000
- 9000:9000
- 9001:9001
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10 # 阿里云
image: ghcr.io/labring/fastgpt:v4.14.4 # git
ports:
- 3000:3000
networks:
@ -99,56 +126,81 @@ services:
depends_on:
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
- FE_DOMAIN=
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234
# AI Proxy 的地址,如果配了该地址,优先使用
- AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- AIPROXY_API_TOKEN=aiproxy
# 模型中转地址(如果用了 AI Proxy下面 2 个就不需要了,旧版 OneAPI 用户,使用下面的变量)
# - OPENAI_BASE_URL=http://oneapi:3000/v1
# - CHAT_API_KEY=sk-fastgpt
# 数据库最大连接数
- DB_MAX_LINK=30
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
- TOKEN_KEY=any
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
- ROOT_KEY=root_key
ROOT_KEY: root_key
# 文件阅读加密
- FILE_TOKEN_KEY=filetoken
# MongoDB 连接参数. 用户名myusername,密码mypassword。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
# Redis 连接参数
- REDIS_URI=redis://default:mypassword@redis:6379
# zilliz 连接参数
- MILVUS_ADDRESS=zilliz_cloud_address
- MILVUS_TOKEN=zilliz_cloud_token
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
- SANDBOX_URL=http://sandbox:3000
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
- LOG_LEVEL=info
- STORE_LOG_LEVEL=warn
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
- WORKFLOW_MAX_RUN_TIMES=1000
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
- WORKFLOW_MAX_LOOP_TIMES=100
# 自定义跨域,不配置时,默认都允许跨域(多个域名通过逗号分割)
- ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启
- USE_IP_LIMIT=false
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.14.4
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.14.4
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v0.3.4
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ghcr.io/labring/aiproxy:v0.1.7
# image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
image: ghcr.io/labring/aiproxy:v0.3.2
container_name: aiproxy
restart: unless-stopped
depends_on:
@ -156,19 +208,20 @@ services:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
RETRY_TIMES: 3
# 不需要计费
- BILLING_ENABLED=false
BILLING_ENABLED: false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
@ -176,13 +229,12 @@ services:
retries: 10
aiproxy_pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
@ -195,3 +247,6 @@ services:
retries: 10
networks:
fastgpt:
aiproxy:
vector:

View File

@ -1,19 +0,0 @@
#!/bin/bash
docker-compose pull
docker-compose up -d
echo "Docker Compose 重新拉取镜像完成!"
# 删除本地旧镜像
images=$(docker images --format "{{.ID}} {{.Repository}}" | grep fastgpt)
# 将镜像 ID 和名称放入数组中
IFS=$'\n' read -rd '' -a image_array <<<"$images"
# 遍历数组并删除所有旧的镜像
for ((i=1; i<${#image_array[@]}; i++))
do
image=${image_array[$i]}
image_id=${image%% *}
docker rmi $image_id
done

View File

@ -26,8 +26,6 @@ data:
"usedInToolCall": true,
"toolChoice": true,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {}
},
@ -47,8 +45,6 @@ data:
"usedInToolCall": true,
"toolChoice": true,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {}
},
@ -68,8 +64,6 @@ data:
"usedInToolCall": true,
"toolChoice": true,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {}
},
@ -89,8 +83,6 @@ data:
"usedInToolCall": false,
"toolChoice": true,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {}
}

228
deploy/init.mjs Normal file
View File

@ -0,0 +1,228 @@
#!/usr/bin/env node
import fs from 'fs';
import path from 'path';
/**
* @enum {String} RegionEnum
*/
const RegionEnum = {
cn: 'cn',
global: 'global'
};
/**
* @enum {String} VectorEnum
*/
const VectorEnum = {
pg: 'pg',
milvus: 'milvus',
zilliz: 'zilliz',
ob: 'ob'
};
/**
* @enum {string} Services
*/
const Services = {
fastgpt: 'fastgpt',
fastgptPlugin: 'fastgpt-plugin',
fastgptSandbox: 'fastgpt-sandbox',
fastgptMcpServer: 'fastgpt-mcp_server',
minio: 'minio',
mongo: 'mongo',
redis: 'redis',
aiproxy: 'aiproxy',
aiproxyPg: 'aiproxy-pg',
// vectors
pg: 'pg',
milvusMinio: 'milvus-minio',
milvusEtcd: 'milvus-etcd',
milvusStandalone: 'milvus-standalone',
oceanbase: 'oceanbase'
};
// make sure the cwd
const basePath = process.cwd();
if (!basePath.endsWith('deploy')) {
process.chdir('deploy');
}
/**
* @typedef {{ tag: String, image: {cn: String, global: String} }} ArgItemType
*/
/** format the args
* @type {Record<Services, ArgItemType>}
*/
const args = (() => {
/**
* @type {{tags: Record<Services, string>, images: Record<Services, Record<string, string>>}}
*/
const obj = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'args.json')));
const args = {};
for (const key of Object.keys(obj.tags)) {
args[key] = {
tag: obj.tags[key],
image: {
cn: obj.images.cn[key],
global: obj.images.global[key]
}
};
}
return args;
})();
const vector = {
pg: {
db: '',
config: `\
PG_URL: postgresql://username:password@pg:5432/postgres`,
extra: ''
},
milvus: {
db: '',
config: `\
MILVUS_ADDRESS: http://milvusStandalone:19530
MILVUS_TOKEN: none
`,
extra: ''
},
zilliz: {
db: '',
config: `\
MILVUS_ADDRESS: zilliz_cloud_address
MILVUS_TOKEN: zilliz_cloud_token`,
extra: ''
},
ob: {
db: '',
config: `\
OCEANBASE_URL: mysql://root%40tenantname:tenantpassword@ob:2881/test
`,
extra: `\
configs:
init_sql:
name: init_sql
content: |
ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30;
`
}
};
/**
* replace all ${{}}
* @param {string} source
* @param {RegionEnum} region
* @param {VectorEnum} vec
* @returns {string}
*/
const replace = (source, region, vec) => {
// Match ${{expr}}, capture "expr" inside {{}}
return source.replace(/\$\{\{([^}]*)\}\}/g, (_, expr) => {
// expr: a.b
/**
* @type {String}
*/
const [a, b] = expr.split('.');
if (a === 'vec') {
if (b === 'db') {
return replace(vector[vec].db, region, vec);
} else {
return vector[vec][b];
}
}
if (b === 'tag') {
return args[a].tag;
} else if (b === 'image') {
return args[a].image[region];
}
});
};
{
// read in Vectors
const pg = fs.readFileSync(path.join(process.cwd(), 'templates', 'vector', 'pg.txt'));
vector.pg.db = String(pg);
const milvus = fs.readFileSync(path.join(process.cwd(), 'templates', 'vector', 'milvus.txt'));
vector.milvus.db = String(milvus);
const ob = fs.readFileSync(path.join(process.cwd(), 'templates', 'vector', 'ob.txt'));
vector.ob.db = String(ob);
}
const generateDevFile = async () => {
console.log('generating dev/docker-compose.yml');
// 1. read template
const template = await fs.promises.readFile(
path.join(process.cwd(), 'templates', 'docker-compose.dev.yml'),
'utf8'
);
await Promise.all([
fs.promises.writeFile(
path.join(process.cwd(), 'dev', 'docker-compose.cn.yml'),
replace(template, 'cn')
),
fs.promises.writeFile(
path.join(process.cwd(), 'dev', 'docker-compose.yml'),
replace(template, 'global')
)
]);
console.log('success geenrate dev files');
};
const generateProdFile = async () => {
console.log('generating prod/docker-compose.yml');
const template = await fs.promises.readFile(
path.join(process.cwd(), 'templates', 'docker-compose.prod.yml'),
'utf8'
);
await Promise.all([
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'cn', 'docker-compose.pg.yml'),
replace(template, 'cn', VectorEnum.pg)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'global', 'docker-compose.pg.yml'),
replace(template, 'global', VectorEnum.pg)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'cn', 'docker-compose.milvus.yml'),
replace(template, 'cn', VectorEnum.milvus)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'global', 'docker-compose.milvus.yml'),
replace(template, 'global', VectorEnum.milvus)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'cn', 'docker-compose.zilliz.yml'),
replace(template, 'cn', VectorEnum.zilliz)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'global', 'docker-compose.ziliiz.yml'),
replace(template, 'global', VectorEnum.zilliz)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'cn', 'docker-compose.oceanbase.yml'),
replace(template, 'cn', VectorEnum.ob)
),
fs.promises.writeFile(
path.join(process.cwd(), 'docker', 'global', 'docker-compose.oceanbase.yml'),
replace(template, 'global', VectorEnum.ob)
)
]);
console.log('success geenrate prod files');
};
await Promise.all([generateDevFile(), generateProdFile()]);
console.log('copy the docker dir to ../document/public');
await fs.promises.cp(
path.join(process.cwd(), 'docker'),
path.join(process.cwd(), '..', 'document', 'public', 'deploy', 'docker'),
{ recursive: true }
);

View File

@ -0,0 +1,229 @@
# 用于开发的 docker-compose 文件:
# - 只包含 FastGPT 的最小化运行条件
# - 没有 FastGPT 本体
# - 所有端口都映射到外层
# - pg: 5432
# - mongo: 27017
# - redis: 6379
# - fastgpt-sandbox: 3002
# - fastgpt-plugin: 3003
# - aiproxy: 3010
# - 使用 pgvector 作为默认的向量库
services:
# Vector DB
pg:
image: ${{pg.image}}:${{pg.tag}}
container_name: pg
restart: always
ports: # 生产环境建议不要暴露
- 5432:5432
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
# DB
mongo:
image: ${{mongo.image}}:${{mongo.tag}} # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
ports:
- 27017:27017
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test:
[
'CMD',
'mongo',
'-u',
'myusername',
'-p',
'mypassword',
'--authenticationDatabase',
'admin',
'--eval',
"db.adminCommand('ping')"
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: ${{redis.image}}:${{redis.tag}}
container_name: redis
ports:
- 6379:6379
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: ${{minio.image}}:${{minio.tag}}
container_name: fastgpt-minio
restart: always
networks:
- fastgpt
ports:
- '9000:9000'
- '9001:9001'
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
sandbox:
container_name: sandbox
image: ${{fastgpt-sandbox.image}}:${{fastgpt-sandbox.tag}}
ports:
- 3002:3000
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ${{fastgpt-mcp_server.image}}:${{fastgpt-mcp_server.tag}}
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ${{fastgpt-plugin.image}}:${{fastgpt-plugin.tag}}
container_name: fastgpt-plugin
restart: always
ports:
- 3003:3000
networks:
- fastgpt
environment:
- AUTH_TOKEN=token
- S3_EXTERNAL_BASE_URL=http://127.0.0.1:9000 # TODO: 改为你 Minio 的实际的 ip 地址
- S3_ENDPOINT=fastgpt-minio
- S3_PORT=9000
- S3_USE_SSL=false
- S3_ACCESS_KEY=minioadmin
- S3_SECRET_KEY=minioadmin
- S3_PUBLIC_BUCKET=fastgpt-public # 系统工具,创建的临时文件,存储的桶,要求公开读私有写。
- S3_PRIVATE_BUCKET=fastgpt-private # 系统插件热安装文件的桶,私有读写。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin&directConnection=true
- REDIS_URL=redis://default:mypassword@redis:6379
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ${{aiproxy.image}}:${{aiproxy.tag}}
container_name: aiproxy
restart: unless-stopped
ports:
- 3010:3000
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RETRY_TIMES=3
# 不需要计费
- BILLING_ENABLED=false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: ${{aiproxy-pg.image}}:${{aiproxy-pg.tag}} # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:

View File

@ -0,0 +1,251 @@
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3005:3000
# - 建议修改账密后再运行
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
x-share-db-config: &x-share-db-config
MONGODB_URI: mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
DB_MAX_LINK: 100
REDIS_URL: redis://default:mypassword@redis:6379
S3_EXTERNAL_BASE_URL: https://minio.com # S3 的公网访问地址
S3_ENDPOINT: fastgpt-minio
S3_PORT: 9000
S3_USE_SSL: false
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_PUBLIC_BUCKET: fastgpt-public # 公开读私有写桶
S3_PRIVATE_BUCKET: fastgpt-private # 私有读写桶
# 向量库相关配置
x-vec-config: &x-vec-config
${{vec.config}}
version: '3.3'
services:
# Vector DB
${{vec.db}}
mongo:
image: ${{mongo.image}}:${{mongo.tag}} # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
restart: always
networks:
- fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0
environment:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
entrypoint:
- bash
- -c
- |
openssl rand -base64 128 > /data/mongodb.key
chmod 400 /data/mongodb.key
chown 999:999 /data/mongodb.key
echo 'const isInited = rs.status().ok === 1
if(!isInited){
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongo:27017" }
]
})
}' > /data/initReplicaSet.js
# 启动MongoDB服务
exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..."
sleep 2
done
# 执行初始化副本集的脚本
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$!
redis:
image: ${{redis.image}}:${{redis.tag}}
container_name: redis
networks:
- fastgpt
restart: always
command: |
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'mypassword', 'ping']
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
fastgpt-minio:
image: ${{minio.image}}:${{minio.tag}}
container_name: fastgpt-minio
restart: always
ports:
- 9000:9000
- 9001:9001
networks:
- fastgpt
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
fastgpt:
container_name: fastgpt
image: ${{fastgpt.image}}:${{fastgpt.tag}} # git
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
- mongo
- sandbox
- vectorDB
restart: always
environment:
<<: [*x-share-db-config, *x-vec-config]
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
FE_DOMAIN:
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
DEFAULT_ROOT_PSW: 1234
# 登录凭证密钥
TOKEN_KEY: any
# root的密钥常用于升级时候的初始化请求
ROOT_KEY: root_key
# 文件阅读加密
FILE_TOKEN_KEY: filetoken
# 密钥加密key
AES256_SECRET_KEY: fastgptkey
# plugin 地址
PLUGIN_BASE_URL: http://fastgpt-plugin:3000
PLUGIN_TOKEN: *x-plugin-auth-token
# sandbox 地址
SANDBOX_URL: http://sandbox:3000
# AI Proxy 的地址,如果配了该地址,优先使用
AIPROXY_API_ENDPOINT: http://aiproxy:3000
# AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# 日志等级: debug, info, warn, error
LOG_LEVEL: info
STORE_LOG_LEVEL: warn
# 工作流最大运行次数
WORKFLOW_MAX_RUN_TIMES: 1000
# 批量执行节点,最大输入长度
WORKFLOW_MAX_LOOP_TIMES: 100
# 对话文件过期天数
CHAT_FILE_EXPIRE_TIME: 7
# 服务器接收请求,最大大小,单位 MB
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
volumes:
- ./config.json:/app/data/config.json
sandbox:
container_name: sandbox
image: ${{fastgpt-sandbox.image}}:${{fastgpt-sandbox.tag}}
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ${{fastgpt-mcp_server.image}}:${{fastgpt-mcp_server.tag}}
networks:
- fastgpt
ports:
- 3005:3000
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt-plugin:
image: ${{fastgpt-plugin.image}}:${{fastgpt-plugin.tag}}
container_name: fastgpt-plugin
restart: always
networks:
- fastgpt
environment:
<<: *x-share-db-config
AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
# 最大 API 请求体大小
MAX_API_SIZE: 10
depends_on:
fastgpt-minio:
condition: service_healthy
# AI Proxy
aiproxy:
image: ${{aiproxy.image}}:${{aiproxy.tag}}
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
- aiproxy
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
ADMIN_KEY: *x-aiproxy-token
# 错误日志详情保存时间(小时)
LOG_DETAIL_STORAGE_HOURS: 1
# 数据库连接地址
SQL_DSN: postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
RETRY_TIMES: 3
# 不需要计费
BILLING_ENABLED: false
# 不需要严格检测模型
DISABLE_MODEL_CONFIG: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: ${{aiproxy-pg.image}}:${{aiproxy-pg.tag}} # docker hub
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
networks:
fastgpt:
aiproxy:
vector:
${{vec.extra}}

View File

@ -0,0 +1,58 @@
milvus-minio:
container_name: milvus-minio
image: ${{milvus-minio.image}}:${{milvus-minio.tag}}
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
networks:
- vector
volumes:
- ./milvus-minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
# milvus
milvus-etcd:
container_name: milvus-etcd
image: ${{milvus-etcd.image}}:${{milvus-etcd.tag}}
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
networks:
- vector
volumes:
- ./milvus/etcd:/etcd
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ['CMD', 'etcdctl', 'endpoint', 'health']
interval: 30s
timeout: 20s
retries: 3
vectorDB:
container_name: milvusStandalone
image: ${{milvus-standalone.image}}:${{milvus-standalone.tag}}
command: ['milvus', 'run', 'standalone']
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: milvus-etcd:2379
MINIO_ADDRESS: milvus-minio:9000
networks:
- fastgpt
- vector
volumes:
- ./milvus/data:/var/lib/milvus
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9091/healthz']
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
depends_on:
- 'milvus-etcd'
- 'milvus-minio'

View File

@ -0,0 +1,36 @@
vectorDB:
image: ${{oceanbase.image}}:${{oceanbase.tag}}
container_name: ob
restart: always
# ports: # 生产环境建议不要暴露
# - 2881:2881
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- OB_SYS_PASSWORD=obsyspassword
# 不同于传统数据库OceanBase 数据库的账号包含更多字段,包括用户名、租户名和集群名。经典格式为"用户名@租户名#集群名"
# 比如用mysql客户端连接时根据本文件的默认配置应该指定 "-uroot@tenantname"
- OB_TENANT_NAME=tenantname
- OB_TENANT_PASSWORD=tenantpassword
# MODE分为MINI和NORMAL 后者会最大程度使用主机资源
- MODE=MINI
- OB_SERVER_IP=127.0.0.1
# 更多环境变量配置见oceanbase官方文档 https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000002013494
volumes:
- ../ob/data:/root/ob
- ../ob/config:/root/.obd/cluster
configs:
- source: init_sql
target: /root/boot/init.d/init.sql
healthcheck:
# obclient -h127.0.0.1 -P2881 -uroot@tenantname -ptenantpassword -e "SELECT 1;"
test:
[
"CMD-SHELL",
'obclient -h$${OB_SERVER_IP} -P2881 -uroot@$${OB_TENANT_NAME} -p$${OB_TENANT_PASSWORD} -e "SELECT 1;"',
]
interval: 30s
timeout: 10s
retries: 1000
start_period: 10s

View File

@ -0,0 +1,18 @@
vectorDB:
image: ${{pg.image}}:${{pg.tag}}
container_name: pg
restart: always
networks:
- fastgpt
environment:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10

232
dev.md
View File

@ -1,114 +1,118 @@
## 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
# Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content)
chmod -R +x ./scripts/
# Executing under the code root directory installs all dependencies within the root package, projects, and packages
pnpm i
# Not make cmd
cd projects/app
pnpm dev
# Make cmd
make dev name=app
```
Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` parameter to Node when running `pnpm i`
```sh
NODE_OPTIONS=--no-node-snapshot pnpm i
```
### 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
```
## 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
# Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content)
chmod -R +x ./scripts/
# Executing under the code root directory installs all dependencies within the root package, projects, and packages
pnpm i
# Not make cmd
cd projects/app
pnpm dev
# Make cmd
make dev name=app
```
Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` parameter to Node when running `pnpm i`
```sh
NODE_OPTIONS=--no-node-snapshot pnpm i
```
### 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.
## audit
Please fill the AuditEventEnum and audit function is added to the ts, and on the corresponding position to fill i18n, at the same time to add the location of the log using addOpearationLog function add function
## 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
```

View File

@ -1,14 +0,0 @@
FROM hugomods/hugo:0.117.0 AS builder
WORKDIR /app
ADD ./docSite hugo
RUN cd /app/hugo && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify
FROM fholzer/nginx-brotli:latest
LABEL org.opencontainers.image.source https://github.com/labring/FastGPT
COPY --from=builder /app/hugo/public /usr/share/nginx/html
COPY ./docSite/nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -1,9 +0,0 @@
# 文档
## 本地运行
1. 安装 go 语言环境。
2. 安装 hugo。[二进制下载](https://github.com/gohugoio/hugo/releases/tag/v0.117.0),注意需要安装 extended 版本。
3. cd docSite
4. hugo serve
5. 访问 http://localhost:1313

View File

@ -1,6 +0,0 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

View File

@ -1,219 +0,0 @@
:root {
--code-bg: rgba(0, 0, 0, 0.03);
--code-color: rgba(14, 116, 144, 0.95);
--inline-code-border: 0.5px solid var(--gray-400);
}
[data-dark-mode] {
--code-bg: hsla(0, 2%, 14%, 1);
--code-color: #f3f4f6ed;
--inline-code-border: 0.5px solid var(--gray-600);
}
#content {
font-family: JetBrains Mono, LXGW WenKai Screen, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", "Ubuntu";
}
@media (min-width: 768px) {
.docs-content h1 {
font-size: 2.4rem;
}
.docs-content .main-content h2 {
margin-top: 2rem !important;
margin-bottom: 1rem !important;
font-size: 1.9rem;
}
.docs-content .main-content h3 {
margin-top: 1.6rem !important;
margin-bottom: 0.6rem !important;
font-size: 1.6rem;
}
.docs-content .main-content h4 {
font-size: 1.4rem;
}
.docs-content .main-content ol, .docs-content .main-content ul {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.docs-content .main-content ol > li {
margin-left: -1.8rem;
}
}
.docs-content .main-content ol > li::before {
border-radius: 9999px;
}
.docs-content .main-content img, .docs-content .main-content svg:not(.gitinfo svg):not(a svg) {
max-width: 80% !important;
height: auto;
display: block !important;
margin: 0 auto !important;
border-radius: .25rem;
}
div.code-toolbar {
padding-top: 1.95rem !important;
}
.docs-content .main-content pre code::before {
background: #fc625d;
border-radius: 50%;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
content: ' ';
height: 12px;
left: 12px;
margin-top: -21px;
position: absolute;
width: 12px;
z-index: 1;
}
.docs-content .main-content pre code {
padding: 0 2.5rem 1.25rem .9rem;
}
.docs-content .main-content code {
font-size: .875em;
padding: 1px 2px;
background: var(--code-bg);
border: var(--inline-code-border);
padding-top: 3px;
padding-bottom: 3px;
padding-left: 5px;
padding-right: 5px;
border-radius: .25rem;
color: var(--code-color);
}
li p {
margin-top: 1rem !important;
margin-bottom: 1rem;
}
.docs-content .main-content ul > li {
margin-top: .3rem !important;
margin-bottom: .3rem;
}
footer {
height: 118px !important;
}
/*
footer a:hover {
text-decoration: none !important;
}
*/
.medium-zoom-overlay,
.medium-zoom-image--opened {
z-index: 1999;
}
/* 徽章样式 */
.github-badge {
display: inline-block;
border-radius: 4px;
text-shadow: none;
font-size: 12px;
color: #fff;
line-height: 15px;
margin-bottom: 5px;
margin-top: 5px;
}
.github-badge .badge-subject {
display: inline-block;
background-color: #4D4D4D;
padding: 4px 4px 4px 6px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.github-badge .badge-value {
display: inline-block;
padding: 4px 6px 4px 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.github-badge .bg-brightgreen {
background-color: #4DC820 !important;
}
.github-badge .bg-orange {
background-color: #FFA500 !important;
}
.github-badge .bg-yellow {
background-color: #D8B024 !important;
}
.github-badge .bg-blueviolet {
background-color: #8833D7 !important;
}
.github-badge .bg-pink {
background-color: #F26BAE !important;
}
.github-badge .bg-red {
background-color: #e05d44 !important;
}
.github-badge .bg-blue {
background-color: #007EC6 !important;
}
.github-badge .bg-lightgrey {
background-color: #9F9F9F !important;
}
.github-badge .bg-grey, .github-badge .bg-gray {
background-color: #555 !important;
}
.github-badge .bg-lightgrey, .github-badge .bg-lightgray {
background-color: #9f9f9f !important;
}
#fixed-box {
position: fixed;
z-index: 9999;
}
@media (max-width: 600px) {
#fixed-box {
display: none
}
}
.feedback-btn-wrapper {
position: fixed;
z-index: 1000;
bottom: 0;
left: 0;
margin: 2rem;
}
#feedback-btn {
height: 30px;
display: flex;
align-items: center;
padding: 1.2rem 0.7rem;
border-radius: 0.4rem;
cursor: pointer;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
0 4px 6px -2px rgba(0, 0, 0, 0.05);
user-select: none;
border: 0;
outline: 0;
color: #fff;
background-color: #4d698e;
transition: filter 0.4s ease;
}
#feedback-btn svg {
width: 1.25rem;
height: 1.25rem;
}
#feedback-btn span {
font-weight: 700;
font-size: 1rem;
margin-left: 0.5rem;
}

View File

@ -1,178 +0,0 @@
/**
* Lotus Docs theme
*
* Adapted from a theme based on:
* https://github.com/chriskempson/tomorrow-theme
*
* @author Colin Wilson <github.com/colinwilson>
* @version 1.0
*/
:root {
--prism-code-bg: #faf9f8;
--prism-code-scrollbar-thumb-color: var(--gray-400);
--prism-color: #333;
--prism-bg: #f0f0f0;
--prism-highlight-bg: var(--blue-200);
--prism-copy-bg: var(--gray-500);
--prism-copy-hover-bg: var(--gray-700);
--prism-copy-success-bg: var(--emerald-500);
--prism-token-punctuation: #666;
--prism-token-deleted: #2b6cb0;
--prism-token-function-name: #3182bd;
--prism-token-function: #c53030;
--prism-token-number: var(--cardinal-600);
--prism-token-symbol: #333;
--prism-token-builtin: #1a202c;
--prism-token-regex: #2f855a;
--prism-token-variable: var(--yellow-700);
--prism-token-url: #4fd1c5;
--prism-token-inserted: #38a169;
}
[data-dark-mode] {
--prism-code-bg: var(--gray-900);
--prism-code-scrollbar-thumb-color: var(--gray-600);
--prism-color: #f5fbff;
--prism-bg: #32325d;
--prism-highlight-bg: var(--blue-400);
--prism-copy-bg: var(--gray-400);
--prism-copy-hover-bg: var(--white);
--prism-copy-success-bg: var(--emerald-200);
--prism-token-punctuation: #ccc;
--prism-token-deleted: #7fd3ed;
--prism-token-function-name: #6196cc;
--prism-token-function: #fda3f3;
--prism-token-number: var(--cardinal-200);
--prism-token-symbol: #ffffff;
--prism-token-builtin: #a4cdfe;
--prism-token-regex: #7ec699;
--prism-token-variable: var(--yellow-100);
--prism-token-url: #67cdcc;
--prism-token-inserted: green;
}
code[class*="language-"],
pre[class*="language-"] {
color: var(--prism-color) !important;
background: var(--prism-code-bg) !important;
}
/* Code blocks */
pre[class*="language-"] {
// padding: 1em;
// margin: .5em 0;
overflow: auto;
border-radius: 0 0 4px 4px;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: var(--prism-bg);
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.line-highlight:before,
.line-highlight[data-end]:after {
background-color: var(--prism-highlight-bg);
}
[data-copy-state="copy"] span:empty::before {
background-color: var(--prism-copy-bg);
}
[data-copy-state="copy"] span:empty:hover::before {
background-color: var(--prism-copy-hover-bg);
}
[data-copy-state="copy-success"] span:empty::before {
background-color: var(--prism-copy-success-bg);
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999;
}
.token.punctuation {
color: var(--prism-token-punctuation);
}
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: var(--prism-token-deleted);
}
.token.function-name {
color: var(--prism-token-function-name);
}
.token.boolean,
.token.function {
color: var(--prism-token-function);
}
.token.number {
color: var(--prism-token-number);
}
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: var(--prism-token-symbol);
font-weight: 700;
}
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: var(--prism-token-builtin);
font-weight: 700;
}
.token.string,
.token.char,
.token.attr-value,
.token.regex {
color: var(--prism-token-regex);
}
.token.variable {
color: var(--prism-token-variable);
}
.token.operator,
.token.entity,
.token.url {
color: var(--prism-token-url);
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.inserted {
color: var(--prism-token-inserted);
}

View File

@ -1,77 +0,0 @@
/* Template Name: Lotus Docs
Author: Colin Wilson
E-mail: colin@aigis.uk
Created: October 2022
Version: 1.2.0
File Description: Main CSS file for Lotus Docs
*/
// Custom Font Variables
$font-family-secondary: {{ .Site.Params.secondary_font | default "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Ubuntu'" }};
$font-family-sans-serif: {{ .Site.Params.sans_serif_font | default "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Ubuntu'" }};
$font-family-monospace: {{ .Site.Params.mono_font | default "SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace" }};
// Code Padding Variables
$code-block-padding-top: {{ if eq .Site.Params.docs.prism true -}}0{{ else }}1.25rem 0 0 0{{ end }};
// Icon Fonts
@import "custom/plugins/icons/google-material";
// Core files
@import "../../scss/bootstrap/functions";
@import "../../scss/bootstrap/variables";
@import {{ printf "'%s%s'" "custom/colors/" (.Site.Params.docs.themeColor | default "blue") }}; // current theme color
@import "../../scss/bootstrap/mixins";
@import "../../scss/bootstrap/bootstrap";
@import "variables";
{{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}}
@import "custom/plugins/docsearch/style";
{{ end }}
// Structure
@import "custom/structure/general";
@import "custom/structure/content";
@import "custom/structure/sidebar";
@import "custom/structure/doc-nav";
@import "custom/structure/toc";
@import "custom/structure/footer";
// Components
@import "custom/components/buttons";
@import "custom/components/modal";
@import "custom/components/breadcrumb";
@import "custom/components/badge";
@import "custom/components/backgrounds";
@import "custom/components/alerts";
@import "custom/components/card";
@import "custom/components/forms";
@import "custom/components/table";
@import "custom/components/tabs";
@import "custom/components/tooltip";
// Pages
@import "custom/pages/features";
@import "custom/pages/helper";
// Plugins
// Prism / Chroma
{{- if eq .Site.Params.docs.prism true }}
@import {{ printf "'%s%s'" "custom/plugins/prism/themes/" (.Site.Params.docs.prismTheme | default "lotusdocs") }}; // current prism theme
@import "custom/plugins/prism/prism";
{{- else }}
@import "custom/plugins/chroma/default";
{{- end -}}
// FlexSearch
{{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}}@import "custom/plugins/flexsearch/flexsearch";{{ end }}
// Feedback Widget
{{ if .Site.Params.feedback.enabled | default false -}}@import "custom/plugins/feedback/feedback";{{ end}}
// Mermaid
@import "custom/plugins/mermaid/mermaid";
// change
@import "custom/pages/custom";

View File

@ -1,14 +0,0 @@
<svg width="26" height="26" viewBox="0 0 1041 1348" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M340.837 0.33933L681.068 0.338989V0.455643C684.032 0.378397 686.999 0.339702 689.967 0.339702C735.961 0.3397 781.504 9.62899 823.997 27.6772C866.49 45.7254 905.099 72.1791 937.622 105.528C970.144 138.877 995.942 178.467 1013.54 222.04C1031.14 265.612 1040.2 312.312 1040.2 359.474L340.836 359.474L340.836 1347.84C296.157 1347.84 251.914 1338.55 210.636 1320.49C169.357 1302.43 131.85 1275.95 100.257 1242.58C68.6636 1209.21 43.6023 1169.59 26.5041 1125.99C11.3834 1087.43 2.75216 1046.42 0.957956 1004.81H0.605869L0.605897 368.098H0.70363C0.105752 341.831 2.23741 315.443 7.14306 289.411C20.2709 219.745 52.6748 155.754 100.257 105.528C147.839 55.3017 208.462 21.0975 274.461 7.24017C296.426 2.62833 318.657 0.339101 340.837 0.33933Z" fill="url(#paint0_linear_1172_228)"/>
<path d="M633.639 904.645H513.029V576.37H635.422V576.377C678.161 576.607 720.454 585.093 759.951 601.37C799.997 617.874 836.384 642.064 867.033 672.559C897.683 703.054 921.996 739.257 938.583 779.101C955.171 818.944 963.709 861.648 963.709 904.775H633.639V904.645Z" fill="url(#paint1_linear_1172_228)"/>
<defs>
<linearGradient id="paint0_linear_1172_228" x1="520.404" y1="0.338989" x2="520.404" y2="1347.84" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint1_linear_1172_228" x1="738.369" y1="576.37" x2="738.369" y2="904.775" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,14 +0,0 @@
<svg width="26" height="26" viewBox="0 0 1041 1348" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M340.837 0.33933L681.068 0.338989V0.455643C684.032 0.378397 686.999 0.339702 689.967 0.339702C735.961 0.3397 781.504 9.62899 823.997 27.6772C866.49 45.7254 905.099 72.1791 937.622 105.528C970.144 138.877 995.942 178.467 1013.54 222.04C1031.14 265.612 1040.2 312.312 1040.2 359.474L340.836 359.474L340.836 1347.84C296.157 1347.84 251.914 1338.55 210.636 1320.49C169.357 1302.43 131.85 1275.95 100.257 1242.58C68.6636 1209.21 43.6023 1169.59 26.5041 1125.99C11.3834 1087.43 2.75216 1046.42 0.957956 1004.81H0.605869L0.605897 368.098H0.70363C0.105752 341.831 2.23741 315.443 7.14306 289.411C20.2709 219.745 52.6748 155.754 100.257 105.528C147.839 55.3017 208.462 21.0975 274.461 7.24017C296.426 2.62833 318.657 0.339101 340.837 0.33933Z" fill="url(#paint0_linear_1172_228)"/>
<path d="M633.639 904.645H513.029V576.37H635.422V576.377C678.161 576.607 720.454 585.093 759.951 601.37C799.997 617.874 836.384 642.064 867.033 672.559C897.683 703.054 921.996 739.257 938.583 779.101C955.171 818.944 963.709 861.648 963.709 904.775H633.639V904.645Z" fill="url(#paint1_linear_1172_228)"/>
<defs>
<linearGradient id="paint0_linear_1172_228" x1="520.404" y1="0.338989" x2="520.404" y2="1347.84" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint1_linear_1172_228" x1="738.369" y1="576.37" x2="738.369" y2="904.775" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,5 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<title>微信群</title>
<path d="M21.6696 15.9962C21.9464 15.9925 22.2107 15.881 22.4064 15.6853C22.6021 15.4896 22.7137 15.2252 22.7173 14.9485C22.7173 14.3675 22.2518 13.9008 21.6696 13.9008C21.0875 13.9008 20.622 14.3675 20.622 14.9485C20.622 15.5318 21.0886 15.9962 21.6696 15.9962ZM16.5071 15.9962C16.7839 15.9925 17.0482 15.881 17.2439 15.6853C17.4396 15.4896 17.5512 15.2252 17.5548 14.9485C17.5548 14.3675 17.0881 13.9008 16.5071 13.9008C15.9238 13.9008 15.4595 14.3675 15.4595 14.9485C15.4595 15.5318 15.925 15.9962 16.5071 15.9962ZM24.1686 21.8762C24.0939 21.9177 24.0342 21.9818 23.9981 22.0594C23.9621 22.1369 23.9515 22.2239 23.968 22.3078C23.968 22.3638 23.968 22.421 23.9971 22.4793C24.1115 22.9658 24.3401 23.7405 24.3401 23.7697C24.3401 23.8548 24.3693 23.912 24.3693 23.9703C24.3693 24.0041 24.3626 24.0376 24.3496 24.0688C24.3367 24.1 24.3177 24.1284 24.2937 24.1522C24.2697 24.1761 24.2413 24.195 24.21 24.2078C24.1788 24.2206 24.1453 24.2272 24.1115 24.227C24.0531 24.227 24.0251 24.199 23.968 24.171L22.2775 23.1957C22.154 23.1277 22.0168 23.0886 21.8761 23.0813C21.791 23.0813 21.7046 23.0813 21.6475 23.1093C20.8448 23.3392 20.0141 23.4535 19.1263 23.4535C14.8563 23.4535 11.4181 20.587 11.4181 17.031C11.4181 13.4762 14.8563 10.6085 19.1263 10.6085C23.3951 10.6085 26.8333 13.4762 26.8333 17.031C26.8333 18.9525 25.802 20.7013 24.1686 21.8773V21.8762ZM19.4518 9.44883C19.3429 9.44521 19.234 9.44327 19.1251 9.443C14.2555 9.443 10.2515 12.7797 10.2515 17.0322C10.2515 17.6785 10.3448 18.3038 10.5175 18.8988H10.4136C9.39426 18.8885 8.38067 18.7442 7.39896 18.4695C7.31263 18.4403 7.22629 18.4403 7.13996 18.4403C6.96754 18.444 6.79921 18.4935 6.65229 18.5838L4.61296 19.7563C4.55463 19.7855 4.49746 19.8147 4.44029 19.8147C4.35703 19.8138 4.27744 19.7803 4.21856 19.7214C4.15968 19.6625 4.1262 19.5829 4.12529 19.4997C4.12529 19.4133 4.15329 19.3562 4.18246 19.2698C4.21046 19.2418 4.46946 18.2968 4.61296 17.7252C4.61296 17.6668 4.64096 17.5817 4.64096 17.5245C4.64065 17.4245 4.61721 17.3259 4.57248 17.2364C4.52775 17.147 4.46295 17.0691 4.38313 17.0088C2.40096 15.6053 1.16663 13.517 1.16663 11.1977C1.16663 6.93583 5.33163 3.5 10.4416 3.5C14.8341 3.5 18.5266 6.0305 19.4518 9.44767V9.44883ZM13.4388 9.9365C14.1073 9.9365 14.6358 9.38 14.6358 8.7395C14.6358 8.071 14.1073 7.5425 13.4388 7.5425C12.7703 7.5425 12.2418 8.071 12.2418 8.7395C12.2418 9.408 12.7703 9.9365 13.4388 9.9365ZM7.30213 9.9365C7.97063 9.9365 8.50029 9.38 8.50029 8.7395C8.50029 8.071 7.97063 7.5425 7.30213 7.5425C6.63479 7.5425 6.10513 8.071 6.10513 8.7395C6.10513 9.408 6.63479 9.9365 7.30213 9.9365Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1,10 +0,0 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_280_54)">
<path d="M21.6696 15.9962C21.9464 15.9925 22.2107 15.881 22.4064 15.6853C22.6021 15.4896 22.7137 15.2252 22.7173 14.9485C22.7173 14.3675 22.2518 13.9008 21.6696 13.9008C21.0875 13.9008 20.622 14.3675 20.622 14.9485C20.622 15.5318 21.0886 15.9962 21.6696 15.9962ZM16.5071 15.9962C16.7839 15.9925 17.0482 15.881 17.2439 15.6853C17.4396 15.4896 17.5512 15.2252 17.5548 14.9485C17.5548 14.3675 17.0881 13.9008 16.5071 13.9008C15.9238 13.9008 15.4595 14.3675 15.4595 14.9485C15.4595 15.5318 15.925 15.9962 16.5071 15.9962ZM24.1686 21.8762C24.0939 21.9177 24.0342 21.9818 23.9981 22.0594C23.9621 22.1369 23.9515 22.2239 23.968 22.3078C23.968 22.3638 23.968 22.421 23.9971 22.4793C24.1115 22.9658 24.3401 23.7405 24.3401 23.7697C24.3401 23.8548 24.3693 23.912 24.3693 23.9703C24.3693 24.0041 24.3626 24.0376 24.3496 24.0688C24.3367 24.1 24.3177 24.1284 24.2937 24.1522C24.2697 24.1761 24.2413 24.195 24.21 24.2078C24.1788 24.2206 24.1453 24.2272 24.1115 24.227C24.0531 24.227 24.0251 24.199 23.968 24.171L22.2775 23.1957C22.154 23.1277 22.0168 23.0886 21.8761 23.0813C21.791 23.0813 21.7046 23.0813 21.6475 23.1093C20.8448 23.3392 20.0141 23.4535 19.1263 23.4535C14.8563 23.4535 11.4181 20.587 11.4181 17.031C11.4181 13.4762 14.8563 10.6085 19.1263 10.6085C23.3951 10.6085 26.8333 13.4762 26.8333 17.031C26.8333 18.9525 25.802 20.7013 24.1686 21.8773V21.8762ZM19.4518 9.44883C19.3429 9.44521 19.234 9.44327 19.1251 9.443C14.2555 9.443 10.2515 12.7797 10.2515 17.0322C10.2515 17.6785 10.3448 18.3038 10.5175 18.8988H10.4136C9.39426 18.8885 8.38067 18.7442 7.39896 18.4695C7.31263 18.4403 7.22629 18.4403 7.13996 18.4403C6.96754 18.444 6.79921 18.4935 6.65229 18.5838L4.61296 19.7563C4.55463 19.7855 4.49746 19.8147 4.44029 19.8147C4.35703 19.8138 4.27744 19.7803 4.21856 19.7214C4.15968 19.6625 4.1262 19.5829 4.12529 19.4997C4.12529 19.4133 4.15329 19.3562 4.18246 19.2698C4.21046 19.2418 4.46946 18.2968 4.61296 17.7252C4.61296 17.6668 4.64096 17.5817 4.64096 17.5245C4.64065 17.4245 4.61721 17.3259 4.57248 17.2364C4.52775 17.147 4.46295 17.0691 4.38313 17.0088C2.40096 15.6053 1.16663 13.517 1.16663 11.1977C1.16663 6.93583 5.33163 3.5 10.4416 3.5C14.8341 3.5 18.5266 6.0305 19.4518 9.44767V9.44883ZM13.4388 9.9365C14.1073 9.9365 14.6358 9.38 14.6358 8.7395C14.6358 8.071 14.1073 7.5425 13.4388 7.5425C12.7703 7.5425 12.2418 8.071 12.2418 8.7395C12.2418 9.408 12.7703 9.9365 13.4388 9.9365ZM7.30213 9.9365C7.97063 9.9365 8.50029 9.38 8.50029 8.7395C8.50029 8.071 7.97063 7.5425 7.30213 7.5425C6.63479 7.5425 6.10513 8.071 6.10513 8.7395C6.10513 9.408 6.63479 9.9365 7.30213 9.9365Z" fill="#2CE25E"/>
</g>
<defs>
<clipPath id="clip0_280_54">
<rect width="28" height="28" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

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