Skip to content

Commit

Permalink
fix stop seq escaping newline
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Nov 20, 2023
1 parent dc4078c commit 4d7c14b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpttype_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,9 @@ generation_outputs gpttype_generate(const generation_inputs inputs, generation_o
remaining_tokens = 0;
if(debugmode!=-1)
{
printf("\n(Stop sequence triggered: <%s>)", matched.c_str());
auto match_clean = matched;
replace_all(match_clean, "\n", "\\n");
printf("\n(Stop sequence triggered: %s)", match_clean.c_str());
}
last_stop_reason = stop_reason::CUSTOM_STOPPER;
break;
Expand Down

0 comments on commit 4d7c14b

Please sign in to comment.