From 59bcdcc3e8946fdadaab0a859bb39155da58eba7 Mon Sep 17 00:00:00 2001 From: Suvodip Date: Sat, 22 Feb 2025 11:31:36 +0530 Subject: [PATCH] add system in aiTest --- src/routes/api/aiTest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/api/aiTest.js b/src/routes/api/aiTest.js index d8fdff1..a034bbd 100644 --- a/src/routes/api/aiTest.js +++ b/src/routes/api/aiTest.js @@ -56,7 +56,7 @@ const aiFollowupQuestion = async (req, res) => { try { - const { prompt, sessionId, provider, model = "gpt-4o-mini", key } = req.body; + const { prompt, sessionId, provider, model = "gpt-4o-mini", key, system } = req.body; if (!key || !PROVIDER_KEYS.includes(key)) { return res.status(403).json({ @@ -101,7 +101,7 @@ const aiFollowupQuestion = async (req, res) => { conversation = { sessionId: newSessionId, conversationHistory: [ - { role: 'system', content: 'answer within 10 words' }, + { role: 'system', content: system }, { role: 'user', content: prompt }, ], };