aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/main/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/main/main.cpp b/examples/main/main.cpp
index e9478d5..66b7c2d 100644
--- a/examples/main/main.cpp
+++ b/examples/main/main.cpp
@@ -493,7 +493,7 @@ int main(int argc, char ** argv) {
}
// In interactive mode, respect the maximum number of tokens and drop back to user input when reached.
- if (params.interactive && n_remain <= 0) {
+ if (params.interactive && n_remain <= 0 && params.n_predict != -1) {
n_remain = params.n_predict;
is_interacting = true;
}