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 6eb1f51 commit 7749240Copy full SHA for 7749240
examples/main/main.cpp
@@ -289,8 +289,13 @@ int main(int argc, char ** argv) {
289
290
// Should not run without any tokens
291
if (embd_inp.empty()) {
292
- embd_inp.push_back(llama_token_bos(model));
293
- 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));
294
+ LOG("embd_inp was considered empty and bos was added: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, embd_inp).c_str());
295
+ } else {
296
+ LOG_TEE("error: input is empty\n");
297
+ return -1;
298
+ }
299
}
300
301
// Tokenize negative prompt
0 commit comments