Skip to content

Commit

Permalink
Set model field in llama_params
Browse files Browse the repository at this point in the history
  • Loading branch information
epicfilemcnulty committed Dec 11, 2023
1 parent 8a7b2fa commit 1a90d4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1a90d4e

Please sign in to comment.