]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : fix local model name in server (#4420)
authorVladimir Zorin <redacted>
Tue, 12 Dec 2023 09:25:29 +0000 (11:25 +0200)
committerGitHub <redacted>
Tue, 12 Dec 2023 09:25:29 +0000 (11:25 +0200)
examples/server/server.cpp

index 895f751c9fdbbe8e613f05c028d892d50c300b43..d0cd8e1cdb2112889fd95b0c4f0bb987ea09e214 100644 (file)
@@ -2382,6 +2382,7 @@ json oaicompat_completion_params_parse(
     llama_params["__oaicompat"] = true;
 
     // Map OpenAI parameters to llama.cpp parameters
+    llama_params["model"]             = json_value(body, "model", std::string("uknown"));
     llama_params["prompt"]            = format_chatml(body["messages"]); // OpenAI 'messages' to llama.cpp 'prompt'
     llama_params["cache_prompt"]      = json_value(body, "cache_prompt", false);
     llama_params["temperature"]       = json_value(body, "temperature", 0.8);