perf: lafgpt

This commit is contained in:
archer 2023-04-12 19:03:27 +08:00
parent c605964fa8
commit e903eb5b94
No known key found for this signature in database
GPG Key ID: 166CA6BF2383B2BB

View File

@ -83,25 +83,26 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
:
.
1. query phone.
2. ,,消息为:手机号格式错误.
2. ,501,原因为:手机号格式错误.
3. phone ,6,内容为:你正在注册laf,验证码为:code.
4. ,"codes", {phone, code}.
,.
1. body phone code.
2. ,,消息为:手机号格式错误.
2. ,"codes", phone, code body参数的记录,,消息为:验证码不正确.
2. ,501,原因为:手机号格式错误.
2. ,"codes", phone, code body参数的记录,500,原因为:验证码不正确.
4. ,"users" ,{phone, code, createTime}.
5. , code .
6. 返回新建用户的Id: return {userId}
blogId,blogText,tags,.
1. body blogId,blogText tags.
2. blogId ,,消息为:博客ID不能为空.
3. blogText ,,消息为:博客内容不能为空.
4. tags ,,消息为:标签必须为数组.
2. blogId ,500,原因为:博客ID不能为空.
3. blogText ,500,原因为:博客内容不能为空.
4. tags ,500,原因为:标签必须为数组.
5. , updateTime.
6. ,"blogs", blogId {blogText, tags, updateTime}.
7. {message: "更新博客记录成功"}.`
7. "更新博客记录成功"`
},
{
role: 'user',
@ -161,8 +162,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
}
}
// textArr 筛选,最多 3200 tokens
const systemPrompt = systemPromptFilter(formatRedisPrompt, 3200);
// textArr 筛选,最多 3000 tokens
const systemPrompt = systemPromptFilter(formatRedisPrompt, 3000);
prompts.unshift({
obj: 'SYSTEM',