mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix: default vector
This commit is contained in:
@@ -76,11 +76,13 @@ const defaultQAModel = {
|
||||
price: 0
|
||||
};
|
||||
|
||||
const defaultVectorModels = [
|
||||
const defaultVectorModels: VectorModelItemType[] = [
|
||||
{
|
||||
model: 'text-embedding-ada-002',
|
||||
name: 'Embedding-2',
|
||||
price: 0
|
||||
price: 0,
|
||||
defaultToken: 500,
|
||||
maxToken: 3000
|
||||
}
|
||||
];
|
||||
|
||||
|
@@ -32,7 +32,7 @@ export async function dispatchKBSearch(props: Record<string, any>): Promise<KBSe
|
||||
}
|
||||
|
||||
// get vector
|
||||
const vectorModel = kbList[0]?.vectorModel;
|
||||
const vectorModel = kbList[0]?.vectorModel || global.vectorModels[0];
|
||||
const { vectors, tokenLen } = await getVector({
|
||||
model: vectorModel.model,
|
||||
input: [userChatInput]
|
||||
|
Reference in New Issue
Block a user