Compare commits

...

303 Commits

Author SHA1 Message Date
f22c22a635 记录个人部署的过程
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
2025-06-09 15:23:09 +08:00
yangxin
59b7c608fd 更改一下systemTitle
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
2025-06-06 21:10:06 +08:00
gggaaallleee
9fb5d05865
add audit (#4923)
* 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)
* add bocha

* Delete packages/service/support/operationLog/util.ts
2025-05-30 21:07:49 +08:00
Archer
8ed35ffe7e
Update dataset.md (#4927) 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)
* 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) 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)
* 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
Archer
50d235c42a
fix: i18n (#4898) 2025-05-27 10:45:25 +08:00
Archer
9838593451
version doc (#4897) 2025-05-27 10:33:35 +08:00
Archer
c25cd48e72
perf: chunk trigger and paragraph split (#4893)
* perf: chunk trigger and paragraph split

* update max size computed

* perf: i18n

* remove table
2025-05-26 18:57:22 +08:00
Archer
874300a56a
fix: chinese name export (#4890)
* fix: chinese name export

* fix: xlsx white space

* doc

* doc
2025-05-25 21:19:29 +08:00
Archer
1dea2b71b4
perf: human check;perf: recursion get node response (#4888)
* perf: human check

* version

* perf: recursion get node response
2025-05-25 20:55:29 +08:00
Archer
a8673344b1
Test add menu (#4887)
* Feature: Add additional dataset options and their descriptions, updat… (#4874)

* Feature: Add additional dataset options and their descriptions, update menu components to support submenu functionality

* Optimize the menu component by removing the sub-menu position attribute, introducing the MyPopover component to support sub-menu functionality, and adding new dataset options and their descriptions in the dataset list.

---------

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

* api dataset tip

* remove invalid code

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-05-25 20:16:03 +08:00
Archer
9709ae7a4f
feat: The workflow quickly adds applications (#4882)
* feat: add node by handle (#4860)

* feat: add node by handle

* fix

* fix edge filter

* fix

* move utils

* move context

* scale handle

* move postion to handle params & optimize handle scale (#4878)

* move position to handle params

* close button scale

* perf: node template ui

* remove handle scale (#4880)

* feat: handle connect

* add mouse down duration check (#4881)

* perf: long press time

* tool handle size

* optimize add node by handle (#4883)

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-05-23 19:20:12 +08:00
Archer
fae76e887a
perf: dataset import params code (#4875)
* perf: dataset import params code

* perf: api dataset code

* model
2025-05-23 10:40:25 +08:00
dreamer6680
9af92d1eae
Open Yufu Feishu Knowledge Base Permissions (#4867)
* add feishu yuque dataset

* Open Yufu Feishu Knowledge Base Permissions

* Refactor the dataset request module, optimize the import path, and fix the type definition

---------

Co-authored-by: dreamer6680 <146868355@qq.com>
2025-05-22 23:19:55 +08:00
Archer
6a6719e93d
perf: isPc check;perf: dataset max token checker (#4872)
* perf: isPc check

* perf: dataset max token checker

* perf: dataset max token checker
2025-05-22 18:40:29 +08:00
Compasafe
50481f4ca8
fix: 修改语音组件中判断isPc的逻辑 (#4854)
* fix: 修改语音组件中判断isPc的逻辑

* fix: 修改语音组件中判断isPc的逻辑
2025-05-22 16:29:53 +08:00
Archer
88bd3aaa9e
perf: backup import (#4866)
* i18n

* remove invalid code

* perf: backup import

* backup tip

* fix: indexsize invalid
2025-05-22 15:53:51 +08:00
Archer
dd3c251603
fix: stream response (#4853) 2025-05-21 10:21:20 +08:00
Archer
aa55f059d4
perf: chat history api;perf: full text error (#4852)
* perf: chat history api

* perf: i18n

* perf: full text
2025-05-20 22:31:32 +08:00
dreamer6680
89c9a02650
change ui of price (#4851)
Co-authored-by: dreamer6680 <146868355@qq.com>
2025-05-20 20:51:07 +08:00
heheer
0f3bfa280a
fix quote reader duplicate rendering (#4845) 2025-05-20 20:21:00 +08:00
dependabot[bot]
593ebfd269
chore(deps): bump multer from 1.4.5-lts.1 to 2.0.0 (#4839)
Bumps [multer](https://github.com/expressjs/multer) from 1.4.5-lts.1 to 2.0.0.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/v2.0.0/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v1.4.5-lts.1...v2.0.0)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.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-05-20 13:58:47 +08:00
John Chen
f6dc2204f5
fix:修正docker-compose-pgvecto.yml文件中,健康检查参数错误 (#4841) 2025-05-20 13:57:32 +08:00
Archer
d44c338059
perf: confirm ux (#4843)
* perf: delete tip ux

* perf: confirm ux
2025-05-20 13:41:56 +08:00
Archer
1dac2b70ec
perf: stream timeout;feat: hnsw max_scan_tuples config;fix: fulltext search merge error (#4838)
* perf: stream timeout

* feat: hnsw max_scan_tuples config

* fix: fulltext search merge error

* perf: jieba code
2025-05-20 09:59:24 +08:00
Archer
9fef3e15fb
Update doc (#4831)
* doc

* doc

* version update
2025-05-18 23:16:31 +08:00
Archer
2d2d0fffe9
Test apidataset (#4830)
* Dataset (#4822)

* apidataset support to basepath

* Resolve the error of the Feishu Knowledge Base modification configuration page not supporting baseurl bug.

* apibasepath

* add

* perf: api dataset

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-05-17 22:41:10 +08:00
heheer
c6e0b5a1e7
offiaccount welcome text (#4827)
* offiaccount welcome text

* fix

* Update Image.tsx

---------

Co-authored-by: Archer <545436317@qq.com>
2025-05-17 22:03:18 +08:00
dependabot[bot]
932aa28a1f
chore(deps): bump undici in /plugins/webcrawler/SPIDER (#4825)
Bumps [undici](https://github.com/nodejs/undici) from 6.21.1 to 6.21.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.1...v6.21.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.21.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-05-17 01:16:31 +08:00
heheer
9c59bc2c17
fix: handle optional indexes in InputDataModal (#4828) 2025-05-16 15:07:33 +08:00
Archer
e145f63554
feat: chat error msg (#4826)
* perf: i18n

* feat: chat error msg

* feat: doc
2025-05-16 12:07:11 +08:00
Archer
554b2ca8dc
perf: mcp tool type (#4820) 2025-05-15 18:14:32 +08:00
Archer
4e83840c14
perf: tool call check (#4818)
* i18n

* tool call

* fix: mcp create permission;Plugin unauth tip

* fix: mcp create permission;Plugin unauth tip

* fix: Cite modal permission

* remove invalide cite

* perf: prompt

* filter fulltext search

* fix: ts

* fix: ts

* fix: ts
2025-05-15 15:51:34 +08:00
heheer
a6c80684d1
fix version match (#4814) 2025-05-14 17:45:31 +08:00
Archer
a4db03a3b7
feat: session id (#4817)
* feat: session id

* feat: Add default index
2025-05-14 17:24:02 +08:00
Archer
cba8f773fe
New license (#4809)
* feat: new-license

* perf: volumn watch

* Set use client
2025-05-14 13:55:09 +08:00
Archer
bd93f28d6f
update doc (#4806) 2025-05-13 21:24:35 +08:00
Archer
2063cb6314
i18n (#4805)
* i18n

* version

* copy node
2025-05-13 18:58:57 +08:00
dreamer6680
12acaf491c
change password rule (#4804)
* change password rule

* change password.tset.ts
2025-05-13 18:20:11 +08:00
heheer
3688842cc7
filter tool type version & fix unpublished version (#4803) 2025-05-13 17:58:51 +08:00
Archer
398d131bac
fix api_dataset.md (#4791) (#4801)
Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-05-13 12:28:50 +08:00
Archer
d5f188a1a4
doc (#4798)
* doc

* fix: i18n

* fix: scroll load
2025-05-13 12:16:32 +08:00
heheer
1edca309c4
remove system plugin node version (#4797) 2025-05-13 11:04:48 +08:00
Archer
1470c37ef1
Test media tag (#4796)
* feat: add html video tag convertion (#4784)

Co-authored-by: Zhenyi Wang <zhenyiwang@intl.zju.edu.cn>

* perf: media tag

---------

Co-authored-by: Zhenyi-Wang <47094597+Zhenyi-Wang@users.noreply.github.com>
Co-authored-by: Zhenyi Wang <zhenyiwang@intl.zju.edu.cn>
2025-05-13 10:46:49 +08:00
heheer
bdb1221d94
optimize editor default value code (#4794) 2025-05-12 23:52:22 +08:00
heheer
cac4b1d435
fix monaco editor default value (#4793)
* fix monaco editor default value

* fix
2025-05-12 23:09:15 +08:00
Archer
0ef3d40296
Test version (#4792)
* plugin node version select (#4760)

* plugin node version select

* type

* fix

* fix

* perf: version list

* fix node version (#4787)

* change my select

* fix-ui

* fix test

* add test

* fix

* remove invalid version field

* filter deprecated field

* fix: claude tool call

* fix: test

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-05-12 22:27:01 +08:00
Theresa
3cc6b8a17a
fix: improve handling of interactive node responses in workflow dispatch (#4786)
* fix: improve handling of interactive node responses in workflow dispatch

* fix: simplify interactive response handling in dispatch functions
2025-05-12 18:18:05 +08:00
Archer
681ec30c38
4.9.8 test (#4790)
* fix: doc url

* doc
2025-05-12 18:13:42 +08:00
Archer
24cd1c98dc
Update official_account.md (#4789) 2025-05-12 17:01:18 +08:00
Archer
eaceabcc43
Update official_account.md (#4788) 2025-05-12 16:56:40 +08:00
dreamer6680
a7f9411dca
feat: Update the system configuration type, add visibility controls for datasets and publishing channels (#4778) 2025-05-12 13:51:58 +08:00
Archer
657fa32217
feat: system config type;fix: retraining permission (#4772)
* feat: system config type

* fix: retraining permission
2025-05-08 22:09:55 +08:00
Archer
12d6948ba7
Feat: prelogin (#4773)
* add prelogin api (#4762)

* add prelogin api

* move type.d.ts

* perf: prelogin code

* doc

* fix: ts

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-05-08 22:09:02 +08:00
Archer
83d54d046d
perf: replace cite;perf: app card ui (#4768)
* perf: replace cite

* perf: app card ui

* fix: test
2025-05-08 13:35:08 +08:00
Archer
c75f154728
Password security policy (#4765)
* Psw (#4748)

* feat: 添加重置密码功能及相关接口

- 在用户模型中新增 passwordUpdateTime 字段以记录密码更新时间。
- 更新用户模式以支持密码更新时间的存储。
- 新增重置密码的模态框组件,允许用户重置密码。
- 实现重置密码的 API 接口,支持根据用户 ID 更新密码。
- 更新相关国际化文件,添加重置密码的提示信息。

* 更新国际化文件,添加重置密码相关提示信息,并优化重置密码模态框的实现。修复部分代码逻辑,确保用户体验流畅。

* 更新国际化文件,添加重置密码相关提示信息,优化重置密码模态框的实现,修复部分代码逻辑,确保用户体验流畅。新增获取用户密码更新时间的API接口,并调整相关逻辑以支持密码重置功能。

* update

* fix

* fix

* Added environment variables NEXT_PUBLIC_PASSWORD_UPDATETIME to support password update time configuration, update related logic to implement password mandatory update function, and optimize the implementation of reset password modal box to improve user experience.

* update index

* 更新用户密码重置功能,调整相关API接口,优化重置密码模态框的实现,确保用户体验流畅。修复部分代码逻辑,更新国际化提示信息。

* 删除获取用户密码更新时间的API接口,并在布局组件中移除不必要的重置密码模态框。优化代码结构,提升可维护性。

* update

* perf: reset expired password code

* perf: layout child components

* doc

* remove invalid env

* perf: update password code

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-05-08 12:11:08 +08:00
Archer
96e7dd581e
fix: json schema parse error;fix: retraining image reset (#4757)
* i18n

* fix: json schema parse error

* fix: retraining image reset

* update doc
2025-05-07 15:38:03 +08:00
Theresa
2d3117c5da
feat: update ESLint config with @typescript-eslint/consistent-type-imports (#4746)
* update: Add type

* fix: update import statement for NextApiRequest type

* fix: update imports to use type for LexicalEditor and EditorState

* Refactor imports to use 'import type' for type-only imports across multiple files

- Updated imports in various components and API files to use 'import type' for better clarity and to optimize TypeScript's type checking.
- Ensured consistent usage of type imports in files related to chat, dataset, workflow, and user management.
- Improved code readability and maintainability by distinguishing between value and type imports.

* refactor: remove old ESLint configuration and add new rules

- Deleted the old ESLint configuration file from the app project.
- Added a new ESLint configuration file with updated rules and settings.
- Changed imports to use type-only imports in various files for better clarity and performance.
- Updated TypeScript configuration to remove unnecessary options.
- Added an ESLint ignore file to exclude build and dependency directories from linting.

* fix: update imports to use 'import type' for type-only imports in schema files
2025-05-06 17:33:09 +08:00
Deepturn
5361674a2c
Update dataset.md (#4752)
去除:
2025-05-06 17:07:57 +08:00
Archer
ef537f391c
fix: rerank usage (#4751)
* remove invalid index

* perf: i18n

* fix: rerank usage
2025-05-06 16:23:36 +08:00
dependabot[bot]
367ee517ec
chore(deps): bump transformers in /plugins/model/llm-ChatGLM2 (#4741)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.48.0 to 4.50.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.48.0...v4.50.0)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.50.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-05-06 14:27:20 +08:00
Deepturn
39cf001358
Update dataset.md (#4747)
知识库上传文件接口,新增控制PDF解析参数
2025-05-06 14:27:01 +08:00
Archer
7b9f935119
update next version (#4743) 2025-05-05 18:44:56 +08:00
Archer
a6fbfac96f
Yuque dataset baseurl (#4742)
* Yuque dataset baseurl (#4512)

* feat: 增加API数据集功能和国际化支持

* 在apiDataset.d.ts中添加uuid、slug、parent_uuid和children字段
* 更新英文、简体中文和繁体中文的dataset.json文件,增加多条提示信息
* 在ApiDatasetForm组件中实现目录选择功能,支持获取Yuque路径
* 新增BaseUrlSelector组件,用于选择根目录
* 实现getpath API,支持根据Yuque服务器获取路径
* 更新相关API调用,确保兼容性和功能完整性

* feat: 更新Yuque服务器的baseUrl处理逻辑

* 在apiDataset.d.ts中将YuqueServer的baseUrl属性改为必填
* 更新ApiDatasetForm组件,调整baseUrl的状态管理和路径加载逻辑
* 新增getcatalog API以支持获取数据集目录
* 修改相关API调用,确保baseUrl的正确传递和使用
* 优化路径返回值为中文“根目录”

* feat: 更新数据集API调用逻辑

* 将getFeishuAndYuqueDatasetFileList替换为getProApiDatasetFileListRequest,统一API调用方式
* 更新相关文件以确保新API的正确使用
* 优化代码结构,提高可读性和维护性

* 清理代码:移除ApiDatasetForm、BaseUrlSelector和相关API中的调试日志

* 删除不必要的console.log语句,提升代码整洁性
* 确保API逻辑的清晰性,避免冗余输出

* 更新数据集相关类型和API逻辑

- 在apiDataset.d.ts中添加ApiDatasetDetailResponse类型,移除不必要的字段。
- 在proApi.ts中新增DETAIL操作类型及相关参数类型。
- 修改ApiDatasetForm.tsx以支持新的API调用逻辑,统一路径获取方式。
- 更新BaseUrlSelector组件,简化目录选择逻辑。
- 优化getpath.ts和getcatalog.ts中的路径处理逻辑,确保API调用的一致性和正确性。
- 清理不必要的代码和注释,提高代码可读性。

* 清理ApiDatasetForm组件中的调试日志,移除console.log语句以提升代码整洁性和可读性。

* fix

* updata apidatasetform

* remove console

* updata

* updata

* updata editapiservermodal

* updata i18n

* add type

* update getpath

* add type

* perf: yuque dataset baseurl

* perf: remove rerank records

* fix: ts

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-05-05 18:37:14 +08:00
Archer
864eff47c7
perf: i18n (#4740)
* feat: login limit time config

* doc

* perf: code

* i18n update

* update lock

* fix: ts

* update package
2025-05-05 16:16:59 +08:00
Archer
fdd4e9edbd
Test parse cite and add tool call parallel (#4737)
* add quote response filter (#4727)

* chatting

* add quote response filter

* add test

* remove comment

* perf: cite hidden

* perf: format llm response

* feat: comment

* update default chunk size

* update default chunk size

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-04-30 17:43:50 +08:00
dependabot[bot]
683ab6c17d
chore(deps): bump transformers in /plugins/model/llm-Baichuan2 (#4733)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.48.0 to 4.50.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.48.0...v4.50.0)

---
updated-dependencies:
- dependency-name: transformers
  dependency-version: 4.50.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-04-30 12:08:12 +08:00
Finley Ge
9f21add7b5
fix: app/dataset list folders' side menu permission bug (#4734) 2025-04-30 12:07:53 +08:00
Archer
4b8db293ce
perf: init token worker (#4726)
* perf: init token worker

* init worker

* preload worker

* preload worker

* remove invalid code
2025-04-29 16:00:35 +08:00
Archer
5e3ec4d6f3
Update doc (#4725)
* doc

* doc

* config
2025-04-29 13:29:50 +08:00
Archer
360a2ec392
Remove quote prompt in api request (#4724)
* chat completion add parsequote param (#4720)

* chat completion add parsequote param

* fix

* perf: quote prompt

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-04-29 13:10:17 +08:00
Archer
b0297d2915
Add test (#4721)
* Add unit tests for Markdown utility functions and CodeClassNameEnum. (#4716)

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>

* Add unit tests for authChatCrud and authCollectionInChat functions in chat service. (#4718)

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>

---------

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-04-29 12:15:07 +08:00
Archer
5023da4489
Feat: Quote auth (#4715)
* fix outlink quote number auth (#4705)

* perf: quote auth

* feat: qwen3 config

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-04-29 12:05:04 +08:00
Finley Ge
26e320b0df
fix: app/dataset list peredit bug (#4714) 2025-04-29 11:12:49 +08:00
Hwting
14ad6aef41
perf: Add Redis Health Check (#4707)
* Update docker.md

Fix a document error

* Update docker.md

* Update docker-compose-milvus.yml

1.Redis Health Check

* Update docker-compose-pgvector.yml

1.Redis Health Check

* Update docker-compose-zilliz.yml

1.Redis Health Check
2025-04-29 10:05:00 +08:00
Archer
d2a32c363d
perf: chat log list (#4704)
* perf: chat log list

* remove log
2025-04-28 18:19:15 +08:00
dreamer6680
e0b85ca4c2
Test (#4701)
* fix utmparams

* add utmparams

* fix

* fix

* Optimized the JsonImportModal shutdown logic to ensure that UTM parameters and workflows are removed when closing.

* remove some import
2025-04-28 17:55:43 +08:00
heheer
3a911c5130
fix chat log list api (#4700) 2025-04-28 17:51:57 +08:00
Archer
433e7ed911
Update doc (#4697)
* perf: share link tip

* udpate doc
2025-04-28 14:19:42 +08:00
heheer
293c0cdb40
url params filter logic (#4694) 2025-04-28 14:04:24 +08:00
Archer
ca8adbbf95
feat: streamable http mcp (#4695)
* feat: streamable http mcp

* mcp api path

* fix: ts
2025-04-28 12:45:51 +08:00
Archer
d91b2ae303
update 4.9.7 doc (#4693)
* update 4.9.7 doc

* doc
2025-04-28 12:21:21 +08:00
Archer
3313bf933c
update version (#4692) 2025-04-28 10:46:20 +08:00
Archer
bf14506603
perf: add outlink usage (#4691)
* update doc

* perf: add outlink usage

* feat: jina provider
2025-04-28 10:41:32 +08:00
heheer
cc01aa4ab8
fix share link chat quote number (#4690)
* fix share link chat quote number

* fix ts

* usememo
2025-04-28 10:33:33 +08:00
Archer
d6fed3d23a
perf: fetch url (#4687) 2025-04-27 23:11:08 +08:00
gru-agent[bot]
1d2026786e
Add unit tests for utility functions in web/core/app/utils (#4681)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-04-27 22:57:19 +08:00
Archer
659b8b1106
Test shorurl (#4686)
* Short-chain burying (#4678)

* TrackRegisterParams

* 新增工作流导入功能,支持从URL获取工作流JSON数据并创建应用。实现了URL验证、CORS处理、剪贴板读取等功能,确保用户能够顺利导入工作流数据。

* 更新工作流导入功能,将导入逻辑从utils模块迁移至workflow模块,并修正相关导入路径。此更改有助于代码结构的清晰和模块化。

* 优化工作流导入组件,重构导入逻辑,增加从URL获取工作流数据的功能,并实现JSON配置导入窗口。修复了状态管理和错误处理,提升用户体验。

* 更新工作流导入功能,增加对UTM参数的支持,优化从URL获取工作流数据的逻辑,并重构相关API接口。修复了状态管理和错误处理,提升了用户体验。

* 更新创建应用的API接口,将UTM参数的字段名称从`shorUrlId`和`projectCode`修改为`shorUrlPlatform`和`shorUrlProjectCode`,以提高代码的可读性和一致性。

* impoter json

* Optimize the logic

* delete some console

* fix

* perf: sem code

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
2025-04-27 22:56:42 +08:00
Archer
5357aa402b
perf: Add tool call prompt (#4683)
* update i18n

* perf: Add tool call prompt
2025-04-27 18:29:10 +08:00
heheer
9923a402d9
fix: chat quote number (#4679) 2025-04-27 17:54:07 +08:00
Archer
6763ac60d5
fix same tag in different datasets (#4673) (#4680)
Co-authored-by: heheer <heheer@sealos.io>
2025-04-27 17:33:14 +08:00
Shiver
f0a25ff964
更新Oceanbase镜像版本;修复容器部署时在healthcheck中出现的问题 (#4676)
* Add oceanbase-version docker-compose.yml, update deployment documents

* sync and improve

* format

---------

Co-authored-by: sa-buc <wangyanwen.wyw@sqaobnoxdn006013051242.sa128>
2025-04-27 17:19:25 +08:00
gru-agent[bot]
7d63b6bae8
Sure! Please provide the content of the git diff so I can help you generate a concise commit message. (#4667)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-04-27 11:53:36 +08:00
heheer
229c8acdb9
fix rerank model undefined (#4674) 2025-04-27 11:53:09 +08:00
Archer
1465999c46
feat: get tokens from api usage (#4671) 2025-04-27 01:13:38 +08:00
Archer
0720bbe4da
V4.9.7 feature (#4669)
* update doc

* feat: Add coupon redemption feature for team subscriptions (#4595)

* feat: Add coupon redemption feature for team subscriptions

- Introduced `TeamCouponSub` and `TeamCouponSchema` types
- Added `redeemCoupon` API endpoint
- Updated UI to include a modal for coupon redemption
- Added new icon and translations for "Redeem coupon"

* perf: remove field teamId

* perf: use dynamic import

* refactor: move to page component

* perf: coupon code

* perf: mcp server

* perf: test

* auto layout (#4634)

* fix 4.9.6 (#4631)

* fix debug quote list

* delete next text node match

* fix extract default boolean value

* export latest 100 chat items

* fix quote item ui

* doc

* fix doc

* feat: auto layout

* perf: auto layout

* fix: auto layout null

* add start node

---------

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

* fix: share link (#4644)

* Add workflow run duration;Get audio duration (#4645)

* add duration

* get audio duration

* Custom config path (#4649)

* feat: 通过环境变量DATA_PATH获取配置文件目录 (#4622)

通过环境变量DATA_PATH获取配置文件目录,以应对不同的部署方式的多样化需求

* feat: custom configjson path

* doc

---------

Co-authored-by: John Chen <sss1991@163.com>

* 程序api调用场景下,如果大量调用带有图片或视频,产生的聊天记录会导致后台mongo数据库异常。这个修改给api客户端一个禁止生成聊天记录的选项,避免这个后果。 (#3964)

* update special chatId

* perf: vector db rename

* update operationLog (#4647)

* update operationLog

* combine operationLogMap

* solve operationI18nLogMap bug

* remoce log

* feat: Rerank usage (#4654)

* refresh concat when update (#4655)

* fix: refresh code

* perf: timer lock

* Fix operationLog (#4657)

* perf: http streamable mcp

* add alipay (#4630)

* perf: subplan ui

* perf: pay code

* hiden bank tip

* Fix: pay error (#4665)

* fix quote number (#4666)

* remove log

---------

Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: John Chen <sss1991@163.com>
Co-authored-by: gaord <bengao168@msn.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-04-26 16:17:21 +08:00
Finley Ge
a669a60fe6
fix: collabrator (#4660)
* fix: inherit permission of orgs

* fix: org members' permission bug
2025-04-25 16:21:39 +08:00
heheer
25dc8984be
add answer quote number (#4658) 2025-04-25 10:34:37 +08:00
heheer
2a54be4d91
support mcp client streamable http (#4650)
* support mcp streamable http

* fix

* fix

* remove deps
2025-04-24 23:04:54 +08:00
heheer
5c93545016
fix 4.9.6 (#4631)
* fix debug quote list

* delete next text node match

* fix extract default boolean value

* export latest 100 chat items

* fix quote item ui

* doc

* fix doc
2025-04-22 20:10:35 +08:00
gru-agent[bot]
27614e9e8b
Add unit tests for toolList API functions and update the export statements in toolList.ts. (#4623)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-04-22 15:26:05 +08:00
heheer
2dd5cf6d1f
mcp server tool alias (#4621) 2025-04-22 15:25:11 +08:00
Finley Ge
6c61812e7a
fix: app copy api (#4614)
* fix: app copy

* test: add app copy test case
2025-04-21 16:25:18 +08:00
Finley Ge
9f8b6dbc5f
docs: sso oauth2.0 standard doc (#4612) 2025-04-21 16:18:56 +08:00
Archer
d8fe9806e6
Test select (#4611)
* 修复表单单选选中长文本时,文字溢出选择框的问题;修复表单单选下拉选项在移动端界面上触发自动换行时部分文字位于屏幕之外的问题 (#4600)

* fix: 修复表单单选选中长文本时,文字溢出选择框的问题

* fix: 修复表单单选下拉选项在移动端界面上触发自动换行时部分文字位于屏幕之外的问题

* perf: select components

---------

Co-authored-by: mmagi <magizhang@qq.com>
2025-04-21 15:02:54 +08:00
Archer
9cd6d2e81f
perf: init model (#4610)
* fix: model config undefined value

* perf: init model
2025-04-21 14:44:34 +08:00
Deepturn
f789af51f5
Update mcp_server.md (#4606) 2025-04-21 10:40:40 +08:00
dependabot[bot]
4edd72b7e6
chore(deps): bump torch in /plugins/model/llm-ChatGLM2 (#4597)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.4.0 to 2.6.0.
- [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.4.0...v2.6.0)

---
updated-dependencies:
- dependency-name: torch
  dependency-version: 2.6.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-04-21 10:30:58 +08:00
Archer
7e19628315
fix: action (#4605) 2025-04-20 22:31:56 +08:00
Archer
4ac2a2f43e
fix: timezone count (#4604)
* fix: timezone count

* fix: ts

* fix: test llm
2025-04-20 22:24:03 +08:00
Archer
61aa91b3aa
perf: hnsw query (#4596)
* perf: hnsw query

* check response embedding recall result
2025-04-18 19:31:02 +08:00
Archer
d9a4a5f3e7
fix: mongodb file oversize (#4594) 2025-04-18 15:01:18 +08:00
a.e.
a18d34e40a
docs: update websync.md (#4588) 2025-04-18 14:47:52 +08:00
dreamer6680
b4aeaf10ae
Llms 1 (#4593)
* add nginx.conf

* updata nginx.conf
2025-04-18 14:47:11 +08:00
Archer
d71f4cee19
perf: doc2x parse (#4591) 2025-04-18 14:02:31 +08:00
Archer
6ed06936a4
update doc (#4589) 2025-04-18 10:55:25 +08:00
Archer
8d9125b0ee
update yml (#4587) 2025-04-18 00:53:50 +08:00
Archer
8f8d4c4190
update package version (#4586) 2025-04-18 00:34:15 +08:00
heheer
5208890c7f
doc: mcp tools (#4585) 2025-04-18 00:08:43 +08:00
Archer
22fc7dddfb
perf: text splitter (#4584)
* perf: text splitter

* update doc
2025-04-17 19:08:04 +08:00
a.e.
cdbc1d5590
fix: ob docker compose file (#4580) 2025-04-17 18:57:08 +08:00
dreamer6680
ab059d105c
Fixed: Updated the iframe allow property in the SelectUsingWayModal component to add support for microphones. (#4583) 2025-04-17 18:56:52 +08:00
Archer
ccd1fd680a
Update doc images (#4577)
* fix: doc img

* doc
2025-04-17 15:10:23 +08:00
Archer
5542eadb2d
fix: tool call history (#4576) 2025-04-17 14:53:38 +08:00
Archer
703a7cfd78
fix: llms encode (#4575) 2025-04-17 13:25:38 +08:00
Archer
66405d43e6
perf: llm.txt file (#4574)
* update doc

* update shell

* update husky

* update doc

* perf: llm.txt
2025-04-17 13:20:56 +08:00
dreamer6680
3196470e11
Updated package.json to add js-yaml dependencies and configure husky hooks to generate documentation; New llms-full.txt (#4562)
* 更新 package.json 添加 js-yaml 依赖,并配置 husky 钩子以生成文档;新增 llms-full.txt 和 llms.txt 文件以整理文档链接;修正 ollama.md 中的描述。

* Update the document generation logic to extract and parse the pre-metadata to ensure that the generated document contains the title and description information.

* Optimize the document generation logic, extract and parse the pre-metadata, and ensure that the generated document contains the title and description information.

* Updated document generation logic to change the title and description format from the original metadata format to Markdown format to improve document readability and consistency.
2025-04-17 13:07:16 +08:00
Archer
853a75c9bc
update mcp doc (#4572) 2025-04-17 12:24:59 +08:00
Archer
4fad9c6025
fix: mcp_server docker file (#4570) 2025-04-17 10:36:45 +08:00
Archer
c2fd5f5f5a
Fix: mcp_server build (#4569)
* update doc

* perf: avatar

* fix: mcp server
2025-04-17 10:32:28 +08:00
Archer
8fa9ec4c13
V4.9.6 dev (#4566)
* update doc

* perf: avatar

* fix: mcp action
2025-04-16 22:35:06 +08:00
Archer
952412f648
V4.9.6 feature (#4565)
* Dashboard submenu (#4545)

* add app submenu (#4452)

* add app submenu

* fix

* width & i18n

* optimize submenu code (#4515)

* optimize submenu code

* fix

* fix

* fix

* fix ts

* perf: dashboard sub menu

* doc

---------

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

* feat: value format test

* doc

* Mcp export (#4555)

* feat: mcp server

* feat: mcp server

* feat: mcp server build

* update doc

* perf: path selector (#4556)

* perf: path selector

* fix: docker file path

* perf: add image endpoint to dataset search (#4557)

* perf: add image endpoint to dataset search

* fix: mcp_server url

* human in loop (#4558)

* Support interactive nodes for loops, and enhance the function of merging nested and loop node history messages. (#4552)

* feat: add LoopInteractive definition

* feat: Support LoopInteractive type and update related logic

* fix: Refactor loop handling logic and improve output value initialization

* feat: Add mergeSignId to dispatchLoop and dispatchRunAppNode responses

* feat: Enhance mergeChatResponseData to recursively merge plugin details and improve response handling

* refactor: Remove redundant comments in mergeChatResponseData for clarity

* perf: loop interactive

* perf: human in loop

---------

Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>

* mcp server ui

* integrate mcp (#4549)

* integrate mcp

* delete unused code

* fix ts

* bug fix

* fix

* support whole mcp tools

* add try catch

* fix

* fix

* fix ts

* fix test

* fix ts

* fix: interactive in v1 completions

* doc

* fix: router path

* fix mcp integrate (#4563)

* fix mcp integrate

* fix ui

* fix: mcp ux

* feat: mcp call title

* remove repeat loading

* fix mcp tools avatar (#4564)

* fix

* fix avatar

* fix update version

* update doc

* fix: value format

* close server and remove cache

* perf: avatar

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>
2025-04-16 22:18:51 +08:00
Finley Ge
ab799e13cd
test: concurrent test (#4548) 2025-04-16 12:05:38 +08:00
Finley Ge
ba422b73b3
docs: team&roles&permissions and intro (#4550)
* docs: add team roles permissions

* docs: intro rewrite
2025-04-16 12:05:17 +08:00
Theresa
c7c79b400a
fix: update workflow to use ubuntu-24.04 for consistency across all jobs (#4553)
* fix: update workflow to use ubuntu-22.04 for consistency across all jobs

* fix: update workflows to use ubuntu-24.04 for consistency across all jobs
2025-04-16 12:04:20 +08:00
Finley Ge
47f674666b
fix: app/dataset create (#4554) 2025-04-16 12:04:00 +08:00
Archer
0c9e56c1ee
Test sandbox (#4547)
* feat: python sandbox execute with a temporary file (#4464)

* change runPythonSandbox:
1. write code into a temp file in /tmp dir then run it
2. write sandbox python script into a tmp file then run it

* repair subProcess.py file does not generate in tmp dir

* Adjust the security policy to kill (#4546)

---------

Co-authored-by: Donald Yang <yjyangfan@gmail.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-04-15 16:26:10 +08:00
gaord
97a6c6749a
变量更新组件处理字符串数组错误修复 (#4523)
1,字符串数组的值可能包含转义斜杠会导致typeof value为string,结果变量更新后的值变形为多层数组嵌套而无法使用([[]])。这个修复解决了这个问题。
2,另外对整体的逻辑做了梳理和整理,更加清晰易懂
2025-04-15 15:28:12 +08:00
dependabot[bot]
565b3e4319
chore(deps): bump @nestjs/common from 10.4.15 to 10.4.16 (#4541)
Bumps [@nestjs/common](https://github.com/nestjs/nest/tree/HEAD/packages/common) from 10.4.15 to 10.4.16.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v10.4.16/packages/common)

---
updated-dependencies:
- dependency-name: "@nestjs/common"
  dependency-version: 10.4.16
  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-04-15 15:26:09 +08:00
Finley Ge
efad4c101f
test: add opreationLog mock (#4542) 2025-04-15 14:03:21 +08:00
zijiren
bed68718e8
fix: image source (#4535) 2025-04-15 10:55:56 +08:00
Archer
7a9cf4ce9e
add system model (#4540) 2025-04-15 10:49:46 +08:00
Archer
b943d05d5a
V4.9.5 feature (#4534)
* update doc

* add response detail value

* fix: filter params
2025-04-14 18:36:16 +08:00
gggaaallleee
2af3cd83f2
update Log (#4533)
* add log search

* update log
2025-04-14 18:28:42 +08:00
zijiren
ea74c669ee
feat: github workflow arm runner (#4530)
* feat: arm runner

* fix

* fix: outputs name

* fix: outputs name

* fix: 429

* feat: cache key

* fix: tags

* fix: tags

* feat: sandbox arm64 runner

* fix: sandbox dockerfile

* feat: merge build
2025-04-14 17:32:38 +08:00
heheer
38597d8f04
fix chat test response detail (#4529) 2025-04-14 17:01:22 +08:00
Archer
88ed019717
feat: workflow input node add selectMulti; MultipleSelect component (#4527)
* feat: workflow input node add selectMulti; MultipleSelect component add disabled state (#4440)

* perf: input form support multiple select

---------

Co-authored-by: mmagi <magizhang@qq.com>
2025-04-14 14:39:35 +08:00
Archer
16a22bc76a
V4.9.5 feature (#4520)
* readme

* Add queue log

* Test interactive (#4509)

* Support nested node interaction (#4503)

* feat: Add a new InteractiveContext type and update InteractiveBasicType, adding an optional context property to support more complex interaction state management.

* feat: Enhance workflow interactivity by adding InteractiveContext support and updating dispatch logic to manage nested contexts and entry nodes more effectively.

* feat: Refactor dispatchWorkFlow to utilize InteractiveContext for improved context management

* feat: Enhance entry node resolution by adding validation for entryNodeIds and recursive search in InteractiveContext

* feat: Remove workflowDepth from InteractiveContext and update recovery logic to utilize parentContext for improved context management

* feat: Update getWorkflowEntryNodeIds to use lastInteractive for improved context handling in runtime nodes

* feat: Add lastInteractive support to enhance context management across workflow components

* feat: Enhance interactive workflow by adding stopForInteractive flag and improving memory edge validation in runtime logic

* feat: Refactor InteractiveContext by removing interactiveAppId and updating runtime edge handling in dispatchRunApp for improved context management

* feat: Simplify runtime node and edge initialization in dispatchRunApp by using ternary operators for improved readability and maintainability

* feat: Improve memory edge validation in initWorkflowEdgeStatus by adding detailed comments for better understanding of subset checks and recursive context searching

* feat: Remove commented-out current level information from InteractiveContext for cleaner code and improved readability

* feat: Simplify stopForInteractive check in dispatchWorkFlow for improved code clarity and maintainability

* feat: Remove stopForInteractive handling and related references for improved code clarity and maintainability

* feat: Add interactive response handling in dispatchRunAppNode for enhanced workflow interactivity

* feat: Add context property to InteractiveBasicType and InteractiveNodeType for improved interactivity management

* feat: remove comments

* feat: Remove the node property from ChatDispatchProps to simplify type definitions

* feat: Remove workflowInteractiveResponse from dispatchRunAppNode for cleaner code

* feat: Refactor interactive value handling in chat history processing for improved clarity

* feat: Simplify initWorkflowEdgeStatus logic for better readability and maintainability

* feat: Add workflowInteractiveResponse to dispatchWorkFlow for enhanced functionality

* feat: Enhance interactive response handling with nested children support

* feat: Remove commented-out code for interactive node handling to improve clarity

* feat: remove  InteractiveContext type

* feat: Refactor UserSelectInteractive and UserInputInteractive params for improved structure and clarity

* feat: remove

* feat: The front end supports extracting the deepest interaction parameters to enhance interaction processing

* feat: The front end supports extracting the deepest interaction parameters to enhance interaction processing

* fix: handle undefined interactive values in runtimeEdges and runtimeNodes initialization

* fix: handle undefined interactive values in runtimeNodes and runtimeEdges initialization

* fix: update runtimeNodes and runtimeEdges initialization to use last interactive value

* fix: remove unused imports and replace getLastInteractiveValue with lastInteractive in runtimeEdges initialization

* fix: import WorkflowInteractiveResponseType and handle lastInteractive as undefined in chatTest

* feat: implement extractDeepestInteractive function and refactor usage in AIResponseBox and ChatBox utils

* fix: refactor initWorkflowEdgeStatus and getWorkflowEntryNodeIds calls in dispatchRunAppNode for recovery handling

* fix: ensure lastInteractive is handled consistently as undefined in runtimeEdges and runtimeNodes initialization

* fix: update dispatchFormInput and dispatchUserSelect to use lastInteractive consistently

* fix: update condition checks in dispatchFormInput and dispatchUserSelect to ensure lastInteractive type is validated correctly

* fix: refactor dispatchRunAppNode to replace isRecovery with childrenInteractive for improved clarity in runtimeNodes and runtimeEdges initialization

* refactor: streamline runtimeNodes and runtimeEdges initialization in dispatchRunAppNode for improved readability and maintainability

* fix: update rewriteNodeOutputByHistories function to accept runtimeNodes and interactive as parameters for improved clarity

* fix: simplify interactiveResponse assignment in dispatchWorkFlow for improved clarity

* fix: update entryNodeIds check in getWorkflowEntryNodeIds to ensure it's an array for improved reliability

* remove some invalid code

---------

Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>

* update doc

* update log

* fix: update debug workflow to conditionally include nextStepSkipNodes… (#4511)

* fix: update debug workflow to conditionally include nextStepSkipNodes based on lastInteractive for improved debugging accuracy

* fix : type error

* remove invalid code

* fix: QA queue

* fix: interactive

* Test log (#4519)

* add log (#4504)

* add log

* update log i18n

* update log

* delete template

* add i18NT

* add team operation log

---------

Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>

* remove search

* update doc

---------

Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-04-12 12:48:19 +08:00
Shiver
b51a87f5b7
Add oceanbase-version docker-compose.yml & Update deployment documents (#4450)
* Add oceanbase-version docker-compose.yml, update deployment documents

* sync and improve

---------

Co-authored-by: sa-buc <wangyanwen.wyw@sqaobnoxdn006013051242.sa128>
2025-04-11 18:58:10 +08:00
a.e.
bc1ca66b66
fix: downgrade md lib (#4508)
downgrade mdast-util-gfm-autolink-literal to 2.0.0 to avoid patch
missing
2025-04-11 13:31:30 +08:00
Peter Dave Hello
c9e12bb608
Update zh-Hant Traditional Chinese i18n translation (#4507) 2025-04-11 09:57:13 +08:00
heheer
4e7fa29087
fix share page dataset search show (#4506)
* fix share page dataset search show

* add comment

* Fix
2025-04-10 23:06:06 +08:00
Archer
ec3bcfa124
fix: password check (#4497)
* fix: password check

* add doc

* fix: password check
2025-04-10 11:49:35 +08:00
Archer
199f454b6b
feat: team permission refine (#4494) (#4498)
* feat: team permission refine (#4402)

* chore: team permission extend

* feat: manage team permission

* chore: api auth

* fix: i18n

* feat: add initv493

* fix: test, org auth manager

* test: app test for refined permission

* update init sh

* fix: add/remove manage permission (#4427)

* fix: add/remove manage permission

* fix: github action fastgpt-test

* fix: mock create model

* fix: team write permission

* fix: ts

* account permission

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
2025-04-10 11:11:54 +08:00
Archer
80f41dd2a9
4.9.4 doc (#4493)
* update doc

* update lock

* update doc

* update doc
2025-04-10 01:52:07 +08:00
a.e.
4343eecaaf
deps: bump pdfjs-dist to 4.10.38 (#4491)
remove deprecated dependency: canvas@2
2025-04-09 23:49:53 +08:00
Archer
c02864facc
fix: package plus request (#4492)
* fix plus request (#4476)

* perf: package plus request

* perf: plus request fix

* fix: doc

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-04-09 23:44:14 +08:00
Archer
e4629a5c8c
fix: queue (#4485) 2025-04-09 13:43:26 +08:00
a.e.
2dc3cb75fe
fix: add backward compatibility patch for regex lookbehind in autolink literals (#4483) 2025-04-09 12:21:10 +08:00
a.e.
431390fe42
fix: Add patch for mdast-util-gfm-autolink-literal@2.0.1 (#4479)
Compatibility patch for Safari versions below 16.4
2025-04-08 18:03:58 +08:00
Donald Yang
1f5709eda6
Fix the log error when the loop input array is too long (#4478) 2025-04-08 17:03:44 +08:00
Archer
86988e31d9
feat: Add docs deploy to cf (#4475)
* perf: remove loading ui

* feat: config chat file expired time

* 494 doc

* feat: Add docs deploy to cf
2025-04-08 13:50:36 +08:00
Archer
675e8ccedb
494 doc (#4472)
* perf: remove loading ui

* feat: config chat file expired time

* 494 doc

* 494 doc

* 494 doc

* update doc preview action
2025-04-08 13:42:09 +08:00
Archer
9dfafb13bf
Action test (#4471)
* perf: remove loading ui

* feat: config chat file expired time

* Update doc

* fix: ts (#4458)

* test

* remove

* 494 doc

* update action
2025-04-08 12:36:00 +08:00
Archer
f642c9603b
V4.9.4 feature (#4470)
* Training status (#4424)

* dataset data training state (#4311)

* dataset data training state

* fix

* fix ts

* fix

* fix api format

* fix

* fix

* perf: count training

* format

* fix: dataset training state (#4417)

* fix

* add test

* fix

* fix

* fix test

* fix test

* perf: training count

* count

* loading status

---------

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

* doc

* website sync feature (#4429)

* perf: introduce BullMQ for website sync (#4403)

* perf: introduce BullMQ for website sync

* feat: new redis module

* fix: remove graceful shutdown

* perf: improve UI in dataset detail

- Updated the "change" icon SVG file.
- Modified i18n strings.
- Added new i18n string "immediate_sync".
- Improved UI in dataset detail page, including button icons and
background colors.

* refactor: Add chunkSettings to DatasetSchema

* perf: website sync ux

* env template

* fix: clean up website dataset when updating chunk settings (#4420)

* perf: check setting updated

* perf: worker currency

* feat: init script for website sync refactor (#4425)

* website feature doc

---------

Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com>

* pro migration (#4388) (#4433)

* pro migration

* reuse customPdfParseType

Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>

* perf: remove loading ui

* feat: config chat file expired time

* Redis cache (#4436)

* perf: add Redis cache for vector counting (#4432)

* feat: cache

* perf: get cache key

---------

Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com>

* perf: mobile voice input (#4437)

* update:Mobile voice interaction (#4362)

* Add files via upload

* Add files via upload

* Update ollama.md

* Update ollama.md

* Add files via upload

* Update useSpeech.ts

* Update ChatInput.tsx

* Update useSpeech.ts

* Update ChatInput.tsx

* Update useSpeech.ts

* Update constants.ts

* Add files via upload

* Update ChatInput.tsx

* Update useSpeech.ts

* Update useSpeech.ts

* Update useSpeech.ts

* Update ChatInput.tsx

* Add files via upload

* Update common.json

* Update VoiceInput.tsx

* Update ChatInput.tsx

* Update VoiceInput.tsx

* Update useSpeech.ts

* Update useSpeech.ts

* Update common.json

* Update common.json

* Update common.json

* Update VoiceInput.tsx

* Update VoiceInput.tsx

* Update ChatInput.tsx

* Update VoiceInput.tsx

* Update ChatInput.tsx

* Update VoiceInput.tsx

* Update ChatInput.tsx

* Update useSpeech.ts

* Update common.json

* Update chat.json

* Update common.json

* Update chat.json

* Update common.json

* Update chat.json

* Update VoiceInput.tsx

* Update ChatInput.tsx

* Update useSpeech.ts

* Update VoiceInput.tsx

* speech ui

* 优化语音输入组件,调整输入框显示逻辑,修复语音输入遮罩层样式,更新画布背景透明度,增强用户交互体验。 (#4435)

* perf: mobil voice input

---------

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

* Test completion v2 (#4438)

* add v2 completions (#4364)

* add v2 completions

* completion config

* config version

* fix

* frontend

* doc

* fix

* fix: completions v2 api

---------

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

* package

* Test mongo log (#4443)

* feat: mongodb-log (#4426)

* perf: mongo log

* feat: completions stop reasoner

* mongo db log

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>

* update doc

* Update doc

* fix external var ui (#4444)

* action

* fix: ts (#4458)

* preview doc action

add docs preview permission

update preview action

udpate action

* update doc (#4460)

* update preview action

* update doc

* remove

* update

* schema

* update mq export;perf: redis cache  (#4465)

* perf: redis cache

* update mq export

* perf: website sync error tip

* add error worker

* website sync ui (#4466)

* Updated the dynamic display of the voice input pop-up (#4469)

* Update VoiceInput.tsx

* Update VoiceInput.tsx

* Update VoiceInput.tsx

* fix: voice input

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
Co-authored-by: dreamer6680 <1468683855@qq.com>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
2025-04-08 12:05:04 +08:00
Archer
5839325f77
test (#4456)
* test

* update action

* remove test
2025-04-06 18:45:04 +08:00
Archer
73c997f7c5
更新 491.md (#4453) 2025-04-04 23:35:55 +08:00
Finley Ge
ff92dced98
chore: security update (#4447) 2025-04-03 21:58:32 +08:00
Carson Yang
7a0747947c
Enhance GitHub Actions workflows security and permissions (#4445)
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
2025-04-03 14:01:17 +08:00
a.e.
5ad383bc6e
fix: add connection timeout to database settings (#4434) 2025-04-02 18:11:23 +08:00
heheer
c85b719384
add chunk reader doc (#4422) 2025-04-01 18:55:16 +08:00
Finley Ge
aeedc2fada
Update sso.md (#4412) 2025-03-31 22:08:20 +08:00
Archer
be34b69f9b
update doc (#4408) 2025-03-31 15:11:36 +08:00
Mr-Chiang
944774ec5f
Update:同知识库搜索问题 (#4405) 2025-03-31 13:34:07 +08:00
Mr-Chiang
5b21b4b674
Update:知识库名称搜索出文件夹后,点击文件夹未置空搜索框,导致进不了文件夹的下一级,工作台也有此问题 (#4404) 2025-03-31 13:33:49 +08:00
dependabot[bot]
b0f0afabd2
chore(deps): bump axios in /plugins/webcrawler/SPIDER (#4399)
Bumps [axios](https://github.com/axios/axios) from 1.7.9 to 1.8.2.
- [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.7.9...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  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-03-31 11:00:29 +08:00
Finley Ge
d9aea53d13
fix: sso.md (#4401)
should be EXTERNAL_USER_SYSTEM_BASE_URL
2025-03-31 11:00:14 +08:00
Finley Ge
73db92e4ad
chore: edit the version number (#4398) 2025-03-31 10:19:42 +08:00
Archer
267cc5702c
update doc (#4386)
* version type

* doc

* doc

* version yml
2025-03-28 18:16:59 +08:00
Archer
540f321fc9
Test email plugin (#4387)
* add email plugin (#4343)

* add email plugin

* remove console.log

---------

Co-authored-by: zhengshuai.li <zhengshuai.li@cloudpense.com>

* perf: smtp email

---------

Co-authored-by: lzs2000131 <lzs2000131@163.com>
Co-authored-by: zhengshuai.li <zhengshuai.li@cloudpense.com>
2025-03-28 18:07:55 +08:00
heheer
a37c75159f
fix child app update variables (#4385) 2025-03-28 17:36:07 +08:00
Archer
0ed99d8c9a
Check debug (#4384)
* feat : Added support for interactive nodes in the debugging interface (#4339)

* feat: add VSCode launch configuration and enhance debug API handler

* feat: refactor debug API handler to streamline workflow processing and enhance interactive chat features

* feat: enhance debug API handler with structured input forms and improved query handling

* feat: enhance debug API handler to support optional query and histories parameters

* feat: simplify query and histories initialization in debug API handler

* feat: add realmode parameter to workflow dispatch and update interactive handling

* feat: add optional query parameter to PostWorkflowDebugProps and remove realmode from ModuleDispatchProps

* feat: add history parameter to PostWorkflowDebugProps and update related components

* feat: remove realmode

* feat: simplify handler parameter destructuring in debug.ts

* feat: remove unused interactive prop from WholeResponseContent component

* feat: refactor onNextNodeDebug to use parameter object for better readability

* feat: Merge selections and next actions to remove unused state management

* feat: 添加 NodeDebugResponse 组件以增强调试功能

* feat: Simplify the import statements in InteractiveComponents.tsx

* feat: Update the handler function to use default parameters to simplify the code

* feat: Add optional workflowInteractiveResponse field to PostWorkflowDebugResponse type

* feat: Add the workflowInteractiveResponse field in the debugging handler to enhance response capabilities

* feat: Added workflowInteractiveResponse field in FlowNodeItemType to enhance responsiveness

* feat: Refactor NodeDebugResponse to utilize workflowInteractiveResponse for improved interactivity

* feat: Extend UserSelectInteractive and UserInputInteractive types to inherit from InteractiveBasicType

* feat: Refactor NodeDebugResponse to streamline interactive handling and improve code clarity

* feat: 重构交互式调试逻辑,创建共用 Hook 以简化用户选择和输入处理

* fix: type error

* feat: 重构 AIResponseBox 组件,简化用户交互逻辑并引入共用表单组件

* feat: 清理 AIResponseBox 和表单组件代码,移除冗余注释和未使用的导入

* fix: type error

* feat: 重构 AIResponseBox 组件,简化类型定义并优化代码结构

* refactor: 将 FormItem 接口更改为类型定义,优化代码结构

* refactor: 将 NodeDebugResponseProps 接口更改为类型定义,优化代码结构

* refactor: 移除不必要的入口节点检查,简化调试处理逻辑

* feat: 移动调试交互组件位置

* refactor: 将 InteractiveBasicType 中的属性设为可选,简化数据结构

* refactor: 优化类型定义

* refactor: 移除未使用的 ChatItemType 和 UserChatItemValueItemType 导入

* refactor: 将接口定义更改为类型别名,简化代码结构

* refactor: 更新类型定义,使用类型别名简化代码结构

* refactor: 使用类型导入简化代码结构,重构 AIResponseBox 组件

* refactor: 提取描述框和表单项标签组件,简化代码结构

* refactor: 移除多余的空行

* refactor: 移除多余的空行和注释

* refactor: 移除多余的空行,简化 AIResponseBox 组件代码

* refactor: 重构组件,移动 FormComponents 到 InteractiveComponents,简化代码结构

* refactor: 移除多余的空行,简化 NodeDebugResponse 组件代码

* refactor: 更新导入语句,使用 type 关键字优化类型导入

* refactor: 在 tsconfig.json 中启用 verbatimModuleSyntax 选项

* Revert "refactor: 在 tsconfig.json 中启用 verbatimModuleSyntax 选项"

This reverts commit 2b335a993887aa539badc028b672d387efff4cef.

* revert: rendertool

* refactor: Remove unused imports and functions to simplify code

* perf: debug interactive

---------

Co-authored-by: Theresa <63280168+sd0ric4@users.noreply.github.com>
2025-03-28 17:09:08 +08:00
Archer
2d3ae7f944
doc (#4381)
* doc

* doc
2025-03-28 13:52:08 +08:00
Archer
565a966d19
Python Sandbox (#4380)
* Python3 Sandbox (#3944)

* update python box (#4251)

* update python box

* Adjust the height of the NodeCode border.

* update python sandbox and add test systemcall bash

* update sandbox

* add VERSION_RELEASE (#4376)

* save empty docx

* fix pythonbox log error

* fix: js template

---------

Co-authored-by: dogfar <37035781+dogfar@users.noreply.github.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
Co-authored-by: gggaaallleee <1293587368@qq.com>
2025-03-28 13:45:09 +08:00
Shixian Sheng
8323c2d27e
修复了几个链接 (#4377)
* Update bge-rerank.md

* Update bge-rerank.md

* Update chatglm2.md

* Update README.md
2025-03-28 10:59:12 +08:00
Archer
4f86a0591c
perf: update test model ux (#4375)
* perf: update test model ux

* feat: oceanbase vector db doc
2025-03-27 18:45:30 +08:00
诸岳
14895bbcfd
feat: vector store support oceanbase (#4356)
* feat: vector store support oceanbase

* chore(config): Rename pgHNSWEfSearch to hnswEfSearch to work for pg and oceanbase both
2025-03-27 18:39:49 +08:00
Theresa
ccf9f5be2e
feat: Add support for independent loading states to optimize user experience during model testing (#4366)
* feat: 添加独立的loading状态支持,优化模型测试过程中的用户体验

* fix: typo

* refactor: 修改loading状态字段名称,提升代码可读性

* feat: optimize model testing functionality, integrate loading state management, improve user experience
2025-03-27 18:30:21 +08:00
Archer
e5b986b4de
V4.9.2 document (#4371)
* fix comment

* add new pic and fix ssd.md

* perf: sso doc

---------

Co-authored-by: gggaaallleee <1293587368@qq.com>
2025-03-27 17:14:59 +08:00
LGiki
cf119a9f0f
fix: typo (#4369) 2025-03-27 17:07:09 +08:00
Archer
05b3062204
V4.9.2 feature (#4354)
* feat: custom dataset split sign (#4221)

* feat: custom dataset split sign

* feat: custom dataset split sign

* add external variable debug (#4204)

* add external variable debug

* fix ui

* plugin variables

* perf: custom varialbe (#4225)

* fix: invite link (#4229)

* fix: invite link

* feat: create invite link and copy it directly

* feat: sync api collection will refresh title;perf: invite link ux (#4237)

* update queue

* feat: sync api collection will refresh title

* sync collection

* remove lock

* perf: invite link ux

* fix ts (#4239)

* sync collection

* remove lock

* fix ts

* fix: ts

* Sso (#4235)

* feat: redirect url can be inner url (#4138)

* fix: update new user sync api (#4145)

* feat: post all params to backend (#4151)

* pref: sso getauthurl api (#4172)

* pref: sso getauthurl api

* pref: sso

* solve the rootorglist (#4234)

---------

Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>

* fix variable sync & popover button height (#4227)

* fix variable sync & popover button height

* required

* feat: node prompt version (#4141)

* feat: node prompt version

* fix

* delete unused code

* fix

* fix code

* update prompt version (#4242)

* sync collection

* remove lock

* update prompt version

* perf: ai proxy (#4265)

* sync collection

* remove lock

* perf: ai proxy

* fix: member count (#4269)

* feat: chunk index independent config (#4271)

* sync collection

* remove lock

* feat: chunk index independent config

* feat: add max chunksize to split chunk function

* remove log

* update doc

* remove

* remove log

* fix input form label overflow (#4266)

* add model test log (#4272)

* sync collection

* remove lock

* add model test log

* update ui

* update log

* fix: channel test

* preview chunk ui

* test model ux

* test model log

* perf: dataset selector

* fix: system plugin auth

* update nextjs

* perf: ai proxy log remove retry log;perf: workflow type auto parse;add chunk spliter test (#4296)

* sync collection

* remove lock

* perf: workflow type auto parse

* add chunk spliter test

* perf: ai proxy log remove retry log

* udpate ai proxy field

* pref: member/org/gourp list (#4295)

* refactor: org api

* refactor: org api

* pref: member/org/group list

* feat: change group owner api

* fix: manage org member

* pref: member search

* tmp org api rewrite (#4304)

* sync collection

* remove lock

* tmp org api rewrite

* perf: text splitter (#4313)

* sync collection

* remove lock

* perf: text splitter

* update comment

* update search filter code (#4317)

* sync collection

* remove lock

* update search filter code

* pref: member/group/org (#4316)

* feat: change group owner api

* pref: member/org/group

* fix: member modal select clb

* fix: search member when change owner

* fix: member list, login button (#4322)

* perf: member group (#4324)

* sync collection

* remove lock

* perf: member group

* fix: ts   (#4325)

* sync collection

* remove lock

* fix: ts

* fix: group (#4330)

* perf: intro wrap (#4346)

* sync collection

* remove lock

* perf: intro wrap

* pref: member list (#4344)

* chore: search member new api

* chore: permission

* fix: ts error

* fix: member modal

* perf: long org name ui (#4347)

* sync collection

* remove lock

* perf: long org name ui

* perf: member tableui (#4353)

* fix: ts (#4357)

* docs: Add SSO Markdown Doc (#4334)

* add sso doc

* fix comment

* update sso doc (#4358)

* pref: useScrollPagination support debounce and throttle. (#4355)

* pref: useScrollPagination support debounce and throttle.

* fix: useScrollPagination loading

* fix: isloading

* fix: org search path hide

* fix: simple app all_app button (#4365)

* add qwen long (#4363)

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-03-27 16:54:08 +08:00
Archer
fed04f0b5d
add qwen long (#4363) 2025-03-27 16:50:29 +08:00
Finley Ge
96aabdf579
fix: simple app all_app button (#4365) 2025-03-27 16:48:22 +08:00
Finley Ge
e9f75c7e66
pref: useScrollPagination support debounce and throttle. (#4355)
* pref: useScrollPagination support debounce and throttle.

* fix: useScrollPagination loading

* fix: isloading

* fix: org search path hide
2025-03-27 15:58:13 +08:00
Archer
8b29aae238
update sso doc (#4358) 2025-03-27 12:42:54 +08:00
gggaaallleee
8999dc5b8c
docs: Add SSO Markdown Doc (#4334)
* add sso doc

* fix comment
2025-03-27 11:46:36 +08:00
Archer
17b20270e1
fix: ts (#4357) 2025-03-27 11:44:44 +08:00
Archer
9d97b60561
perf: member tableui (#4353) 2025-03-27 10:55:54 +08:00
gru-agent[bot]
f483832749
test: Add unit test for projects/app/src/pages/api/core/dataset/collection/paths.ts (#4350)
* Add unit tests for getDatasetCollectionPaths function and modify paths.ts to export handler.

* Update paths.ts

---------

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Co-authored-by: Archer <545436317@qq.com>
2025-03-27 10:41:24 +08:00
gru-agent[bot]
0778508908
test: Add unit test for projects/app/src/pages/api/core/dataset/paths.ts (#4349)
* Add unit tests for the getParents function in the dataset paths API.

* Update paths.ts

---------

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Co-authored-by: Archer <545436317@qq.com>
2025-03-27 10:38:55 +08:00
Archer
f3a069bc80
perf: long org name ui (#4347)
* sync collection

* remove lock

* perf: long org name ui
2025-03-27 10:13:06 +08:00
Finley Ge
2ebb2ccc9c
pref: member list (#4344)
* chore: search member new api

* chore: permission

* fix: ts error

* fix: member modal
2025-03-27 10:13:04 +08:00
Archer
484b87478c
perf: intro wrap (#4346)
* sync collection

* remove lock

* perf: intro wrap
2025-03-27 10:11:24 +08:00
Finley Ge
a17623d4ea
fix: group (#4330) 2025-03-27 10:11:24 +08:00
Archer
dd2f7bdcfd
fix: ts (#4325)
* sync collection

* remove lock

* fix: ts
2025-03-27 10:11:24 +08:00
Archer
4871a6980f
perf: member group (#4324)
* sync collection

* remove lock

* perf: member group
2025-03-27 10:11:22 +08:00
Finley Ge
64fb09146f
fix: member list, login button (#4322) 2025-03-27 10:08:24 +08:00
Finley Ge
1fdf947a13
pref: member/group/org (#4316)
* feat: change group owner api

* pref: member/org/group

* fix: member modal select clb

* fix: search member when change owner
2025-03-27 10:08:23 +08:00
Archer
ff64a3c039
update search filter code (#4317)
* sync collection

* remove lock

* update search filter code
2025-03-27 10:05:33 +08:00
Archer
37b4a1919b
perf: text splitter (#4313)
* sync collection

* remove lock

* perf: text splitter

* update comment
2025-03-27 10:05:32 +08:00
Archer
826a53dcb6
tmp org api rewrite (#4304)
* sync collection

* remove lock

* tmp org api rewrite
2025-03-27 10:05:32 +08:00
Finley Ge
5a47af6fff
pref: member/org/gourp list (#4295)
* refactor: org api

* refactor: org api

* pref: member/org/group list

* feat: change group owner api

* fix: manage org member

* pref: member search
2025-03-27 10:05:32 +08:00
Archer
6ea57e4609
perf: ai proxy log remove retry log;perf: workflow type auto parse;add chunk spliter test (#4296)
* sync collection

* remove lock

* perf: workflow type auto parse

* add chunk spliter test

* perf: ai proxy log remove retry log

* udpate ai proxy field
2025-03-27 10:05:32 +08:00
Archer
2fcf421672
add model test log (#4272)
* sync collection

* remove lock

* add model test log

* update ui

* update log

* fix: channel test

* preview chunk ui

* test model ux

* test model log

* perf: dataset selector

* fix: system plugin auth

* update nextjs
2025-03-27 10:05:31 +08:00
heheer
a680b565ea
fix input form label overflow (#4266) 2025-03-27 10:05:31 +08:00
Archer
e812ad6e84
feat: chunk index independent config (#4271)
* sync collection

* remove lock

* feat: chunk index independent config

* feat: add max chunksize to split chunk function

* remove log

* update doc

* remove

* remove log
2025-03-27 10:05:31 +08:00
Finley Ge
222ff0d49a
fix: member count (#4269) 2025-03-27 10:05:31 +08:00
Archer
2c73e9dc12
perf: ai proxy (#4265)
* sync collection

* remove lock

* perf: ai proxy
2025-03-27 10:05:30 +08:00
Archer
9918133426
update prompt version (#4242)
* sync collection

* remove lock

* update prompt version
2025-03-27 10:05:30 +08:00
heheer
8eec8566db
feat: node prompt version (#4141)
* feat: node prompt version

* fix

* delete unused code

* fix

* fix code
2025-03-27 10:05:30 +08:00
heheer
6a4eada85b
fix variable sync & popover button height (#4227)
* fix variable sync & popover button height

* required
2025-03-27 10:05:29 +08:00
Finley Ge
652ec45bbd
Sso (#4235)
* feat: redirect url can be inner url (#4138)

* fix: update new user sync api (#4145)

* feat: post all params to backend (#4151)

* pref: sso getauthurl api (#4172)

* pref: sso getauthurl api

* pref: sso

* solve the rootorglist (#4234)

---------

Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-03-27 10:05:29 +08:00
Archer
6fee39873d
fix ts (#4239)
* sync collection

* remove lock

* fix ts

* fix: ts
2025-03-27 10:05:29 +08:00
Archer
87e90c37bd
feat: sync api collection will refresh title;perf: invite link ux (#4237)
* update queue

* feat: sync api collection will refresh title

* sync collection

* remove lock

* perf: invite link ux
2025-03-27 10:05:27 +08:00
Finley Ge
73451dbc64
fix: invite link (#4229)
* fix: invite link

* feat: create invite link and copy it directly
2025-03-27 10:05:02 +08:00
Archer
077350e651
perf: custom varialbe (#4225) 2025-03-27 10:05:02 +08:00
heheer
d52700c645
add external variable debug (#4204)
* add external variable debug

* fix ui

* plugin variables
2025-03-27 10:05:02 +08:00
Archer
ec30d79286
feat: custom dataset split sign (#4221)
* feat: custom dataset split sign

* feat: custom dataset split sign
2025-03-27 10:04:59 +08:00
gggaaallleee
cb29076e5b
Inform (#4307)
* add manager change memberName and update inform UI

* change icon and some inform ui

* change for comment

* fix for comment
2025-03-27 10:04:29 +08:00
gru-agent[bot]
29a10c1389
test: Add unit test for projects/app/src/global/core/chat/utils.ts (#4328)
* Add unit tests for chat utility functions and enhance statistical data calculation in utils.ts.

* Update utils.ts

---------

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Co-authored-by: Archer <545436317@qq.com>
2025-03-26 13:46:21 +08:00
gru-agent[bot]
28877373ac
Add unit tests for workflow utility functions in utils.test.ts (#4327)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-03-26 13:30:01 +08:00
gru-agent[bot]
4538f2a9d4
Add unit tests for authType2UsageSource function in utils.test.ts (#4326)
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
2025-03-26 13:26:04 +08:00
LGiki
fc23db745c
fixed: permission error when viewing database search node responses (#4308)
Fix issue where API-called workflows with database search nodes would show
"无权操作该数据集" when trying to view full responses in conversation logs.
2025-03-26 10:47:39 +08:00
ROKY
8a68de6471
add pdf-mineru (#4276)
* add pdf-mineru

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

* Rename Readme.md to README.md

* Rename pdf_parser_mineru.py to main.py
2025-03-24 17:17:08 +08:00
dreamer6680
1c4e0c66d5
Ollama接入文档 (#4294)
* Add files via upload

* Add files via upload

* Update ollama.md

* Update ollama.md

* Add files via upload
2025-03-24 15:05:56 +08:00
dependabot[bot]
6dcdd540b9
chore(deps): bump python-multipart in /plugins/model/pdf-mistral (#4290)
Bumps [python-multipart](https://github.com/Kludex/python-multipart) from 0.0.17 to 0.0.18.
- [Release notes](https://github.com/Kludex/python-multipart/releases)
- [Changelog](https://github.com/Kludex/python-multipart/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kludex/python-multipart/compare/0.0.17...0.0.18)

---
updated-dependencies:
- dependency-name: python-multipart
  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-03-24 13:44:18 +08:00
lzs2000131
48233c7d55
add mistral-ocr support as a plugin like pdf-marker (#4284)
Co-authored-by: zhengshuai.li <zhengshuai.li@cloudpense.com>
2025-03-24 10:32:06 +08:00
dependabot[bot]
f3ef56998d
chore(deps): bump transformers in /plugins/model/llm-ChatGLM2 (#4288)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.31.0 to 4.48.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.31.0...v4.48.0)

---
updated-dependencies:
- dependency-name: transformers
  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-03-24 10:28:58 +08:00
dependabot[bot]
7e7269b2ba
chore(deps): bump transformers in /plugins/model/llm-Baichuan2 (#4281)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.30.2 to 4.48.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.30.2...v4.48.0)

---
updated-dependencies:
- dependency-name: transformers
  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-03-24 10:26:54 +08:00
dependabot[bot]
606e9505c0
chore(deps): bump torch in /plugins/model/llm-ChatGLM2 (#4282)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.0.1 to 2.4.0.
- [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.0.1...v2.4.0)

---
updated-dependencies:
- dependency-name: torch
  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-03-24 10:26:46 +08:00
Archer
1db39e8907
4.9.1 fix dataset (#4279) (#4280)
* fix dataset search node reference save

* rewrite

---------

Co-authored-by: heheer <1239331448@qq.com>
2025-03-22 00:26:31 +08:00
Archer
7f13eb4642
update doc (#4256) 2025-03-21 09:58:29 +08:00
Archer
9a1fff74fd
fix: nextjs 14.2.24 cannot auto create local storage (#4249) (#4250) 2025-03-20 11:40:47 +08:00
Archer
de87639fce
fix: vector name (#4246) 2025-03-20 00:27:31 +08:00
Archer
f9cecfd49a
fix: dataset selector load error (#4243)
* fix: dataset selector load error

* fix: path auth error

* fix: plugin scroll

* export chat log with contact (#4211)

* export chat log with contact

* fix

---------

Co-authored-by: heheer <heheer@sealos.io>
2025-03-20 00:17:10 +08:00
gggaaallleee
70563d2bcb
fix DatasetSelectModal.tsx (#4241) 2025-03-19 23:08:22 +08:00
a.e.
4ca99a6361
docs: Add PPIO integration documentation (#4216)
* docs: Add PPIO integration documentation

Add new documentation for integrating models via PPIO LLM API.

* docs: copy PPIO docs
2025-03-18 17:44:49 +08:00
Finley Ge
8f70e436cf
doc: invitaion link (#4217) 2025-03-18 17:11:37 +08:00
Archer
e75d81d05a
V4.9.1 feature (#4206)
* fix: remove DefaultTeam (#4037)

* fix :Get application bound knowledge base information logical rewrite (#4057)

* fix :Get application bound knowledge base information logical rewrite

* fix :Get application bound knowledge base information logical rewrite

* fix :Get application bound knowledge base information logical rewrite

* fix :Get application bound knowledge base information logical rewrite

* update package

* fix: import dataset step error;perf: ai proxy avatar (#4074)

* perf: pg config params

* perf: ai proxy avatar

* fix: import dataset step error

* feat: data input ux

* perf: app dataset rewite

* fix: 文本提取不支持arrayString,arrayNumber等jsonSchema (#4079)

* update doc ;perf: model test (#4098)

* perf: extract array

* update doc

* perf: model test

* perf: model test

* perf: think tag parse (#4102)

* chat quote reader (#3912)

* init chat quote full text reader

* linked structure

* dataset data linked

* optimize code

* fix ts build

* test finish

* delete log

* fix

* fix ts

* fix ts

* remove nextId

* initial scroll

* fix

* fix

* perf: chunk read   (#4109)

* package

* perf: chunk read

* feat: api dataset support pdf parse;fix: chunk reader auth (#4117)

* feat: api dataset support pdf parse

* fix: chunk reader auth

* feat: invitation link (#3979)

* feat: invitation link schema and apis

* feat: add invitation link

* feat: member status: active, leave, forbidden

* fix: expires show hours and minutes

* feat: invalid invitation link hint

* fix: typo

* chore: fix typo & i18n

* fix

* pref: fe

* feat: add ttl index for 30-day-clean-up

* perf: invite member code (#4118)

* perf: invite member code

* fix: ts

* fix: model test channel id;fix: quote reader (#4123)

* fix: model test channel id

* fix: quote reader

* fix chat quote reader (#4125)

* perf: model test;perf: sidebar trigger (#4127)

* fix: import dataset step error;perf: ai proxy avatar (#4074)

* perf: pg config params

* perf: ai proxy avatar

* fix: import dataset step error

* feat: data input ux

* perf: app dataset rewite

* perf: model test

* perf: sidebar trigger

* lock

* update nanoid version

* fix: select component ux

* fix: ts

* fix: vitest

* remove test

* fix: prompt toolcall ui (#4139)

* load log error adapt

* fix: prompt toolcall ui

* perf: commercial function tip

* update package

* pref: copy link (#4147)

* fix(i18n): namespace (#4143)

* hiden dataset source (#4152)

* hiden dataset source

* perf: reader

* chore: move all tests into a single folder (#4160)

* fix modal close scroll (#4162)

* fix modal close scroll

* update refresh

* feat: rerank modal select and weight (#4164)

* fix loadInitData refresh (#4169)

* fix

* fix

* form input number default & api dataset max token

* feat: mix search weight (#4170)

* feat: mix search weight

* feat: svg render

* fix: avatar error remove (#4173)

* fix: avatar error remove

* fix: index

* fix: guide

* fix: auth

* update package;fix: input data model ui (#4181)

* update package

* fix: ts

* update config

* update jieba package

* add type sign

* fix: input data ui

* fix: page title refresh (#4186)

* fix: ts

* update jieba package

* fix: page title refresh

* fix: remove member length check when opening invite create modal (#4193)

* add env to check internal ip (#4187)

* fix: ts

* update jieba package

* add env to check internal ip

* package

* fix: jieba

* reset package

* update config

* fix: jieba package

* init shell

* init version

* change team reload

* update jieba package (#4200)

* update jieba package

* package

* update package

* remove invalid code

* action

* package (#4201)

* package

* update package

* remove invalid code

* package

* remove i18n tip (#4202)

* doc (#4205)

* fix: i18n (#4208)

* fix: next config (#4207)

* reset package

* i18n

* update config

* i18n

* remove log

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
Co-authored-by: shilin <39396378+shilin66@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
2025-03-18 14:40:41 +08:00
Hwting
56793114d8
Update docker.md (#4176)
* Update docker.md

Fix a document error

* Update docker.md
2025-03-15 11:49:28 +08:00
Archer
a7b09461be
Update official_account.md (#4132) 2025-03-12 21:26:17 +08:00
dependabot[bot]
cd2cb3f6ea
chore(deps): bump gradio in /plugins/model/tts-cosevoice (#4130)
Bumps [gradio](https://github.com/gradio-app/gradio) from 4.32.2 to 5.11.0.
- [Release notes](https://github.com/gradio-app/gradio/releases)
- [Changelog](https://github.com/gradio-app/gradio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gradio-app/gradio/compare/gradio@4.32.2...gradio@5.11.0)

---
updated-dependencies:
- dependency-name: gradio
  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-03-12 19:33:10 +08:00
dependabot[bot]
56f77b58c9
chore(deps): bump lightning in /plugins/model/tts-cosevoice (#4129)
Bumps [lightning](https://github.com/Lightning-AI/lightning) from 2.2.4 to 2.3.3.
- [Release notes](https://github.com/Lightning-AI/lightning/releases)
- [Commits](https://github.com/Lightning-AI/lightning/compare/2.2.4...2.3.3)

---
updated-dependencies:
- dependency-name: lightning
  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-03-12 19:33:02 +08:00
dependabot[bot]
1d697f97d7
chore(deps): bump deepspeed in /plugins/model/tts-cosevoice (#4128)
Bumps [deepspeed](https://github.com/deepspeedai/DeepSpeed) from 0.14.2 to 0.15.1.
- [Release notes](https://github.com/deepspeedai/DeepSpeed/releases)
- [Commits](https://github.com/deepspeedai/DeepSpeed/compare/v0.14.2...v0.15.1)

---
updated-dependencies:
- dependency-name: deepspeed
  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-03-12 19:32:46 +08:00
Finley Ge
bb30ca4859
chore: vitest support (#4026)
* chore: vitest

* chore: move test files

* chore: support vitest

* fix: exclude test files

* chore(ci): add test workflow

* feat: remove read env
2025-03-12 19:27:53 +08:00
zijiren
139e934345
feat: aiproxy repo moved (#4116)
* feat: aiproxy repo

* fix
2025-03-12 12:41:04 +08:00
dependabot[bot]
bf69aa6e3d
chore(deps): bump next from 14.2.5 to 14.2.21 (#4091)
Bumps [next](https://github.com/vercel/next.js) from 14.2.5 to 14.2.21.
- [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/v14.2.5...v14.2.21)

---
updated-dependencies:
- dependency-name: next
  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-03-11 12:27:10 +08:00
dependabot[bot]
3a730a23cb
chore(deps): bump next from 14.2.5 to 14.2.21 in /projects/app (#4087)
Bumps [next](https://github.com/vercel/next.js) from 14.2.5 to 14.2.21.
- [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/v14.2.5...v14.2.21)

---
updated-dependencies:
- dependency-name: next
  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-03-11 11:39:44 +08:00
dependabot[bot]
75cb46796a
chore(deps): bump axios from 1.7.2 to 1.8.2 (#4088)
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.8.2.
- [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.7.2...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  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-03-11 11:38:19 +08:00
dependabot[bot]
effdb5884b
chore(deps): bump jsonpath-plus from 10.1.0 to 10.3.0 (#4089)
Bumps [jsonpath-plus](https://github.com/s3u/JSONPath) from 10.1.0 to 10.3.0.
- [Release notes](https://github.com/s3u/JSONPath/releases)
- [Changelog](https://github.com/JSONPath-Plus/JSONPath/blob/main/CHANGES.md)
- [Commits](https://github.com/s3u/JSONPath/compare/v10.1.0...v10.3.0)

---
updated-dependencies:
- dependency-name: jsonpath-plus
  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-03-11 11:37:58 +08:00
Archer
9523ba92f3
perf: HTTP node jsonBody support \n (#4070) 2025-03-10 13:56:34 +08:00
archer
2f522aff90
perf: HTTP node jsonBody support \n 2025-03-10 13:55:51 +08:00
Wenhao Zhu
0dccfd176d
fix: 修复最大响应 tokens 提示显示错误的问题 (#4048) 2025-03-10 10:01:25 +08:00
Wenhao Zhu
867e8acf27
fix: 修复部分参数丢失的问题 (#4040)
部分参数 (Reasoning, TopP, StopSign, ResponseFormat, JsonSchema) 保存完后重新进入不显示,并且在某些情况(包括但不限于保存应用操作)会导致用空值覆盖数据库的值从而丢失这个参数值
2025-03-08 18:27:58 +08:00
Wenhao Zhu
36da8c862f
fix: 修复知识库问题优化无效的BUG (#4033) 2025-03-07 16:00:01 +08:00
Archer
b50cf49cc7
更新 4820.md (#4028) 2025-03-07 13:36:02 +08:00
Archer
2270e149eb
Update 490.md (#4022) 2025-03-07 11:15:52 +08:00
Archer
4957bdcba1
Update official_account.md (#4021) 2025-03-07 11:12:08 +08:00
ENg-122
bca5cf738a
翻译缺失 (#4010) 2025-03-06 22:33:09 +08:00
Archer
c35bb5841c
version doc (#4013) 2025-03-06 22:31:56 +08:00
Archer
6e045093b1
qwq config (#4009) 2025-03-06 20:21:57 +08:00
Archer
a1b114e426
feat: qwen qwq model config (#4008) 2025-03-06 20:18:33 +08:00
Archer
54fde7630c
V4.9.0 feature (#4006)
* Add image index and pdf parse (#3956)

* feat: think tag parse

* feat: parse think tag test

* feat: pdf parse ux

* feat: doc2x parse

* perf: rewrite training mode setting

* feat: image parse queue

* perf: image index

* feat: image parse process

* feat: add init sh

* fix: ts

* feat: pg vector 0.8.0;perf: app pdf enhance parse (#3962)

* perf: app pdf enhance parse

* feat: pg vector 0.8.0

* update schema default

* model sort and default image

* perf: i18n

* perf: ui tip

* Add markdown format; Update doc (#3969)

* update doc

* markdown

* ai proxy docker compose & doc (#3947)

* feat: prompt call tool support reason;perf: ai proxy doc (#3982)

* update schema

* perf: ai proxy doc

* feat: prompt call tool support reason

* doc

* update init sh

* simple mode tool reason (#3984)

* simple mode tool reason

* model config cannot set empty

* perf: read files code

* perf: mongo gridfs chunks

* perf: doc

* fix: link (#3987)

* pdf parse doc (#3990)

* update action

* doc

* markerv0.2 (#3992)

* markerv0.2

* marker2

* perf: retry to load image;perf: default index check (#4004)

* perf: retry to load image

* perf: default index check

* perf: doc (#4005)

* perf: doc

* doc

* version doc

* README

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
2025-03-06 19:42:58 +08:00
archer
467c408ad7
README 2025-03-06 18:39:51 +08:00
archer
c005a94454
version doc 2025-03-06 18:39:00 +08:00
Archer
c8a35822d6
perf: doc (#4005)
* perf: doc

* doc
2025-03-06 18:35:02 +08:00
Archer
d05259dedd
perf: retry to load image;perf: default index check (#4004)
* perf: retry to load image

* perf: default index check
2025-03-06 18:28:09 +08:00
YeYuheng
8980664b8a
markerv0.2 (#3992)
* markerv0.2

* marker2
2025-03-06 18:28:09 +08:00
archer
43f30b3790
doc 2025-03-06 18:28:09 +08:00
archer
3ddbb37612
update action 2025-03-06 18:28:08 +08:00
Archer
7c419a26b3
pdf parse doc (#3990) 2025-03-06 18:28:08 +08:00
Archer
e131465d25
fix: link (#3987) 2025-03-06 18:28:08 +08:00
Archer
a345e56508
simple mode tool reason (#3984)
* simple mode tool reason

* model config cannot set empty

* perf: read files code

* perf: mongo gridfs chunks

* perf: doc
2025-03-06 18:28:07 +08:00
archer
32ce032995
update init sh 2025-03-06 18:28:07 +08:00
archer
0bc075aa4e
doc 2025-03-06 18:28:06 +08:00
Archer
3e3f2165db
feat: prompt call tool support reason;perf: ai proxy doc (#3982)
* update schema

* perf: ai proxy doc

* feat: prompt call tool support reason
2025-03-06 18:28:05 +08:00
heheer
e1aa068858
ai proxy docker compose & doc (#3947) 2025-03-06 18:28:05 +08:00
Archer
e98d6f1d30
Add markdown format; Update doc (#3969)
* update doc

* markdown
2025-03-06 18:28:04 +08:00
Archer
54eb5c0547
feat: pg vector 0.8.0;perf: app pdf enhance parse (#3962)
* perf: app pdf enhance parse

* feat: pg vector 0.8.0

* update schema default

* model sort and default image

* perf: i18n

* perf: ui tip
2025-03-06 18:28:04 +08:00
Archer
adf5377ebe
Add image index and pdf parse (#3956)
* feat: think tag parse

* feat: parse think tag test

* feat: pdf parse ux

* feat: doc2x parse

* perf: rewrite training mode setting

* feat: image parse queue

* perf: image index

* feat: image parse process

* feat: add init sh

* fix: ts
2025-03-06 18:28:03 +08:00
Finley Ge
08b6f594df
pref: set strictQuery to throw. (#3994) 2025-03-06 18:24:58 +08:00
Fmaverick
90d13ee3df
Update README.md (#3999)
加了锚点
2025-03-06 18:24:39 +08:00
Archer
5c718abd50
Merge pull request #4003 from labring/v4.8.23
perf: http body check
2025-03-06 18:24:06 +08:00
1684 changed files with 80091 additions and 24374 deletions

25
.eslintignore Normal file
View File

@ -0,0 +1,25 @@
# 构建输出目录
dist/
build/
.next/
out/
# 依赖目录
node_modules/
# 缓存和生成文件
coverage/
.coverage/
.nyc_output/
*.log
# 其他不需要检查的文件
*.min.js
*.config.js
vitest.config.mts
# 特定目录
bin/
scripts/
deploy/
docSite/

17
.eslintrc.json Normal file
View File

@ -0,0 +1,17 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["next/core-web-vitals"],
"rules": {
"react-hooks/rules-of-hooks": 0,
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": false
}
]
},
"ignorePatterns": ["node_modules/", "dist/", "build/", "coverage/"]
}

View File

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

30
.github/gh-bot.yml vendored
View File

@ -1,30 +0,0 @@
version: v1
debug: true
action:
printConfig: false
release:
retry: 15s
actionName: Release
allowOps:
- cuisongliu
bot:
prefix: /
spe: _
allowOps:
- sealos-ci-robot
- sealos-release-robot
email: sealos-ci-robot@sealos.io
username: sealos-ci-robot
repo:
org: false
message:
success: |
🤖 says: Hooray! The action {{.Body}} has been completed successfully. 🎉
format_error: |
🤖 says: ‼️ There is a formatting issue with the action, kindly verify the action's format.
permission_error: |
🤖 says: ‼️ The action doesn't have permission to trigger.
release_error: |
🤖 says: ‼️ Release action failed.
Error details: {{.Error}}

View File

@ -1,4 +1,4 @@
name: Deploy doc image to vercel name: Deploy doc image to cf
on: on:
workflow_dispatch: workflow_dispatch:
@ -7,8 +7,6 @@ on:
- 'docSite/**' - 'docSite/**'
branches: branches:
- 'main' - 'main'
tags:
- 'v*.*.*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
@ -20,7 +18,12 @@ jobs:
url: ${{ steps.vercel-action.outputs.preview-url }} url: ${{ steps.vercel-action.outputs.preview-url }}
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Job outputs # Job outputs
outputs: outputs:
@ -60,20 +63,9 @@ jobs:
- name: Build - name: Build
run: cd docSite && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify run: cd docSite && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify
# Step 5 - Push our generated site to Vercel
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} #Required
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required
github-comment: false
vercel-args: '--prod --local-config ../vercel.json' # Optional
working-directory: docSite/public
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GH_PAT }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docSite/public publish_dir: docSite/public

View File

@ -6,12 +6,17 @@ on:
- 'docSite/**' - 'docSite/**'
branches: branches:
- 'main' - 'main'
tags:
- 'v*.*.*'
jobs: jobs:
build-fastgpt-docs-images: build-fastgpt-docs-images:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -29,7 +34,6 @@ jobs:
with: with:
# list of Docker images to use as base name for tags # list of Docker images to use as base name for tags
images: | images: |
${{ secrets.DOCKER_HUB_NAME }}/fastgpt-docs
ghcr.io/${{ github.repository_owner }}/fastgpt-docs ghcr.io/${{ github.repository_owner }}/fastgpt-docs
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs
tags: | tags: |
@ -42,18 +46,12 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Login to ghcr.io - name: Login to ghcr.io
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Aliyun - name: Login to Aliyun
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -72,9 +70,10 @@ jobs:
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
outputs: outputs:
tags: ${{ steps.datetime.outputs.datetime }} tags: ${{ steps.datetime.outputs.datetime }}
update-docs-image: update-docs-image:
needs: build-fastgpt-docs-images needs: build-fastgpt-docs-images
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
if: github.repository == 'labring/FastGPT' if: github.repository == 'labring/FastGPT'
steps: steps:
- name: Checkout code - name: Checkout code

View File

@ -4,21 +4,25 @@ on:
pull_request_target: pull_request_target:
paths: paths:
- 'docSite/**' - 'docSite/**'
branches:
- 'main'
workflow_dispatch: workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
# This workflow contains jobs "deploy-production" # This workflow contains jobs "deploy-production"
deploy-preview: deploy-preview:
permissions:
contents: read
packages: write
attestations: write
id-token: write
pull-requests: write
# The environment this job references # The environment this job references
environment: environment:
name: Preview name: Preview
url: ${{ steps.vercel-action.outputs.preview-url }} url: ${{ steps.vercel-action.outputs.preview-url }}
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04
# Job outputs # Job outputs
outputs: outputs:
@ -34,6 +38,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }} repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: recursive # Fetch submodules submodules: recursive # Fetch submodules
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
token: ${{ secrets.GITHUB_TOKEN }}
# Step 2 Detect changes to Docs Content # Step 2 Detect changes to Docs Content
- name: Detect changes in doc content - name: Detect changes in doc content
@ -45,10 +50,6 @@ jobs:
- 'docSite/content/docs/**' - 'docSite/content/docs/**'
base: main 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) # Step 3 - Install Hugo (specific version)
- name: Install Hugo - name: Install Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
@ -60,39 +61,35 @@ jobs:
- name: Build - name: Build
run: cd docSite && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify run: cd docSite && hugo mod get -u github.com/colinwilson/lotusdocs@6d0568e && hugo -v --minify
# Step 5 - Push our generated site to Vercel # Step 5 - Push our generated site to Cloudflare
- name: Deploy to Vercel - name: Deploy to Cloudflare Pages
uses: amondnet/vercel-action@v25 id: deploy
id: vercel-action uses: cloudflare/wrangler-action@v3
with: with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} #Required accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required command: pages deploy ./docSite/public --project-name=fastgpt-doc
github-comment: false packageManager: npm
vercel-args: '--local-config ../vercel.json' # Optional
working-directory: docSite/public - name: Create deployment status comment
alias-domains: | #Optional if: always()
fastgpt-staging.vercel.app
docsOutput:
needs: [deploy-preview]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Write md
run: |
echo "# 🤖 Generated by deploy action" > report.md
echo "[👀 Visit Preview](${{ needs.deploy-preview.outputs.url }})" >> report.md
cat report.md
- name: Gh Rebot for Sealos
uses: labring/gh-rebot@v0.0.6
if: ${{ (github.event_name == 'pull_request_target') }}
with:
version: v0.0.6
env: env:
GH_TOKEN: '${{ secrets.GH_PAT }}' JOB_STATUS: ${{ job.status }}
SEALOS_TYPE: 'pr_comment' PREVIEW_URL: ${{ steps.deploy.outputs.deployment-url }}
SEALOS_FILENAME: 'report.md' uses: actions/github-script@v6
SEALOS_REPLACE_TAG: 'DEFAULT_REPLACE_DEPLOY' 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);
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
});

View File

@ -1,6 +1,6 @@
name: Sync images name: Sync images
on: on:
pull_request_target: pull_request:
branches: branches:
- main - main
paths: paths:
@ -15,13 +15,6 @@ jobs:
sync: sync:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout
uses: actions/checkout@v3
if: ${{ (github.event_name == 'pull_request_target') }}
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -29,7 +22,7 @@ jobs:
uses: BetaHuhn/repo-file-sync-action@v1.21.0 uses: BetaHuhn/repo-file-sync-action@v1.21.0
with: with:
GH_PAT: ${{ secrets.IMG_GH_PAT }} GH_PAT: ${{ secrets.IMG_GH_PAT }}
CONFIG_PATH: .github/sync_imgs.yml CONFIG_PATH: .github/doc-sync-image.yml
ORIGINAL_MESSAGE: true ORIGINAL_MESSAGE: true
SKIP_PR: true SKIP_PR: true
COMMIT_EACH_FILE: false COMMIT_EACH_FILE: false

View File

@ -9,7 +9,12 @@ on:
- 'main' - 'main'
jobs: jobs:
build-fastgpt-images: build-fastgpt-images:
runs-on: ubuntu-20.04 permissions:
packages: write
contents: read
attestations: write
id-token: write
runs-on: ubuntu-24.04
if: github.repository != 'labring/FastGPT' if: github.repository != 'labring/FastGPT'
steps: steps:
- name: Checkout - name: Checkout
@ -32,7 +37,7 @@ jobs:
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set DOCKER_REPO_TAGGED based on branch or tag - name: Set DOCKER_REPO_TAGGED based on branch or tag
run: | run: |
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV

View File

@ -1,258 +1,171 @@
name: Build FastGPT images name: Build FastGPT images
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
paths: paths:
- 'projects/app/**' - "projects/app/**"
- 'packages/**' - "packages/**"
tags: tags:
- 'v*' - "v*"
jobs: jobs:
build-fastgpt-images: build-fastgpt-images:
runs-on: ubuntu-20.04 permissions:
packages: write
contents: read
attestations: write
id-token: write
strategy:
matrix:
sub_routes:
- repo: fastgpt
base_url: ""
- repo: fastgpt-sub-route
base_url: "/fastai"
- repo: fastgpt-sub-route-gchat
base_url: "/gchat"
archs:
- arch: amd64
- arch: arm64
runs-on: ubuntu-24.04-arm
runs-on: ${{ matrix.archs.runs-on || 'ubuntu-24.04' }}
steps: steps:
# install env # install env
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y nodejs npm
- name: Set up QEMU (optional)
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
with: with:
driver-opts: network=host driver-opts: network=host
- name: Cache Docker layers - name: Cache Docker layers
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: /tmp/.buildx-cache path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }} key: ${{ runner.os }}-${{ matrix.sub_routes.repo }}-buildx-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ runner.os }}-${{ matrix.sub_routes.repo }}-buildx-
# login docker # login docker
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Ali Hub - name: Login to Ali Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: registry.cn-hangzhou.aliyuncs.com registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }} username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }} password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_HUB_NAME }} username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Set tag - name: Build for ${{ matrix.archs.arch }}
- name: Set image name and tag id: build
run: | uses: docker/build-push-action@v6
if [[ "${{ github.ref_name }}" == "main" ]]; then with:
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV context: .
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV file: projects/app/Dockerfile
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV platforms: linux/${{ matrix.archs.arch }}
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV build-args: |
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV ${{ matrix.sub_routes.base_url && format('base_url={0}', matrix.sub_routes.base_url) || '' }}
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV labels: |
else org.opencontainers.image.source=https://github.com/${{ github.repository }}
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV org.opencontainers.image.description=${{ matrix.sub_routes.repo }} image
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/${{ matrix.sub_routes.repo }},${{ secrets.ALI_IMAGE_NAME }}/${{ matrix.sub_routes.repo }},${{ secrets.DOCKER_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}",push-by-digest=true,push=true
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV cache-from: type=local,src=/tmp/.buildx-cache
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV cache-to: type=local,dest=/tmp/.buildx-cache
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt:latest" >> $GITHUB_ENV
fi
- name: Build and publish image for main branch or tag push event - name: Export digest
env:
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
run: | run: |
docker buildx build \ mkdir -p ${{ runner.temp }}/digests/${{ matrix.sub_routes.repo }}
-f projects/app/Dockerfile \ digest="${{ steps.build.outputs.digest }}"
--platform linux/amd64,linux/arm64 \ touch "${{ runner.temp }}/digests/${{ matrix.sub_routes.repo }}/${digest#sha256:}"
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.description=fastgpt image" \ - name: Upload digest
--push \ uses: actions/upload-artifact@v4
--cache-from=type=local,src=/tmp/.buildx-cache \ with:
--cache-to=type=local,dest=/tmp/.buildx-cache \ name: digests-${{ matrix.sub_routes.repo }}-${{ github.sha }}-${{ matrix.archs.arch }}
-t ${Git_Tag} \ path: ${{ runner.temp }}/digests/${{ matrix.sub_routes.repo }}/*
-t ${Git_Latest} \ if-no-files-found: error
-t ${Ali_Tag} \ retention-days: 1
-t ${Ali_Latest} \
-t ${Docker_Hub_Tag} \ release-fastgpt-images:
-t ${Docker_Hub_Latest} \ permissions:
. packages: write
build-fastgpt-images-sub-route: contents: read
runs-on: ubuntu-20.04 attestations: write
id-token: write
needs: build-fastgpt-images
strategy:
matrix:
sub_routes:
- repo: fastgpt
- repo: fastgpt-sub-route
- repo: fastgpt-sub-route-gchat
runs-on: ubuntu-24.04
steps: steps:
# install env
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y nodejs npm
- name: Set up QEMU (optional)
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
# login docker
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Ali Hub - name: Login to Ali Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: registry.cn-hangzhou.aliyuncs.com registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }} username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }} password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_HUB_NAME }} username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Set tag - name: Download digests
- name: Set image name and tag uses: actions/download-artifact@v4
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route:latest" >> $GITHUB_ENV
fi
- name: Build and publish image for main branch or tag push event
env:
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
run: |
docker buildx build \
-f projects/app/Dockerfile \
--platform linux/amd64,linux/arm64 \
--build-arg base_url=/fastai \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.description=fastgpt image" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t ${Git_Tag} \
-t ${Git_Latest} \
-t ${Ali_Tag} \
-t ${Ali_Latest} \
-t ${Docker_Hub_Tag} \
-t ${Docker_Hub_Latest} \
.
build-fastgpt-images-sub-route-gchat:
runs-on: ubuntu-20.04
steps:
# install env
- name: Checkout
uses: actions/checkout@v3
with: with:
fetch-depth: 1 path: ${{ runner.temp }}/digests
- name: Install Dependencies pattern: digests-${{ matrix.sub_routes.repo }}-${{ github.sha }}-*
run: | merge-multiple: true
sudo apt update && sudo apt install -y nodejs npm
- name: Set up QEMU (optional)
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - 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@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
# login docker
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Set tag
- name: Set image name and tag - name: Set image name and tag
run: | run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
else else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:${{ github.ref_name }}" >> $GITHUB_ENV echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/${{ matrix.sub_routes.repo }}:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:${{ github.ref_name }}" >> $GITHUB_ENV echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:${{ github.ref_name }}" >> $GITHUB_ENV echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/${{ matrix.sub_routes.repo }}:latest" >> $GITHUB_ENV
fi fi
- name: Build and publish image for main branch or tag push event - name: Create manifest list and push
env: working-directory: ${{ runner.temp }}/digests
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }}
run: | run: |
docker buildx build \ TAGS="$(echo -e "${Git_Tag}\n${Git_Latest}\n${Ali_Tag}\n${Ali_Latest}\n${Docker_Hub_Tag}\n${Docker_Hub_Latest}")"
-f projects/app/Dockerfile \ for TAG in $TAGS; do
--platform linux/amd64,linux/arm64 \ docker buildx imagetools create -t $TAG \
--build-arg base_url=/gchat \ $(printf 'ghcr.io/${{ github.repository_owner }}/${{ matrix.sub_routes.repo }}@sha256:%s ' *)
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \ sleep 5
--label "org.opencontainers.image.description=fastgpt-sub-route-gchat image" \ done
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t ${Git_Tag} \
-t ${Git_Latest} \
-t ${Ali_Tag} \
-t ${Ali_Latest} \
-t ${Docker_Hub_Tag} \
-t ${Docker_Hub_Latest} \
.

View File

@ -1,70 +1,89 @@
name: Preview FastGPT images name: Preview FastGPT images
on: on:
pull_request_target: pull_request_target:
paths:
- 'projects/app/**'
- 'packages/**'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
preview-fastgpt-images: preview-fastgpt-images:
runs-on: ubuntu-20.04 permissions:
contents: read
packages: write
attestations: write
id-token: write
pull-requests: write
runs-on: ubuntu-24.04
strategy:
matrix:
image: [fastgpt, sandbox, mcp_server]
fail-fast: false # 即使一个镜像构建失败,也继续构建其他镜像
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.ref }} ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }} repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: recursive # Fetch submodules fetch-depth: 0
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with: with:
driver-opts: network=host driver-opts: network=host
- name: Cache Docker layers - name: Cache Docker layers
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: /tmp/.buildx-cache path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }} key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.image }}
restore-keys: | restore-keys: |
${{ runner.os }}-buildx-${{ github.sha }}-
${{ runner.os }}-buildx- ${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set DOCKER_REPO_TAGGED based on branch or tag
- name: Set image config
id: config
run: | run: |
echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt-pr:${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV if [[ "${{ matrix.image }}" == "fastgpt" ]]; then
- name: Build image for PR echo "DOCKERFILE=projects/app/Dockerfile" >> $GITHUB_OUTPUT
env: echo "DESCRIPTION=fastgpt-pr image" >> $GITHUB_OUTPUT
DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }} echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/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
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
fi
- name: Build ${{ matrix.image }} image for PR
run: | run: |
docker buildx build \ docker buildx build \
-f projects/app/Dockerfile \ -f ${{ steps.config.outputs.DOCKERFILE }} \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \ --label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.description=fastgpt-pr image" \ --label "org.opencontainers.image.description=${{ steps.config.outputs.DESCRIPTION }}" \
--label "org.opencontainers.image.licenses=Apache" \
--push \ --push \
--cache-from=type=local,src=/tmp/.buildx-cache \ --cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \ --cache-to=type=local,dest=/tmp/.buildx-cache \
-t ${DOCKER_REPO_TAGGED} \ -t ${{ steps.config.outputs.DOCKER_REPO_TAGGED }} \
. .
# Add write md step after build
- name: Write md
run: |
echo "# 🤖 Generated by deploy action" > report.md
echo "📦 Preview Image: \`${DOCKER_REPO_TAGGED}\`" >> report.md
cat report.md
- name: Gh Rebot for Sealos - uses: actions/github-script@v7
uses: labring/gh-rebot@v0.0.6
if: ${{ (github.event_name == 'pull_request_target') }}
with: with:
version: v0.0.6 github-token: ${{secrets.GITHUB_TOKEN}}
env: script: |
GH_TOKEN: '${{ secrets.GH_PAT }}' github.rest.issues.createComment({
SEALOS_TYPE: 'pr_comment' issue_number: context.issue.number,
SEALOS_FILENAME: 'report.md' owner: context.repo.owner,
SEALOS_REPLACE_TAG: 'DEFAULT_REPLACE_DEPLOY' repo: context.repo.repo,
body: 'Preview ${{ matrix.image }} Image: `${{ steps.config.outputs.DOCKER_REPO_TAGGED }}`'
})

32
.github/workflows/fastgpt-test.yaml vendored Normal file
View File

@ -0,0 +1,32 @@
name: 'FastGPT-Test'
on:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: pnpm/action-setup@v4
with:
version: 10
- name: 'Install Deps'
run: pnpm install
- name: 'Test'
run: pnpm run test
- name: 'Report Coverage'
# Set if: always() to also generate the report if tests are failing
# Only works if you set `reportOnFailure: true` in your vite config as specified above
if: always()
uses: davelosert/vitest-coverage-report-action@v2

View File

@ -8,7 +8,12 @@ on:
jobs: jobs:
helm: helm:
runs-on: ubuntu-20.04 permissions:
packages: write
contents: read
attestations: write
id-token: write
runs-on: ubuntu-24.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -20,7 +25,7 @@ jobs:
run: echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT run: echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
- name: Release Helm - name: Release Helm
run: | run: |
echo ${{ secrets.GH_PAT }} | helm registry login ghcr.io -u ${{ github.repository_owner }} --password-stdin echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io -u ${{ github.repository_owner }} --password-stdin
export APP_VERSION=${{ steps.vars.outputs.tag }} export APP_VERSION=${{ steps.vars.outputs.tag }}
export HELM_VERSION=${{ steps.vars.outputs.tag }} export HELM_VERSION=${{ steps.vars.outputs.tag }}
export HELM_REPO=ghcr.io/${{ github.repository_owner }} export HELM_REPO=ghcr.io/${{ github.repository_owner }}

View File

@ -0,0 +1,151 @@
name: Build fastgpt-mcp-server images
on:
workflow_dispatch:
push:
paths:
- 'projects/mcp_server/**'
tags:
- 'v*'
jobs:
build-fastgpt-mcp_server-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 }}-mcp-server-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-mcp_server-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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build for ${{ matrix.arch }}
id: build
uses: docker/build-push-action@v6
with:
context: .
file: projects/mcp_server/Dockerfile
platforms: linux/${{ matrix.arch }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=fastgpt-mcp_server image
outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/fastgpt-mcp_server,${{ secrets.ALI_IMAGE_NAME }}/fastgpt-mcp_server,${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-mcp_server",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-mcp_server-${{ github.sha }}-${{ matrix.arch }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
release-fastgpt-mcp_server-images:
permissions:
packages: write
contents: read
attestations: write
id-token: write
needs: build-fastgpt-mcp_server-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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-fastgpt-mcp_server-${{ github.sha }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set image name and tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-mcp_server:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-mcp_server:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-mcp_server:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-mcp_server:latest" >> $GITHUB_ENV
fi
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
run: |
TAGS="$(echo -e "${Git_Tag}\n${Git_Latest}\n${Ali_Tag}\n${Ali_Latest}\n${Docker_Hub_Tag}\n${Docker_Hub_Latest}")"
for TAG in $TAGS; do
docker buildx imagetools create -t $TAG \
$(printf 'ghcr.io/${{ github.repository_owner }}/fastgpt-mcp_server@sha256:%s ' *)
sleep 5
done

View File

@ -8,50 +8,120 @@ on:
- 'v*' - 'v*'
jobs: jobs:
build-fastgpt-sandbox-images: build-fastgpt-sandbox-images:
runs-on: ubuntu-20.04 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: steps:
# install env # install env
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y nodejs npm
- name: Set up QEMU (optional)
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
with: with:
driver-opts: network=host driver-opts: network=host
- name: Cache Docker layers - name: Cache Docker layers
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: /tmp/.buildx-cache path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }} key: ${{ runner.os }}-sandbox-buildx-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ runner.os }}-sandbox-buildx-
# login docker # login docker
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Ali Hub - name: Login to Ali Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: registry.cn-hangzhou.aliyuncs.com registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }} username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }} password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_HUB_NAME }} username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Set tag - name: Build for ${{ matrix.arch }}
id: build
uses: docker/build-push-action@v6
with:
context: .
file: projects/sandbox/Dockerfile
platforms: linux/${{ matrix.arch }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=fastgpt-sandbox image
outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/fastgpt-sandbox,${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sandbox,${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox",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-sandbox-${{ github.sha }}-${{ matrix.arch }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
release-fastgpt-sandbox-images:
permissions:
packages: write
contents: read
attestations: write
id-token: write
needs: build-fastgpt-sandbox-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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-fastgpt-sandbox-${{ github.sha }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set image name and tag - name: Set image name and tag
run: | run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then if [[ "${{ github.ref_name }}" == "main" ]]; then
@ -70,27 +140,12 @@ jobs:
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sandbox:latest" >> $GITHUB_ENV
fi fi
- name: Build and publish image for main branch or tag push event - name: Create manifest list and push
env: working-directory: ${{ runner.temp }}/digests
Git_Tag: ${{ env.Git_Tag }}
Git_Latest: ${{ env.Git_Latest }}
Ali_Tag: ${{ env.Ali_Tag }}
Ali_Latest: ${{ env.Ali_Latest }}
Docker_Hub_Tag: ${{ env.Docker_Hub_Tag }}
Docker_Hub_Latest: ${{ env.Docker_Hub_Latest }}
run: | run: |
docker buildx build \ TAGS="$(echo -e "${Git_Tag}\n${Git_Latest}\n${Ali_Tag}\n${Ali_Latest}\n${Docker_Hub_Tag}\n${Docker_Hub_Latest}")"
-f projects/sandbox/Dockerfile \ for TAG in $TAGS; do
--platform linux/amd64,linux/arm64 \ docker buildx imagetools create -t $TAG \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/fastgpt-sandbox" \ $(printf 'ghcr.io/${{ github.repository_owner }}/fastgpt-sandbox@sha256:%s ' *)
--label "org.opencontainers.image.description=fastgpt-sandbox image" \ sleep 5
--push \ done
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t ${Git_Tag} \
-t ${Git_Latest} \
-t ${Ali_Tag} \
-t ${Ali_Latest} \
-t ${Docker_Hub_Tag} \
-t ${Docker_Hub_Latest} \
.

1
.gitignore vendored
View File

@ -44,3 +44,4 @@ files/helm/fastgpt/fastgpt-0.1.0.tgz
files/helm/fastgpt/charts/*.tgz files/helm/fastgpt/charts/*.tgz
tmp/ tmp/
coverage

View File

@ -5,4 +5,6 @@ node_modules
docSite/ docSite/
*.md *.md
cl100l_base.ts pnpm-lock.yaml
cl100l_base.ts
dict.json

View File

@ -16,16 +16,6 @@ usageMatchRegex:
# the `{key}` will be placed by a proper keypath matching regex, # the `{key}` will be placed by a proper keypath matching regex,
# you can ignore it and use your own matching rules as well # you can ignore it and use your own matching rules as well
- "[^\\w\\d]t\\(['\"`]({key})['\"`]" - "[^\\w\\d]t\\(['\"`]({key})['\"`]"
- "[^\\w\\d]commonT\\(['\"`]({key})['\"`]"
# 支持 appT("your.i18n.keys")
- "[^\\w\\d]appT\\(['\"`]({key})['\"`]"
# 支持 datasetT("your.i18n.keys")
- "[^\\w\\d]datasetT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]fileT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]publishT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]workflowT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]userT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]chatT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]i18nT\\(['\"`]({key})['\"`]" - "[^\\w\\d]i18nT\\(['\"`]({key})['\"`]"
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys # A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys

39
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,39 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "pnpm run dev",
"cwd": "${workspaceFolder}/projects/app"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug client-side (Edge)",
"type": "msedge",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "pnpm run dev",
"cwd": "${workspaceFolder}/projects/app",
"skipFiles": ["<node_internals>/**"],
"serverReadyAction": {
"action": "debugWithEdge",
"killOnServerStop": true,
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"webRoot": "${workspaceFolder}/projects/app"
}
}
]
}

View File

@ -52,71 +52,17 @@
"description": "FastGPT usecontext template" "description": "FastGPT usecontext template"
}, },
"Jest test template": { "Vitest test case template": {
"scope": "typescriptreact", "scope": "typescript",
"prefix": "jesttest", "prefix": "template_test",
"body": [ "body": [
"import '@/pages/api/__mocks__/base';", "import { describe, it, expect } from 'vitest';",
"import { root } from '@/pages/api/__mocks__/db/init';",
"import { getTestRequest } from '@fastgpt/service/test/utils'; ;",
"import { AppErrEnum } from '@fastgpt/global/common/error/code/app';",
"import handler from './demo';",
"", "",
"// Import the schema", "describe('authType2UsageSource', () => {",
"import { MongoOutLink } from '@fastgpt/service/support/outLink/schema';", " it('Test description', () => {",
"", " expect().toBe();",
"beforeAll(async () => {", " });",
" // await MongoOutLink.create({",
" // shareId: 'aaa',",
" // appId: root.appId,",
" // tmbId: root.tmbId,",
" // teamId: root.teamId,",
" // type: 'share',",
" // name: 'aaa'",
" // })",
"});",
"",
"test('Should return a list of outLink', async () => {",
" // Mock request",
" const res = (await handler(",
" ...getTestRequest({",
" query: {",
" appId: root.appId,",
" type: 'share'",
" },",
" user: root",
" })",
" )) as any;",
"",
" expect(res.code).toBe(200);",
" expect(res.data.length).toBe(2);",
"});",
"",
"test('appId is required', async () => {",
" const res = (await handler(",
" ...getTestRequest({",
" query: {",
" type: 'share'",
" },",
" user: root",
" })",
" )) as any;",
" expect(res.code).toBe(500);",
" expect(res.error).toBe(AppErrEnum.unExist);",
"});",
"",
"test('if type is not provided, return nothing', async () => {",
" const res = (await handler(",
" ...getTestRequest({",
" query: {",
" appId: root.appId",
" },",
" user: root",
" })",
" )) as any;",
" expect(res.code).toBe(200);",
" expect(res.data.length).toBe(0);",
"});" "});"
] ]
} }
} }

View File

@ -21,13 +21,11 @@
"i18n-ally.namespace": true, "i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json", "i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key", "i18n-ally.extract.targetPickingStrategy": "most-similar-by-key",
"i18n-ally.translate.engines": ["google"], "i18n-ally.translate.engines": ["deepl","google"],
"[typescript]": { "[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"markdown.copyFiles.destination": { "markdown.copyFiles.destination": {
"/docSite/content/**/*": "${documentWorkspaceFolder}/docSite/assets/imgs/" "/docSite/content/**/*": "${documentWorkspaceFolder}/docSite/assets/imgs/"
}, }
"markdown.copyFiles.overwriteBehavior": "nameIncrementally",
"markdown.copyFiles.transformPath": "const filename = uri.path.split('/').pop(); return `/imgs/${filename}`;"
} }

View File

@ -17,7 +17,7 @@ dev:
build: build:
ifeq ($(proxy), taobao) ifeq ($(proxy), taobao)
docker build -f $(filePath) -t $(image) . --build-arg proxy=taobao docker build -f $(filePath) -t $(image) . --build-arg proxy=taobao
else ifeq ($(proxy), clash) 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 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 else

View File

@ -10,7 +10,7 @@
<a href="./README_ja.md">日语</a> <a href="./README_ja.md">日语</a>
</p> </p>
FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景! FastGPT 是一个 AI Agent 构建平台,提供开箱即用的数据处理、模型调用等能力,同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的应用场景!
</div> </div>
@ -114,16 +114,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right"> <img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
</a> </a>
## 🏘️ 社区交流群
扫码加入飞书话题群:
![](https://oss.laf.run/otnvvf-imgs/fastgpt-feishu1.png)
<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 的发展。你可以通过 [FastGPT 2025 招聘](https://fael3z0zfze.feishu.cn/wiki/P7FOwEmPziVcaYkvVaacnVX1nvg)了解 FastGPT 的招聘信息。
@ -133,17 +123,26 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
- [Laf3 分钟快速接入三方应用](https://github.com/labring/laf) - [Laf3 分钟快速接入三方应用](https://github.com/labring/laf)
- [Sealos快速部署集群应用](https://github.com/labring/sealos) - [Sealos快速部署集群应用](https://github.com/labring/sealos)
- [One API多模型管理支持 Azure、文心一言等](https://github.com/songquanpeng/one-api) - [One API多模型管理支持 Azure、文心一言等](https://github.com/songquanpeng/one-api)
- [TuShan5 分钟搭建后台管理系统](https://github.com/msgbyte/tushan)
<a href="#readme"> <a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right"> <img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
</a> </a>
## 🌿 第三方生态 ## 🌿 第三方生态
- [PPIO 派欧云:一键调用高性价比的开源模型 API 和 GPU 容器](https://ppinfra.com/user/register?invited_by=VITYVU&utm_source=github_fastgpt)
- [COW 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/) - [AI Proxy国内模型聚合服务](https://sealos.run/aiproxy/?k=fastgpt-github/)
- [SiliconCloud (硅基流动) —— 开源模型在线体验平台](https://cloud.siliconflow.cn/i/TR9Ym0c4) - [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">
</a>
## 🏘️ 社区交流群
扫码加入飞书话题群:
![](https://oss.laf.run/otnvvf-imgs/fastgpt-feishu1.png)
<a href="#readme"> <a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right"> <img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">

View File

@ -69,7 +69,7 @@ Project tech stack: NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector plu
> When using [Sealos](https://sealos.io) services, there is no need to purchase servers or domain names. It supports high concurrency and dynamic scaling, and the database application uses the kubeblocks database, which far exceeds the simple Docker container deployment in terms of IO performance. > When using [Sealos](https://sealos.io) services, there is no need to purchase servers or domain names. It supports high concurrency and dynamic scaling, and the database application uses the kubeblocks database, which far exceeds the simple Docker container deployment in terms of IO performance.
<div align="center"> <div align="center">
[![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt) [![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt&uid=fnWRt09fZP)
</div> </div>
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. 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.

View File

@ -94,7 +94,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
- **⚡ デプロイ** - **⚡ デプロイ**
[![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt) [![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt&uid=fnWRt09fZP)
デプロイ 後、データベースをセットアップするので、24分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。 デプロイ 後、データベースをセットアップするので、24分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。

View File

@ -100,7 +100,7 @@ services:
exec docker-entrypoint.sh "$$@" & exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动 # 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')" > /dev/null 2>&1; do until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..." echo "Waiting for MongoDB to start..."
sleep 2 sleep 2
done done
@ -110,19 +110,48 @@ services:
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程 # 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$! 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 # fastgpt
sandbox: sandbox:
container_name: sandbox container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.8.23-fix # git image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.23-fix # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云
networks: networks:
- fastgpt - fastgpt
restart: always restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.23-fix # git image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.23-fix # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:
@ -137,10 +166,13 @@ services:
- FE_DOMAIN= - FE_DOMAIN=
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。 # root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234 - DEFAULT_ROOT_PSW=1234
# AI模型的API地址哦。务必加 /v1。这里默认填写了OneApi的访问地址。 # AI Proxy 的地址,如果配了该地址,优先使用
- OPENAI_BASE_URL=http://oneapi:3000/v1 - AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI模型的API Key。这里默认填写了OneAPI的快速默认key测试通后务必及时修改 # AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- CHAT_API_KEY=sk-fastgpt - AIPROXY_API_TOKEN=aiproxy
# 模型中转地址(如果用了 AI Proxy下面 2 个就不需要了,旧版 OneAPI 用户,使用下面的变量)
# - OPENAI_BASE_URL=http://oneapi:3000/v1
# - CHAT_API_KEY=sk-fastgpt
# 数据库最大连接数 # 数据库最大连接数
- DB_MAX_LINK=30 - DB_MAX_LINK=30
# 登录凭证密钥 # 登录凭证密钥
@ -154,6 +186,8 @@ services:
# zilliz 连接参数 # zilliz 连接参数
- MILVUS_ADDRESS=http://milvusStandalone:19530 - MILVUS_ADDRESS=http://milvusStandalone:19530
- MILVUS_TOKEN=none - MILVUS_TOKEN=none
# Redis 地址
- REDIS_URL=redis://default:mypassword@redis:6379
# sandbox 地址 # sandbox 地址
- SANDBOX_URL=http://sandbox:3000 - SANDBOX_URL=http://sandbox:3000
# 日志等级: debug, info, warn, error # 日志等级: debug, info, warn, error
@ -167,51 +201,58 @@ services:
- ALLOWED_ORIGINS= - ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启 # 是否开启IP限制默认不开启
- USE_IP_LIMIT=false - USE_IP_LIMIT=false
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
volumes: volumes:
- ./config.json:/app/data/config.json - ./config.json:/app/data/config.json
# oneapi # AI Proxy
mysql: aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mysql:8.0.36 # 阿里云 image: ghcr.io/labring/aiproxy:v0.1.7
# image: mysql:8.0.36 # image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
container_name: mysql container_name: aiproxy
restart: always restart: unless-stopped
ports:
- 3306:3306
networks:
- fastgpt
command: --default-authentication-plugin=mysql_native_password
environment:
# 默认root密码仅首次运行有效
MYSQL_ROOT_PASSWORD: oneapimmysql
MYSQL_DATABASE: oneapi
volumes:
- ./mysql:/var/lib/mysql
oneapi:
container_name: oneapi
image: ghcr.io/songquanpeng/one-api:v0.6.7
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/one-api:v0.6.6 # 阿里云
ports:
- 3001:3000
depends_on: depends_on:
- mysql aiproxy_pg:
condition: service_healthy
networks: networks:
- fastgpt - fastgpt
restart: always
environment: environment:
# mysql 连接参数 # 对应 fastgpt 里的AIPROXY_API_TOKEN
- SQL_DSN=root:oneapimmysql@tcp(mysql:3306)/oneapi - ADMIN_KEY=aiproxy
# 登录凭证加密密钥 # 错误日志详情保存时间(小时)
- SESSION_SECRET=oneapikey - LOG_DETAIL_STORAGE_HOURS=1
# 内存缓存 # 数据库连接地址
- MEMORY_CACHE_ENABLED=true - SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 启动聚合更新,减少数据交互频率 # 最大重试次数
- BATCH_UPDATE_ENABLED=true - RETRY_TIMES=3
# 聚合更新时长 # 不需要计费
- BATCH_UPDATE_INTERVAL=10 - BILLING_ENABLED=false
# 初始化的 root 密钥(建议部署完后更改,否则容易泄露) # 不需要严格检测模型
- INITIAL_ROOT_TOKEN=fastgpt - 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
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes: volumes:
- ./oneapi:/data - ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
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: networks:
fastgpt: fastgpt:

View File

@ -0,0 +1,234 @@
# 数据库的默认账号和密码仅首次运行时设置有效
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
# 如何无法访问 dockerhub 和 git可以用阿里云阿里云没有arm包
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 # 镜像
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
- ./init.sql:/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: mongo:5.0.18 # dockerhub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
# image: mongo:4.4.29 # cpu不支持AVX时候使用
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
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
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-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云
ports:
- 3000:3000
networks:
- fastgpt
depends_on:
mongo:
condition: service_started
ob:
condition: service_healthy
sandbox:
condition: service_started
restart: always
environment:
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn不能填 localhost。这个值可以不填不填则发给模型的图片会是一个相对路径而不是全路径模型可能伪造Host。
- 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
# 登录凭证密钥
- TOKEN_KEY=any
# root的密钥常用于升级时候的初始化请求
- 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
# sandbox 地址
- SANDBOX_URL=http://sandbox:3000
# 日志等级: debug, info, warn, error
- LOG_LEVEL=info
- STORE_LOG_LEVEL=warn
# 工作流最大运行次数
- WORKFLOW_MAX_RUN_TIMES=1000
# 批量执行节点,最大输入长度
- WORKFLOW_MAX_LOOP_TIMES=100
# 自定义跨域,不配置时,默认都允许跨域(多个域名通过逗号分割)
- ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启
- USE_IP_LIMIT=false
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
volumes:
- ./config.json:/app/data/config.json
# AI Proxy
aiproxy:
image: ghcr.io/labring/aiproxy:v0.1.7
# image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
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
# 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
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:

View File

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

View File

@ -7,12 +7,12 @@ version: '3.3'
services: services:
# db # db
pg: pg:
image: pgvector/pgvector:0.7.0-pg15 # docker hub image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.7.0 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
container_name: pg container_name: pg
restart: always restart: always
ports: # 生产环境建议不要暴露 # ports: # 生产环境建议不要暴露
- 5432:5432 # - 5432:5432
networks: networks:
- fastgpt - fastgpt
environment: environment:
@ -22,14 +22,19 @@ services:
- POSTGRES_DB=postgres - POSTGRES_DB=postgres
volumes: volumes:
- ./pg/data:/var/lib/postgresql/data - ./pg/data:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
mongo: mongo:
image: mongo:5.0.18 # dockerhub image: mongo:5.0.18 # dockerhub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
# image: mongo:4.4.29 # cpu不支持AVX时候使用 # image: mongo:4.4.29 # cpu不支持AVX时候使用
container_name: mongo container_name: mongo
restart: always restart: always
ports: # ports:
- 27017:27017 # - 27017:27017
networks: networks:
- fastgpt - fastgpt
command: mongod --keyFile /data/mongodb.key --replSet rs0 command: mongod --keyFile /data/mongodb.key --replSet rs0
@ -58,7 +63,7 @@ services:
exec docker-entrypoint.sh "$$@" & exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动 # 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')" > /dev/null 2>&1; do until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..." echo "Waiting for MongoDB to start..."
sleep 2 sleep 2
done done
@ -69,18 +74,48 @@ services:
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程 # 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$! wait $$!
# fastgpt redis:
sandbox: image: redis:7.2-alpine
container_name: sandbox container_name: redis
image: ghcr.io/labring/fastgpt-sandbox:v4.8.23-fix # git # ports:
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.23-fix # 阿里云 # - 6379:6379
networks: networks:
- fastgpt - fastgpt
restart: always 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
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.23-fix # git image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.23-fix # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:
@ -95,10 +130,10 @@ services:
- FE_DOMAIN= - FE_DOMAIN=
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。 # root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234 - DEFAULT_ROOT_PSW=1234
# AI模型的API地址哦。务必加 /v1。这里默认填写了OneApi的访问地址。 # AI Proxy 的地址,如果配了该地址,优先使用
- OPENAI_BASE_URL=http://oneapi:3000/v1 - AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI模型的API Key。这里默认填写了OneAPI的快速默认key测试通后务必及时修改 # AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- CHAT_API_KEY=sk-fastgpt - AIPROXY_API_TOKEN=aiproxy
# 数据库最大连接数 # 数据库最大连接数
- DB_MAX_LINK=30 - DB_MAX_LINK=30
# 登录凭证密钥 # 登录凭证密钥
@ -111,6 +146,8 @@ services:
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin - MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
# pg 连接参数 # pg 连接参数
- PG_URL=postgresql://username:password@pg:5432/postgres - PG_URL=postgresql://username:password@pg:5432/postgres
# Redis 连接参数
- REDIS_URL=redis://default:mypassword@redis:6379
# sandbox 地址 # sandbox 地址
- SANDBOX_URL=http://sandbox:3000 - SANDBOX_URL=http://sandbox:3000
# 日志等级: debug, info, warn, error # 日志等级: debug, info, warn, error
@ -124,51 +161,58 @@ services:
- ALLOWED_ORIGINS= - ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启 # 是否开启IP限制默认不开启
- USE_IP_LIMIT=false - USE_IP_LIMIT=false
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
volumes: volumes:
- ./config.json:/app/data/config.json - ./config.json:/app/data/config.json
# oneapi # AI Proxy
mysql: aiproxy:
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mysql:8.0.36 # 阿里云 image: ghcr.io/labring/aiproxy:v0.1.7
image: mysql:8.0.36 # image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
container_name: mysql container_name: aiproxy
restart: always restart: unless-stopped
ports:
- 3306:3306
networks:
- fastgpt
command: --default-authentication-plugin=mysql_native_password
environment:
# 默认root密码仅首次运行有效
MYSQL_ROOT_PASSWORD: oneapimmysql
MYSQL_DATABASE: oneapi
volumes:
- ./mysql:/var/lib/mysql
oneapi:
container_name: oneapi
image: ghcr.io/songquanpeng/one-api:v0.6.7
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/one-api:v0.6.6 # 阿里云
ports:
- 3001:3000
depends_on: depends_on:
- mysql aiproxy_pg:
condition: service_healthy
networks: networks:
- fastgpt - fastgpt
restart: always
environment: environment:
# mysql 连接参数 # 对应 fastgpt 里的AIPROXY_API_TOKEN
- SQL_DSN=root:oneapimmysql@tcp(mysql:3306)/oneapi - ADMIN_KEY=aiproxy
# 登录凭证加密密钥 # 错误日志详情保存时间(小时)
- SESSION_SECRET=oneapikey - LOG_DETAIL_STORAGE_HOURS=1
# 内存缓存 # 数据库连接地址
- MEMORY_CACHE_ENABLED=true - SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 启动聚合更新,减少数据交互频率 # 最大重试次数
- BATCH_UPDATE_ENABLED=true - RETRY_TIMES=3
# 聚合更新时长 # 不需要计费
- BATCH_UPDATE_INTERVAL=10 - BILLING_ENABLED=false
# 初始化的 root 密钥(建议部署完后更改,否则容易泄露) # 不需要严格检测模型
- INITIAL_ROOT_TOKEN=fastgpt - 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
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes: volumes:
- ./oneapi:/data - ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
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: networks:
fastgpt: fastgpt:

View File

@ -41,7 +41,7 @@ services:
exec docker-entrypoint.sh "$$@" & exec docker-entrypoint.sh "$$@" &
# 等待MongoDB服务启动 # 等待MongoDB服务启动
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')" > /dev/null 2>&1; do until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
echo "Waiting for MongoDB to start..." echo "Waiting for MongoDB to start..."
sleep 2 sleep 2
done done
@ -51,17 +51,47 @@ services:
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程 # 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
wait $$! wait $$!
sandbox: redis:
container_name: sandbox image: redis:7.2-alpine
image: ghcr.io/labring/fastgpt-sandbox:v4.8.23-fix # git container_name: redis
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.23-fix # 阿里云 # ports:
# - 6379:6379
networks: networks:
- fastgpt - fastgpt
restart: always 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
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云
networks:
- fastgpt
restart: always
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云
ports:
- 3005:3000
networks:
- fastgpt
restart: always
environment:
- FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.23-fix # git image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.23-fix # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:
@ -75,10 +105,13 @@ services:
- FE_DOMAIN= - FE_DOMAIN=
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。 # root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
- DEFAULT_ROOT_PSW=1234 - DEFAULT_ROOT_PSW=1234
# AI模型的API地址哦。务必加 /v1。这里默认填写了OneApi的访问地址。 # AI Proxy 的地址,如果配了该地址,优先使用
- OPENAI_BASE_URL=http://oneapi:3000/v1 - AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI模型的API Key。这里默认填写了OneAPI的快速默认key测试通后务必及时修改 # AI Proxy 的 Admin Token与 AI Proxy 中的环境变量 ADMIN_KEY
- CHAT_API_KEY=sk-fastgpt - AIPROXY_API_TOKEN=aiproxy
# 模型中转地址(如果用了 AI Proxy下面 2 个就不需要了,旧版 OneAPI 用户,使用下面的变量)
# - OPENAI_BASE_URL=http://oneapi:3000/v1
# - CHAT_API_KEY=sk-fastgpt
# 数据库最大连接数 # 数据库最大连接数
- DB_MAX_LINK=30 - DB_MAX_LINK=30
# 登录凭证密钥 # 登录凭证密钥
@ -89,6 +122,8 @@ services:
- FILE_TOKEN_KEY=filetoken - FILE_TOKEN_KEY=filetoken
# MongoDB 连接参数. 用户名myusername,密码mypassword。 # MongoDB 连接参数. 用户名myusername,密码mypassword。
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin - MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
# Redis 连接参数
- REDIS_URI=redis://default:mypassword@redis:6379
# zilliz 连接参数 # zilliz 连接参数
- MILVUS_ADDRESS=zilliz_cloud_address - MILVUS_ADDRESS=zilliz_cloud_address
- MILVUS_TOKEN=zilliz_cloud_token - MILVUS_TOKEN=zilliz_cloud_token
@ -105,51 +140,58 @@ services:
- ALLOWED_ORIGINS= - ALLOWED_ORIGINS=
# 是否开启IP限制默认不开启 # 是否开启IP限制默认不开启
- USE_IP_LIMIT=false - USE_IP_LIMIT=false
# 对话文件过期天数
- CHAT_FILE_EXPIRE_TIME=7
volumes: volumes:
- ./config.json:/app/data/config.json - ./config.json:/app/data/config.json
# oneapi # AI Proxy
mysql: aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mysql:8.0.36 # 阿里云 image: ghcr.io/labring/aiproxy:v0.1.7
# image: mysql:8.0.36 # image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.7 # 阿里云
container_name: mysql container_name: aiproxy
restart: always restart: unless-stopped
ports:
- 3306:3306
networks:
- fastgpt
command: --default-authentication-plugin=mysql_native_password
environment:
# 默认root密码仅首次运行有效
MYSQL_ROOT_PASSWORD: oneapimmysql
MYSQL_DATABASE: oneapi
volumes:
- ./mysql:/var/lib/mysql
oneapi:
container_name: oneapi
image: ghcr.io/songquanpeng/one-api:v0.6.7
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/one-api:v0.6.6 # 阿里云
ports:
- 3001:3000
depends_on: depends_on:
- mysql aiproxy_pg:
condition: service_healthy
networks: networks:
- fastgpt - fastgpt
restart: always
environment: environment:
# mysql 连接参数 # 对应 fastgpt 里的AIPROXY_API_TOKEN
- SQL_DSN=root:oneapimmysql@tcp(mysql:3306)/oneapi - ADMIN_KEY=aiproxy
# 登录凭证加密密钥 # 错误日志详情保存时间(小时)
- SESSION_SECRET=oneapikey - LOG_DETAIL_STORAGE_HOURS=1
# 内存缓存 # 数据库连接地址
- MEMORY_CACHE_ENABLED=true - SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 启动聚合更新,减少数据交互频率 # 最大重试次数
- BATCH_UPDATE_ENABLED=true - RETRY_TIMES=3
# 聚合更新时长 # 不需要计费
- BATCH_UPDATE_INTERVAL=10 - BILLING_ENABLED=false
# 初始化的 root 密钥(建议部署完后更改,否则容易泄露) # 不需要严格检测模型
- INITIAL_ROOT_TOKEN=fastgpt - 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
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes: volumes:
- ./oneapi:/data - ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
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: networks:
fastgpt: fastgpt:

View File

@ -6,7 +6,8 @@ data:
"openapiPrefix": "fastgpt", "openapiPrefix": "fastgpt",
"vectorMaxProcess": 15, "vectorMaxProcess": 15,
"qaMaxProcess": 15, "qaMaxProcess": 15,
"pgHNSWEfSearch": 100 "vlmMaxProcess": 15,
"hnswEfSearch": 100
}, },
"llmModels": [ "llmModels": [
{ {

232
dev.md
View File

@ -1,114 +1,118 @@
## Premise ## Premise
Since FastGPT is managed in the same way as monorepo, it is recommended to install make first during development. Since FastGPT is managed in the same way as monorepo, it is recommended to install make first during development.
monorepo Project Name: monorepo Project Name:
- app: main project - app: main project
-...... -......
## Dev ## Dev
```sh ```sh
# Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content) # Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content)
chmod -R +x ./scripts/ chmod -R +x ./scripts/
# Executing under the code root directory installs all dependencies within the root package, projects, and packages # Executing under the code root directory installs all dependencies within the root package, projects, and packages
pnpm i pnpm i
# Not make cmd # Not make cmd
cd projects/app cd projects/app
pnpm dev pnpm dev
# Make cmd # Make cmd
make dev name=app 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` Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` parameter to Node when running `pnpm i`
```sh ```sh
NODE_OPTIONS=--no-node-snapshot pnpm i NODE_OPTIONS=--no-node-snapshot pnpm i
``` ```
### Jest ### Jest
https://fael3z0zfze.feishu.cn/docx/ZOI1dABpxoGhS7xzhkXcKPxZnDL https://fael3z0zfze.feishu.cn/docx/ZOI1dABpxoGhS7xzhkXcKPxZnDL
## I18N ## I18N
### Install i18n-ally Plugin ### Install i18n-ally Plugin
1. Open the Extensions Marketplace in VSCode, search for and install the `i18n Ally` plugin. 1. Open the Extensions Marketplace in VSCode, search for and install the `i18n Ally` plugin.
### Code Optimization Examples ### Code Optimization Examples
#### Fetch Specific Namespace Translations in `getServerSideProps` #### Fetch Specific Namespace Translations in `getServerSideProps`
```typescript ```typescript
// pages/yourPage.tsx // pages/yourPage.tsx
export async function getServerSideProps(context: any) { export async function getServerSideProps(context: any) {
return { return {
props: { props: {
currentTab: context?.query?.currentTab || TabEnum.info, currentTab: context?.query?.currentTab || TabEnum.info,
...(await serverSideTranslations(context.locale, ['publish', 'user'])) ...(await serverSideTranslations(context.locale, ['publish', 'user']))
} }
}; };
} }
``` ```
#### Use useTranslation Hook in Page #### Use useTranslation Hook in Page
```typescript ```typescript
// pages/yourPage.tsx // pages/yourPage.tsx
import { useTranslation } from 'next-i18next'; import { useTranslation } from 'next-i18next';
const YourComponent = () => { const YourComponent = () => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Button <Button
variant="outline" variant="outline"
size="sm" size="sm"
mr={2} mr={2}
onClick={() => setShowSelected(false)} onClick={() => setShowSelected(false)}
> >
{t('common:close')} {t('common:close')}
</Button> </Button>
); );
}; };
export default YourComponent; export default YourComponent;
``` ```
#### Handle Static File Translations #### Handle Static File Translations
```typescript ```typescript
// utils/i18n.ts // utils/i18n.ts
import { i18nT } from '@fastgpt/web/i18n/utils'; import { i18nT } from '@fastgpt/web/i18n/utils';
const staticContent = { const staticContent = {
id: 'simpleChat', id: 'simpleChat',
avatar: 'core/workflow/template/aiChat', avatar: 'core/workflow/template/aiChat',
name: i18nT('app:template.simple_robot'), name: i18nT('app:template.simple_robot'),
}; };
export default staticContent; export default staticContent;
``` ```
### Standardize Translation Format ### Standardize Translation Format
- Use the t(namespace:key) format to ensure consistent naming. - Use the t(namespace:key) format to ensure consistent naming.
- Translation keys should use lowercase letters and underscores, e.g., common.close. - Translation keys should use lowercase letters and underscores, e.g., common.close.
## Build ## audit
```sh Please fill the OperationLogEventEnum and operationLog/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
# 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 ## Build
# Make cmd: Build image, not proxy
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 ```sh
# Docker cmd: Build image, not proxy
# 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
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, not proxy
# Make cmd: Build image with proxy make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 proxy=taobao
``` # 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

@ -9,4 +9,6 @@ FROM fholzer/nginx-brotli:latest
LABEL org.opencontainers.image.source https://github.com/labring/FastGPT LABEL org.opencontainers.image.source https://github.com/labring/FastGPT
COPY --from=builder /app/hugo/public /usr/share/nginx/html COPY --from=builder /app/hugo/public /usr/share/nginx/html
COPY ./docSite/nginx.conf /etc/nginx/conf.d/default.conf

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 KiB

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 KiB

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

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