Update main.cpp to use instruct mode
This commit is contained in:
parent
edb52ab13c
commit
1c1cf35694
1 changed files with 5 additions and 2 deletions
7
main.cpp
7
main.cpp
|
@ -210,13 +210,16 @@ int main(int argc, char ** argv) {
|
||||||
}
|
}
|
||||||
if (is_interacting) {
|
if (is_interacting) {
|
||||||
if (params.instruct) {
|
if (params.instruct) {
|
||||||
llama_update_input(ctx, "\n\n### Instruction:\n\n");
|
llama_update_input(ctx, inp_pfx);
|
||||||
|
|
||||||
printf("\n> ");
|
printf("\n> ");
|
||||||
}
|
}
|
||||||
|
|
||||||
// currently being interactive
|
// currently being interactive
|
||||||
process_interactive_input(ctx, params);
|
process_interactive_input(ctx, params);
|
||||||
|
|
||||||
|
if (params.instruct) {
|
||||||
|
llama_update_input(ctx, inp_sfx);
|
||||||
|
}
|
||||||
input_noecho = true; // do not echo this input again
|
input_noecho = true; // do not echo this input again
|
||||||
is_interacting = false;
|
is_interacting = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue