tool-call: add LLAMA_UPDATE_GOLDENS env for test-chat-template

This commit is contained in:
ochafik 2024-10-31 13:53:33 +00:00
parent c773516d57
commit b35aa4ae1c

View File

@ -117,7 +117,11 @@ static void test_jinja_templates() {
} catch (const std::runtime_error & e) {
actual = "ERROR: " + std::string(e.what());
}
assert_equals(expected, actual);
if (getenv("LLAMA_UPDATE_GOLDENS")) {
std::ofstream(golden_file) << actual;
} else {
assert_equals(expected, actual);
}
}
if (!found_goldens) {