server : skip GH copilot requests from logging

This commit is contained in:
Georgi Gerganov 2024-02-24 15:02:25 +02:00
parent 04b5a92478
commit 65e65fd6c0
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -2605,7 +2605,14 @@ static json format_detokenized_response(std::string content)
static void log_server_request(const httplib::Request &req, const httplib::Response &res) static void log_server_request(const httplib::Request &req, const httplib::Response &res)
{ {
LOG_INFO("request", { // skip GH copilot requests when using default port
if (req.path == "/v1/health" || req.path == "/v1/completions")
{
return;
}
LOG_INFO("request",
{
{"remote_addr", req.remote_addr}, {"remote_addr", req.remote_addr},
{"remote_port", req.remote_port}, {"remote_port", req.remote_port},
{"status", res.status}, {"status", res.status},
@ -2614,7 +2621,8 @@ static void log_server_request(const httplib::Request &req, const httplib::Respo
{"params", req.params}, {"params", req.params},
}); });
LOG_VERBOSE("request", { LOG_VERBOSE("request",
{
{"request", req.body}, {"request", req.body},
{"response", res.body}, {"response", res.body},
}); });