MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / build_grammar

Function build_grammar

smallthinker/tests/test-grammar-integration.cpp:18–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using json = nlohmann::ordered_json;
17
18static llama_grammar * build_grammar(const std::string & grammar_str) {
19 return llama_grammar_init_impl(nullptr, grammar_str.c_str(), "root", false, nullptr, 0, nullptr, 0);
20}
21
22static bool test_build_grammar_fails(const std::string & grammar_str) {
23 fprintf(stderr, "⚫ Testing failure for grammar: %s\n", grammar_str.c_str());

Callers 2

test_build_grammar_failsFunction · 0.70
testFunction · 0.70

Calls 2

llama_grammar_init_implFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected