From 0085f94936ecf29f778989355558780d66e42541 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 4 Jun 2024 15:58:14 +0300 Subject: [PATCH] server : add /v1/completion endpoint --- examples/server/server.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index fc6d90848..087266032 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -3086,6 +3086,7 @@ int main(int argc, char ** argv) { "/props", "/completion", "/completions", + "/v1/completion", "/v1/completions", "/chat/completions", "/v1/chat/completions", @@ -3789,6 +3790,7 @@ int main(int argc, char ** argv) { svr->Get ("/v1/models", handle_models); svr->Post("/completion", handle_completions); // legacy svr->Post("/completions", handle_completions); + svr->Post("/v1/completion", handle_completions); svr->Post("/v1/completions", handle_completions); svr->Post("/chat/completions", handle_chat_completions); svr->Post("/v1/chat/completions", handle_chat_completions);