server: clean up using_chatml variable

Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com>
This commit is contained in:
Xuan Son Nguyen 2024-02-10 00:11:13 +01:00 committed by GitHub
parent ebe3079539
commit 1a27406426
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,8 +19,7 @@ inline static json oaicompat_completion_params_parse(
const std::string &chat_template)
{
json llama_params;
bool using_chatml = chat_template == "chatml";
std::string formatted_prompt = using_chatml
std::string formatted_prompt = chat_template == "chatml"
? format_chatml(body["messages"]) // OpenAI 'messages' to chatml (with <|im_start|>,...)
: format_llama2(body["messages"]); // OpenAI 'messages' to llama2 (with [INST],...)