Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion controllers/llamaCPP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void llamaCPP::chatCompletion(

if (jsonBody) {
// Default values to enable auto caching
data["cache_prompt"] = true;
data["cache_prompt"] = caching_enabled;
data["n_keep"] = -1;

// Passing load value
Expand Down Expand Up @@ -390,6 +390,7 @@ bool llamaCPP::loadModelImpl(const Json::Value &jsonBody) {
.asInt();
params.cont_batching = jsonBody.get("cont_batching", false).asBool();

this->caching_enabled = jsonBody.get("caching_enabled", false).asBool();
this->user_prompt = jsonBody.get("user_prompt", "USER: ").asString();
this->ai_prompt = jsonBody.get("ai_prompt", "ASSISTANT: ").asString();
this->system_prompt =
Expand Down
1 change: 1 addition & 0 deletions controllers/llamaCPP.h
Original file line number Diff line number Diff line change
Expand Up @@ -1908,5 +1908,6 @@ class llamaCPP : public drogon::HttpController<llamaCPP> {
std::string system_prompt;
std::string pre_prompt;
int repeat_last_n;
bool caching_enabled;
};
}; // namespace inferences
2 changes: 1 addition & 1 deletion llama.cpp