server : fix local model name in server (#4420)

This commit is contained in:
Vladimir Zorin 2023-12-12 11:25:29 +02:00 committed by GitHub
parent 41a11aaf99
commit d9d4cfef64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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);