fix code indentation.
This commit is contained in:
parent
fa651909bb
commit
315e69fd7f
1 changed files with 39 additions and 40 deletions
|
@ -49,7 +49,7 @@ void sigint_handler(int signo) {
|
||||||
|
|
||||||
void command(std::string buffer, gpt_params params, const int n_ctx ) {
|
void command(std::string buffer, gpt_params params, const int n_ctx ) {
|
||||||
// check buffer's first 3 chars equal '???' to enter command mode.
|
// 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);
|
set_console_color(con_st, CONSOLE_COLOR_DEFAULT);
|
||||||
std::istringstream command(buffer);
|
std::istringstream command(buffer);
|
||||||
int j = 0; std::string test, arg, cmd;
|
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);
|
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);
|
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) {
|
int main(int argc, char ** argv) {
|
||||||
gpt_params params;
|
gpt_params params;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue