perf: 账号页异步加载组件

This commit is contained in:
archer
2023-04-06 18:30:47 +08:00
parent 9a45fb64c2
commit 77dc961a07
4 changed files with 187 additions and 137 deletions

View File

@@ -71,7 +71,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
`idx:${VecModelDataPrefix}:hash`,
`@modelId:{${String(
chat.modelId._id
)}} @vector:[VECTOR_RANGE 0.22 $blob]=>{$YIELD_DISTANCE_AS: score}`,
)}} @vector:[VECTOR_RANGE 0.24 $blob]=>{$YIELD_DISTANCE_AS: score}`,
// `@modelId:{${String(chat.modelId._id)}}=>[KNN 10 @vector $blob AS score]`,
'RETURN',
'1',
@@ -105,8 +105,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
throw new Error('对不起,我没有找到你的问题');
}
// textArr 筛选,最多 3200 tokens
const systemPrompt = systemPromptFilter(formatRedisPrompt, 3200);
// textArr 筛选,最多 3000 tokens
const systemPrompt = systemPromptFilter(formatRedisPrompt, 3000);
prompts.unshift({
obj: 'SYSTEM',