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

Function json_value

examples/server/server.cpp:335–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333
334template <typename T>
335static T json_value(const json &body, const std::string &key, const T &default_value)
336{
337 // Fallback null to default value
338 return body.contains(key) && !body.at(key).is_null()
339 ? body.value(key, default_value)
340 : default_value;
341}
342
343struct llama_client_slot
344{

Callers 3

launch_slot_with_dataMethod · 0.70
process_tasksMethod · 0.70
mainFunction · 0.70

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected