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 a58b9e5 commit f999ff5Copy full SHA for f999ff5
examples/main/main.cpp
@@ -759,11 +759,14 @@ int main(int argc, char ** argv) {
759
760
// check for reverse prompt using special tokens
761
llama_token last_token = common_sampler_last(smpl);
762
- if (std::find(antiprompt_token.begin(), antiprompt_token.end(), (int32_t) last_token) != antiprompt_token.end()) {
763
- if (params.interactive) {
764
- is_interacting = true;
+ for (auto token : antiprompt_token) {
+ if (token == last_token) {
+ if (params.interactive) {
765
+ is_interacting = true;
766
+ }
767
+ is_antiprompt = true;
768
+ break;
769
}
- is_antiprompt = true;
770
771
772
if (is_antiprompt) {
0 commit comments