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 fea95c6 commit 7694addCopy full SHA for 7694add
examples/main/main.cpp
@@ -798,7 +798,8 @@ int main(int argc, char ** argv) {
798
}
799
800
// In interactive mode, respect the maximum number of tokens and drop back to user input when reached.
801
- if (params.interactive && n_remain <= 0 && params.n_predict != -1) {
+ // We skip this logic when n_predict == -1 (infinite) or -2 (stop at context size).
802
+ if (params.interactive && n_remain <= 0 && params.n_predict >= 0) {
803
n_remain = params.n_predict;
804
is_interacting = true;
805
0 commit comments