| 2688 | } | 2688 | } |
| 2689 | | 2689 | |
| 2690 | const exampleSeparator = power_user.context.example_separator ? `${substituteParams(power_user.context.example_separator)}\n` : ''; | 2690 | const exampleSeparator = power_user.context.example_separator ? `${substituteParams(power_user.context.example_separator)}\n` : ''; |
| 2691 | const blockHeading = main_api === 'openai' ? '<START>\n' : (exampleSeparator || (isInstruct ? '<START>\n' : '')); | 2691 | const blockHeading = (main_api === 'openai' || isInstruct) ? '<START>\n' : exampleSeparator; |
| 2692 | const splitExamples = examplesStr.split(/<START>/gi).slice(1).map(block => `${blockHeading}${block.trim()}\n`); | 2692 | const splitExamples = examplesStr.split(/<START>/gi).slice(1).map(block => `${blockHeading}${block.trim()}\n`); |
| 2693 | | 2693 | |
| 2694 | return splitExamples; | 2694 | return splitExamples; |