stream : "-kc" now enables context keeping from previous segment (#90)

By default, the context keeping is disabled
This commit is contained in:
Georgi Gerganov
2022-11-22 18:20:05 +02:00
parent 63ae03b8e0
commit 385236d1d3
3 changed files with 17 additions and 13 deletions

View File

@@ -2590,9 +2590,9 @@ int whisper_full(
prompt_past.clear();
}
// Prepend the prompt tokens to the prompt_past
// prepend the prompt tokens to the prompt_past
if (params.prompt_tokens && params.prompt_n_tokens > 0) {
// Parse tokens from the pointer (it points to an std::vector)
// parse tokens from the pointer
for (int i = 0; i < params.prompt_n_tokens; i++) {
prompt_past.push_back(params.prompt_tokens[i]);
}