MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / make_peg_parser

Class make_peg_parser

tests/test-chat.cpp:928–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

926};
927
928struct make_peg_parser {
929 common_chat_params params_;
930 common_peg_arena arena_;
931 bool detailed_debug_;
932
933 make_peg_parser(common_chat_templates * tmpls,
934 const common_chat_templates_inputs & inputs,
935 bool detailed_debug = false) {
936 detailed_debug_ = detailed_debug;
937 params_ = common_chat_templates_apply(tmpls, inputs);
938 arena_.load(params_.parser);
939 }
940
941 common_chat_msg parse(const std::string & msg, bool is_partial) const {
942 common_chat_parser_params parser_params(params_);
943 parser_params.debug = detailed_debug_;
944 return common_chat_peg_parse(arena_, msg, is_partial, parser_params);
945 }
946};
947
948// Global template filter for --template flag
949static std::string g_template_filter;

Callers 1

test_peg_parserFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_peg_parserFunction · 0.68