Skip to content

Commit 947b792

Browse files
committed
fix: cs fix
Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
1 parent 70d0a43 commit 947b792

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

lib/Service/SessionSummaryService.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use OCA\Assistant\Db\ChattyLLM\MessageMapper;
1616
use OCA\Assistant\Db\ChattyLLM\Session;
1717
use OCA\Assistant\Db\ChattyLLM\SessionMapper;
18-
use OCP\IAppConfig;
1918
use OCP\BackgroundJob\IJobList;
2019
use OCP\DB\Exception;
20+
use OCP\IAppConfig;
2121
use OCP\TaskProcessing\Task;
2222
use OCP\TaskProcessing\TaskTypes\TextToText;
2323
use Psr\Log\LoggerInterface;
@@ -121,15 +121,14 @@ public function getMemories(?string $userId): array {
121121
$memory = $session->getSummary();
122122
if (!$session->getIsSummaryUpToDate()) {
123123
$lastNMessages = intval($this->appConfig->getValueString(Application::APP_ID, 'chat_last_n_messages', '10'));
124-
$chatHistory = $this->messageMapper->getMessages($session->getId(),0, $lastNMessages);
125-
$memory .= "The summary is outdated. These are the last messages in the raw chat history: " . json_encode($chatHistory);
124+
$chatHistory = $this->messageMapper->getMessages($session->getId(), 0, $lastNMessages);
125+
$memory .= 'The summary is outdated. These are the last messages in the raw chat history: ' . json_encode($chatHistory);
126126
}
127127

128-
}
129-
else {
128+
} else {
130129
$lastNMessages = intval($this->appConfig->getValueString(Application::APP_ID, 'chat_last_n_messages', '10'));
131-
$chatHistory = $this->messageMapper->getMessages($session->getId(),0, $lastNMessages);
132-
$memory = "This is the raw chat history of a chat between the user and Assistant: " . json_encode($chatHistory);
130+
$chatHistory = $this->messageMapper->getMessages($session->getId(), 0, $lastNMessages);
131+
$memory = 'This is the raw chat history of a chat between the user and Assistant: ' . json_encode($chatHistory);
133132
}
134133
$memories[] = $memory;
135134
}

0 commit comments

Comments
 (0)