MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / find_tool_function

Function find_tool_function

server/src/server/http_server.cpp:391–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389int resolve_max_output_tokens(const json & body, int default_max_tokens) {
390 if (body.contains("max_tokens")) {
391 return body.at("max_tokens").get<int>();
392 }
393 if (body.contains("max_output_tokens")) {
394 return body.at("max_output_tokens").get<int>();
395 }
396 if (body.contains("max_completion_tokens")) {
397 return body.at("max_completion_tokens").get<int>();
398 }
399 return default_max_tokens;
400}
401
402// Sampler parameters. When the request omits a value, fall back to the
403// model card's sampling defaults (spec §3.3); when the card doesn't
404// supply one either, use the hard-coded default.
405SamplerCfg parse_request_sampler(const json & body,

Callers 1

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected