feat: maxToken setting

This commit is contained in:
archer
2023-06-18 21:23:36 +08:00
parent ee9afa310a
commit ff2043c0fb
7 changed files with 54 additions and 6 deletions

View File

@@ -180,6 +180,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
await modelServiceToolMap[model.chat.chatModel].chatCompletion({
apiKey: userOpenAiKey || apiKey,
temperature: +temperature,
maxToken: model.chat.maxToken,
messages: completePrompts,
stream,
res