8000
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 aad4859 commit adae40eCopy full SHA for adae40e
examples/main/main.cpp
@@ -517,13 +517,16 @@ int main(int argc, char ** argv) {
517
518
is_antiprompt = false;
519
// Check if each of the reverse prompts appears at the end of the output.
520
+ bool need_stop=false;
521
for (std::string & antiprompt : params.antiprompt) {
522
if (last_output.find(antiprompt.c_str(), last_output.length() - antiprompt.length(), antiprompt.length()) != std::string::npos) {
- is_interacting = true;
523
+ //is_interacting = true;
524
+ need_stop=true;
525
is_antiprompt = true;
526
break;
527
}
528
529
+ if(need_stop==true&&is_interacting==false) break; // exit if not in interactive mode
530
531
532
if (n_past > 0 && is_interacting) {
0 commit comments