This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ void llamaCPP::chatCompletion(
178178
179179 if (jsonBody) {
180180 // Default values to enable auto caching
181- data[" cache_prompt" ] = true ;
181+ data[" cache_prompt" ] = caching_enabled ;
182182 data[" n_keep" ] = -1 ;
183183
184184 // Passing load value
@@ -390,6 +390,7 @@ bool llamaCPP::loadModelImpl(const Json::Value &jsonBody) {
390390 .asInt ();
391391 params.cont_batching = jsonBody.get (" cont_batching" , false ).asBool ();
392392
393+ this ->caching_enabled = jsonBody.get (" caching_enabled" , false ).asBool ();
393394 this ->user_prompt = jsonBody.get (" user_prompt" , " USER: " ).asString ();
394395 this ->ai_prompt = jsonBody.get (" ai_prompt" , " ASSISTANT: " ).asString ();
395396 this ->system_prompt =
Original file line number Diff line number Diff line change @@ -1908,5 +1908,6 @@ class llamaCPP : public drogon::HttpController<llamaCPP> {
19081908 std::string system_prompt;
19091909 std::string pre_prompt;
19101910 int repeat_last_n;
1911+ bool caching_enabled;
19111912};
19121913}; // namespace inferences
You can’t perform that action at this time.
0 commit comments