From 8ff0e8bd34f209df017ebcc7126705d1040b7828 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Mon, 14 Jul 2025 10:13:21 +0800 Subject: [PATCH] update project domain (#5208) --- .github/ISSUE_TEMPLATE/bugs.md | 2 +- README.md | 28 ++++++++-------- README_en.md | 26 +++++++-------- README_ja.md | 20 ++++++------ .../zh-cn/docs/agreement/open-source.md | 2 +- .../content/zh-cn/docs/development/intro.md | 4 +-- .../docs/development/modelConfig/ppio.md | 2 +- .../zh-cn/docs/development/openapi/dataset.md | 4 +-- .../zh-cn/docs/development/openapi/share.md | 8 ++--- .../content/zh-cn/docs/development/sealos.md | 4 +-- .../docs/guide/dashboard/workflow/http.md | 4 +-- .../docs/guide/knowledge_base/websync.md | 2 +- docSite/content/zh-cn/docs/intro.md | 2 +- docSite/static/llms-full.txt | 32 +++++++++---------- packages/web/i18n/en/common.json | 2 +- packages/web/i18n/zh-Hant/common.json | 2 +- plugins/model/rerank-bge/README.md | 2 +- projects/app/public/docs/chatProblem.md | 6 ++-- .../src/components/support/apikey/Table.tsx | 2 +- .../app/src/service/common/system/index.ts | 4 +-- .../global/common/string/textSplitter.test.ts | 8 ++--- 21 files changed, 83 insertions(+), 83 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bugs.md b/.github/ISSUE_TEMPLATE/bugs.md index 943942036..accf6c19e 100644 --- a/.github/ISSUE_TEMPLATE/bugs.md +++ b/.github/ISSUE_TEMPLATE/bugs.md @@ -11,7 +11,7 @@ assignees: '' [//]: # '方框内填 x 表示打钩' - [ ] 我已确认目前没有类似 issue -- [ ] 我已完整查看过项目 README,以及[项目文档](https://doc.tryfastgpt.ai/docs/intro/) +- [ ] 我已完整查看过项目 README,以及[项目文档](https://doc.fastgpt.io/docs/intro/) - [ ] 我使用了自己的 key,并确认我的 key 是可正常使用的 - [ ] 我理解并愿意跟进此 issue,协助测试和提供反馈 - [x] 我理解并认可上述内容,并理解项目维护者精力有限,**不遵循规则的 issue 可能会被无视或直接关闭** diff --git a/README.md b/README.md index 0f20cbc36..41624aa76 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-fastgpt logo +fastgpt logo # FastGPT @@ -15,13 +15,13 @@ FastGPT 是一个 AI Agent 构建平台,提供开箱即用的数据处理、

- + cloud - + document - + development @@ -100,15 +100,15 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b > 使用 [Sealos](https://sealos.io) 服务,无需采购服务器、无需域名,支持高并发 & 动态伸缩,并且数据库应用采用 kubeblocks 的数据库,在 IO 性能方面,远超于简单的 Docker 容器部署。 - [点击查看 Sealos 一键部署 FastGPT 教程](https://doc.tryfastgpt.ai/docs/development/sealos/) + [点击查看 Sealos 一键部署 FastGPT 教程](https://doc.fastgpt.io/docs/development/sealos/) -* [快速开始本地开发](https://doc.tryfastgpt.ai/docs/development/intro/) -* [部署 FastGPT](https://doc.tryfastgpt.ai/docs/development/sealos/) -* [系统配置文件说明](https://doc.tryfastgpt.ai/docs/development/configuration/) -* [多模型配置方案](https://doc.tryfastgpt.ai/docs/development/modelconfig/one-api/) -* [版本更新/升级介绍](https://doc.tryfastgpt.ai/docs/development/upgrading/) -* [OpenAPI API 文档](https://doc.tryfastgpt.ai/docs/development/openapi/) -* [知识库结构详解](https://doc.tryfastgpt.ai/docs/guide/knowledge_base/rag/) +* [快速开始本地开发](https://doc.fastgpt.io/docs/development/intro/) +* [部署 FastGPT](https://doc.fastgpt.io/docs/development/sealos/) +* [系统配置文件说明](https://doc.fastgpt.io/docs/development/configuration/) +* [多模型配置方案](https://doc.fastgpt.io/docs/development/modelconfig/one-api/) +* [版本更新/升级介绍](https://doc.fastgpt.io/docs/development/upgrading/) +* [OpenAPI API 文档](https://doc.fastgpt.io/docs/development/openapi/) +* [知识库结构详解](https://doc.fastgpt.io/docs/guide/knowledge_base/rag/) # @@ -133,7 +133,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b - [PPIO 派欧云:一键调用高性价比的开源模型 API 和 GPU 容器](https://ppinfra.com/user/register?invited_by=VITYVU&utm_source=github_fastgpt) - [AI Proxy:国内模型聚合服务](https://sealos.run/aiproxy/?k=fastgpt-github/) - [SiliconCloud (硅基流动) —— 开源模型在线体验平台](https://cloud.siliconflow.cn/i/TR9Ym0c4) -- [COW 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/) +- [COW 个人微信/企微机器人](https://doc.fastgpt.io/docs/use-cases/external-integration/onwechat/) # @@ -216,4 +216,4 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b 1. 允许作为后台服务直接商用,但不允许提供 SaaS 服务。 2. 未经商业授权,任何形式的商用服务均需保留相关版权信息。 3. 完整请查看 [FastGPT Open Source License](./LICENSE) -4. 联系方式:Dennis@sealos.io,[点击查看商业版定价策略](https://doc.tryfastgpt.ai/docs/shopping_cart/intro/) +4. 联系方式:Dennis@sealos.io,[点击查看商业版定价策略](https://doc.fastgpt.io/docs/shopping_cart/intro/) diff --git a/README_en.md b/README_en.md index da99863b6..2722fe8c6 100644 --- a/README_en.md +++ b/README_en.md @@ -1,6 +1,6 @@

-fastgpt logo +fastgpt logo # FastGPT @@ -18,9 +18,9 @@ FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive [![GitHub pull request](https://img.shields.io/badge/PRs-welcome-fffff?style=flat-square&labelColor=d4eaf7&color=7d09f1)](https://github.com/labring/FastGPT/pulls) [![GitHub last commit](https://img.shields.io/github/last-commit/labring/FastGPT?style=flat-square&labelColor=d4eaf7&color=7d09f1)](https://github.com/labring/FastGPT/pulls) [![License](https://img.shields.io/badge/License-Apache--2.0-ffffff?style=flat-square&labelColor=d4eaf7&color=7d09f1)](https://github.com/labring/FastGPT/blob/main/LICENSE) -[![Documentation](https://img.shields.io/badge/Documentation-7d09f1?style=flat-square)](https://doc.tryfastgpt.ai/docs/intro) -[![Local Development](https://img.shields.io/badge/Local_Development-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1)](https://doc.tryfastgpt.ai/docs/intro) -[![Explore our platform](https://img.shields.io/badge/Explore_our_platform-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1)](https://tryfastgpt.ai/) +[![Documentation](https://img.shields.io/badge/Documentation-7d09f1?style=flat-square)](https://doc.fastgpt.io/docs/intro) +[![Local Development](https://img.shields.io/badge/Local_Development-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1)](https://doc.fastgpt.io/docs/intro) +[![Explore our platform](https://img.shields.io/badge/Explore_our_platform-d4eaf7?style=flat-square&logo=spoj&logoColor=7d09f1)](https://fastgpt.io/) [![discord](https://theme.zdassets.com/theme_assets/678183/cc59daa07820943e943c2fc283b9079d7003ff76.svg)](https://discord.gg/mp68xkZn2Q)     [![Wechat](https://upload.wikimedia.org/wikipedia/en/thumb/a/af/WeChat_logo.svg/100px-WeChat_logo.svg.png?20231125073656)](https://oss.laf.run/otnvvf-imgs/feishu3.png) @@ -33,7 +33,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b ## 🛸 Online Use -Website: [tryfastgpt.ai](https://tryfastgpt.ai/) +Website: [fastgpt.io](https://fastgpt.io/) | | | | ---------------------------------- | ---------------------------------- | @@ -74,13 +74,13 @@ Project tech stack: NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector plu Give it a 2-4 minute wait after deployment as it sets up the database. Initially, it might be a too slow since we're using the basic settings. - [sealos one click deployment tutorial](https://doc.tryfastgpt.ai/docs/development/sealos/) + [sealos one click deployment tutorial](https://doc.fastgpt.io/docs/development/sealos/) -- [Getting Started with Local Development](https://doc.tryfastgpt.ai/docs/development) -- [Deploying FastGPT](https://doc.tryfastgpt.ai/docs/installation) -- [Guide on System Configs](https://doc.tryfastgpt.ai/docs/installation/reference) -- [Configuring Multiple Models](https://doc.tryfastgpt.ai/docs/installation/reference/models) -- [Version Updates & Upgrades](https://doc.tryfastgpt.ai/docs/installation/upgrading) +- [Getting Started with Local Development](https://doc.fastgpt.io/docs/development) +- [Deploying FastGPT](https://doc.fastgpt.io/docs/installation) +- [Guide on System Configs](https://doc.fastgpt.io/docs/installation/reference) +- [Configuring Multiple Models](https://doc.fastgpt.io/docs/installation/reference/models) +- [Version Updates & Upgrades](https://doc.fastgpt.io/docs/installation/upgrading) # @@ -108,7 +108,7 @@ Project tech stack: NextJs + TS + ChakraUI + MongoDB + PostgreSQL (PG Vector plu ## 🏘️ Community & Support -+ 🌐 Visit the [FastGPT website](https://tryfastgpt.ai/) for full documentation and useful links. ++ 🌐 Visit the [FastGPT website](https://fastgpt.io/) for full documentation and useful links. + 💬 Join our [Discord server](https://discord.gg/mp68xkZn2Q) is to chat with FastGPT developers and other FastGPT users. This is a good place to learn about FastGPT, ask questions, and share your experiences. + 🐞 Create [GitHub Issues](https://github.com/labring/FastGPT/issues/new/choose) for bug reports and feature requests. @@ -185,7 +185,7 @@ This repository complies with the [FastGPT Open Source License](./LICENSE) open 1. Direct commercial use as a backend service is allowed, but provision of SaaS services is not allowed. 2. Without commercial authorization, any form of commercial service must retain relevant copyright information. 3. For full details, please see [FastGPT Open Source License](./LICENSE) -4. Contact: Dennis@sealos.io , [click to view commercial version pricing strategy](https://doc.tryfastgpt.ai/docs/commercial) +4. Contact: Dennis@sealos.io , [click to view commercial version pricing strategy](https://doc.fastgpt.io/docs/commercial) # diff --git a/README_ja.md b/README_ja.md index fcb9239d4..14a72062e 100644 --- a/README_ja.md +++ b/README_ja.md @@ -1,6 +1,6 @@
-fastgpt logo +fastgpt logo # FastGPT @@ -15,13 +15,13 @@ FastGPT は、LLM 上 に 構築 された 知識 ベースの Q&A システム

- + cloud - + document - + development @@ -36,7 +36,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b ## 🛸 クラウドサービスの 利用 -[tryfastgpt.ai](https://tryfastgpt.ai/) +[fastgpt.io](https://fastgpt.io/) | | | | ---------------------------------- | ---------------------------------- | @@ -98,11 +98,11 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b デプロイ 後、データベースをセットアップするので、2~4分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。 -- [ローカル 開発入門](https://doc.tryfastgpt.ai/docs/development) -- [FastGPT のデプロイ](https://doc.tryfastgpt.ai/docs/installation) -- [システム 設定 ガイド](https://doc.tryfastgpt.ai/docs/installation/reference) -- [複数 モデルの 設定](https://doc.tryfastgpt.ai/docs/installation/reference/models) -- [バージョン 更新 とアップグレード](https://doc.tryfastgpt.ai/docs/installation/upgrading) +- [ローカル 開発入門](https://doc.fastgpt.io/docs/development) +- [FastGPT のデプロイ](https://doc.fastgpt.io/docs/installation) +- [システム 設定 ガイド](https://doc.fastgpt.io/docs/installation/reference) +- [複数 モデルの 設定](https://doc.fastgpt.io/docs/installation/reference/models) +- [バージョン 更新 とアップグレード](https://doc.fastgpt.io/docs/installation/upgrading) diff --git a/docSite/content/zh-cn/docs/agreement/open-source.md b/docSite/content/zh-cn/docs/agreement/open-source.md index eaa493ec6..f232efe9f 100644 --- a/docSite/content/zh-cn/docs/agreement/open-source.md +++ b/docSite/content/zh-cn/docs/agreement/open-source.md @@ -11,7 +11,7 @@ FastGPT 项目在 Apache License 2.0 许可下开源,但包含以下附加条 + FastGPT 允许被用于商业化,例如作为其他应用的“后端即服务”使用,或者作为应用开发平台提供给企业。然而,当满足以下条件时,必须联系作者获得商业许可: - + 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 tryfastgpt.ai 的源码来运营与 tryfastgpt.ai 服务类似的多租户 SaaS 服务。 + + 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 fastgpt.io 的源码来运营与 fastgpt.io 服务类似的多租户 SaaS 服务。 + LOGO 及版权信息:在使用 FastGPT 的过程中,不得移除或修改 FastGPT 控制台内的 LOGO 或版权信息。 请通过电子邮件 yujinlong@sealos.io 联系我们咨询许可事宜。 diff --git a/docSite/content/zh-cn/docs/development/intro.md b/docSite/content/zh-cn/docs/development/intro.md index 1050f3d76..22bbe09fd 100644 --- a/docSite/content/zh-cn/docs/development/intro.md +++ b/docSite/content/zh-cn/docs/development/intro.md @@ -7,11 +7,11 @@ toc: true weight: 705 --- -本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://tryfastgpt.ai),。 +本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://fastgpt.io),。 ## 前置依赖项 -您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://tryfastgpt.ai): +您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://fastgpt.io): - [Git](http://git-scm.com/) - [Docker](https://www.docker.com/)(构建镜像) diff --git a/docSite/content/zh-cn/docs/development/modelConfig/ppio.md b/docSite/content/zh-cn/docs/development/modelConfig/ppio.md index a450bdab5..de7551185 100644 --- a/docSite/content/zh-cn/docs/development/modelConfig/ppio.md +++ b/docSite/content/zh-cn/docs/development/modelConfig/ppio.md @@ -55,7 +55,7 @@ deepseek 系列: ## 2. 部署最新版 FastGPT 到本地环境 {{% alert context="warning" %}} -请使用 v4.8.22 以上版本,部署参考: https://doc.tryfastgpt.ai/docs/development/intro/ +请使用 v4.8.22 以上版本,部署参考: https://doc.fastgpt.io/docs/development/intro/ {{% /alert %}} ## 3. 模型配置(下面两种方式二选其一) diff --git a/docSite/content/zh-cn/docs/development/openapi/dataset.md b/docSite/content/zh-cn/docs/development/openapi/dataset.md index a22f43338..686b48949 100644 --- a/docSite/content/zh-cn/docs/development/openapi/dataset.md +++ b/docSite/content/zh-cn/docs/development/openapi/dataset.md @@ -454,7 +454,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio --header 'Authorization: Bearer {{authorization}}' \ --header 'Content-Type: application/json' \ --data-raw '{ - "link":"https://doc.tryfastgpt.ai/docs/course/quick-start/", + "link":"https://doc.fastgpt.io/docs/course/quick-start/", "datasetId":"6593e137231a2be9c5603ba7", "parentId": null, @@ -796,7 +796,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio "tmbId": "65422be6aa44b7da77729ec9", "type": "link", "name": "快速上手 | FastGPT", - "rawLink": "https://doc.tryfastgpt.ai/docs/course/quick-start/", + "rawLink": "https://doc.fastgpt.io/docs/course/quick-start/", "updateTime": "2024-01-20T13:54:53.031Z", "dataAmount": 3, "trainingAmount": 0, diff --git a/docSite/content/zh-cn/docs/development/openapi/share.md b/docSite/content/zh-cn/docs/development/openapi/share.md index 7d9a81dd1..b960d93ce 100644 --- a/docSite/content/zh-cn/docs/development/openapi/share.md +++ b/docSite/content/zh-cn/docs/development/openapi/share.md @@ -53,9 +53,9 @@ weight: 860 在分享链接的地址中,增加一个额外的参数: authToken。例如: -原始的链接:`https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192` +原始的链接:`https://share.fastgpt.io/chat/share?shareId=648aaf5ae121349a16d62192` -完整链接: `https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345` +完整链接: `https://share.fastgpt.io/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345` 这个`authToken`通常是你系统生成的用户唯一凭证(Token之类的)。FastGPT 会在鉴权接口的`body`中携带 token={{authToken}} 的参数。 @@ -387,9 +387,9 @@ export default async function (ctx: FunctionContext) { ### 3. 修改分享链接参数 -源分享链接:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c` +源分享链接:`https://share.fastgpt.io/chat/share?shareId=64be36376a438af0311e599c` -修改后:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt` +修改后:`https://share.fastgpt.io/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt` ### 4. 测试效果 diff --git a/docSite/content/zh-cn/docs/development/sealos.md b/docSite/content/zh-cn/docs/development/sealos.md index 8e3028732..ab4f6fe80 100644 --- a/docSite/content/zh-cn/docs/development/sealos.md +++ b/docSite/content/zh-cn/docs/development/sealos.md @@ -94,7 +94,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据 ### 如何更新/升级 FastGPT -[升级脚本文档](https://doc.tryfastgpt.ai/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!! +[升级脚本文档](https://doc.fastgpt.io/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!! 例如,目前是4.5 版本,要升级到4.5.1,就先把镜像版本改成v4.5.1,执行一下升级脚本,等待完成后再继续升级。如果目标版本不需要执行初始化,则可以跳过。 @@ -129,7 +129,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据 ![](/imgs/onsealos5.png) -[配置文件参考](https://doc.tryfastgpt.ai/docs/development/configuration/) +[配置文件参考](https://doc.fastgpt.io/docs/development/configuration/) ### 修改站点名称以及 favicon 修改应用的环境变量,增加 diff --git a/docSite/content/zh-cn/docs/guide/dashboard/workflow/http.md b/docSite/content/zh-cn/docs/guide/dashboard/workflow/http.md index 32605409e..56e845110 100644 --- a/docSite/content/zh-cn/docs/guide/dashboard/workflow/http.md +++ b/docSite/content/zh-cn/docs/guide/dashboard/workflow/http.md @@ -70,7 +70,7 @@ HTTP 模块会向对应的地址发送一个 `HTTP` 请求,实际操作与 Pos "array": [1, 2, 3], "obj": { "name": "FastGPT", - "url": "https://tryfastgpt.ai" + "url": "https://fastgpt.io" } } ``` @@ -109,7 +109,7 @@ HTTP 模块会向对应的地址发送一个 `HTTP` 请求,实际操作与 Pos "array2": [1, 2, 3], "object": { "name": "FastGPT", - "url": "https://tryfastgpt.ai" + "url": "https://fastgpt.io" } } ``` diff --git a/docSite/content/zh-cn/docs/guide/knowledge_base/websync.md b/docSite/content/zh-cn/docs/guide/knowledge_base/websync.md index bd3c069f9..94f3c9f41 100644 --- a/docSite/content/zh-cn/docs/guide/knowledge_base/websync.md +++ b/docSite/content/zh-cn/docs/guide/knowledge_base/websync.md @@ -18,7 +18,7 @@ Web 站点同步利用爬虫的技术,可以通过一个入口网站,自动 Tips: 国内的媒体站点基本不可用,公众号、csdn、知乎等。可以通过终端发送`curl`请求检测是否为静态站点,例如: ```bash -curl https://doc.tryfastgpt.ai/docs/intro/ +curl https://doc.fastgpt.io/docs/intro/ ``` ## 如何使用 diff --git a/docSite/content/zh-cn/docs/intro.md b/docSite/content/zh-cn/docs/intro.md index af58862e5..4e8469dda 100644 --- a/docSite/content/zh-cn/docs/intro.md +++ b/docSite/content/zh-cn/docs/intro.md @@ -11,7 +11,7 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,将智能 {{% alert icon="🤖 " context="success" %}} 快速开始体验 -- 海外版:[https://tryfastgpt.ai](https://tryfastgpt.ai) +- 海外版:[https://fastgpt.io](https://fastgpt.io) - 国内版:[https://fastgpt.cn](https://fastgpt.cn) {{% /alert %}} diff --git a/docSite/static/llms-full.txt b/docSite/static/llms-full.txt index 40b1a95b3..8f48a253c 100644 --- a/docSite/static/llms-full.txt +++ b/docSite/static/llms-full.txt @@ -5,7 +5,7 @@ FastGPT 项目在 Apache License 2.0 许可下开源,但包含以下附加条 + FastGPT 允许被用于商业化,例如作为其他应用的“后端即服务”使用,或者作为应用开发平台提供给企业。然而,当满足以下条件时,必须联系作者获得商业许可: - + 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 tryfastgpt.ai 的源码来运营与 tryfastgpt.ai 服务类似的多租户 SaaS 服务。 + + 多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 fastgpt.io 的源码来运营与 fastgpt.io 服务类似的多租户 SaaS 服务。 + LOGO 及版权信息:在使用 FastGPT 的过程中,不得移除或修改 FastGPT 控制台内的 LOGO 或版权信息。 请通过电子邮件 yujinlong@sealos.io 联系我们咨询许可事宜。 @@ -1947,11 +1947,11 @@ curl --location --request POST 'https://oneapi.xxxx/v1/chat/completions' \ # 快速开始本地开发 ## 对 FastGPT 进行开发调试 -本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://tryfastgpt.ai),。 +本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://fastgpt.io),。 ## 前置依赖项 -您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://tryfastgpt.ai): +您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://fastgpt.io): - [Git](http://git-scm.com/) - [Docker](https://www.docker.com/)(构建镜像) @@ -3104,7 +3104,7 @@ deepseek 系列: ## 2. 部署最新版 FastGPT 到本地环境 {{% alert context="warning" %}} -请使用 v4.8.22 以上版本,部署参考: https://doc.tryfastgpt.ai/docs/development/intro/ +请使用 v4.8.22 以上版本,部署参考: https://doc.fastgpt.io/docs/development/intro/ {{% /alert %}} ## 3. 模型配置(下面两种方式二选其一) @@ -5404,7 +5404,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio --header 'Authorization: Bearer {{authorization}}' \ --header 'Content-Type: application/json' \ --data-raw '{ - "link":"https://doc.tryfastgpt.ai/docs/course/quick-start/", + "link":"https://doc.fastgpt.io/docs/course/quick-start/", "datasetId":"6593e137231a2be9c5603ba7", "parentId": null, @@ -5758,7 +5758,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio "tmbId": "65422be6aa44b7da77729ec9", "type": "link", "name": "快速上手 | FastGPT", - "rawLink": "https://doc.tryfastgpt.ai/docs/course/quick-start/", + "rawLink": "https://doc.fastgpt.io/docs/course/quick-start/", "updateTime": "2024-01-20T13:54:53.031Z", "dataAmount": 3, "trainingAmount": 0, @@ -6564,9 +6564,9 @@ curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' 在分享链接的地址中,增加一个额外的参数: authToken。例如: -原始的链接:`https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192` +原始的链接:`https://share.fastgpt.io/chat/share?shareId=648aaf5ae121349a16d62192` -完整链接: `https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345` +完整链接: `https://share.fastgpt.io/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345` 这个`authToken`通常是你系统生成的用户唯一凭证(Token之类的)。FastGPT 会在鉴权接口的`body`中携带 token={{authToken}} 的参数。 @@ -6898,9 +6898,9 @@ export default async function (ctx: FunctionContext) { ### 3. 修改分享链接参数 -源分享链接:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c` +源分享链接:`https://share.fastgpt.io/chat/share?shareId=64be36376a438af0311e599c` -修改后:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt` +修改后:`https://share.fastgpt.io/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt` ### 4. 测试效果 @@ -7194,7 +7194,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据 ### 如何更新/升级 FastGPT -[升级脚本文档](https://doc.tryfastgpt.ai/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!! +[升级脚本文档](https://doc.fastgpt.io/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!! 例如,目前是4.5 版本,要升级到4.5.1,就先把镜像版本改成v4.5.1,执行一下升级脚本,等待完成后再继续升级。如果目标版本不需要执行初始化,则可以跳过。 @@ -7229,7 +7229,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据 ![](/imgs/onsealos5.png) -[配置文件参考](https://doc.tryfastgpt.ai/docs/development/configuration/) +[配置文件参考](https://doc.fastgpt.io/docs/development/configuration/) ### 修改站点名称以及 favicon 修改应用的环境变量,增加 @@ -11861,7 +11861,7 @@ HTTP 模块会向对应的地址发送一个 `HTTP` 请求,实际操作与 Pos "array": [1, 2, 3], "obj": { "name": "FastGPT", - "url": "https://tryfastgpt.ai" + "url": "https://fastgpt.io" } } ``` @@ -11900,7 +11900,7 @@ HTTP 模块会向对应的地址发送一个 `HTTP` 请求,实际操作与 Pos "array2": [1, 2, 3], "object": { "name": "FastGPT", - "url": "https://tryfastgpt.ai" + "url": "https://fastgpt.io" } } ``` @@ -13570,7 +13570,7 @@ Web 站点同步利用爬虫的技术,可以通过一个入口网站,自动 Tips: 国内的媒体站点基本不可用,公众号、csdn、知乎等。可以通过终端发送`curl`请求检测是否为静态站点,例如: ```bash -curl https://doc.tryfastgpt.ai/docs/intro/ +curl https://doc.fastgpt.io/docs/intro/ ``` ## 如何使用 @@ -14315,7 +14315,7 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,将智能 {{% alert icon="🤖 " context="success" %}} 快速开始体验 -- 海外版:[https://tryfastgpt.ai](https://tryfastgpt.ai) +- 海外版:[https://fastgpt.io](https://fastgpt.io) - 国内版:[https://fastgpt.cn](https://fastgpt.cn) {{% /alert %}} diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 38cc970b7..e5711c20d 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -154,7 +154,7 @@ "code_error.outlink_error.un_auth_user": "Identity Verification Failed", "code_error.plugin_error.not_exist": "The tool does not exist", "code_error.plugin_error.un_auth": "No permission to operate the tool", - "code_error.system_error.community_version_num_limit": "Exceeded Open Source Version Limit, Please Upgrade to Commercial Version: https://tryfastgpt.ai", + "code_error.system_error.community_version_num_limit": "Exceeded Open Source Version Limit, Please Upgrade to Commercial Version: https://fastgpt.io", "code_error.system_error.license_app_amount_limit": "Exceed the maximum number of applications in the system", "code_error.system_error.license_dataset_amount_limit": "Exceed the maximum number of knowledge bases in the system", "code_error.system_error.license_user_amount_limit": "Exceed the maximum number of users in the system", diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json index d3c79d49e..bc4a8aea0 100644 --- a/packages/web/i18n/zh-Hant/common.json +++ b/packages/web/i18n/zh-Hant/common.json @@ -154,7 +154,7 @@ "code_error.outlink_error.un_auth_user": "身份驗證失敗", "code_error.plugin_error.not_exist": "工具不存在", "code_error.plugin_error.un_auth": "無權操作該工具", - "code_error.system_error.community_version_num_limit": "超出開源版數量限制,請升級商業版:https://tryfastgpt.ai", + "code_error.system_error.community_version_num_limit": "超出開源版數量限制,請升級商業版:https://fastgpt.io", "code_error.system_error.license_app_amount_limit": "超出系統最大應用數量", "code_error.system_error.license_dataset_amount_limit": "超出系統最大知識庫數量", "code_error.system_error.license_user_amount_limit": "超出系統最大用戶數量", diff --git a/plugins/model/rerank-bge/README.md b/plugins/model/rerank-bge/README.md index c7b1d2564..bb1b4339f 100644 --- a/plugins/model/rerank-bge/README.md +++ b/plugins/model/rerank-bge/README.md @@ -111,4 +111,4 @@ services: ## 接入 FastGPT -参考 [ReRank模型接入](https://doc.tryfastgpt.ai/docs/development/configuration/#rerank-接入) +参考 [ReRank模型接入](https://doc.fastgpt.io/docs/development/configuration/#rerank-接入) diff --git a/projects/app/public/docs/chatProblem.md b/projects/app/public/docs/chatProblem.md index c110cd467..18a7fc5e0 100644 --- a/projects/app/public/docs/chatProblem.md +++ b/projects/app/public/docs/chatProblem.md @@ -1,9 +1,9 @@ ### 常见问题 - [**Git 地址**,点击查看项目地址](https://github.com/labring/FastGPT) -- [点击查看官方文档](https://doc.tryfastgpt.ai/docs/) -- [点击查看商业版文档](https://doc.tryfastgpt.ai/docs/shopping_cart/intro/) -- [计费规则](https://doc.tryfastgpt.ai/docs/pricing/) +- [点击查看官方文档](https://doc.fastgpt.io/docs/) +- [点击查看商业版文档](https://doc.fastgpt.io/docs/shopping_cart/intro/) +- [计费规则](https://doc.fastgpt.io/docs/pricing/) **其他问题** | 扫码进入交流群 | diff --git a/projects/app/src/components/support/apikey/Table.tsx b/projects/app/src/components/support/apikey/Table.tsx index 39b705531..7aabe8174 100644 --- a/projects/app/src/components/support/apikey/Table.tsx +++ b/projects/app/src/components/support/apikey/Table.tsx @@ -53,7 +53,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => { const theme = useTheme(); const { copyData } = useCopyData(); const { feConfigs } = useSystemStore(); - const [baseUrl, setBaseUrl] = useState('https://tryfastgpt.ai/api'); + const [baseUrl, setBaseUrl] = useState('https://fastgpt.io/api'); const [editData, setEditData] = useState(); const [apiKey, setApiKey] = useState(''); diff --git a/projects/app/src/service/common/system/index.ts b/projects/app/src/service/common/system/index.ts index 7ce0aa18c..c023547bb 100644 --- a/projects/app/src/service/common/system/index.ts +++ b/projects/app/src/service/common/system/index.ts @@ -105,8 +105,8 @@ export async function getInitConfig() { const defaultFeConfigs: FastGPTFeConfigsType = { show_emptyChat: true, show_git: true, - docUrl: 'https://doc.tryfastgpt.ai', - openAPIDocUrl: 'https://doc.tryfastgpt.ai/docs/development/openapi', + docUrl: 'https://doc.fastgpt.io', + openAPIDocUrl: 'https://doc.fastgpt.io/docs/development/openapi', systemPluginCourseUrl: 'https://fael3z0zfze.feishu.cn/wiki/ERZnw9R26iRRG0kXZRec6WL9nwh', appTemplateCourse: 'https://fael3z0zfze.feishu.cn/wiki/CX9wwMGyEi5TL6koiLYcg7U0nWb?fromScene=spaceOverview', diff --git a/test/cases/function/packages/global/common/string/textSplitter.test.ts b/test/cases/function/packages/global/common/string/textSplitter.test.ts index 53184e577..ba01a3041 100644 --- a/test/cases/function/packages/global/common/string/textSplitter.test.ts +++ b/test/cases/function/packages/global/common/string/textSplitter.test.ts @@ -93,7 +93,7 @@ FastGPT 的能力与优势 FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景! -FastGPT 在线使用:https://tryfastgpt.ai +FastGPT 在线使用:https://fastgpt.io FastGPT 能力 1. 专属 AI 客服 @@ -227,7 +227,7 @@ FastGPT 知识库采用 QA 对(不一定都是问答格式,仅代表两个变 通用模板与问答模板对比 我们通过一组你是谁的手动数据,对通用模板与问答模板的效果进行对比。此处特意打了个搞笑的答案,通用模板下 GPT35 就变得不那么听话了,`, result: [ - '快速了解 FastGPT\nFastGPT 的能力与优势\n\nFastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景!\n\nFastGPT 在线使用:https://tryfastgpt.ai\n\nFastGPT 能力 \n1. 专属 AI 客服 \n通过导入文档或已有问答对进行训练,让 AI 模型能根据你的文档以交互式对话方式回答问题。\n\n2. 简单易用的可视化界面 \nFastGPT 采用直观的可视化界面设计,为各种应用场景提供了丰富实用的功能。通过简洁易懂的操作步骤,可以轻松完成 AI 客服的创建和训练流程。\n\n3. 自动数据预处理 \n提供手动输入、直接分段、LLM 自动处理和 CSV 等多种数据导入途径,其中“直接分段”支持通过 PDF、WORD、Markdown 和 CSV 文档内容作为上下文。FastGPT 会自动对文本数据进行预处理、向量化和 QA 分割,节省手动训练时间,提升效能。\n\n4. 工作流编排 \n基于 Flow 模块的工作流编排,可以帮助你设计更加复杂的问答流程。例如查询数据库、查询库存、预约实验室等。\n\n5. 强大的 API 集成 \nFastGPT 对外的 API 接口对齐了 OpenAI 官方接口,可以直接接入现有的 GPT 应用,也可以轻松集成到企业微信、公众号、飞书等平台。', + '快速了解 FastGPT\nFastGPT 的能力与优势\n\nFastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景!\n\nFastGPT 在线使用:https://fastgpt.io\n\nFastGPT 能力 \n1. 专属 AI 客服 \n通过导入文档或已有问答对进行训练,让 AI 模型能根据你的文档以交互式对话方式回答问题。\n\n2. 简单易用的可视化界面 \nFastGPT 采用直观的可视化界面设计,为各种应用场景提供了丰富实用的功能。通过简洁易懂的操作步骤,可以轻松完成 AI 客服的创建和训练流程。\n\n3. 自动数据预处理 \n提供手动输入、直接分段、LLM 自动处理和 CSV 等多种数据导入途径,其中“直接分段”支持通过 PDF、WORD、Markdown 和 CSV 文档内容作为上下文。FastGPT 会自动对文本数据进行预处理、向量化和 QA 分割,节省手动训练时间,提升效能。\n\n4. 工作流编排 \n基于 Flow 模块的工作流编排,可以帮助你设计更加复杂的问答流程。例如查询数据库、查询库存、预约实验室等。\n\n5. 强大的 API 集成 \nFastGPT 对外的 API 接口对齐了 OpenAI 官方接口,可以直接接入现有的 GPT 应用,也可以轻松集成到企业微信、公众号、飞书等平台。', 'FastGPT 特点 \n项目开源\n\nFastGPT 遵循附加条件 Apache License 2.0 开源协议,你可以 Fork 之后进行二次开发和发布。FastGPT 社区版将保留核心功能,商业版仅在社区版基础上使用 API 的形式进行扩展,不影响学习使用。\n\n独特的 QA 结构\n\n针对客服问答场景设计的 QA 结构,提高在大量数据场景中的问答准确性。\n\n可视化工作流\n\n通过 Flow 模块展示了从问题输入到模型输出的完整流程,便于调试和设计复杂流程。\n\n无限扩展\n\n基于 API 进行扩展,无需修改 FastGPT 源码,也可快速接入现有的程序中。\n\n便于调试\n\n提供搜索测试、引用修改、完整对话预览等多种调试途径。\n\n支持多种模型\n\n支持 GPT、Claude、文心一言等多种 LLM 模型,未来也将支持自定义的向量模型。\n\n知识库核心流程\n\nFastGPT AI 相关参数配置说明\n\n在 FastGPT 的 AI 对话模块中,有一个 AI 高级配置,里面包含了 AI 模型的参数配置,本文详细介绍这些配置的含义。\n\n返回AI内容(高级编排特有) \n这是一个开关,打开的时候,当 AI 对话模块运行时,会将其输出的内容返回到浏览器(API响应);如果关闭,AI 输出的内容不会返回到浏览器,但是生成的内容仍可以通过【AI回复】进行输出。你可以将【AI回复】连接到其他模块中。', '最大上下文 \n代表模型最多容纳的文字数量。\n\n函数调用 \n支持函数调用的模型,在使用工具时更加准确。\n\n温度 \n越低回答越严谨,少废话(实测下来,感觉差别不大)\n\n回复上限 \n最大回复 token 数量。注意,是回复的Tokens!不是上下文 tokens。\n\n系统提示词 \n被放置在上下文数组的最前面,role 为 system,用于引导模型。\n\n引用模板 & 引用提示词 \n这两个参数与知识库问答场景相关,可以控制知识库相关的提示词。\n\nAI 对话消息组成 \n想使用明白这两个变量,首先要了解传递传递给 AI 模型的消息格式。它是一个数组,FastGPT 中这个数组的组成形式为:\n\n[\n内置提示词(config.json 配置,一般为空)\n系统提示词 (用户输入的提示词)\n历史记录\n问题(由引用提示词、引用模板和用户问题组成)\n]\n🍅\n\nTips: 可以通过点击上下文按键查看完整的上下文组成,便于调试。\n\n引用模板和提示词设计 \n简易模式已移除该功能,仅在工作流中可配置,可点击工作流中AI对话节点内,知识库引用旁边的setting icon进行配置。随着模型的增强,这部分功能将逐步弱化。\n\n引用模板和引用提示词通常是成对出现,引用提示词依赖引用模板。', 'FastGPT 知识库采用 QA 对(不一定都是问答格式,仅代表两个变量)的格式存储,在转义成字符串时候会根据引用模板来进行格式化。知识库包含多个可用变量: q, a, sourceId(数据的ID), index(第n个数据), source(数据的集合名、文件名),score(距离得分,0-1) 可以通过 {{q}} {{a}} {{sourceId}} {{index}} {{source}} {{score}} 按需引入。下面一个模板例子:\n\n可以通过 知识库结构讲解 了解详细的知识库的结构。\n\n引用模板 \n{instruction:"{{q}}",output:"{{a}}",source:"{{source}}"}\n搜索到的知识库,会自动将 q,a,source 替换成对应的内容。每条搜索到的内容,会通过 \n 隔开。例如:\n\n{instruction:"电影《铃芽之旅》的导演是谁?",output:"电影《铃芽之旅》的导演是新海诚。",source:"手动输入"}\n{instruction:"本作的主人公是谁?",output:"本作的主人公是名叫铃芽的少女。",source:""}\n{instruction:"电影《铃芽之旅》男主角是谁?",output:"电影《铃芽之旅》男主角是宗像草太,由松村北斗配音。",source:""}\n{instruction:"电影《铃芽之旅》的编剧是谁?22",output:"新海诚是本片的编剧。",source:"手动输入"}\n引用提示词 \n引用模板需要和引用提示词一起使用,提示词中可以写引用模板的格式说明以及对话的要求等。可以使用 {{quote}} 来使用 引用模板,使用 {{question}} 来引入问题。例如:', @@ -336,7 +336,7 @@ FastGPT 的能力与优势 FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景! -FastGPT 在线使用:https://tryfastgpt.ai +FastGPT 在线使用:https://fastgpt.io FastGPT 能力 1. 专属 AI 客服 @@ -536,7 +536,7 @@ FastGPT AI 相关参数配置说明 最大上下文 代表模型最多容纳的文字数量。`, result: [ - "这是一个测试的内容,包含代码块\n\n快速了解 FastGPT\nFastGPT 的能力与优势\n\nFastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景!\n\nFastGPT 在线使用:https://tryfastgpt.ai\n\nFastGPT 能力 \n1. 专属 AI 客服 \n通过导入文档或已有问答对进行训练,让 AI 模型能根据你的文档以交互式对话方式回答问题。\n\n2. 简单易用的可视化界面 \nFastGPT 采用直观的可视化界面设计,为各种应用场景提供了丰富实用的功能。通过简洁易懂的操作步骤,可以轻松完成 AI 客服的创建和训练流程。\n\n~~~js\nimport { defaultMaxChunkSize } from '../../core/dataset/training/utils';\nimport { getErrText } from '../error/utils';\n\nconst getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n~~~", + "这是一个测试的内容,包含代码块\n\n快速了解 FastGPT\nFastGPT 的能力与优势\n\nFastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景!\n\nFastGPT 在线使用:https://fastgpt.io\n\nFastGPT 能力 \n1. 专属 AI 客服 \n通过导入文档或已有问答对进行训练,让 AI 模型能根据你的文档以交互式对话方式回答问题。\n\n2. 简单易用的可视化界面 \nFastGPT 采用直观的可视化界面设计,为各种应用场景提供了丰富实用的功能。通过简洁易懂的操作步骤,可以轻松完成 AI 客服的创建和训练流程。\n\n~~~js\nimport { defaultMaxChunkSize } from '../../core/dataset/training/utils';\nimport { getErrText } from '../error/utils';\n\nconst getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n\n const getOneTextOverlapText = ({ text, step }: { text: string; step: number }): string => {\n const forbidOverlap = checkForbidOverlap(step);\n const maxOverlapLen = chunkSize * 0.4;\n\n // step >= stepReges.length: Do not overlap incomplete sentences\n if (forbidOverlap || overlapLen === 0 || step >= stepReges.length) return '';\n\n const splitTexts = getSplitTexts({ text, step });\n let overlayText = '';\n\n for (let i = splitTexts.length - 1; i >= 0; i--) {\n const currentText = splitTexts[i].text;\n const newText = currentText + overlayText;\n const newTextLen = newText.length;\n\n if (newTextLen > overlapLen) {\n if (newTextLen > maxOverlapLen) {\n const text = getOneTextOverlapText({ text: newText, step: step + 1 });\n return text || overlayText;\n }\n return newText;\n }\n\n overlayText = newText;\n }\n return overlayText;\n };\n~~~", '3. 自动数据预处理 \n提供手动输入、直接分段、LLM 自动处理和 CSV 等多种数据导入途径,其中“直接分段”支持通过 PDF、WORD、Markdown 和 CSV 文档内容作为上下文。FastGPT 会自动对文本数据进行预处理、向量化和 QA 分割,节省手动训练时间,提升效能。\n\n4. 工作流编排 \n基于 Flow 模块的工作流编排,可以帮助你设计更加复杂的问答流程。例如查询数据库、查询库存、预约实验室等。\n\n5. 强大的 API 集成 \nFastGPT 对外的 API 接口对齐了 OpenAI 官方接口,可以直接接入现有的 GPT 应用,也可以轻松集成到企业微信、公众号、飞书等平台。\n\nFastGPT 特点 \n项目开源\n\nFastGPT 遵循附加条件 Apache License 2.0 开源协议,你可以 Fork 之后进行二次开发和发布。FastGPT 社区版将保留核心功能,商业版仅在社区版基础上使用 API 的形式进行扩展,不影响学习使用。\n\n独特的 QA 结构\n\n针对客服问答场景设计的 QA 结构,提高在大量数据场景中的问答准确性。\n\n可视化工作流\n\n通过 Flow 模块展示了从问题输入到模型输出的完整流程,便于调试和设计复杂流程。\n\n无限扩展\n\n基于 API 进行扩展,无需修改 FastGPT 源码,也可快速接入现有的程序中。', '便于调试\n\n提供搜索测试、引用修改、完整对话预览等多种调试途径。\n\n支持多种模型\n\n支持 GPT、Claude、文心一言等多种 LLM 模型,未来也将支持自定义的向量模型。\n\n知识库核心流程\n\nFastGPT AI 相关参数配置说明\n\n在 FastGPT 的 AI 对话模块中,有一个 AI 高级配置,里面包含了 AI 模型的参数配置,本文详细介绍这些配置的含义。\n\n返回AI内容(高级编排特有) \n这是一个开关,打开的时候,当 AI 对话模块运行时,会将其输出的内容返回到浏览器(API响应);如果关闭,AI 输出的内容不会返回到浏览器,但是生成的内容仍可以通过【AI回复】进行输出。你可以将【AI回复】连接到其他模块中。\n\n最大上下文 \n代表模型最多容纳的文字数量。' ]