perf: 微调截止词

This commit is contained in:
archer
2023-03-26 15:27:57 +08:00
parent 9125910cfe
commit e547893ac1
4 changed files with 9 additions and 8 deletions

View File

@@ -78,7 +78,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// model.trainingTimes > 0 ? modelConstantsData.trainedMaxToken : modelConstantsData.maxToken,
// presence_penalty: -0.5, // 越大,越容易出现新内容
// frequency_penalty: 0.5, // 越大,重复内容越少
// stop: [`</s>`, '。!?.!.']
// stop: [`###`]
// });
// 发出请求
const chatResponse = await chatAPI.createCompletion(
@@ -93,7 +93,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
: modelConstantsData.maxToken,
presence_penalty: -0.5, // 越大,越容易出现新内容
frequency_penalty: 0.5, // 越大,重复内容越少
stop: [`</s>`, '。!?.!.']
stop: [`###`, '。!?.!.']
},
{
timeout: 40000,