add server code

This commit is contained in:
Xuan Son Nguyen
2026-10-01 19:32:36 +02:00
parent 654a5622de
commit 1b89754bb4
10 changed files with 763 additions and 0 deletions
+2
View File
@@ -231,6 +231,7 @@ int llama_server(common_params & params, int argc, char ** argv) {
routes.post_embeddings = models_routes->proxy_post;
routes.post_embeddings_oai = models_routes->proxy_post;
routes.post_rerank = models_routes->proxy_post;
routes.post_systemone = models_routes->proxy_post;
routes.post_tokenize = models_routes->proxy_post;
routes.post_detokenize = models_routes->proxy_post;
routes.post_apply_template = models_routes->proxy_post;
@@ -278,6 +279,7 @@ int llama_server(common_params & params, int argc, char ** argv) {
ctx_http.post("/reranking", ex_wrapper(routes.post_rerank));
ctx_http.post("/v1/rerank", ex_wrapper(routes.post_rerank));
ctx_http.post("/v1/reranking", ex_wrapper(routes.post_rerank));
ctx_http.post("/v1/systemone", ex_wrapper(routes.post_systemone));
ctx_http.post("/tokenize", ex_wrapper(routes.post_tokenize));
ctx_http.post("/detokenize", ex_wrapper(routes.post_detokenize));
ctx_http.post("/apply-template", ex_wrapper(routes.post_apply_template));