mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-03 17:44:34 +00:00
fix regressions in system prompt handling (#2219)
* python: fix system prompt being ignored * fix unintended whitespace after system prompt Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -755,6 +755,7 @@ void LLamaModel::embedInternal(
|
||||
tokens.resize(text.length()+4);
|
||||
int32_t n_tokens = llama_tokenize(d_ptr->model, text.c_str(), text.length(), tokens.data(), tokens.size(), wantBOS, false);
|
||||
if (n_tokens) {
|
||||
(void)eos_token;
|
||||
assert(useEOS == (eos_token != -1 && tokens[n_tokens - 1] == eos_token));
|
||||
tokens.resize(n_tokens - useEOS); // erase EOS/SEP
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user