Skip to content

Commit

Permalink
Update doc (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored May 10, 2024
1 parent 50716ff commit 08a310c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docSite/content/docs/development/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ OneAPI 账号的余额不足,默认 root 用户只有 200 刀,可以手动
FastGPT 模型配置文件中的 model 必须与 OneAPI 渠道中的模型对应上,否则就会提示这个错误。可检查下面内容:

1. OneAPI 中没有配置该模型渠道,或者被禁用了。
2. 修改了 FastGPT 配置文件中一部分的模型,但没有全部修改,仍有模型是 OneAPI 没配置的
2. FastGPT 配置文件有 OneAPI 没有配置的模型。如果 OneAPI 没有配置对应模型的,配置文件中也不要写
3. 使用旧的向量模型创建了知识库,后又更新了向量模型。这时候需要删除以前的知识库,重建。

如果OneAPI中,没有配置对应的模型,`config.json`中也不要配置,否则容易报错。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
---
weight: 749
title: "FastGPT mongodump跨环境迁移fastgpt数据库"
description: "FastGPT 私有部署数据迁移问题"
icon: upgrade
weight: 762
title: "Docker Mongo迁移(dump模式)"
description: "FastGPT Docker Mongo迁移"
icon: database
draft: false
images: []
---

## 作者

[https://github.com/samqin123](https://github.com/samqin123)

[相关PR。有问题可打开这里与作者交流](https://github.com/labring/FastGPT/pull/1426)

## 介绍

如何使用Mongodump来完成从A环境到B环境的Fastgpt的mongodb迁移
Expand Down
9 changes: 9 additions & 0 deletions docSite/content/docs/development/migration/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
weight: 960
title: "迁移&备份"
description: "FastGPT 迁移&备份"
icon: settings_backup_restore
draft: false
images: []
---
<!-- 960~970 -->
15 changes: 15 additions & 0 deletions docSite/content/docs/development/migration/docker_db.md
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions packages/service/core/ai/embedding/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { VectorModelItemType } from '@fastgpt/global/core/ai/model.d';
import { getAIApi } from '../config';
import { countPromptTokens } from '../../../common/string/tiktoken/index';
import { EmbeddingTypeEnm } from '@fastgpt/global/core/ai/constants';
import { addLog } from '../../../common/system/log';

type GetVectorProps = {
model: VectorModelItemType;
Expand Down Expand Up @@ -32,6 +33,7 @@ export async function getVectorsByText({ model, input, type }: GetVectorProps) {
})
.then(async (res) => {
if (!res.data) {
addLog.error('Embedding API is not responding', res);
return Promise.reject('Embedding API is not responding');
}
if (!res?.data?.[0]?.embedding) {
Expand Down

0 comments on commit 08a310c

Please sign in to comment.