mirror of https://github.com/google/gemma.cpp.git
Lint fix - string append, remove stale TODO
PiperOrigin-RevId: 650197468
This commit is contained in:
parent
cbb67b4ee0
commit
6a3f7cf3ea
17
gemma/run.cc
17
gemma/run.cc
|
|
@ -186,24 +186,25 @@ void Run(LoaderArgs& loader, InferenceArgs& inference, AppArgs& app) {
|
||||||
KVCache kv_cache = KVCache::Create(model.Info().model);
|
KVCache kv_cache = KVCache::Create(model.Info().model);
|
||||||
|
|
||||||
if (app.verbosity >= 1) {
|
if (app.verbosity >= 1) {
|
||||||
const std::string instructions =
|
std::string instructions =
|
||||||
std::string(
|
|
||||||
"*Usage*\n"
|
"*Usage*\n"
|
||||||
" Enter an instruction and press enter (%C resets conversation, "
|
" Enter an instruction and press enter (%C resets conversation, "
|
||||||
"%Q quits).\n")
|
"%Q quits).\n";
|
||||||
.append(
|
const std::string multiturn =
|
||||||
(inference.multiturn == 0
|
inference.multiturn == 0
|
||||||
? std::string(
|
? std::string(
|
||||||
" Since multiturn is set to 0, conversation will "
|
" Since multiturn is set to 0, conversation will "
|
||||||
"automatically reset every turn.\n\n")
|
"automatically reset every turn.\n\n")
|
||||||
: "\n"))
|
: "\n";
|
||||||
.append(
|
const std::string examples =
|
||||||
"*Examples*\n"
|
"*Examples*\n"
|
||||||
" - Write an email to grandma thanking her for the cookies.\n"
|
" - Write an email to grandma thanking her for the cookies.\n"
|
||||||
" - What are some historical attractions to visit around "
|
" - What are some historical attractions to visit around "
|
||||||
"Massachusetts?\n"
|
"Massachusetts?\n"
|
||||||
" - Compute the nth fibonacci number in javascript.\n"
|
" - Compute the nth fibonacci number in javascript.\n"
|
||||||
" - Write a standup comedy bit about GPU programming.\n");
|
" - Write a standup comedy bit about GPU programming.\n";
|
||||||
|
instructions += multiturn;
|
||||||
|
instructions += examples;
|
||||||
|
|
||||||
std::cout << "\033[2J\033[1;1H" // clear screen
|
std::cout << "\033[2J\033[1;1H" // clear screen
|
||||||
<< kAsciiArtBanner << "\n\n";
|
<< kAsciiArtBanner << "\n\n";
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,6 @@ class ArgsBase {
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline HWY_MAYBE_UNUSED bool HasHelp(int argc, char* argv[]) {
|
static inline HWY_MAYBE_UNUSED bool HasHelp(int argc, char* argv[]) {
|
||||||
// TODO(austinvhuang): handle case insensitivity
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
// no arguments - print help
|
// no arguments - print help
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue