diff --git a/public/scripts/extensions/expressions/index.js b/public/scripts/extensions/expressions/index.js index 95cdfa66c..508cfc6f4 100644 --- a/public/scripts/extensions/expressions/index.js +++ b/public/scripts/extensions/expressions/index.js @@ -1024,7 +1024,7 @@ function parseLlmResponse(emotionResponse, labels) { try { const parsedEmotion = JSON.parse(emotionResponse); - const response = parsedEmotion?.emotion; + const response = parsedEmotion?.emotion?.trim()?.toLowerCase(); if (!response || !labels.includes(response)) { return fallbackExpression;