We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d78453c + 0fa2ec4 commit 34ad71fCopy full SHA for 34ad71f
examples/low_level_api/low_level_api_chat_cpp.py
@@ -382,12 +382,15 @@ def generate(self):
382
# replace end of text token with newline token when in interactive mode
383
if (id == llama_cpp.llama_token_eos() and self.params.interactive and not self.params.instruct):
384
id = self.llama_token_newline[0]
385
+ self.embd.append(id)
386
if (self.use_antiprompt()):
387
# tokenize and inject first reverse prompt
388
self.embd_inp += self.first_antiprompt[0]
-
389
- # add it to the context
390
- self.embd.append(id)
+ for id in self.first_antiprompt[0]:
391
+ else:
392
+ # add it to the context
393
394
395
# echo this to console
396
self.output_echo = True
0 commit comments