Skip to content

Commit

Permalink
created feedback prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
YoBulkMaster committed Mar 9, 2023
1 parent c933ba3 commit 1d09372
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pages/api/yobulk-ai/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ export default async function feedback(req, res) {
console.log(resp);
res.json({ status: 200, data: resp });
break;

case 'POST':
console.log(req.body);
let csvPrompt = `you are a potential data error finder. Find semantic data errors in below json data. Send all the feedback for each key value pair as json object. \n
${JSON.stringify(req.body)}
`;
console.log(csvPrompt);
let csvresp = await getGPTResponse(csvPrompt, 100, 0, 0);
console.log('Feedback', csvresp);
res.json({ status: 200, data: csvresp });
break;

default:
res.json({ status: 405, data: 'Method not found' });
break;
Expand Down

1 comment on commit 1d09372

@vercel
Copy link

@vercel vercel bot commented on 1d09372 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

yobulkdev – ./

yobulkdev-master-yobulkdev-s-team.vercel.app
yobulkdev-git-main-master-yobulkdev-s-team.vercel.app

Please sign in to comment.