aiFeedbackOnReport

galleryApi
Kar 2024-09-20 15:28:37 +05:30
parent 67bc3e9995
commit f490aac87e
1 changed files with 0 additions and 2 deletions

View File

@ -1,13 +1,11 @@
const aiFeedbackOnReport = async (req, res) => {
const url = process.env.AI_API_ENDOINT;
const api_key = process.env.AI_API_KEY;
console.log(req.body.score);
const payload = {
"model": "gpt-4o-mini",
"messages": [{ "role": "user",
"content": JSON.stringify(req.body.score) + " - is a sample of a students report card " + req.body.instruction }]
}
// res.send(req);
try {
const apiResponse = await fetch(url, {
method: 'POST',