Skip to content

Commit

Permalink
fix: ai model in use
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinand11 committed Sep 14, 2024
1 parent 9c3aa1a commit ba80525
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/api/src/modules/study/utils/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const generateAiQuestions = async ({
questionType: QuestionTypes
}) => {
const { results: tags } = await TagsUseCases.get({
where: [{ field: 'id', condition: Conditions.in, value: quiz.tagIds }],
where: [{ field: 'id', condition: Conditions.in, value: quiz.tagIds.concat(quiz.topicId) }],
all: true,
})

Expand Down
2 changes: 1 addition & 1 deletion services/api/src/utils/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class AI {
const response = await this.#client.chat.completions.create({
temperature: 0.2,
...options,
model: 'gpt-4o',
model: 'gpt-4o-2024-08-06',
})
return response.choices.at(0)?.message?.content?.trim() ?? ''
} catch (err) {
Expand Down

0 comments on commit ba80525

Please sign in to comment.