mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Transform LLM emotion response to lower
This commit is contained in:
parent
fa6fc45e6f
commit
b545185f1a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user