mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-05 12:39:05 +00:00
fix: set cache_prompt default to true
This commit is contained in:
parent
ca5996e7a6
commit
0cf87c8837
1 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ struct server_task_result {
|
|||
|
||||
struct slot_params {
|
||||
bool stream = true;
|
||||
bool cache_prompt = false; // remember the prompt to avoid reprocessing all prompt
|
||||
bool cache_prompt = true; // remember the prompt to avoid reprocessing all prompt
|
||||
|
||||
int32_t n_keep = 0; // number of tokens to keep from initial prompt
|
||||
int32_t n_discard = 0; // number of tokens after n_keep that may be discarded when shifting context, 0 defaults to half
|
||||
|
@ -993,7 +993,7 @@ struct server_context {
|
|||
}
|
||||
|
||||
slot.params.stream = json_value(data, "stream", false);
|
||||
slot.params.cache_prompt = json_value(data, "cache_prompt", false);
|
||||
slot.params.cache_prompt = json_value(data, "cache_prompt", true);
|
||||
slot.params.n_predict = json_value(data, "n_predict", json_value(data, "max_tokens", default_params.n_predict));
|
||||
slot.sparams.top_k = json_value(data, "top_k", default_sparams.top_k);
|
||||
slot.sparams.top_p = json_value(data, "top_p", default_sparams.top_p);
|
||||
|
|
Loading…
Add table
Reference in a new issue