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

Function foreach_function

common/chat.cpp:726–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724}
725
726static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) {
727 for (const auto & tool : tools) {
728 if (!tool.contains("type") || tool.at("type") != "function" || !tool.contains("function")) {
729 LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str());
730 continue;
731 }
732 fn(tool);
733 }
734}
735
736static void foreach_parameter(const json & function,
737 const std::function<void(const std::string &, const json &, bool)> & fn) {

Calls 3

fnFunction · 0.85
containsMethod · 0.80
dumpMethod · 0.80

Tested by

no test coverage detected