Skip to content

Commit c0ca21d

Browse files
committed
Only call common_chat_parse with assistant messages
1 parent 7216448 commit c0ca21d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class chat_formatter {
141141
}
142142

143143
common_chat_msg new_msg;
144-
if (syntax_ptr) {
144+
if (role == "assistant" && syntax_ptr) {
145145
new_msg = common_chat_parse(content, false, *syntax_ptr);
146146
} else {
147147
new_msg.content = content;

0 commit comments

Comments
 (0)