From 27976c31b6c8293978fff41a951c9759b5e76735 Mon Sep 17 00:00:00 2001 From: ngxson Date: Fri, 9 Feb 2024 09:32:51 +0100 Subject: [PATCH] server: fix typo --- examples/server/oai.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/server/oai.hpp b/examples/server/oai.hpp index ce87f0aac..c0c1f521e 100644 --- a/examples/server/oai.hpp +++ b/examples/server/oai.hpp @@ -20,7 +20,7 @@ inline static json oaicompat_completion_params_parse( { json llama_params; bool using_chatml = chat_template == "chatml"; - std::string formated_prompt = using_chatml + std::string formatted_prompt = using_chatml ? format_chatml(body["messages"]) // OpenAI 'messages' to chatml : format_mistral(body["messages"]); // OpenAI 'messages' to mistral format @@ -35,7 +35,7 @@ inline static json oaicompat_completion_params_parse( // https://platform.openai.com/docs/api-reference/chat/create llama_sampling_params default_sparams; llama_params["model"] = json_value(body, "model", std::string("unknown")); - llama_params["prompt"] = formated_prompt; + llama_params["prompt"] = formatted_prompt; llama_params["cache_prompt"] = json_value(body, "cache_prompt", false); llama_params["temperature"] = json_value(body, "temperature", 0.0); llama_params["top_k"] = json_value(body, "top_k", default_sparams.top_k);