mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Revert "#210 [OAI] Don't insert example dialogues without bots"
This reverts commit 7b9e042589
.
This commit is contained in:
@ -183,13 +183,6 @@ function setOpenAIMessageExamples(mesExamplesArray) {
|
|||||||
// remove <START> {Example Dialogue:} and replace \r\n with just \n
|
// remove <START> {Example Dialogue:} and replace \r\n with just \n
|
||||||
let replaced = item.replace(/<START>/i, "{Example Dialogue:}").replace(/\r/gm, '');
|
let replaced = item.replace(/<START>/i, "{Example Dialogue:}").replace(/\r/gm, '');
|
||||||
let parsed = parseExampleIntoIndividual(replaced);
|
let parsed = parseExampleIntoIndividual(replaced);
|
||||||
|
|
||||||
// Discard example dialogue if there's not a single bot message in it
|
|
||||||
if (parsed.findIndex(x => x.name == "example_assistant") === -1) {
|
|
||||||
console.warn('Example dialogue without bot reply discarded:', replaced);
|
|
||||||
parsed = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// add to the example message blocks array
|
// add to the example message blocks array
|
||||||
openai_msgs_example.push(parsed);
|
openai_msgs_example.push(parsed);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user