Compare commits
8 Commits
v4.8.18
...
v4.8.18-fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59177d307e | ||
|
|
bfb598d686 | ||
|
|
b780fbd6a7 | ||
|
|
7861229325 | ||
|
|
5b0516c28b | ||
|
|
740e8eb30c | ||
|
|
05a357dffe | ||
|
|
781fd45e39 |
83
.github/workflows/fastgpt-image.yml
vendored
83
.github/workflows/fastgpt-image.yml
vendored
@@ -173,3 +173,86 @@ jobs:
|
||||
-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:
|
||||
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-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sub-route-gchat:latest" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Tag=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat:${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "Docker_Hub_Latest=${{ secrets.DOCKER_IMAGE_NAME }}/fastgpt-sub-route-gchat: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=/gchat \
|
||||
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
|
||||
--label "org.opencontainers.image.description=fastgpt-sub-route-gchat 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/image-83.png
Normal file
BIN
docSite/assets/imgs/image-83.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 144 KiB |
BIN
docSite/assets/imgs/image-84.png
Normal file
BIN
docSite/assets/imgs/image-84.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
BIN
docSite/assets/imgs/image-85.png
Normal file
BIN
docSite/assets/imgs/image-85.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 237 KiB |
BIN
docSite/assets/imgs/image-86.png
Normal file
BIN
docSite/assets/imgs/image-86.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 550 KiB |
BIN
docSite/assets/imgs/image-87.png
Normal file
BIN
docSite/assets/imgs/image-87.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 390 KiB |
@@ -1175,7 +1175,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/data/v2/l
|
||||
}'
|
||||
```
|
||||
|
||||
**4.6.7+**
|
||||
**4.6.7-(即将弃用)**
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'http://localhost:3000/api/core/dataset/data/list' \
|
||||
@@ -1197,8 +1197,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/data/list
|
||||
|
||||
{{% alert icon=" " context="success" %}}
|
||||
|
||||
- pageNum: 偏移量(选填)
|
||||
- pageNum: 页码(选填)
|
||||
- offset: 偏移量(选填)
|
||||
- pageSize: 每页数量,最大30(选填)
|
||||
- collectionId: 集合的ID(必填)
|
||||
- searchText: 模糊搜索词(选填)
|
||||
@@ -1218,9 +1217,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/data/list
|
||||
"statusText": "",
|
||||
"message": "",
|
||||
"data": {
|
||||
"pageNum": 1,
|
||||
"pageSize": 10,
|
||||
"data": [
|
||||
"list": [
|
||||
{
|
||||
"_id": "65abd4b29d1448617cba61db",
|
||||
"datasetId": "65abc9bd9d1448617cba5e6c",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.18(进行中)'
|
||||
title: 'V4.8.18'
|
||||
description: 'FastGPT V4.8.18 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
@@ -9,6 +9,12 @@ weight: 806
|
||||
|
||||
## 更新指南
|
||||
|
||||
### 1. 更新镜像:
|
||||
|
||||
- 更新 fastgpt 镜像 tag: v4.8.18-fix
|
||||
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.18-fix
|
||||
- Sandbox 镜像无需更新
|
||||
|
||||
### 2. 运行升级脚本
|
||||
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 域名**。
|
||||
|
||||
@@ -7,7 +7,7 @@ toc: true
|
||||
weight: 908
|
||||
---
|
||||
|
||||
## 工作流中多轮对话场景中如何使连续问题被问题分类节点正确的归类
|
||||
## 多轮对话中如何使连续问题被问题分类节点正确的归类
|
||||
|
||||
问题分类节点具有获取上下文信息的能力,当处理两个关联性较大的问题时,模型的判断准确性往往依赖于这两个问题之间的联系和模型的能力。例如,当用户先问“我该如何使用这个功能?”接着又询问“这个功能有什么限制?”时,模型借助上下文信息,就能够更精准地理解并响应。
|
||||
|
||||
@@ -15,10 +15,26 @@ weight: 908
|
||||
|
||||
建议:构建批量运行脚本进行测试,评估问题分类的准确性。
|
||||
|
||||
## 系统编排配置中的定时执行,如果用户打开分享的连接,停留在那个页面,定时执行触发问题
|
||||
## 定时执行的时机问题
|
||||
|
||||
发布后,后台生效。
|
||||
系统编排配置中的定时执行,如果用户打开分享的连接,停留在那个页面,定时执行触发问题:
|
||||
|
||||
定时执行会在应用发布后生效,会在后台生效。
|
||||
|
||||
## AI对话回答要求中的Markdown语法取消
|
||||
|
||||
在针对知识库的回答要求里有, 要给它配置提示词,不然他就是默认的,默认的里面就有该语法。
|
||||
修改知识库默认提示词, 默认用的是标准模板提示词,会要求按 Markdown 输出,可以去除该要求:
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
## 应用在不同来源效果不一致
|
||||
|
||||
Q: 应用在调试和正式发布后,效果不一致;在 API 调用时,效果不一致。
|
||||
|
||||
A: 通常是由于上下文不一致导致,可以在对话日志中,找到对应的记录,并查看运行详情来进行比对。
|
||||
|
||||
| | | |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
@@ -100,10 +100,9 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
||||
const concatVariables = {
|
||||
...variables,
|
||||
...body,
|
||||
// ...dynamicInput,
|
||||
...systemVariables
|
||||
};
|
||||
const allVariables = {
|
||||
const allVariables: Record<string, any> = {
|
||||
[NodeInputKeyEnum.addInputParam]: concatVariables,
|
||||
...concatVariables
|
||||
};
|
||||
@@ -135,19 +134,10 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
||||
return String(val);
|
||||
};
|
||||
|
||||
// 1. Replace {{key}} variables
|
||||
const regex1 = /{{([^}]+)}}/g;
|
||||
const matches1 = text.match(regex1) || [];
|
||||
const uniqueKeys1 = [...new Set(matches1.map((match) => match.slice(2, -2)))];
|
||||
for (const key of uniqueKeys1) {
|
||||
text = text.replace(new RegExp(`{{(${key})}}`, 'g'), () => valToStr(variables[key]));
|
||||
}
|
||||
|
||||
// 2. Replace {{key.key}} variables
|
||||
const regex2 = /\{\{\$([^.]+)\.([^$]+)\$\}\}/g;
|
||||
const matches2 = [...text.matchAll(regex2)];
|
||||
if (matches2.length === 0) return text;
|
||||
matches2.forEach((match) => {
|
||||
// 1. Replace {{key.key}} variables
|
||||
const regex1 = /\{\{\$([^.]+)\.([^$]+)\$\}\}/g;
|
||||
const matches1 = [...text.matchAll(regex1)];
|
||||
matches1.forEach((match) => {
|
||||
const nodeId = match[1];
|
||||
const id = match[2];
|
||||
|
||||
@@ -173,6 +163,14 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
||||
text = text.replace(regex, () => formatVal);
|
||||
});
|
||||
|
||||
// 2. Replace {{key}} variables
|
||||
const regex2 = /{{([^}]+)}}/g;
|
||||
const matches2 = text.match(regex2) || [];
|
||||
const uniqueKeys2 = [...new Set(matches2.map((match) => match.slice(2, -2)))];
|
||||
for (const key of uniqueKeys2) {
|
||||
text = text.replace(new RegExp(`{{(${key})}}`, 'g'), () => valToStr(allVariables[key]));
|
||||
}
|
||||
|
||||
return text.replace(/(".*?")\s*:\s*undefined\b/g, '$1: null');
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ const HttpInput = ({
|
||||
|
||||
const onChangeInput = useCallback(
|
||||
(editorState: EditorState, editor: LexicalEditor) => {
|
||||
const text = editorStateToText(editor).replaceAll('}}{{', '}} {{');
|
||||
const text = editorStateToText(editor);
|
||||
setCurrentValue(text);
|
||||
onChange?.(text);
|
||||
},
|
||||
@@ -39,7 +39,7 @@ const HttpInput = ({
|
||||
);
|
||||
const onBlurInput = useCallback(
|
||||
(editor: LexicalEditor) => {
|
||||
const text = editorStateToText(editor).replaceAll('}}{{', '}} {{');
|
||||
const text = editorStateToText(editor);
|
||||
onBlur?.(text);
|
||||
},
|
||||
[onBlur]
|
||||
|
||||
@@ -40,14 +40,14 @@ const PromptEditor = ({
|
||||
|
||||
const onChangeInput = useCallback(
|
||||
(editorState: EditorState, editor: LexicalEditor) => {
|
||||
const text = editorStateToText(editor).replaceAll('}}{{', '}} {{');
|
||||
const text = editorStateToText(editor);
|
||||
onChange?.(text);
|
||||
},
|
||||
[onChange]
|
||||
);
|
||||
const onBlurInput = useCallback(
|
||||
(editor: LexicalEditor) => {
|
||||
const text = editorStateToText(editor).replaceAll('}}{{', '}} {{');
|
||||
const text = editorStateToText(editor);
|
||||
onBlur?.(text);
|
||||
},
|
||||
[onBlur]
|
||||
|
||||
Reference in New Issue
Block a user