Skip to content

Commit

Permalink
Update quizService.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyRAV committed Sep 15, 2024
1 parent 2d4e9da commit 1ddc5b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/quizService.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const generateQuizQuestions = async (interests, numberOfQuestions) => {
const openai = new OpenAI(OPENAI_API_KEY);
const response = await openai.chat.completions.create({
model: gpt_model,
response_format: { type: 'json_object'},
response_format: {type: 'json_object'},
messages: [{
'role': 'system',
'content': prompt
Expand All @@ -54,8 +54,8 @@ export const generateQuizQuestions = async (interests, numberOfQuestions) => {
seed: generatedSeed
});
const rawContent = response.choices[0].message.content;
const { usage } = response;
const { system_fingerprint } = response;
const {usage} = response;
const {system_fingerprint} = response;
// console.log('rawContent:', JSON.stringify(rawContent, null, 2));

const questionStrings = rawContent.split('\n\n');
Expand Down

0 comments on commit 1ddc5b7

Please sign in to comment.