Skip to content

Commit

Permalink
server : recognize cache_prompt parameter in OAI API
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Dec 6, 2023
1 parent da5eaef commit ef455cb
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 @@ -2387,6 +2387,7 @@ json oaicompat_completion_params_parse(

// Map OpenAI parameters to llama.cpp parameters
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);
llama_params["top_k"] = json_value(body, "top_k", 40);
llama_params["top_p"] = json_value(body, "top_p", 0.95);
Expand Down

0 comments on commit ef455cb

Please sign in to comment.