Compare commits

...

2 Commits

Author SHA1 Message Date
Piotr Wilkin (ilintar) fcff47bcb1 Merge branch 'master' into add-long-debug-prompt 2026-06-15 17:05:22 +02:00
Piotr Wilkin 6787472942 chat: include full unparsed prompt in debug
message on parse error
2026-06-15 13:22:23 +02:00
+3 -4
View File
@@ -2678,10 +2678,9 @@ common_chat_msg common_chat_peg_parse(const common_peg_arena & src_pars
}
return msg;
}
LOG_WRN("%s: unparsed %s output: %s\n", __func__, common_chat_format_name(params.format),
effective_input.substr(result.end).c_str());
throw std::runtime_error(std::string("The model produced output that does not match the expected ") +
common_chat_format_name(params.format) + " format");
LOG_WRN("%s: unparsed %s output: %s\n", __func__, common_chat_format_name(params.format), effective_input.substr(result.end).c_str());
LOG_DBG("%s: full %s output triggering error:\n=== BEGIN ===\n%s\n=== END ===\n", __func__, common_chat_format_name(params.format), effective_input.c_str());
throw std::runtime_error(std::string("The model produced output that does not match the expected ") + common_chat_format_name(params.format) + " format");
}
common_chat_msg msg;