Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add baidu mochow vdb #3605

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/service/common/vectorStore/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ export const DatasetVectorTableName = 'modeldata';
export const PG_ADDRESS = process.env.PG_URL;
export const MILVUS_ADDRESS = process.env.MILVUS_ADDRESS;
export const MILVUS_TOKEN = process.env.MILVUS_TOKEN;

export const MOCHOW_ADDRESS = process.env.MOCHOW_ADDRESS;
export const MOCHOW_ACCOUNT = process.env.MOCHOW_ACCOUNT;
export const MOCHOW_APIKEY = process.env.MOCHOW_APIKEY;
export const MOCHOW_REPLICA_NUM = process.env.MOCHOW_REPLICA_NUM;
4 changes: 3 additions & 1 deletion packages/service/common/vectorStore/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { PgVectorCtrl } from './pg/class';
import { getVectorsByText } from '../../core/ai/embedding';
import { InsertVectorProps } from './controller.d';
import { VectorModelItemType } from '@fastgpt/global/core/ai/model.d';
import { MILVUS_ADDRESS, PG_ADDRESS } from './constants';
import { MILVUS_ADDRESS, MOCHOW_ADDRESS, PG_ADDRESS } from './constants';
import { MilvusCtrl } from './milvus/class';
import { MochowCtrl } from './mochow/class';

const getVectorObj = () => {
if (PG_ADDRESS) return new PgVectorCtrl();
if (MILVUS_ADDRESS) return new MilvusCtrl();
if (MOCHOW_ADDRESS) return new MochowCtrl();

return new PgVectorCtrl();
};
Expand Down
Loading
Loading