MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / normalize

Function normalize

subprojects/llama.cpp/tests/test-chat.cpp:67–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67static common_chat_msg normalize(const common_chat_msg & msg) {
68 common_chat_msg normalized = msg;
69 for (auto & tool_call : normalized.tool_calls) {
70 try {
71 tool_call.arguments = json::parse(tool_call.arguments).dump();
72 } catch (const std::exception &) {
73 // Do nothing
74 }
75 }
76 return normalized;
77}
78
79
80template <>

Callers 2

tokenizeMethod · 0.85
equalsFunction · 0.85

Calls 2

parseFunction · 0.85
dumpMethod · 0.45

Tested by

no test coverage detected