server : remove model.json endpoint (#5371)

This commit is contained in:
Alexey Parfenov 2024-02-06 18:08:38 +00:00 committed by GitHub
parent 17c97fb062
commit 213d1439fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 244 additions and 218 deletions

View file

@ -990,11 +990,6 @@ struct llama_server_context
queue_results.send(res);
}
json get_model_props()
{
return get_formated_generation(slots[0]);
}
json get_formated_generation(llama_client_slot &slot)
{
const auto eos_bias = slot.sparams.logit_bias.find(llama_token_eos(model));
@ -2895,12 +2890,6 @@ int main(int argc, char **argv)
}
});
svr.Get("/model.json", [&llama](const httplib::Request &, httplib::Response &res)
{
const json data = llama.get_model_props();
return res.set_content(data.dump(), "application/json; charset=utf-8");
});
svr.Options(R"(/.*)", [](const httplib::Request &, httplib::Response &res)
{ return res.set_content("", "application/json; charset=utf-8"); });