2 Commits

Author SHA1 Message Date
Suvodip
59bcdcc3e8 add system in aiTest 2025-02-22 11:31:36 +05:30
ab74529965 Merge pull request 'Update src/routes/v1/api.route.js' (#25) from suvo-patch-1 into master
Reviewed-on: #25
2025-02-11 11:21:10 +00:00

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