Skip to content

Commit 05325eb

Browse files
authored
Fix GEMMA MessagesFormatter
Gemma needs another \n to avoid slow processing of follow up prompts, see Maximilian-Winter#54
1 parent fb1c42c commit 05325eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama_cpp_agent/messages_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def _format_response(
180180
gemma_2_prompt_markers = {
181181
Roles.system: PromptMarkers("""""", """\n\n"""),
182182
Roles.user: PromptMarkers("""<start_of_turn>user\n""", """<end_of_turn>\n"""),
183-
Roles.assistant: PromptMarkers("""<start_of_turn>model\n""", """<end_of_turn>\n"""),
183+
Roles.assistant: PromptMarkers("""<start_of_turn>model\n\n""", """<end_of_turn>\n"""),
184184
Roles.tool: PromptMarkers("", ""),
185185
}
186186
code_ds_prompt_markers = {

0 commit comments

Comments
 (0)