@@ -128,12 +128,8 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
128
128
break ;
129
129
}
130
130
params.path_prompt_cache = argv[i];
131
- } else if (arg == " --session" ) {
132
- if (++i >= argc) {
133
- invalid_param = true ;
134
- break ;
135
- }
136
- params.path_session = argv[i];
131
+ } else if (arg == " --prompt-cache-all" ) {
132
+ params.prompt_cache_save_all = true ;
137
133
} else if (arg == " -f" || arg == " --file" ) {
138
134
if (++i >= argc) {
139
135
invalid_param = true ;
@@ -350,11 +346,6 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
350
346
gpt_print_usage (argc, argv, default_params);
351
347
exit (1 );
352
348
}
353
- if (!params.path_session .empty () && !params.path_prompt_cache .empty ()) {
354
- fprintf (stderr, " error: only one of --prompt-cache or --session may be specified\n " );
355
- gpt_print_usage (argc, argv, default_params);
356
- exit (1 );
357
- }
358
349
if (escape_prompt) {
359
350
process_escapes (params.prompt );
360
351
}
@@ -380,7 +371,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
380
371
fprintf (stderr, " prompt to start generation with (default: empty)\n " );
381
372
fprintf (stderr, " -e process prompt escapes sequences (\\ n, \\ r, \\ t, \\ ', \\\" , \\\\ )\n " );
382
373
fprintf (stderr, " --prompt-cache FNAME file to cache prompt state for faster startup (default: none)\n " );
383
- fprintf (stderr, " --session FNAME file to store prompt and generations, allowing continuation (default: none) \n " );
374
+ fprintf (stderr, " --prompt-cache-all if specified, saves user input and generations to cache as well \n " );
384
375
fprintf (stderr, " --random-prompt start with a randomized prompt.\n " );
385
376
fprintf (stderr, " --in-prefix STRING string to prefix user inputs with (default: empty)\n " );
386
377
fprintf (stderr, " --in-suffix STRING string to suffix after user inputs with (default: empty)\n " );
0 commit comments