This project generates interview questions based on user input. The user can specify the number of questions per category and the categories they want to generate questions for. The project will use AI from Azure OpenAI to generate questions and answers. You will need an Azure OpenAI API key to use this project.
-
Clone the repository:
git clone https://github.com/photonn/local_ai_inteview.git cd local_ai_inteview
-
Install the required dependencies:
npm install
-
Create a
.env
file in the root directory and add your Azure OpenAI API key and API endpoint:AZURE_OPENAI_API_KEY=your_azure_openai_api_key API_ENDPOINT=your_api_endpoint
-
Start the server:
node server.js
-
Open your browser and navigate to
http://localhost:3000
. -
Enter the number of questions per category in the "Number of questions per category" field.
-
Enter the categories you want to generate questions for in the "Categories" field (comma-separated).
-
Click on "Submit".
-
The page will then display a table with generated interview questions and their answers.
main.html
: The main page where users can enter their preferences for generating interview questions.questions.html
: The page that displays generated interview questions and their answers.css/main.css
: Stylesheet formain.html
.css/questions.css
: Stylesheet forquestions.html
.js/index.js
: JavaScript file that handles user input and generates interview questions onmain.html
.js/questions.js
: JavaScript file that displays generated interview questions onquestions.html
.server.js
: Server-side code that handles requests for generating questions and answers using the Azure OpenAI API andgpt-4o-mini
model.
The .gitignore
file has been updated to include common entries for Node.js projects, such as node_modules/
, dist/
, *.log
, and retains the existing entry for .env
.