@speakableio/core 0.1.37 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.native.mjs +4 -3
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.js +4 -3
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.mjs
CHANGED
|
@@ -2847,6 +2847,7 @@ var useBaseOpenAI = ({
|
|
|
2847
2847
|
}
|
|
2848
2848
|
};
|
|
2849
2849
|
const getAIResponse = async ({ cardId, transcript }) => {
|
|
2850
|
+
var _a;
|
|
2850
2851
|
try {
|
|
2851
2852
|
const card = getCardFromCache({
|
|
2852
2853
|
cardId,
|
|
@@ -2868,9 +2869,9 @@ var useBaseOpenAI = ({
|
|
|
2868
2869
|
studentResponse: transcript
|
|
2869
2870
|
})
|
|
2870
2871
|
]);
|
|
2871
|
-
proficiencyData = proficiencyResult.data || {};
|
|
2872
|
+
proficiencyData = (proficiencyResult == null ? void 0 : proficiencyResult.data) || {};
|
|
2872
2873
|
feedbackData = {
|
|
2873
|
-
...geminiResult.data,
|
|
2874
|
+
...(_a = geminiResult == null ? void 0 : geminiResult.data) != null ? _a : {},
|
|
2874
2875
|
// @ts-ignore
|
|
2875
2876
|
proficiency_level: (proficiencyData == null ? void 0 : proficiencyData.proficiency_level) || null
|
|
2876
2877
|
};
|
|
@@ -2880,7 +2881,7 @@ var useBaseOpenAI = ({
|
|
|
2880
2881
|
studentId: currentUserId,
|
|
2881
2882
|
studentResponse: transcript
|
|
2882
2883
|
}));
|
|
2883
|
-
feedbackData = geminiResult.data;
|
|
2884
|
+
feedbackData = geminiResult == null ? void 0 : geminiResult.data;
|
|
2884
2885
|
}
|
|
2885
2886
|
const results = {
|
|
2886
2887
|
...feedbackData,
|