@@ -901,6 +901,10 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
901901 params.interactive = true ;
902902 return true ;
903903 }
904+ if (arg == " --interactive-specials" ) {
905+ params.interactive_specials = true ;
906+ return true ;
907+ }
904908 if (arg == " --embedding" ) {
905909 params.embedding = true ;
906910 return true ;
@@ -1422,6 +1426,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
14221426 printf (" -h, --help show this help message and exit\n " );
14231427 printf (" --version show version and build info\n " );
14241428 printf (" -i, --interactive run in interactive mode\n " );
1429+ printf (" --interactive-specials allow special tokens in user text, in interactive mode\n " );
14251430 printf (" --interactive-first run in interactive mode and wait for input right away\n " );
14261431 printf (" -cnv, --conversation run in conversation mode (does not print special tokens and suffix/prefix)\n " );
14271432 printf (" -ins, --instruct run in instruction mode (use with Alpaca models)\n " );
@@ -2652,6 +2657,7 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l
26522657 dump_string_yaml_multiline (stream, " in_suffix" , params.input_prefix .c_str ());
26532658 fprintf (stream, " instruct: %s # default: false\n " , params.instruct ? " true" : " false" );
26542659 fprintf (stream, " interactive: %s # default: false\n " , params.interactive ? " true" : " false" );
2660+ fprintf (stream, " interactive_specials: %s # default: false\n " , params.interactive_specials ? " true" : " false" );
26552661 fprintf (stream, " interactive_first: %s # default: false\n " , params.interactive_first ? " true" : " false" );
26562662 fprintf (stream, " keep: %d # default: 0\n " , params.n_keep );
26572663 fprintf (stream, " logdir: %s # default: unset (no logging)\n " , params.logdir .c_str ());
0 commit comments