Skip to content

Commit ba8ad92

Browse files
fix(OpenAiAPIService): correct text processing time update method
This commit fixes a bug where the method updateExpTextProcessingTime incorrectly called getExpImgProcessingTime. The change ensures that text and image processing times are tracked independently. Additionally, unit tests have been added to verify the correct functionality of processing time tracking for both text and image generations. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
1 parent c562202 commit ba8ad92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Service/OpenAiAPIService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ public function getExpTextProcessingTime(): int {
953953
* @return void
954954
*/
955955
public function updateExpTextProcessingTime(int $runtime): void {
956-
$oldTime = floatval($this->getExpImgProcessingTime());
956+
$oldTime = floatval($this->getExpTextProcessingTime());
957957
$newTime = (1.0 - Application::EXPECTED_RUNTIME_LOWPASS_FACTOR) * $oldTime + Application::EXPECTED_RUNTIME_LOWPASS_FACTOR * floatval($runtime);
958958

959959
if ($this->isUsingOpenAi()) {

0 commit comments

Comments
 (0)