Skip to content

Commit 5fac587

Browse files
committed
fix psalm
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent 04a1a90 commit 5fac587

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/Controller/ChattyLLMController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ public function regenerateForSession(int $sessionId, int $messageId): JSONRespon
659659
*
660660
* @param int $taskId The message generation task ID
661661
* @param int $sessionId The chat session ID
662-
* @return JSONResponse<Http::STATUS_OK, AssistantChatAgencyMessage, array{}>|JSONResponse<Http::STATUS_EXPECTATION_FAILED, array{task_status: int}, array{}>|JSONResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_UNAUTHORIZED|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND, array{error: string}, array{}>
662+
* @return JSONResponse<Http::STATUS_OK, AssistantChatAgencyMessage, array{}>|JSONResponse<Http::STATUS_EXPECTATION_FAILED, array{task_status: int, slow_pickup: bool}, array{}>|JSONResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_UNAUTHORIZED|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND, array{error: string}, array{}>
663663
* @throws MultipleObjectsReturnedException
664664
* @throws \OCP\DB\Exception
665665
*
@@ -709,7 +709,7 @@ public function checkMessageGenerationTask(int $taskId, int $sessionId): JSONRes
709709
}
710710
} elseif ($task->getstatus() === Task::STATUS_RUNNING || $task->getstatus() === Task::STATUS_SCHEDULED) {
711711
$slowPickup = $task->getstatus() === Task::STATUS_SCHEDULED && $task->getScheduledAt() + 60 * 5 < time();
712-
return new JSONResponse(['task_status' => $task->getstatus(), 'slowPickup' => $slowPickup], Http::STATUS_EXPECTATION_FAILED);
712+
return new JSONResponse(['task_status' => $task->getstatus(), 'slow_pickup' => $slowPickup], Http::STATUS_EXPECTATION_FAILED);
713713
} elseif ($task->getstatus() === Task::STATUS_FAILED || $task->getstatus() === Task::STATUS_CANCELLED) {
714714
return new JSONResponse(['error' => 'task_failed_or_canceled', 'task_status' => $task->getstatus()], Http::STATUS_BAD_REQUEST);
715715
}

src/components/ChattyLLM/ChattyLLMInputForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ export default {
751751
reject(new Error('Message generation task check failed'))
752752
} else {
753753
console.debug('checkTaskPolling, task is still scheduled or running')
754-
this.slowPickup = error.response.data.slowPickup
754+
this.slowPickup = error.response.data.slow_pickup
755755
}
756756
})
757757
}, 2000)

0 commit comments

Comments
 (0)