MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / test_grammar_from_string

Function test_grammar_from_string

tests/test_llama_grammar.py:11–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10
11def test_grammar_from_string():
12 grammar = llama_cpp.LlamaGrammar.from_string(tree)
13 # assert grammar._n_rules == 3
14 # assert grammar._start_rule_index == 2
15 # assert grammar.grammar is not None
16
17
18def test_composed_pydantic_grammar():

Callers

nothing calls this directly

Calls 1

from_stringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…