Merge pull request 'add system in aiTest' (#26) from branch2 into master

Reviewed-on: #26
master
Subhodip Ghosh 2025-02-22 06:01:57 +00:00
commit 76e503c4a9
1 changed files with 2 additions and 2 deletions

View File

@ -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 },
],
};