correction

This commit is contained in:
Kar
2025-01-06 19:22:28 +05:30
parent f68b1e78e0
commit 4d9a785812
3 changed files with 10 additions and 9 deletions

View File

@@ -1,11 +1,10 @@
const aiFeedbackOnReport = async (req, res) => {
// const fetch = require('node-fetch');
const fetch = require('node-fetch');
const url = process.env.AI_API_ENDOINT;
const api_key = process.env.AI_API_KEY;
const api_key = process.env.OPENAI_KEY;
const payload = {
"model": "gpt-4o-mini",
"messages": [{ "role": "user",
"content": JSON.stringify(req.body.score) + " - is the students report card. " + req.body.instruction }]
"messages": [{ "role": "user", "content": JSON.stringify(req.body.score) + " - is the students report card. " + req.body.instruction }]
}
try {
const apiResponse = await fetch(url, {