mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-13 04:00:16 +00:00
tool-call
: add LLAMA_UPDATE_GOLDENS env for test-chat-template
This commit is contained in:
parent
c773516d57
commit
b35aa4ae1c
@ -117,8 +117,12 @@ static void test_jinja_templates() {
|
|||||||
} catch (const std::runtime_error & e) {
|
} catch (const std::runtime_error & e) {
|
||||||
actual = "ERROR: " + std::string(e.what());
|
actual = "ERROR: " + std::string(e.what());
|
||||||
}
|
}
|
||||||
|
if (getenv("LLAMA_UPDATE_GOLDENS")) {
|
||||||
|
std::ofstream(golden_file) << actual;
|
||||||
|
} else {
|
||||||
assert_equals(expected, actual);
|
assert_equals(expected, actual);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!found_goldens) {
|
if (!found_goldens) {
|
||||||
std::cerr << "No golden files found for " << tmpl_file << std::endl;
|
std::cerr << "No golden files found for " << tmpl_file << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user