4.8.13 feature (#3118)

* chore(ui): login page & workflow page (#3046)

* login page & number input & multirow select & llm select

* workflow

* adjust nodes

* New file upload (#3058)

* feat: toolNode aiNode readFileNode adapt new version

* update docker-compose

* update tip

* feat: adapt new file version

* perf: file input

* fix: ts

* feat: add chat history time label (#3024)

* feat:add chat and logs time

* feat: add chat history time label

* code perf

* code perf

---------

Co-authored-by: 勤劳上班的卑微小张 <jiazhan.zhang@ggimage.com>

* add chatType (#3060)

* pref: slow query of full text search (#3044)

* Adapt findLast api;perf: markdown zh format. (#3066)

* perf: context code

* fix: adapt findLast api

* perf: commercial plugin run error

* perf: markdown zh format

* perf: dockerfile proxy (#3067)

* fix ui (#3065)

* fix ui

* fix

* feat: support array reference multi-select (#3041)

* feat: support array reference multi-select

* fix build

* fix

* fix loop multi-select

* adjust condition

* fix get value

* array and non-array conversion

* fix plugin input

* merge func

* feat: iframe code block;perf: workflow selector type (#3076)

* feat: iframe code block

* perf: workflow selector type

* node pluginoutput check (#3074)

* feat: View will move when workflow check error;fix: ui refresh error when continuous file upload (#3077)

* fix: plugin output check

* fix: ui refresh error when continuous file upload

* feat: View will move when workflow check error

* add dispatch try catch (#3075)

* perf: workflow context split (#3083)

* perf: workflow context split

* perf: context

* 4.8.13 test (#3085)

* perf: workflow node ui

* chat iframe url

* feat: support sub route config (#3071)

* feat: support sub route config

* dockerfile

* fix upload

* delete unused code

* 4.8.13 test (#3087)

* fix: image expired

* fix: datacard navbar ui

* perf: build action

* fix: workflow file upload refresh (#3088)

* fix: http tool response (#3097)

* loop node dynamic height (#3092)

* loop node dynamic height

* fix

* fix

* feat: support push chat log (#3093)

* feat: custom uid/metadata

* to: custom info

* fix: chat push latest

* feat: add chat log envs

* refactor: move timer to pushChatLog

* fix: using precise log

---------

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

* 4.8.13 test (#3098)

* perf: loop node refresh

* rename context

* comment

* fix: ts

* perf: push chat log

* array reference check & node ui (#3100)

* feat: loop start add index (#3101)

* feat: loop start add index

* update doc

* 4.8.13 test (#3102)

* fix: loop index;edge parent check

* perf: reference invalid check

* fix: ts

* fix: plugin select files and ai response check (#3104)

* fix: plugin select files and ai response check

* perf: text editor selector;tool call tip;remove invalid image url;

* perf: select file

* perf: drop files

* feat: source id prefix env (#3103)

* 4.8.13 test (#3106)

* perf: select file

* perf: drop files

* perf: env template

* 4.8.13 test (#3107)

* perf: select file

* perf: drop files

* fix: imple mode adapt files

* perf: push chat log (#3109)

* fix: share page load title error (#3111)

* 4.8.13 perf (#3112)

* fix: share page load title error

* update file input doc

* perf: auto add file urls

* perf: auto ser loop node offset height

* 4.8.13 test (#3117)

* perf: plugin

* updat eaction

* feat: add more share config (#3120)

* feat: add more share config

* add i18n en

* fix: missing subroute (#3121)

* perf: outlink config (#3128)

* update action

* perf: outlink config

* fix: ts (#3129)

* 更新 docSite 文档内容 (#3131)

* fix: null pointer (#3130)

* fix: null pointer

* perf: not input text

* update doc url

* perf: outlink default value (#3134)

* update doc (#3136)

* 4.8.13 test (#3137)

* update doc

* perf: completions chat api

* Restore docSite content based on upstream/4.8.13-dev (#3138)

* Restore docSite content based on upstream/4.8.13-dev

* 4813.md缺少更正

* update doc (#3141)

---------

Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: papapatrick <109422393+Patrickill@users.noreply.github.com>
Co-authored-by: 勤劳上班的卑微小张 <jiazhan.zhang@ggimage.com>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com>
Co-authored-by: Finley Ge <m13203533462@163.com>
Co-authored-by: Jiangween <145003935+Jiangween@users.noreply.github.com>
This commit is contained in:
Archer
2024-11-13 11:29:53 +08:00
committed by GitHub
parent e1f5483432
commit e9d52ada73
449 changed files with 7626 additions and 4180 deletions

View File

@@ -1,4 +1,4 @@
name: Build fastgpt-sandbox images and copy image to docker hub
name: Build fastgpt-sandbox images
on:
workflow_dispatch:
push:

View File

@@ -1,4 +1,4 @@
name: Build FastGPT images and copy image to docker hub
name: Build FastGPT images
on:
workflow_dispatch:
push:
@@ -90,3 +90,86 @@ jobs:
-t ${Docker_Hub_Tag} \
-t ${Docker_Hub_Latest} \
.
build-fastgpt-images-sub-route:
runs-on: ubuntu-20.04
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
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_HUB_USERNAME }}
password: ${{ secrets.ALI_HUB_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Set tag
- name: Set image name and tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-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} \
.

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

View File

@@ -32,7 +32,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv464' \
4. 优化 - 历史记录模块。弃用旧的历史记录模块,直接在对应地方填写数值即可。
5. 调整 - 知识库搜索模块 topk 逻辑,采用 MaxToken 计算,兼容不同长度的文本块
6. 调整鉴权顺序,提高 apikey 的优先级避免cookie抢占 apikey 的鉴权。
7. 链接读取支持多选择器。参考[Web 站点同步用法](/docs/course/websync)
7. 链接读取支持多选择器。参考[Web 站点同步用法](/docs/guide/knowledge_base/websync/)
8. 修复 - 分享链接图片上传鉴权问题
9. 修复 - Mongo 连接池未释放问题。
10. 修复 - Dataset Intro 无法更新

View File

@@ -21,10 +21,10 @@ weight: 831
## V4.6.5 功能介绍
1. 新增 - [问题优化模块](/docs/workflow/modules/coreferenceresolution/)
2. 新增 - [文本编辑模块](/docs/workflow/modules/text_editor/)
3. 新增 - [判断器模块](/docs/workflow/modules/tfswitch/)
4. 新增 - [自定义反馈模块](/docs/workflow/modules/custom_feedback/)
1. 新增 - [问题优化模块](/docs/guide/workbench/workflow/coreferenceresolution/)
2. 新增 - [文本编辑模块](/docs/guide/workbench/workflow/text_editor/)
3. 新增 - [判断器模块](/docs/guide/workbench/workflow/tfswitch//)
4. 新增 - [自定义反馈模块](/docs/guide/workbench/workflow/custom_feedback/)
5. 新增 - 【内容提取】模块支持选择模型,以及字段枚举
6. 优化 - docx读取兼容表格表格转markdown
7. 优化 - 高级编排连接线交互

View File

@@ -25,7 +25,7 @@ weight: 830
1. 查看 [FastGPT 2024 RoadMap](https://github.com/labring/FastGPT?tab=readme-ov-file#-%E5%9C%A8%E7%BA%BF%E4%BD%BF%E7%94%A8)
2. 新增 - Http 模块请求头支持 Json 编辑器。
3. 新增 - [ReRank模型部署](/docs/development/custom-models/reranker/)
3. 新增 - [ReRank模型部署](/docs/development/custom-models/bge-rerank/)
4. 新增 - 搜索方式:分离向量语义检索,全文检索和重排,通过 RRF 进行排序合并。
5. 优化 - 问题分类提示词id引导。测试国产商用 api 模型(百度阿里智谱讯飞)使用 Prompt 模式均可分类。
6. UI 优化未来将逐步替换新的UI设计。

View File

@@ -91,7 +91,7 @@ curl --location --request POST 'https://{{host}}/api/init/v468' \
1. 新增 - 知识库搜索合并模块。
2. 新增 - 新的 Http 模块,支持更加灵活的参数传入。同时支持了输入输出自动数据类型转化,例如:接口输出的 JSON 类型会自动转成字符串类型,直接给其他模块使用。此外,还补充了一些例子,可在文档中查看。
3. 优化 - 内容补全。将内容补全内置到【知识库搜索】中并实现了一次内容补全即可完成“指代消除”和“问题扩展”。FastGPT知识库搜索详细流程可查看[知识库搜索介绍](/docs/course/data_search/)
3. 优化 - 内容补全。将内容补全内置到【知识库搜索】中并实现了一次内容补全即可完成“指代消除”和“问题扩展”。FastGPT知识库搜索详细流程可查看[知识库搜索介绍](/docs/guide/workbench/workflow/dataset_search/)
4. 优化 - LLM 模型配置,不再区分对话、分类、提取模型。同时支持模型的默认参数,避免不同模型参数冲突,可通过`defaultConfig`传入默认的配置。
5. 优化 - 流响应,参考了`ChatNextWeb`的流,更加丝滑。此外,之前提到的乱码、中断,刷新后又正常了,可能会修复)
6. 修复 - 语音输入文件无法上传。

View File

@@ -7,6 +7,20 @@ toc: true
weight: 811
---
## 更新指南
### 1. 做好数据备份
### 2. 修改镜像
- 更新 FastGPT 镜像 tag: v4.8.13-beta
- 更新 FastGPT 商业版镜像 tag: v4.8.13-beta fastgpt-pro镜像
- Sandbox 镜像,可以不更新
### 3. 调整文件上传编排
虽然依然兼容旧版的文件上传编排,但是未来两个版本内将会去除兼容代码,请尽快调整编排,以适应最新的文件上传逻辑。尤其是嵌套应用的文件传递,未来将不会自动传递,必须手动指定传递的文件。
## 更新说明
1. 新增 - 数组变量选择支持多选,可以选多个数组或对应的单一数据类型,会自动按选择顺序进行合并。
@@ -16,26 +30,15 @@ weight: 811
5. 新增 - 循环节点增加下标值。
6. 新增 - 部分对话错误提醒增加翻译。
7. 新增 - 对话输入框支持拖拽文件上传,可直接拖文件到输入框中。
8. 优化 - 合并多个 system 提示词成 1 个,避免部分模型不支持多个 system 提示词。
9. 优化 - 知识库上传文件,优化报错提示。
10. 优化 - 全文检索语句,减少一轮子查询
11. 优化 - 修改 findLast 为 [...array].reverse().find适配旧版浏览器
12. 优化 - Markdown 组件自动空格,避免分割 url 中的中文
13. 优化 - 工作流上下文拆分,性能优化
14. 优化 - 语音播报,不支持 mediaSource 的浏览器可等待完全生成语音后输出
15. 修复 - Dockerfile pnpm install 支持代理
16. 修复 - BI 图表生成无法写入文件
## 更新指南
### 1. 做好数据备份
### 2. 修改镜像
- 更新 FastGPT 镜像 tag: v4.8.13-alpha
- 更新 FastGPT 管理端镜像 tag: v4.8.13-alpha fastgpt-pro镜像
- Sandbox 镜像,可以不更新
### 3. 调整文件上传编排
虽然依然兼容旧版的文件上传编排,但是未来两个版本内将会去除兼容代码,请尽快调整编排,以适应最新的文件上传逻辑。尤其是嵌套应用的文件传递,未来将不会自动传递,必须手动指定传递的文件。
8. 新增 - 对话日志,来源可显示分享链接/API具体名称
9. 新增 - 分享链接支持配置是否展示实时运行状态。
10. 优化 - 合并多个 system 提示词成 1 个,避免部分模型不支持多个 system 提示词
11. 优化 - 知识库上传文件,优化报错提示
12. 优化 - 全文检索语句,减少一轮子查询
13. 优化 - 修改 findLast 为 [...array].reverse().find适配旧版浏览器
14. 优化 - Markdown 组件自动空格,避免分割 url 中的中文
15. 优化 - 工作流上下文拆分,性能优化
16. 优化 - 语音播报,不支持 mediaSource 的浏览器可等待完全生成语音后输出
17. 修复 - Dockerfile pnpm install 支持代理。
18. 修复 - BI 图表生成无法写入文件。同时优化其解析,支持数字类型数组。
19. 修复 - 分享链接首次加载时,标题显示不正确。

View File

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

View File

@@ -4,7 +4,7 @@ description: 'FastGPT 常见应用使用问题,包括简易应用、工作流
icon: 'quiz'
draft: false
toc: true
weight: 903
weight: 908
---
## 工作流中多轮对话场景中如何使连续问题被问题分类节点正确的归类

View File

@@ -4,7 +4,7 @@ description: 'FastGPT 常见聊天框问题'
icon: 'quiz'
draft: false
toc: true
weight: 905
weight: 906
---
## 我修改了工作台的应用,为什么在“聊天”时没有更新配置?

View File

@@ -4,7 +4,7 @@ description: '常见知识库使用问题'
icon: 'quiz'
draft: false
toc: true
weight: 904
weight: 910
---
## 上传的文件内容出现中文乱码

View File

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

View File

@@ -1,7 +1,15 @@
---
title: '常见错误'
title: '报错'
icon: 'quiz'
draft: false
toc: true
weight: 920
---
weight: 914
---
1. ### 当前分组上游负载已饱和,请稍后再试(request id:202407100753411462086782835521)
是oneapi渠道的问题可以换个模型用or换一家中转站
1. ### 使用API时在日志中报错Connection Error
大概率是api-key填写了openapi然后部署的服务器在国内不能访问海外的api可以使用中转或者反代的手段解决访问不到的问题

View File

@@ -0,0 +1,18 @@
---
title: "接入外部渠道"
description: "如何通过外部渠道与 FastGPT 集成,实现对多种平台的支持"
icon: "integration"
draft: false
toc: true
weight: 912
---
1. ### 接入cow图文对话无法直接显示图片
提示词给引导不要以markdown格式输出。图片需要二开 cow 实现图片链接截取并发送。
1. ### 可以获取到用户发送问答的记录吗
在应用的对话日志里可以查看。
![](/imgs/integration1.png)

View File

@@ -3,7 +3,7 @@ title: '其他问题'
icon: 'quiz'
draft: false
toc: true
weight: 925
weight: 918
---
## oneapi 官网是哪个

View File

@@ -0,0 +1,14 @@
---
title: "积分消耗"
description: "了解 FastGPT 中的积分消耗机制和使用场景"
icon: "points"
draft: false
toc: true
weight: 916
---
1. ### 接入oneapi后为什么还会消耗fastgpt的积分
矢量数据库检索会默认消耗。可以查看看绑定提示和使用记录。
![](/imgs/points1.png)

View File

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

View File

@@ -0,0 +1,9 @@
---
weight: 100
title: '功能介绍'
description: 'FastGPT 的功能和使用指南'
icon: 'import_contacts'
draft: false
images: []
---
<!-- 100 ~ 500 -->

View File

@@ -6,4 +6,4 @@ icon: 'import_contacts'
draft: false
images: []
---
<!-- 100 ~ 300 -->
<!-- 100 ~ 200 -->

View File

@@ -4,7 +4,7 @@ description: "FastGPT AI 相关参数配置说明"
icon: "sign_language"
draft: false
toc: true
weight: 102
weight: 104
---
在 FastGPT 的 AI 对话模块中,有一个 AI 高级配置,里面包含了 AI 模型的参数配置,本文详细介绍这些配置的含义。
@@ -66,7 +66,7 @@ Tips: 可以通过点击上下文按键查看完整的上下文组成,便于
FastGPT 知识库采用 QA 对(不一定都是问答格式,仅代表两个变量)的格式存储,在转义成字符串时候会根据**引用模板**来进行格式化。知识库包含多个可用变量: q, a, sourceId数据的ID, index(第n个数据), source(数据的集合名、文件名)score(距离得分0-1) 可以通过 {{q}} {{a}} {{sourceId}} {{index}} {{source}} {{score}} 按需引入。下面一个模板例子:
可以通过 [知识库结构讲解](/docs/course/dataset_engine/) 了解详细的知识库的结构。
可以通过 [知识库结构讲解](/docs/guide/knowledge_base/dataset_engine/) 了解详细的知识库的结构。
#### 引用模板

View File

@@ -4,7 +4,7 @@ description: "FastGPT 对话问题引导"
icon: "code"
draft: false
toc: true
weight: 108
weight: 106
---
![](/imgs/questionGuide.png)

View File

@@ -20,10 +20,12 @@ weight: 110
随后,你的调试对话框中,就会出现一个文件选择的 icon可以点击文件选择 icon选择你需要上传的文件。
由于采用的是工具调用模式,所以在提问时候,可能需要加上适当的引导,让模型知道,你需要读取`文档`
![打开文件上传](/imgs/fileinpu-2.png)
**工作模式**
从 4.8.13 版本起,简易模式的文件读取将会强制解析文件并放入 system 提示词中,避免连续对话时,模型有时候不会主动调用读取文件的工具。
## 工作流中使用
工作流中,可以在系统配置中,找到`文件输入`配置项,点击其右侧的`开启`/`关闭`按键,即可打开配置弹窗。
@@ -32,14 +34,13 @@ weight: 110
在工作流中,使用文件的方式很多,最简单的就是类似下图中,直接通过工具调用接入文档解析,实现和简易模式一样的效果。
![打开文件上传](/imgs/fileinpu-3.jpg)
| | |
| --------------------- | --------------------- |
| ![](/imgs/image-5.png) | ![](/imgs/image-6.png) |
也可以更简单点,强制每轮对话都携带上文档内容进行回答,这样就不需要调用两次 AI 才能读取文档内容了
![打开文件上传](/imgs/fileinpu-5.jpg)
当然,你也可以在工作流中,对文档进行内容提取、内容分析等,然后将分析的结果传递给 HTTP 或者其他模块,从而实现文件处理的 SOP。不过目前版本`插件`中并未支持文件处理,所以在构建 SOP 的话可能还是有一些麻烦。
当然,你也可以在工作流中,对文档进行内容提取、内容分析等,然后将分析的结果传递给 HTTP 或者其他模块,从而实现文件处理的 SOP
![文档解析](/imgs/image-7.png)
## 文档解析工作原理
@@ -73,23 +74,8 @@ type UserChatItemValueItemType = {
文档解析依赖文档解析节点,这个节点会接收一个`array<string>`类型的输入,对应的是文件输入的 URL输出的是一个`string`,对应的是文档解析后的内容。
![打开文件上传](/imgs/fileinpu-6.jpg)
* 在文档解析节点中,只会解析`文档`类型的 URL它是通过文件 URL 解析出来的`文名件后缀`去判断的。如果你同时选择了文档和图片,图片会被忽略。
* 文档解析节点,除了解析本轮工作流接收的文件外,还会把历史记录的文档 URL 进行解析。最终会解析至多 n 个文档n 取决于你配置文件上传时,允许的最大文件数量。
{{% alert icon="🤖" context="success" %}}
举例:
配置了最多允许 5 个文件上传
1. 第一轮对话,上传 3 个文档和 1 个图片:文档解析节点,返回 3 个文档内容。
2. 第二轮对话,不上传任何文件:文档解析节点,返回 3 个文档内容。
3. 第三轮对话,上传 2 个文档:文档解析节点,返回 5 个文档内容。
4. 第四轮对话,上传 1 个文档:文档解析节点,返回 5 个文档内容,第一轮对话中的第三个文档会被过滤掉。
{{% /alert %}}
* **文档解析节点,只会解析本轮工作流接收的文件,不会解析历史记录的文件。**
* 多个文档内容如何拼接的
按下列的模板,对多个文件进行拼接,即文件名+文件内容的形式组成一个字符串,不同文档之间通过分隔符:`\n******\n` 进行分割。
@@ -101,32 +87,27 @@ ${content}
</Content>
```
### 工具调用如何使用文档解析
### AI节点中如何使用文档解析
在工具调用中,文档解析节点的调用提示词为:`解析对话中所有上传的文档,并返回对应文档内容`
AI 节点AI对话/工具调用中,新增了一个文档链接的输入,可以直接引用文档的地址,从而实现文档内容的引用
作为工具被执行后,文档解析节点会返回解析后的文档内容作为工具响应。
### AI对话中如何使用文档解析
在 AI 对话节点中,新增了一个文档引用的输入,可以直接引用文档解析节点的输出,从而实现文档内容的引用。
它接收一个`string`类型的输入,除了可以引用文档解析结果外,还可以实现自定义内容引用,最终会进行提示词拼接,放置在 role=system 的消息中。提示词模板如下:
它接收一个`Array<string>`类型的输入,最终这些 url 会被解析,并进行提示词拼接,放置在 role=system 的消息中。提示词模板如下:
```
<Quote></Quote> 中的内容作为本次对话的参考:
<Quote>
<FilesContent></FilesContent> 中的内容作为本次对话的参考:
<FilesContent>
{{quote}}
</Quote>
</FilesContent>
```
quote 为引用的内容。
# 4.8.13版本起,关于文件上传的更新
![打开文件上传](/imgs/fileinpu-7.jpg)
由于与 4.8.9 版本有些差异,尽管我们做了向下兼容,避免工作流立即不可用。但是请尽快的按新版本规则进行调整工作流,后续将会去除兼容性代码。
## 文件输入后续更新
* 插件支持配置文件输入
* 子应用和插件调用,支持传递文件输入
* 文档解析,结构化解析结果
* 更多的文件类型输入以及解析器。
1. 简易模式中,将会强制进行文件解析,不再由模型决策是否解析,保证每次都能参考文档。
2. 文档解析:不再解析历史记录中的文件。
3. 工具调用:支持直接选择文档引用,不需要再挂载文档解析工具。会自动解析历史记录中的文件
4. AI 对话:支持直接选择文档引用,不需要进过文档解析节点。会自动解析历史记录中的文件
5. 插件单独运行:不再支持全局文件;插件输入支持配置文件类型,可以取代全局文件上传
6. **工作流调用插件:不再自动传递工作流上传的文件到插件,需要手动给插件输入指定变量。**
7. **工作流调用工作流:不再自动传递工作流上传的文件到子工作流,可以手动选择需要传递的文件链接。**

View File

@@ -4,7 +4,7 @@ description: '快速体验 FastGPT 基础功能'
icon: 'rocket_launch'
draft: false
toc: true
weight: 101
weight: 102
---
更多使用技巧,[查看视屏教程](https://www.bilibili.com/video/BV1sH4y1T7s9)

View File

@@ -4,7 +4,7 @@ description: '本节详细介绍RAG模型的核心机制、应用场景及其在
icon: 'language'
draft: false
toc: true
weight: 106
weight: 402
---
[RAG文档](https://huggingface.co/docs/transformers/model_doc/rag)
@@ -83,7 +83,7 @@ RAG检索增强生成模型通过结合检索器和生成器实现了
RAG模型的性能很大程度上取决于检索器返回的文档质量。由于生成器主要依赖检索器提供的上下文信息如果检索到的文档片段不相关、不准确生成的文本可能出现偏差甚至产生误导性的结果。尤其在多模糊查询或跨领域检索的情况下检索器可能无法找到合适的片段这将直接影响生成内容的连贯性和准确性。
- 挑战当知识库庞大且内容多样时如何提高检索器在复杂问题下的精确度是一大挑战。当前的方法如BM25等在特定任务上有局限尤其是在面对语义模糊的查询时传统的关键词匹配方式可能无法提供语义上相关的内容。
- 解决途径引入混合检索技术如结合稀疏检索BM25与密集检索如向量检索。例如[Faiss](https://fael3z0zfze.feishu.cn/wiki/LULawsUufitGvWkDjx3cKJqHnle?from=from_copylink)的底层实现允许通过BERT等模型生成密集向量表示显著提升语义级别的匹配效果。通过这种方式检索器可以捕捉深层次的语义相似性减少无关文档对生成器的负面影响。
- 解决途径引入混合检索技术如结合稀疏检索BM25与密集检索如向量检索。例如Faiss的底层实现允许通过BERT等模型生成密集向量表示显著提升语义级别的匹配效果。通过这种方式检索器可以捕捉深层次的语义相似性减少无关文档对生成器的负面影响。
#### 4.2.2 生成器的计算复杂度与性能瓶颈

View File

@@ -0,0 +1,9 @@
---
weight: 400
title: '知识库'
description: '知识库的基础原理、搜索方案、Web站点同步和外部文件知识库的使用方法。'
icon: 'book'
draft: false
images: []
---
<!-- 400 ~ 450 -->

View File

@@ -4,7 +4,7 @@ description: '本节会详细介绍 FastGPT 知识库结构设计,理解其 QA
icon: 'language'
draft: false
toc: true
weight: 106
weight: 404
---
## 理解向量

View File

@@ -4,7 +4,7 @@ description: 'FastGPT 外部文件知识库功能介绍和使用方式'
icon: 'language'
draft: false
toc: true
weight: 107
weight: 408
---
外部文件库是 FastGPT 商业版特有功能。它允许接入你现在的文件系统,无需将文件再导入一份到 FastGPT 中。

View File

@@ -4,7 +4,7 @@ description: 'FastGPT Web 站点同步功能介绍和使用方式'
icon: 'language'
draft: false
toc: true
weight: 105
weight: 406
---
![](/imgs/webSync1.jpg)

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