diff --git a/public/scripts/extensions/expressions/index.js b/public/scripts/extensions/expressions/index.js index 35109357e..3ab2d0eb0 100644 --- a/public/scripts/extensions/expressions/index.js +++ b/public/scripts/extensions/expressions/index.js @@ -1006,7 +1006,6 @@ function parseLlmResponse(emotionResponse, labels) { try { const parsedEmotion = JSON.parse(emotionResponse); return parsedEmotion?.emotion ?? fallbackExpression; - } catch { const fuse = new Fuse([emotionResponse]); for (const label of labels) { @@ -1017,7 +1016,7 @@ function parseLlmResponse(emotionResponse, labels) { } } - return fallbackExpression; + throw new Error('Could not parse emotion response ' + emotionResponse); } function onTextGenSettingsReady(args) {