mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-16 08:01:18 +00:00
fix: chinese name export (#4890)
* fix: chinese name export * fix: xlsx white space * doc * doc
This commit is contained in:
@@ -30,4 +30,5 @@ weight: 790
|
|||||||
2. 流响应捕获 finish_reason 可能不正确。
|
2. 流响应捕获 finish_reason 可能不正确。
|
||||||
3. 工具调用模式,未保存思考输出。
|
3. 工具调用模式,未保存思考输出。
|
||||||
4. 知识库 indexSize 参数未生效。
|
4. 知识库 indexSize 参数未生效。
|
||||||
5. 工作流嵌套 2 层后,获取预览引用、上下文不正确。
|
5. 工作流嵌套 2 层后,获取预览引用、上下文不正确。
|
||||||
|
6. xlsx 转成 Markdown 时候,前面会多出一个空格。
|
@@ -28,7 +28,6 @@ FastGPT 商业版是基于 FastGPT 开源版的增强版本,增加了一些独
|
|||||||
| 应用发布安全配置 | ❌ | ✅ | ✅ |
|
| 应用发布安全配置 | ❌ | ✅ | ✅ |
|
||||||
| 内容审核 | ❌ | ✅ | ✅ |
|
| 内容审核 | ❌ | ✅ | ✅ |
|
||||||
| web站点同步 | ❌ | ✅ | ✅ |
|
| web站点同步 | ❌ | ✅ | ✅ |
|
||||||
| 主流文档库接入(目前支持:语雀、飞书) | ❌ | ✅ | ✅ |
|
|
||||||
| 增强训练模式 | ❌ | ✅ | ✅ |
|
| 增强训练模式 | ❌ | ✅ | ✅ |
|
||||||
| 第三方应用快速接入(飞书、公众号) | ❌ | ✅ | ✅ |
|
| 第三方应用快速接入(飞书、公众号) | ❌ | ✅ | ✅ |
|
||||||
| 管理后台 | ❌ | ✅ | 不需要 |
|
| 管理后台 | ❌ | ✅ | 不需要 |
|
||||||
|
@@ -28,11 +28,11 @@ export const readXlsxRawText = async ({
|
|||||||
if (!header) return;
|
if (!header) return;
|
||||||
|
|
||||||
const formatText = `| ${header.join(' | ')} |
|
const formatText = `| ${header.join(' | ')} |
|
||||||
| ${header.map(() => '---').join(' | ')} |
|
| ${header.map(() => '---').join(' | ')} |
|
||||||
${csvArr
|
${csvArr
|
||||||
.slice(1)
|
.slice(1)
|
||||||
.map((row) => `| ${row.map((item) => item.replace(/\n/g, '\\n')).join(' | ')} |`)
|
.map((row) => `| ${row.map((item) => item.replace(/\n/g, '\\n')).join(' | ')} |`)
|
||||||
.join('\n')}`;
|
.join('\n')}`;
|
||||||
|
|
||||||
return formatText;
|
return formatText;
|
||||||
})
|
})
|
||||||
|
@@ -48,7 +48,7 @@ async function handler(req: ApiRequestProps<backupBody, backupQuery>, res: ApiRe
|
|||||||
encoding: file.encoding,
|
encoding: file.encoding,
|
||||||
getFormatText: false
|
getFormatText: false
|
||||||
});
|
});
|
||||||
if (!rawText.startsWith('q,a,indexes')) {
|
if (!rawText.trim().startsWith('q,a,indexes')) {
|
||||||
return Promise.reject('Backup file start with "q,a,indexes"');
|
return Promise.reject('Backup file start with "q,a,indexes"');
|
||||||
}
|
}
|
||||||
// 2. delete tmp file
|
// 2. delete tmp file
|
||||||
|
@@ -50,7 +50,10 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
res.setHeader('Content-Type', 'text/csv; charset=utf-8;');
|
res.setHeader('Content-Type', 'text/csv; charset=utf-8;');
|
||||||
res.setHeader('Content-Disposition', `attachment; filename=${dataset.name}-backup.csv;`);
|
res.setHeader(
|
||||||
|
'Content-Disposition',
|
||||||
|
`attachment; filename=${encodeURIComponent(dataset.name)}-backup.csv;`
|
||||||
|
);
|
||||||
|
|
||||||
const cursor = MongoDatasetData.find<DataItemType>(
|
const cursor = MongoDatasetData.find<DataItemType>(
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user