Make context stop strings togglable

This commit is contained in:
Cohee
2023-12-01 23:06:37 +02:00
parent 9ad42025e5
commit a2f293b6af
3 changed files with 17 additions and 5 deletions

View File

@ -214,12 +214,14 @@ export function getInstructStoppingSequences() {
combined_sequence.split('\n').filter((line, index, self) => self.indexOf(line) === index).forEach(addInstructSequence);
}
if (power_user.context.chat_start) {
result.push(`\n${substituteParams(power_user.context.chat_start)}`);
}
if (power_user.context.use_stop_strings) {
if (power_user.context.chat_start) {
result.push(`\n${substituteParams(power_user.context.chat_start)}`);
}
if (power_user.context.example_separator) {
result.push(`\n${substituteParams(power_user.context.example_separator)}`);
if (power_user.context.example_separator) {
result.push(`\n${substituteParams(power_user.context.example_separator)}`);
}
}
return result;