mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
Update doc (#1430)
This commit is contained in:
@@ -104,7 +104,7 @@ OneAPI 账号的余额不足,默认 root 用户只有 200 刀,可以手动
|
|||||||
FastGPT 模型配置文件中的 model 必须与 OneAPI 渠道中的模型对应上,否则就会提示这个错误。可检查下面内容:
|
FastGPT 模型配置文件中的 model 必须与 OneAPI 渠道中的模型对应上,否则就会提示这个错误。可检查下面内容:
|
||||||
|
|
||||||
1. OneAPI 中没有配置该模型渠道,或者被禁用了。
|
1. OneAPI 中没有配置该模型渠道,或者被禁用了。
|
||||||
2. 修改了 FastGPT 配置文件中一部分的模型,但没有全部修改,仍有模型是 OneAPI 没配置的。
|
2. FastGPT 配置文件有 OneAPI 没有配置的模型。如果 OneAPI 没有配置对应模型的,配置文件中也不要写。
|
||||||
3. 使用旧的向量模型创建了知识库,后又更新了向量模型。这时候需要删除以前的知识库,重建。
|
3. 使用旧的向量模型创建了知识库,后又更新了向量模型。这时候需要删除以前的知识库,重建。
|
||||||
|
|
||||||
如果OneAPI中,没有配置对应的模型,`config.json`中也不要配置,否则容易报错。
|
如果OneAPI中,没有配置对应的模型,`config.json`中也不要配置,否则容易报错。
|
||||||
|
@@ -1,12 +1,18 @@
|
|||||||
---
|
---
|
||||||
weight: 749
|
weight: 762
|
||||||
title: "FastGPT mongodump跨环境迁移fastgpt数据库"
|
title: "Docker Mongo迁移(dump模式)"
|
||||||
description: "FastGPT 私有部署数据迁移问题"
|
description: "FastGPT Docker Mongo迁移"
|
||||||
icon: upgrade
|
icon: database
|
||||||
draft: false
|
draft: false
|
||||||
images: []
|
images: []
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 作者
|
||||||
|
|
||||||
|
[https://github.com/samqin123](https://github.com/samqin123)
|
||||||
|
|
||||||
|
[相关PR。有问题可打开这里与作者交流](https://github.com/labring/FastGPT/pull/1426)
|
||||||
|
|
||||||
## 介绍
|
## 介绍
|
||||||
|
|
||||||
如何使用Mongodump来完成从A环境到B环境的Fastgpt的mongodb迁移
|
如何使用Mongodump来完成从A环境到B环境的Fastgpt的mongodb迁移
|
9
docSite/content/docs/development/migration/_index.md
Normal file
9
docSite/content/docs/development/migration/_index.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
weight: 960
|
||||||
|
title: "迁移&备份"
|
||||||
|
description: "FastGPT 迁移&备份"
|
||||||
|
icon: settings_backup_restore
|
||||||
|
draft: false
|
||||||
|
images: []
|
||||||
|
---
|
||||||
|
<!-- 960~970 -->
|
15
docSite/content/docs/development/migration/docker_db.md
Normal file
15
docSite/content/docs/development/migration/docker_db.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
weight: 762
|
||||||
|
title: "Docker 数据库迁移(无脑操作)"
|
||||||
|
description: "FastGPT Docker 数据库备份和迁移"
|
||||||
|
icon: database
|
||||||
|
draft: false
|
||||||
|
images: []
|
||||||
|
---
|
||||||
|
|
||||||
|
## Copy文件
|
||||||
|
|
||||||
|
Docker 部署数据库都会通过 volume 挂载本地的目录进入容器,如果要迁移,直接复制这些目录即可。
|
||||||
|
|
||||||
|
`PG 数据`: pg/data
|
||||||
|
`Mongo 数据`: mongo/data
|
@@ -2,6 +2,7 @@ import { VectorModelItemType } from '@fastgpt/global/core/ai/model.d';
|
|||||||
import { getAIApi } from '../config';
|
import { getAIApi } from '../config';
|
||||||
import { countPromptTokens } from '../../../common/string/tiktoken/index';
|
import { countPromptTokens } from '../../../common/string/tiktoken/index';
|
||||||
import { EmbeddingTypeEnm } from '@fastgpt/global/core/ai/constants';
|
import { EmbeddingTypeEnm } from '@fastgpt/global/core/ai/constants';
|
||||||
|
import { addLog } from '../../../common/system/log';
|
||||||
|
|
||||||
type GetVectorProps = {
|
type GetVectorProps = {
|
||||||
model: VectorModelItemType;
|
model: VectorModelItemType;
|
||||||
@@ -32,6 +33,7 @@ export async function getVectorsByText({ model, input, type }: GetVectorProps) {
|
|||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
if (!res.data) {
|
if (!res.data) {
|
||||||
|
addLog.error('Embedding API is not responding', res);
|
||||||
return Promise.reject('Embedding API is not responding');
|
return Promise.reject('Embedding API is not responding');
|
||||||
}
|
}
|
||||||
if (!res?.data?.[0]?.embedding) {
|
if (!res?.data?.[0]?.embedding) {
|
||||||
|
Reference in New Issue
Block a user