@@ -3819,7 +3819,6 @@ int main(int argc, char ** argv) {
38193819 // SRV_DBG("Prompt: %s\n", prompt.is_string() ? prompt.get<std::string>().c_str() : prompt.dump(2).c_str());
38203820
38213821 if (prompt.contains (" chat_history" )) {
3822- res_ok (res, {{ " success" , true }});
38233822 return ;
38243823 }
38253824
@@ -3911,12 +3910,7 @@ int main(int argc, char ** argv) {
39113910 }
39123911 };
39133912
3914- const auto handle_completions = [&handle_completions_impl, &res_ok](const httplib::Request & req, httplib::Response & res) {
3915- if (req.body .find (" chat_history" ) != std::string::npos) {
3916- res_ok (res, {{ " success" , true }});
3917- return ;
3918- }
3919-
3913+ const auto handle_completions = [&handle_completions_impl](const httplib::Request & req, httplib::Response & res) {
39203914 json data = json::parse (req.body );
39213915 return handle_completions_impl (
39223916 SERVER_TASK_TYPE_COMPLETION,
@@ -3926,12 +3920,7 @@ int main(int argc, char ** argv) {
39263920 OAICOMPAT_TYPE_NONE);
39273921 };
39283922
3929- const auto handle_completions_oai = [&handle_completions_impl, &res_ok](const httplib::Request & req, httplib::Response & res) {
3930- if (req.body .find (" chat_history" ) != std::string::npos) {
3931- res_ok (res, {{ " success" , true }});
3932- return ;
3933- }
3934-
3923+ const auto handle_completions_oai = [&handle_completions_impl](const httplib::Request & req, httplib::Response & res) {
39353924 json data = oaicompat_completion_params_parse (json::parse (req.body ));
39363925 return handle_completions_impl (
39373926 SERVER_TASK_TYPE_COMPLETION,
@@ -4025,11 +4014,6 @@ int main(int argc, char ** argv) {
40254014 return ;
40264015 }
40274016
4028- if (req.body .find (" chat_history" ) != std::string::npos) {
4029- res_ok (res, {{ " success" , true }});
4030- return ;
4031- }
4032-
40334017 auto body = json::parse (req.body );
40344018 json data = oaicompat_completion_params_parse (body, params.use_jinja , params.reasoning_format , ctx_server.chat_templates .get ());
40354019
0 commit comments