Commit 4973d7ad by archer

fix: default vector

parent defc7365
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment