gpt4all: properly handle newlines in system prompt

This commit is contained in:
2024-09-20 17:31:17 -04:00
parent e3e3036c06
commit c0f8f7617b
4 changed files with 16 additions and 16 deletions

View File

@@ -105,7 +105,9 @@ in
maxLength=${model.gen_length}
promptBatchSize=256
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
systemPrompt="<|im_start|>system\n${system_prompt}<|im_end|>
systemPrompt="<|im_start|>system\n${
builtins.replaceStrings [ "\n" ] [ "\\n" ] system_prompt
}<|im_end|>
\n"
'') models
));