From 87afa13a4273a5757eba3d74dfded3402bb2c28f Mon Sep 17 00:00:00 2001 From: Kar l5 Date: Wed, 1 Jan 2025 21:25:10 +0530 Subject: [PATCH] reply cap --- src/routes/api/aiFollowupQuestion.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/api/aiFollowupQuestion.js b/src/routes/api/aiFollowupQuestion.js index 9991971..3726db4 100644 --- a/src/routes/api/aiFollowupQuestion.js +++ b/src/routes/api/aiFollowupQuestion.js @@ -20,7 +20,11 @@ const aiFollowupQuestion = async (req, res) => { }, body: JSON.stringify({ model: model, - messages: messages, + // messages: messages, + messages: [ + { role: "system", content: "reply must not exceed 20 words" }, + { role: "user", content: messages } + ], max_tokens: max_tokens, }), });