commit
76e503c4a9
|
@ -56,7 +56,7 @@ const aiFollowupQuestion = async (req, res) => {
|
||||||
|
|
||||||
try {
|
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)) {
|
if (!key || !PROVIDER_KEYS.includes(key)) {
|
||||||
return res.status(403).json({
|
return res.status(403).json({
|
||||||
|
@ -101,7 +101,7 @@ const aiFollowupQuestion = async (req, res) => {
|
||||||
conversation = {
|
conversation = {
|
||||||
sessionId: newSessionId,
|
sessionId: newSessionId,
|
||||||
conversationHistory: [
|
conversationHistory: [
|
||||||
{ role: 'system', content: 'answer within 10 words' },
|
{ role: 'system', content: system },
|
||||||
{ role: 'user', content: prompt },
|
{ role: 'user', content: prompt },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue