#300 Fix multigen issues:

1. Not working with instruct mode
2. Not working with impersonation
3. Not working with real streaming
This commit is contained in:
SillyLossy
2023-05-13 22:44:46 +03:00
parent a36c843752
commit 07e7028269
2 changed files with 64 additions and 20 deletions

View File

@ -242,6 +242,12 @@ function processReply(str) {
str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one
str = str.trim();
str = str
.split(',') // list split by commas
.map(x => x.trim()) // trim each entry
.filter(x => x) // remove empty entries
.join(', '); // join it back with proper spacing
return str;
}