Merge pull request #4347 from crimeragames/release Fix duplication of multi-line example message separators in instruct mode
Signed| @@ -2688,7 +2688,7 @@ export function parseMesExamples(examplesStr, isInstruct) { | ||
| 2688 | 2688 | } |
| 2689 | 2689 | |
| 2690 | 2690 | const exampleSeparator = power_user.context.example_separator ? `${substituteParams(power_user.context.example_separator)}\n` : ''; |
| 2691 | 2691 | const blockHeading = (main_api === 'openai' ? '<START>\n' : (exampleSeparator || (isInstruct) ? '<START>\n' : ''))exampleSeparator; |
| 2692 | 2692 | const splitExamples = examplesStr.split(/<START>/gi).slice(1).map(block => `${blockHeading}${block.trim()}\n`); |
| 2693 | 2693 | |
| 2694 | 2694 | return splitExamples; |