Skip to content

Commit 1c1cf35

Browse files
committed
Update main.cpp to use instruct mode
1 parent edb52ab commit 1c1cf35

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
@@ -210,13 +210,16 @@ int main(int argc, char ** argv) {
210210
}
211211
if (is_interacting) {
212212
if (params.instruct) {
213-
llama_update_input(ctx, "\n\n### Instruction:\n\n");
214-
213+
llama_update_input(ctx, inp_pfx);
215214
printf("\n> ");
216215
}
217216

218217
// currently being interactive
219218
process_interactive_input(ctx, params);
219+
220+
if (params.instruct) {
221+
llama_update_input(ctx, inp_sfx);
222+
}
220223
input_noecho = true; // do not echo this input again
221224
is_interacting = false;
222225
}

0 commit comments

Comments
 (0)