Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ai message summary #10465

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: ai message summary #10465

wants to merge 12 commits into from

Conversation

SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Dec 9, 2024

Fix #10387
Fix #10388

Summarize messages using Ai

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
@GVodyanov
Copy link
Contributor

image

Hovering over the sparkle or the summary text brings up the disclaimer

@GVodyanov GVodyanov self-assigned this Dec 12, 2024
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick first review. Architecture looks sound, there are a few issues with code quality.

lib/Listener/NewMessagesSummarizeListener.php Outdated Show resolved Hide resolved
lib/Listener/NewMessagesSummarizeListener.php Outdated Show resolved Hide resolved
lib/Listener/TaskProcessingListener.php Outdated Show resolved Hide resolved
lib/Listener/TaskProcessingListener.php Outdated Show resolved Hide resolved
lib/Listener/TaskProcessingListener.php Outdated Show resolved Hide resolved
lib/Service/AiIntegrations/AiIntegrationsService.php Outdated Show resolved Hide resolved
lib/Service/AiIntegrations/AiIntegrationsService.php Outdated Show resolved Hide resolved
lib/Service/AiIntegrations/AiIntegrationsService.php Outdated Show resolved Hide resolved
lib/Service/AiIntegrations/AiIntegrationsService.php Outdated Show resolved Hide resolved
SebastianKrupinski and others added 9 commits December 17, 2024 16:10
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@@ -34,7 +34,7 @@ The rating depends on the installed text processing backend. See [the rating ove
Learn more about the Nextcloud Ethical AI Rating [in our blog](https://nextcloud.com/blog/nextcloud-ethical-ai-rating/).
]]></description>
<version>4.2.0-alpha.0</version>
<version>4.2.1-alpha.0</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<version>4.2.1-alpha.0</version>
<version>4.2.0-alpha.1</version>

main will become 4.2.0. The suffix is for internal versioning during the development phase. 4.2.1 will be the first patch update of 4.2.0

if ($task->getCustomId() !== null) {
[$type, $id] = explode(':', $task->getCustomId());
} else {
$this->logger->info('Error handling task processing event custom id missing');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For debuggability I suggest to log the value of the custom ID

Suggested change
$this->logger->info('Error handling task processing event custom id missing');
$this->logger->info('Error handling task processing event custom id missing', ['taskCustomId' => $task->getCustomid(), ]);

return;
}
if ($type === null || $id === null) {
$this->logger->info('Error handling task processing event custom id is invalid');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

if ($task->getOutput() !== null) {
$output = $task->getOutput();
if (isset($task->getOutput()['output'])) {
/* @psalm-suppress PossiblyInvalidCast */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on the suppressed check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

Create a short summary of every email Show email summary in the thread list
3 participants