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

Function common_chat_parse_firefunction_v2

smallthinker/common/chat.cpp:1327–1334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1325 return data;
1326}
1327static void common_chat_parse_firefunction_v2(common_chat_msg_parser & builder) {
1328 if (!builder.syntax().parse_tool_calls) {
1329 builder.add_content(builder.consume_rest());
1330 return;
1331 }
1332 static const common_regex prefix(regex_escape(" functools["));
1333 parse_prefixed_json_tool_call_array(builder, prefix, /* rstrip_prefix= */ 1);
1334}
1335
1336static common_chat_params common_chat_params_init_functionary_v3_2(const common_chat_template & tmpl, const struct templates_params & inputs) {
1337 // >>>all\nlet's call functions>>>fn1\n{"arg1": 1...}\n>>>fn2\n{"arg1": 1...}...

Callers 1

common_chat_parseFunction · 0.85

Calls 4

regex_escapeFunction · 0.85
add_contentMethod · 0.80
consume_restMethod · 0.80

Tested by

no test coverage detected