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

Function first_tool_parameter_name

server/src/server/http_server.cpp:404–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,
406 const SamplingDefaults & defaults) {
407 SamplerCfg sampler;
408 sampler.temp = body.value(
409 "temperature", defaults.has_temperature ? defaults.temperature : 0.0f);
410 sampler.top_p = body.value(
411 "top_p", defaults.has_top_p ? defaults.top_p : 1.0f);
412 sampler.top_k = body.value(
413 "top_k", defaults.has_top_k ? defaults.top_k : 0);
414 if (body.contains("seed")) {
415 sampler.seed = body["seed"].get<uint64_t>();
416 }
417
418 // OpenAI-style additive penalties.
419 sampler.freq_pen = body.value("frequency_penalty", 0.0f);
420 sampler.pres_pen = body.value(

Callers 1

build_stall_tool_prefixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected