Compare commits
62 Commits
v4.8.12-be
...
v4.8.14-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
019bf67e2d | ||
|
|
9b2c3b242a | ||
|
|
4f55025906 | ||
|
|
489bb076a3 | ||
|
|
a9db5b57c5 | ||
|
|
fdb3720b41 | ||
|
|
00641a8652 | ||
|
|
5c56b375c7 | ||
|
|
d8d9b936c4 | ||
|
|
b237a3ec55 | ||
|
|
af894680cb | ||
|
|
58745f8c35 | ||
|
|
f699061dea | ||
|
|
3f72f88591 | ||
|
|
be59c2f6a7 | ||
|
|
795904a357 | ||
|
|
e8824987fa | ||
|
|
b6d650adfb | ||
|
|
710fa37847 | ||
|
|
e22031ca6c | ||
|
|
0c9e10dd2b | ||
|
|
0472dc2967 | ||
|
|
98d4a6ee75 | ||
|
|
c12159bfb4 | ||
|
|
abce1e9cf6 | ||
|
|
c3cc51c9a0 | ||
|
|
519b519458 | ||
|
|
e9d52ada73 | ||
|
|
e1f5483432 | ||
|
|
2c5f88b85f | ||
|
|
2e1bf66d3d | ||
|
|
952771e34d | ||
|
|
49bee95b12 | ||
|
|
0645b274da | ||
|
|
cf8786b194 | ||
|
|
be6269688b | ||
|
|
912b264a47 | ||
|
|
7ef1821557 | ||
|
|
4061b11922 | ||
|
|
bc171db945 | ||
|
|
eb365fef44 | ||
|
|
2e7047cb3b | ||
|
|
89a817d1c9 | ||
|
|
e788bcaabe | ||
|
|
9219903341 | ||
|
|
6939899baa | ||
|
|
732b6d7780 | ||
|
|
e361279208 | ||
|
|
946fda0843 | ||
|
|
97216eec59 | ||
|
|
9f4aa3160e | ||
|
|
8e4084f7ee | ||
|
|
ee718750e2 | ||
|
|
1e02544c3a | ||
|
|
98771284e4 | ||
|
|
efc4e860b7 | ||
|
|
e06d72e86e | ||
|
|
b712a821f8 | ||
|
|
4e3d817b63 | ||
|
|
78a85bf847 | ||
|
|
a5b913f1b1 | ||
|
|
7ee1a340e6 |
2
.github/workflows/build-sandbox-image.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build fastgpt-sandbox images and copy image to docker hub
|
||||
name: Build fastgpt-sandbox images
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
|
||||
85
.github/workflows/fastgpt-image.yml
vendored
@@ -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} \
|
||||
.
|
||||
|
||||
BIN
docSite/assets/imgs/RAG1.png
Normal file
|
After Width: | Height: | Size: 381 KiB |
BIN
docSite/assets/imgs/RAG2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docSite/assets/imgs/RAG3.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
docSite/assets/imgs/bing_search_plugin1.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
docSite/assets/imgs/bing_search_plugin2.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
docSite/assets/imgs/bing_search_plugin3.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
docSite/assets/imgs/bing_search_plugin4.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
docSite/assets/imgs/bing_search_plugin5.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docSite/assets/imgs/doc2x_plugin1.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
docSite/assets/imgs/doc2x_plugin2.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
docSite/assets/imgs/doc2x_plugin3.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
docSite/assets/imgs/doc2x_plugin4.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docSite/assets/imgs/document_analysis1.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
docSite/assets/imgs/document_analysis2.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node-config.png
Normal file
|
After Width: | Height: | Size: 369 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node-example-1.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node-example-2.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node-example-3.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node-example-4.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node-example-5.png
Normal file
|
After Width: | Height: | Size: 288 KiB |
BIN
docSite/assets/imgs/fastgpt-loop-node.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 152 KiB |
BIN
docSite/assets/imgs/flow-tool5.png
Normal file
|
After Width: | Height: | Size: 338 KiB |
BIN
docSite/assets/imgs/flow-tool6.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docSite/assets/imgs/flow-tool7.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docSite/assets/imgs/form_input1.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
docSite/assets/imgs/form_input2.png
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
docSite/assets/imgs/form_input3.png
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
docSite/assets/imgs/google_search_plugin1.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
docSite/assets/imgs/google_search_plugin2.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
docSite/assets/imgs/google_search_plugin3.png
Normal file
|
After Width: | Height: | Size: 207 KiB |
BIN
docSite/assets/imgs/google_search_plugin4.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
docSite/assets/imgs/image-5.png
Normal file
|
After Width: | Height: | Size: 372 KiB |
BIN
docSite/assets/imgs/image-6.png
Normal file
|
After Width: | Height: | Size: 471 KiB |
BIN
docSite/assets/imgs/image-7.png
Normal file
|
After Width: | Height: | Size: 416 KiB |
BIN
docSite/assets/imgs/integration1.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
docSite/assets/imgs/knowledge_merge1.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
docSite/assets/imgs/knowledge_merge2.png
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
docSite/assets/imgs/knowledge_merge3.png
Normal file
|
After Width: | Height: | Size: 179 KiB |
BIN
docSite/assets/imgs/plugin_submission1.png
Normal file
|
After Width: | Height: | Size: 210 KiB |
BIN
docSite/assets/imgs/plugin_submission2.png
Normal file
|
After Width: | Height: | Size: 275 KiB |
BIN
docSite/assets/imgs/plugin_submission3.png
Normal file
|
After Width: | Height: | Size: 183 KiB |
BIN
docSite/assets/imgs/plugin_submission4.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
docSite/assets/imgs/plugin_submission5.png
Normal file
|
After Width: | Height: | Size: 189 KiB |
BIN
docSite/assets/imgs/plugin_submission6.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
docSite/assets/imgs/plugin_submission7.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
docSite/assets/imgs/points1.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
docSite/assets/imgs/spellcheck1.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
docSite/assets/imgs/spellcheck2.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
docSite/assets/imgs/spellcheck3.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
docSite/assets/imgs/spellcheck4.png
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
docSite/assets/imgs/spellcheck5.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docSite/assets/imgs/template_submission1.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
docSite/assets/imgs/template_submission2.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docSite/assets/imgs/template_submission3.png
Normal file
|
After Width: | Height: | Size: 283 KiB |
BIN
docSite/assets/imgs/template_submission4.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
docSite/assets/imgs/translate1.png
Normal file
|
After Width: | Height: | Size: 261 KiB |
BIN
docSite/assets/imgs/translate10.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
docSite/assets/imgs/translate11.png
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
docSite/assets/imgs/translate12.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
docSite/assets/imgs/translate13.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
docSite/assets/imgs/translate14.png
Normal file
|
After Width: | Height: | Size: 216 KiB |
BIN
docSite/assets/imgs/translate15.png
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
docSite/assets/imgs/translate16.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
docSite/assets/imgs/translate17.png
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
docSite/assets/imgs/translate18.png
Normal file
|
After Width: | Height: | Size: 442 KiB |
BIN
docSite/assets/imgs/translate19.png
Normal file
|
After Width: | Height: | Size: 465 KiB |
BIN
docSite/assets/imgs/translate2.png
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
docSite/assets/imgs/translate20.png
Normal file
|
After Width: | Height: | Size: 434 KiB |
BIN
docSite/assets/imgs/translate21.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
docSite/assets/imgs/translate3.png
Normal file
|
After Width: | Height: | Size: 341 KiB |
BIN
docSite/assets/imgs/translate4.png
Normal file
|
After Width: | Height: | Size: 175 KiB |
BIN
docSite/assets/imgs/translate5.png
Normal file
|
After Width: | Height: | Size: 463 KiB |
BIN
docSite/assets/imgs/translate61.png
Normal file
|
After Width: | Height: | Size: 591 KiB |
BIN
docSite/assets/imgs/translate7.png
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
docSite/assets/imgs/translate8.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
docSite/assets/imgs/translate9.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
docSite/assets/imgs/user-selection1.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
docSite/assets/imgs/user-selection2.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
docSite/assets/imgs/user-selection3.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
docSite/assets/imgs/variable_update1.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docSite/assets/imgs/variable_update2.png
Normal file
|
After Width: | Height: | Size: 179 KiB |
BIN
docSite/assets/imgs/variable_update3.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
docSite/assets/imgs/variable_update4.png
Normal file
|
After Width: | Height: | Size: 175 KiB |
BIN
docSite/assets/imgs/variable_update5.png
Normal file
|
After Width: | Height: | Size: 186 KiB |
@@ -23,6 +23,7 @@ weight: 708
|
||||
"systemEnv": {
|
||||
"vectorMaxProcess": 15,
|
||||
"qaMaxProcess": 15,
|
||||
"tokenWorkers": 50, // Token 计算线程保持数,会持续占用内存,不能设置太大。
|
||||
"pgHNSWEfSearch": 100 // 向量搜索参数。越大,搜索越精确,但是速度越慢。设置为100,有99%+精度。
|
||||
},
|
||||
"llmModels": [
|
||||
|
||||
@@ -35,9 +35,10 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"chatId": "abcd",
|
||||
"chatId": "my_chatId",
|
||||
"stream": false,
|
||||
"detail": false,
|
||||
"responseChatItemId": "my_responseChatItemId",
|
||||
"variables": {
|
||||
"uid": "asdfadsfasfd2323",
|
||||
"name": "张三"
|
||||
@@ -45,7 +46,7 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "导演是谁",
|
||||
"content": "导演是谁"
|
||||
}
|
||||
]
|
||||
}'
|
||||
@@ -104,6 +105,7 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
|
||||
- 为 `undefined` 时(不传入),不使用 FastGpt 提供的上下文功能,完全通过传入的 messages 构建上下文。 不会将你的记录存储到数据库中,你也无法在记录汇总中查阅到。
|
||||
- 为`非空字符串`时,意味着使用 chatId 进行对话,自动从 FastGpt 数据库取历史记录,并使用 messages 数组最后一个内容作为用户问题。请自行确保 chatId 唯一,长度小于250,通常可以是自己系统的对话框ID。
|
||||
- messages: 结构与 [GPT接口](https://platform.openai.com/docs/api-reference/chat/object) chat模式一致。
|
||||
- responseChatItemId: string | undefined 。如果传入,则会将该值作为本次对话的响应消息的 ID,FastGPT 会自动将该 ID 存入数据库。请确保,在当前`chatId`下,`responseChatItemId`是唯一的。
|
||||
- detail: 是否返回中间值(模块状态,响应的完整结果等),`stream模式`下会通过`event`进行区分,`非stream模式`结果保存在`responseData`中。
|
||||
- variables: 模块变量,一个对象,会替换模块中,输入框内容里的`{{key}}`
|
||||
{{% /alert %}}
|
||||
@@ -312,6 +314,149 @@ event取值:
|
||||
{{< /tabs >}}
|
||||
|
||||
|
||||
### 交互节点响应
|
||||
|
||||
如果工作流中包含交互节点,依然是调用该 API 接口,需要设置`detail=true`,并可以从`event=interactive`的数据中获取交互节点的配置信息。如果是`stream=false`,则可以从 choice 中获取`type=interactive`的元素,获取交互节点的选择信息。
|
||||
|
||||
当你调用一个带交互节点的工作流时,如果工作流遇到了交互节点,那么会直接返回,你可以得到下面的信息:
|
||||
|
||||
{{< tabs tabTotal="2" >}}
|
||||
{{< tab tabName="用户选择" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
```json
|
||||
{
|
||||
"interactive": {
|
||||
"type": "userSelect",
|
||||
"params": {
|
||||
"description": "测试",
|
||||
"userSelectOptions": [
|
||||
{
|
||||
"value": "Confirm",
|
||||
"key": "option1"
|
||||
},
|
||||
{
|
||||
"value": "Cancel",
|
||||
"key": "option2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab tabName="表单输入" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
```json
|
||||
{
|
||||
"interactive": {
|
||||
"type": "userInput",
|
||||
"params": {
|
||||
"description": "测试",
|
||||
"inputForm": [
|
||||
{
|
||||
"type": "input",
|
||||
"key": "测试 1",
|
||||
"label": "测试 1",
|
||||
"description": "",
|
||||
"value": "",
|
||||
"defaultValue": "",
|
||||
"valueType": "string",
|
||||
"required": false,
|
||||
"list": [
|
||||
{
|
||||
"label": "",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "numberInput",
|
||||
"key": "测试 2",
|
||||
"label": "测试 2",
|
||||
"description": "",
|
||||
"value": "",
|
||||
"defaultValue": "",
|
||||
"valueType": "number",
|
||||
"required": false,
|
||||
"list": [
|
||||
{
|
||||
"label": "",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
### 交互节点继续运行
|
||||
|
||||
紧接着上一节,当你接收到交互节点信息后,可以根据这些数据进行 UI 渲染,引导用户输入或选择相关信息。然后需要再次发起对话,来继续工作流。调用的接口与仍是该接口,你需要按以下格式来发起请求:
|
||||
|
||||
{{< tabs tabTotal="2" >}}
|
||||
{{< tab tabName="用户选择" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
对于用户选择,你只需要直接传递一个选择的结果给 messages 即可。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"stream": true,
|
||||
"detail": true,
|
||||
"chatId":"22222231",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "Confirm"
|
||||
}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab tabName="表单输入" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
表单输入稍微麻烦一点,需要将输入的内容,以对象形式并序列化成字符串,作为`messages`的值。对象的 key 对应表单的 key,value 为用户输入的值。务必确保`chatId`是一致的。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"stream": true,
|
||||
"detail": true,
|
||||
"chatId":"22231",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "{\"测试 1\":\"这是输入框的内容\",\"测试 2\":666}"
|
||||
}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
|
||||
## 请求插件
|
||||
|
||||
插件的接口与对话接口一致,仅请求参数略有区别,有以下规定:
|
||||
@@ -526,7 +671,8 @@ curl --location --request POST 'http://localhost:3000/api/core/chat/getHistories
|
||||
--data-raw '{
|
||||
"appId": "appId",
|
||||
"offset": 0,
|
||||
"pageSize": 20
|
||||
"pageSize": 20,
|
||||
"source: "api"
|
||||
}'
|
||||
```
|
||||
|
||||
@@ -540,6 +686,7 @@ curl --location --request POST 'http://localhost:3000/api/core/chat/getHistories
|
||||
- appId - 应用 Id
|
||||
- offset - 偏移量,即从第几条数据开始取
|
||||
- pageSize - 记录数量
|
||||
- source - 对话源
|
||||
{{% /alert %}}
|
||||
|
||||
{{< /markdownify >}}
|
||||
|
||||
@@ -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 无法更新
|
||||
|
||||
@@ -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. 优化 - 高级编排连接线交互
|
||||
|
||||
@@ -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设计。
|
||||
|
||||
@@ -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. 修复 - 语音输入文件无法上传。
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.12(进行中)'
|
||||
title: 'V4.8.12(需要初始化)'
|
||||
description: 'FastGPT V4.8.12 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
@@ -13,14 +13,14 @@ weight: 812
|
||||
|
||||
### 2. 修改镜像
|
||||
|
||||
- 更新 FastGPT 镜像 tag: v4.8.12-beta
|
||||
- 更新 FastGPT 商业版镜像 tag: v4.8.12-beta
|
||||
- 更新 FastGPT 镜像 tag: v4.8.12-fix
|
||||
- 更新 FastGPT 管理端镜像 tag: v4.8.12 (fastgpt-pro镜像)
|
||||
- Sandbox 镜像,可以不更新
|
||||
|
||||
|
||||
### 3. 商业版执行初始化
|
||||
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 商业版域名**。
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 管理端域名**。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://{{host}}/api/admin/init/4812' \
|
||||
@@ -30,6 +30,18 @@ curl --location --request POST 'https://{{host}}/api/admin/init/4812' \
|
||||
|
||||
会初始化应用和知识库的成员组数据。
|
||||
|
||||
### 4. 重构 Milvus 数据
|
||||
|
||||
由于 js int64 精度丢失问题,之前私有化使用 milvus 或者 zilliz 的用户,如果存在数据精度丢失的问题,需要重构 Milvus 数据。(可以查看 dataset_datas 表中,indexes 中的 dataId 是否末尾精度丢失)。使用 PG 的用户不需要操作。
|
||||
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 主域名**。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://{{host}}/api/admin/resetMilvus' \
|
||||
--header 'rootkey: {{rootkey}}' \
|
||||
--header 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
## 更新说明
|
||||
|
||||
1. 新增 - 全局变量支持数字类型,支持配置默认值和部分输入框参数。
|
||||
@@ -45,10 +57,12 @@ curl --location --request POST 'https://{{host}}/api/admin/init/4812' \
|
||||
11. 新增 - HTTP 节点支持 JSONPath 表达式
|
||||
12. 新增 - 应用和知识库支持成员组配置权限
|
||||
13. 优化 - 循环节点支持选择外部节点的变量
|
||||
14. 修复 - 文件后缀判断,去除 query 影响。
|
||||
15. 修复 - AI 响应为空时,会造成 LLM 历史记录合并。
|
||||
16. 修复 - 用户交互节点未阻塞流程。
|
||||
17. 修复 - 新建 APP,有时候会导致空指针报错。
|
||||
18. 修复 - 拥有多个循环节点时,错误运行。
|
||||
19. 修复 - 循环节点中修改变量,无法传递。
|
||||
20. 修复 - 非 stream 模式,嵌套子应用/插件执行时无法获取子应用响应。
|
||||
14. 优化 - Docx 文件读取中, HTML to Markdown 优化,提高速度和大幅度降低内存消耗。
|
||||
15. 修复 - 文件后缀判断,去除 query 影响。
|
||||
16. 修复 - AI 响应为空时,会造成 LLM 历史记录合并。
|
||||
17. 修复 - 用户交互节点未阻塞流程。
|
||||
18. 修复 - 新建 APP,有时候会导致空指针报错。
|
||||
19. 修复 - 拥有多个循环节点时,错误运行。
|
||||
20. 修复 - 循环节点中修改变量,无法传递。
|
||||
21. 修复 - 非 stream 模式,嵌套子应用/插件执行时无法获取子应用响应。
|
||||
22. 修复 - 数据分块策略,同时将每个 Markdown 独立分块。
|
||||
|
||||