From 2602b4faa0d835055e07528eb9c71e257a1960de Mon Sep 17 00:00:00 2001 From: tikikun Date: Tue, 21 Nov 2023 19:26:58 +0700 Subject: [PATCH] enable cache prompt --- controllers/llamaCPP.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/llamaCPP.cc b/controllers/llamaCPP.cc index 28c109d24..429bdab44 100644 --- a/controllers/llamaCPP.cc +++ b/controllers/llamaCPP.cc @@ -164,7 +164,7 @@ void llamaCPP::chatCompletion( data["frequency_penalty"] = (*jsonBody).get("frequency_penalty", 0).asFloat(); data["presence_penalty"] = (*jsonBody).get("presence_penalty", 0).asFloat(); - + data["cache_prompt"] = true; const Json::Value &messages = (*jsonBody)["messages"]; for (const auto &message : messages) { std::string input_role = message["role"].asString();