We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30f2df0 commit 02521eeCopy full SHA for 02521ee
app/nodejs/simple/api/v2.js
@@ -57,7 +57,9 @@ module.exports = (app) => {
57
const prompt = req.body.prompt;
58
if (!prompt) {
59
return res.status(400).send('Prompt is required');
60
- }
+ }
61
+
62
+ console.info(`\n\nUser Prompt:\n${prompt}`);
63
64
// Add the user's prompt to the conversation history
65
appendConversationHistory("user", prompt);
@@ -98,6 +100,8 @@ module.exports = (app) => {
98
100
const systemResponse = chatResponse.choices[0].message.content;
99
101
appendConversationHistory("assistant", systemResponse, chatResponse);
102
103
+ console.info(`\n\nAI Response:\n${systemResponse}`);
104
105
//return res.json({ response: systemResponse });
106
return res.json(chatResponse);
107
} catch (error) {
0 commit comments