aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProviderQuiz.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/StyleProviderQuiz.tsx')
-rw-r--r--src/client/views/StyleProviderQuiz.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/StyleProviderQuiz.tsx b/src/client/views/StyleProviderQuiz.tsx
index 5d6a37832..bcb4b4ec1 100644
--- a/src/client/views/StyleProviderQuiz.tsx
+++ b/src/client/views/StyleProviderQuiz.tsx
@@ -17,7 +17,7 @@ import { AnchorMenu } from './pdf/AnchorMenu';
import { DocumentViewProps } from './nodes/DocumentView';
import { FieldViewProps } from './nodes/FieldView';
import { ImageBox } from './nodes/ImageBox';
-import { ImageUtility } from './nodes/generativeFill/generativeFillUtils/ImageHandler';
+import { ImageUtility } from './nodes/imageEditor/imageEditorUtils/ImageHandler';
import './StyleProviderQuiz.scss';
import { Networking } from '../Network';
@@ -117,7 +117,7 @@ export namespace styleProviderQuiz {
try {
const hrefBase64 = await createCanvas(img);
const response = await gptImageLabel(hrefBase64, 'Make flashcards out of this image with each question and answer labeled as "question" and "answer". Do not label each flashcard and do not include asterisks: ');
- AnchorMenu.Instance.transferToFlashcard(response, NumCast(img.layoutDoc['x']), NumCast(img.layoutDoc['y']));
+ AnchorMenu.Instance.transferToFlashcard(response, NumCast(img.layoutDoc.x), NumCast(img.layoutDoc.y));
} catch (error) {
console.log('Error', error);
}
@@ -258,7 +258,7 @@ export namespace styleProviderQuiz {
'. ' +
rubricText +
'. One sentence and evaluate based on meaning, not wording. Provide a hex color at the beginning with a period after it on a scale of green (minor details missed) to red (big error) for how correct the answer is. Example: "#FFFFFF. Pasta is delicious."';
- const response = await gptAPICall(queryText, GPTCallType.QUIZ);
+ const response = await gptAPICall(queryText, GPTCallType.QUIZDOC);
const hexSent = extractHexAndSentences(response);
doc.quiz = hexSent.sentences?.replace(/UserAnswer/g, "user's answer").replace(/Rubric/g, 'rubric');
doc.backgroundColor = '#' + hexSent.hexNumber;