server: Add support for carry_initial_prompt#3781
Conversation
|
I just watched a talk on an AI conference about 'clankers', so I wanted to make sure to leave a note that this PR was made by a real human with a real issue he's trying to solve, and I thought opening a PR is more useful than an issue because we can discuss both on whether this PR has merit but also see and discuss code changes. For this PR specifically, my issue is that I'm migrating an application from using the CLI to using one central server and I'm missing support for |
| fprintf(stderr, " -l LANG, --language LANG [%-7s] spoken language ('auto' for auto-detect)\n", params.language.c_str()); | ||
| fprintf(stderr, " -dl, --detect-language [%-7s] exit after automatically detecting language\n", params.detect_language ? "true" : "false"); | ||
| fprintf(stderr, " --prompt PROMPT [%-7s] initial prompt\n", params.prompt.c_str()); | ||
| fprintf(stderr, " --carry-initial-prompt [%-7s] always prepend initial prompt\n", params.carry_initial_prompt ? "true" : "false"); |
There was a problem hiding this comment.
Nit: The usage output is no longer aligned:
-l LANG, --language LANG [en ] spoken language ('auto' for auto-detect)
-dl, --detect-language [false ] exit after automatically detecting language
--prompt PROMPT [ ] initial prompt
--carry-initial-prompt [false ] always prepend initial prompt
-m FNAME, --model FNAME [models/ggml-base.en.bin] model path
There was a problem hiding this comment.
Would you be okay with me adding whitespace to the other lines?
There was a problem hiding this comment.
Would you be okay with me adding whitespace to the other lines?
Yes that would be fine, thanks!
| else if (arg == "-l" || arg == "--language") { params.language = argv[++i]; } | ||
| else if (arg == "-dl" || arg == "--detect-language") { params.detect_language = true; } | ||
| else if ( arg == "--prompt") { params.prompt = argv[++i]; } | ||
| else if ( arg == "--carry-initial-prompt") { params.carry_initial_prompt = true; } |
There was a problem hiding this comment.
Nit: It would be nice to keep the if statement bodies aligned as before.
There was a problem hiding this comment.
Would you be okay with me adding whitespace to the other lines?
This adds support for carry_initial_prompt to the server, just as the CLI has it