mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Transform LLM emotion response to lower
This commit is contained in:
@ -1024,7 +1024,7 @@ function parseLlmResponse(emotionResponse, labels) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const parsedEmotion = JSON.parse(emotionResponse);
|
const parsedEmotion = JSON.parse(emotionResponse);
|
||||||
const response = parsedEmotion?.emotion;
|
const response = parsedEmotion?.emotion?.trim()?.toLowerCase();
|
||||||
|
|
||||||
if (!response || !labels.includes(response)) {
|
if (!response || !labels.includes(response)) {
|
||||||
return fallbackExpression;
|
return fallbackExpression;
|
||||||
|
Reference in New Issue
Block a user