@@ -624,7 +624,7 @@ public function createChatCompletion(
624
624
* @return array|null
625
625
*/
626
626
private function getAdminExtraParams (string $ configKey ): ?array {
627
- $ stringValue = $ this ->appConfig ->getValueString (Application::APP_ID , $ configKey );
627
+ $ stringValue = $ this ->appConfig ->getValueString (Application::APP_ID , $ configKey, lazy: true );
628
628
if ($ stringValue === '' ) {
629
629
return null ;
630
630
}
@@ -838,8 +838,8 @@ public function requestSpeechCreation(
838
838
*/
839
839
public function getExpTextProcessingTime (): int {
840
840
return $ this ->isUsingOpenAi ()
841
- ? intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'openai_text_generation_time ' , strval (Application::DEFAULT_OPENAI_TEXT_GENERATION_TIME )))
842
- : intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'localai_text_generation_time ' , strval (Application::DEFAULT_LOCALAI_TEXT_GENERATION_TIME )));
841
+ ? intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'openai_text_generation_time ' , strval (Application::DEFAULT_OPENAI_TEXT_GENERATION_TIME ), lazy: true ))
842
+ : intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'localai_text_generation_time ' , strval (Application::DEFAULT_LOCALAI_TEXT_GENERATION_TIME ), lazy: true ));
843
843
}
844
844
845
845
/**
@@ -851,9 +851,9 @@ public function updateExpTextProcessingTime(int $runtime): void {
851
851
$ newTime = (1.0 - Application::EXPECTED_RUNTIME_LOWPASS_FACTOR ) * $ oldTime + Application::EXPECTED_RUNTIME_LOWPASS_FACTOR * floatval ($ runtime );
852
852
853
853
if ($ this ->isUsingOpenAi ()) {
854
- $ this ->appConfig ->setValueString (Application::APP_ID , 'openai_text_generation_time ' , strval (intval ($ newTime )));
854
+ $ this ->appConfig ->setValueString (Application::APP_ID , 'openai_text_generation_time ' , strval (intval ($ newTime )), lazy: true );
855
855
} else {
856
- $ this ->appConfig ->setValueString (Application::APP_ID , 'localai_text_generation_time ' , strval (intval ($ newTime )));
856
+ $ this ->appConfig ->setValueString (Application::APP_ID , 'localai_text_generation_time ' , strval (intval ($ newTime )), lazy: true );
857
857
}
858
858
}
859
859
@@ -862,8 +862,8 @@ public function updateExpTextProcessingTime(int $runtime): void {
862
862
*/
863
863
public function getExpImgProcessingTime (): int {
864
864
return $ this ->isUsingOpenAi ()
865
- ? intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'openai_image_generation_time ' , strval (Application::DEFAULT_OPENAI_IMAGE_GENERATION_TIME )))
866
- : intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'localai_image_generation_time ' , strval (Application::DEFAULT_LOCALAI_IMAGE_GENERATION_TIME )));
865
+ ? intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'openai_image_generation_time ' , strval (Application::DEFAULT_OPENAI_IMAGE_GENERATION_TIME ), lazy: true ))
866
+ : intval ($ this ->appConfig ->getValueString (Application::APP_ID , 'localai_image_generation_time ' , strval (Application::DEFAULT_LOCALAI_IMAGE_GENERATION_TIME ), lazy: true ));
867
867
}
868
868
869
869
/**
@@ -875,9 +875,9 @@ public function updateExpImgProcessingTime(int $runtime): void {
875
875
$ newTime = (1.0 - Application::EXPECTED_RUNTIME_LOWPASS_FACTOR ) * $ oldTime + Application::EXPECTED_RUNTIME_LOWPASS_FACTOR * floatval ($ runtime );
876
876
877
877
if ($ this ->isUsingOpenAi ()) {
878
- $ this ->appConfig ->setValueString (Application::APP_ID , 'openai_image_generation_time ' , strval (intval ($ newTime )));
878
+ $ this ->appConfig ->setValueString (Application::APP_ID , 'openai_image_generation_time ' , strval (intval ($ newTime )), lazy: true );
879
879
} else {
880
- $ this ->appConfig ->setValueString (Application::APP_ID , 'localai_image_generation_time ' , strval (intval ($ newTime )));
880
+ $ this ->appConfig ->setValueString (Application::APP_ID , 'localai_image_generation_time ' , strval (intval ($ newTime )), lazy: true );
881
881
}
882
882
}
883
883
0 commit comments