Closed SwindleA closed 9 months ago
Updated JSON:
const payload = { 'sender_email': sender_email, 'recipient_email': recipient_email, 'subject': subject, 'email_message' : email_message }
This is what is sent from the google extension to the backend for further prompt design
NOTE: more up to date front end is in issue #7 so no further front end changes should be made in this issue.
Most up to date JSON: payload= { 'sender_email': sender_email, 'sender_email_domain' : email_domain, 'sender_name': sender_name, 'recipient_email': recipient_email, 'subject': subject, 'email_message' : decoded }
We need to figure out the best way to ask GPT about the email. Here is a suggested json that is sent from the front end to back end:
`{ 'sender_email' : 'email@email.com' 'receiver_email' : 'an@gmail.com' 'subject' : 'email subject' 'body_message' : ''main body of the email'
} `
On the backend, two things need to be done:
Here is an example:
Return the yes/no and the explanation to the front end.
NOTE: we need to get the yes/no then ask for the explanation because in my (Adrian) experience, the yes/no does not always line up with the explanation.
Make sure to get explicit yes/no response for categorizing the email.
We may also want to limit the length of the evaluation in order to not display too much information to the user.