fix code indentation.

This commit is contained in:
wbpxre150 2023-04-14 01:58:38 +08:00
parent fa651909bb
commit 315e69fd7f

View file

@ -49,7 +49,7 @@ void sigint_handler(int signo) {
void command(std::string buffer, gpt_params params, const int n_ctx ) {
// check buffer's first 3 chars equal '???' to enter command mode.
if (strncmp(buffer.c_str(), "???", 3) == 0 && buffer.length() > 3) {
if (buffer.length() <= 3 || strncmp(buffer.c_str(), "???", 3) != 0) return;
set_console_color(con_st, CONSOLE_COLOR_DEFAULT);
std::istringstream command(buffer);
int j = 0; std::string test, arg, cmd;
@ -92,7 +92,6 @@ void command(std::string buffer, gpt_params params, const int n_ctx ) {
params.temp, params.top_k, params.top_p, params.repeat_last_n, params.repeat_penalty);
printf("generate: n_ctx = %d, n_batch = %d, n_predict = %d, n_keep = %d\n", n_ctx, params.n_batch, params.n_predict, params.n_keep);
}
}
int main(int argc, char ** argv) {
gpt_params params;