Open SonnyFishback opened 6 months ago
Hey brother, @jaime1127. I am going to start working on this as well. Push up what you have when you get a chance so we don't duplicate work.
I am woking on the dashboard page and this is coupled to this feature.
My latest changes have been sent
Start an Interview
API first:
Create the API route and
+page.server.ts
file.Install Open AI API
Configure environment variable
Import SDK
Call to GPT to generate a JSON list of questions that contain the question and an accurate answer to that question. The goal is to 1. Generate a list of questions and 2. Generate a list of answers to each question that when we ask GPT to compare the question and answer then it will be able to accurately determine if the questions "wrongness or rightness level".
Depending on if the user opts into multiple choice or not we will need to be able to generate not only one question but three for each. One question will be the AI generated "right answer" and the other two will be "wrong".
The form action should:
Should execute the following logic/functionality:
IF (user wants text to speech functionality in interview)
Loops through questions and generate MP3 audio files from AWS Polly via AWS Polly SDK. You can create a shell function and return a hard coded mp3 audio file.
END IF:
Loops through questions and answers and stores them both in DB using Prisma ORM.
RETURNS:
Page Route next:
Create the +page.svelte
Create a form that uses the
use:action
attribute and submits to the form action in the+page.server.ts
file