Skip to content

Commit 8e39dfa

Browse files
committed
Update main.cpp to use instruct mode
1 parent ce3dd8b commit 8e39dfa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,16 @@ int main(int argc, char ** argv) {
200200
}
201201
if (is_interacting) {
202202
if (params.instruct) {
203-
llama_update_input(ctx, "\n\n### Instruction:\n\n");
204-
203+
llama_update_input(ctx, inp_pfx);
205204
printf("\n> ");
206205
}
207206

208207
// currently being interactive
209208
process_interactive_input(ctx, params);
209+
210+
if (params.instruct) {
211+
llama_update_input(ctx, inp_sfx);
212+
}
210213
input_noecho = true; // do not echo this input again
211214
is_interacting = false;
212215
}

0 commit comments

Comments
 (0)