File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,6 @@ void llamaCPP::loadModel(
339
339
340
340
gpt_params params;
341
341
342
- params.cont_batching = false ;
343
342
// By default will setting based on number of handlers
344
343
int drogon_thread = drogon::app ().getThreadNum ();
345
344
LOG_INFO << " Drogon thread is:" << drogon_thread;
@@ -351,8 +350,11 @@ void llamaCPP::loadModel(
351
350
// Check if n_parallel exists in jsonBody, if not, set to drogon_thread
352
351
353
352
params.n_parallel = (*jsonBody).get (" n_parallel" , drogon_thread).asInt ();
354
-
355
- params.cont_batching = (*jsonBody)[" cont_batching" ].asBool ();
353
+ params.n_threads =
354
+ (*jsonBody)
355
+ .get (" cpu_threads" , std::thread::hardware_concurrency ())
356
+ .asInt ();
357
+ params.cont_batching = (*jsonBody).get (" cont_batching" , false ).asBool ();
356
358
357
359
this ->user_prompt = (*jsonBody).get (" user_prompt" , " USER: " ).asString ();
358
360
this ->ai_prompt = (*jsonBody).get (" ai_prompt" , " ASSISTANT: " ).asString ();
You can’t perform that action at this time.
0 commit comments