We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 975532f commit 1060775Copy full SHA for 1060775
examples/main/main.cpp
@@ -290,8 +290,13 @@ int main(int argc, char ** argv) {
290
291
// Should not run without any tokens
292
if (embd_inp.empty()) {
293
- embd_inp.push_back(llama_token_bos(model));
294
- LOG("embd_inp was considered empty and bos was added: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, embd_inp).c_str());
+ if (add_bos) {
+ embd_inp.push_back(llama_token_bos(model));
295
+ LOG("embd_inp was considered empty and bos was added: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, embd_inp).c_str());
296
+ } else {
297
+ LOG_TEE("error: input is empty\n");
298
+ return -1;
299
+ }
300
}
301
302
// Tokenize negative prompt
0 commit comments