Skip to content

Commit

Permalink
Merge pull request #3166 from serlo/chore/temp-warning-for-non-math-e…
Browse files Browse the repository at this point in the history
…xercise-generation

Chore/temp warning for non math exercise generation
  • Loading branch information
CodingDive authored Dec 5, 2023
2 parents cc00852 + 07452b1 commit 33e58ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ export function ExerciseGenerationWizard({
generatesMultipleExercises={numberOfSubtasks > 0}
onNext={handleNext}
onPrev={handlePrev}
isNonMathSubject={
subject.toLowerCase() !== 'mathe' &&
subject.toLowerCase() !== 'mathematik'
}
onSubmit={() => {
// eslint-disable-next-line no-console
console.log("Let's generate exercise", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface WizardFooterProps {
onPrev: () => void
onSubmit: () => void
generatesMultipleExercises: boolean
isNonMathSubject: boolean
}

export function WizardFooter({
Expand All @@ -20,6 +21,7 @@ export function WizardFooter({
onNext,
onPrev,
onSubmit,
isNonMathSubject,
}: WizardFooterProps) {
const { exerciseGeneration: exerciseGenerationString } =
useLoggedInData()!.strings.ai
Expand All @@ -45,9 +47,17 @@ export function WizardFooter({
? exerciseGenerationString.generateExercisesButton
: exerciseGenerationString.generateExerciseButton}
</button>
<p className="mb-2 self-end text-right text-sm text-gray-600">
{exerciseGenerationString.hallucinationWarning}
</p>
{isNonMathSubject ? (
<p className="mb-2 self-end text-right text-sm text-gray-600">
Bitte beachte, dass das Feature für Matheaufgaben optimiert wurde.
Die KI kann inkorrekte Lösungen erstellen. Bitte überprüfe die
Inhalte.
</p>
) : (
<p className="mb-2 self-end text-right text-sm text-gray-600">
{exerciseGenerationString.hallucinationWarning}
</p>
)}
</>
) : (
<button
Expand Down

0 comments on commit 33e58ac

Please sign in to comment.